xref: /linux/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml (revision 6aec97513a8c26a6f9c7a0424a2c55d6751e0c33)
1*6aec9751SNeil Armstrong# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*6aec9751SNeil Armstrong# Copyright 2019 BayLibre, SAS
3*6aec9751SNeil Armstrong%YAML 1.2
4*6aec9751SNeil Armstrong---
5*6aec9751SNeil Armstrong$id: "http://devicetree.org/schemas/usb/amlogic,meson-g12a-usb-ctrl.yaml#"
6*6aec9751SNeil Armstrong$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7*6aec9751SNeil Armstrong
8*6aec9751SNeil Armstrongtitle: Amlogic Meson G12A DWC3 USB SoC Controller Glue
9*6aec9751SNeil Armstrong
10*6aec9751SNeil Armstrongmaintainers:
11*6aec9751SNeil Armstrong  - Neil Armstrong <narmstrong@baylibre.com>
12*6aec9751SNeil Armstrong
13*6aec9751SNeil Armstrongdescription: |
14*6aec9751SNeil Armstrong  The Amlogic G12A embeds a DWC3 USB IP Core configured for USB2 and USB3
15*6aec9751SNeil Armstrong  in host-only mode, and a DWC2 IP Core configured for USB2 peripheral mode
16*6aec9751SNeil Armstrong  only.
17*6aec9751SNeil Armstrong
18*6aec9751SNeil Armstrong  A glue connects the DWC3 core to USB2 PHYs and optionally to an USB3 PHY.
19*6aec9751SNeil Armstrong
20*6aec9751SNeil Armstrong  One of the USB2 PHYs can be re-routed in peripheral mode to a DWC2 USB IP.
21*6aec9751SNeil Armstrong
22*6aec9751SNeil Armstrong  The DWC3 Glue controls the PHY routing and power, an interrupt line is
23*6aec9751SNeil Armstrong  connected to the Glue to serve as OTG ID change detection.
24*6aec9751SNeil Armstrong
25*6aec9751SNeil Armstrongproperties:
26*6aec9751SNeil Armstrong  compatible:
27*6aec9751SNeil Armstrong    enum:
28*6aec9751SNeil Armstrong      - amlogic,meson-g12a-usb-ctrl
29*6aec9751SNeil Armstrong
30*6aec9751SNeil Armstrong  ranges: true
31*6aec9751SNeil Armstrong
32*6aec9751SNeil Armstrong  "#address-cells":
33*6aec9751SNeil Armstrong    enum: [ 1, 2 ]
34*6aec9751SNeil Armstrong
35*6aec9751SNeil Armstrong  "#size-cells":
36*6aec9751SNeil Armstrong    enum: [ 1, 2 ]
37*6aec9751SNeil Armstrong
38*6aec9751SNeil Armstrong  clocks:
39*6aec9751SNeil Armstrong    minItems: 1
40*6aec9751SNeil Armstrong
41*6aec9751SNeil Armstrong  resets:
42*6aec9751SNeil Armstrong    minItems: 1
43*6aec9751SNeil Armstrong
44*6aec9751SNeil Armstrong  reg:
45*6aec9751SNeil Armstrong    maxItems: 1
46*6aec9751SNeil Armstrong
47*6aec9751SNeil Armstrong  interrupts:
48*6aec9751SNeil Armstrong    maxItems: 1
49*6aec9751SNeil Armstrong
50*6aec9751SNeil Armstrong  phy-names:
51*6aec9751SNeil Armstrong    items:
52*6aec9751SNeil Armstrong      - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
53*6aec9751SNeil Armstrong      - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
54*6aec9751SNeil Armstrong      - const: usb3-phy0 # USB3 PHY if USB3_0 is used
55*6aec9751SNeil Armstrong
56*6aec9751SNeil Armstrong  phys:
57*6aec9751SNeil Armstrong    minItems: 1
58*6aec9751SNeil Armstrong    maxItems: 3
59*6aec9751SNeil Armstrong
60*6aec9751SNeil Armstrong  dr_mode: true
61*6aec9751SNeil Armstrong
62*6aec9751SNeil Armstrong  power-domains:
63*6aec9751SNeil Armstrong    maxItems: 1
64*6aec9751SNeil Armstrong
65*6aec9751SNeil Armstrong  vbus-supply:
66*6aec9751SNeil Armstrong    description: VBUS power supply when used in OTG switchable mode
67*6aec9751SNeil Armstrong
68*6aec9751SNeil ArmstrongpatternProperties:
69*6aec9751SNeil Armstrong  "^usb@[0-9a-f]+$":
70*6aec9751SNeil Armstrong    type: object
71*6aec9751SNeil Armstrong
72*6aec9751SNeil ArmstrongadditionalProperties: false
73*6aec9751SNeil Armstrong
74*6aec9751SNeil Armstrongrequired:
75*6aec9751SNeil Armstrong  - compatible
76*6aec9751SNeil Armstrong  - "#address-cells"
77*6aec9751SNeil Armstrong  - "#size-cells"
78*6aec9751SNeil Armstrong  - ranges
79*6aec9751SNeil Armstrong  - clocks
80*6aec9751SNeil Armstrong  - resets
81*6aec9751SNeil Armstrong  - reg
82*6aec9751SNeil Armstrong  - interrupts
83*6aec9751SNeil Armstrong  - phy-names
84*6aec9751SNeil Armstrong  - phys
85*6aec9751SNeil Armstrong  - dr_mode
86*6aec9751SNeil Armstrong
87*6aec9751SNeil Armstrongexamples:
88*6aec9751SNeil Armstrong  - |
89*6aec9751SNeil Armstrong    usb: usb@ffe09000 {
90*6aec9751SNeil Armstrong          compatible = "amlogic,meson-g12a-usb-ctrl";
91*6aec9751SNeil Armstrong          reg = <0x0 0xffe09000 0x0 0xa0>;
92*6aec9751SNeil Armstrong          interrupts = <16>;
93*6aec9751SNeil Armstrong          #address-cells = <1>;
94*6aec9751SNeil Armstrong          #size-cells = <1>;
95*6aec9751SNeil Armstrong          ranges;
96*6aec9751SNeil Armstrong
97*6aec9751SNeil Armstrong          clocks = <&clkc_usb>;
98*6aec9751SNeil Armstrong          resets = <&reset_usb>;
99*6aec9751SNeil Armstrong
100*6aec9751SNeil Armstrong          dr_mode = "otg";
101*6aec9751SNeil Armstrong
102*6aec9751SNeil Armstrong          phys = <&usb2_phy0>, <&usb2_phy1>, <&usb3_phy0>;
103*6aec9751SNeil Armstrong          phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0";
104*6aec9751SNeil Armstrong
105*6aec9751SNeil Armstrong          dwc2: usb@ff400000 {
106*6aec9751SNeil Armstrong              compatible = "amlogic,meson-g12a-usb", "snps,dwc2";
107*6aec9751SNeil Armstrong              reg = <0xff400000 0x40000>;
108*6aec9751SNeil Armstrong              interrupts = <31>;
109*6aec9751SNeil Armstrong              clocks = <&clkc_usb1>;
110*6aec9751SNeil Armstrong              clock-names = "ddr";
111*6aec9751SNeil Armstrong              phys = <&usb2_phy1>;
112*6aec9751SNeil Armstrong              dr_mode = "peripheral";
113*6aec9751SNeil Armstrong              g-rx-fifo-size = <192>;
114*6aec9751SNeil Armstrong              g-np-tx-fifo-size = <128>;
115*6aec9751SNeil Armstrong              g-tx-fifo-size = <128 128 16 16 16>;
116*6aec9751SNeil Armstrong          };
117*6aec9751SNeil Armstrong
118*6aec9751SNeil Armstrong          dwc3: usb@ff500000 {
119*6aec9751SNeil Armstrong              compatible = "snps,dwc3";
120*6aec9751SNeil Armstrong              reg = <0xff500000 0x100000>;
121*6aec9751SNeil Armstrong              interrupts = <30>;
122*6aec9751SNeil Armstrong              dr_mode = "host";
123*6aec9751SNeil Armstrong              snps,dis_u2_susphy_quirk;
124*6aec9751SNeil Armstrong              snps,quirk-frame-length-adjustment;
125*6aec9751SNeil Armstrong          };
126*6aec9751SNeil Armstrong    };
127*6aec9751SNeil Armstrong
128