xref: /openbmc/linux/Documentation/devicetree/bindings/usb/dwc2.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1f3ca745dSBenjamin Gaignard# SPDX-License-Identifier: GPL-2.0
2f3ca745dSBenjamin Gaignard%YAML 1.2
3f3ca745dSBenjamin Gaignard---
4f3ca745dSBenjamin Gaignard$id: http://devicetree.org/schemas/usb/dwc2.yaml#
5f3ca745dSBenjamin Gaignard$schema: http://devicetree.org/meta-schemas/core.yaml#
6f3ca745dSBenjamin Gaignard
784e85359SKrzysztof Kozlowskititle: DesignWare HS OTG USB 2.0 controller
8f3ca745dSBenjamin Gaignard
9f3ca745dSBenjamin Gaignardmaintainers:
10f3ca745dSBenjamin Gaignard  - Rob Herring <robh@kernel.org>
11f3ca745dSBenjamin Gaignard
12bb88dbbeSFabrice GasnierallOf:
13bb88dbbeSFabrice Gasnier  - $ref: usb-drd.yaml#
1454bd6c9aSFabrice Gasnier  - $ref: usb-hcd.yaml#
15bb88dbbeSFabrice Gasnier
16f3ca745dSBenjamin Gaignardproperties:
17f3ca745dSBenjamin Gaignard  compatible:
18f3ca745dSBenjamin Gaignard    oneOf:
19f3ca745dSBenjamin Gaignard      - const: brcm,bcm2835-usb
20f3ca745dSBenjamin Gaignard      - const: hisilicon,hi6220-usb
219cd6576fS周琰杰 (Zhou Yanjie)      - const: ingenic,jz4775-otg
229cd6576fS周琰杰 (Zhou Yanjie)      - const: ingenic,jz4780-otg
239cd6576fS周琰杰 (Zhou Yanjie)      - const: ingenic,x1000-otg
249cd6576fS周琰杰 (Zhou Yanjie)      - const: ingenic,x1600-otg
259cd6576fS周琰杰 (Zhou Yanjie)      - const: ingenic,x1700-otg
269cd6576fS周琰杰 (Zhou Yanjie)      - const: ingenic,x1830-otg
279cd6576fS周琰杰 (Zhou Yanjie)      - const: ingenic,x2000-otg
28f3ca745dSBenjamin Gaignard      - items:
29f3ca745dSBenjamin Gaignard          - const: rockchip,rk3066-usb
30f3ca745dSBenjamin Gaignard          - const: snps,dwc2
31f3ca745dSBenjamin Gaignard      - items:
3295b18f28SJohan Jonker          - enum:
3395b18f28SJohan Jonker              - rockchip,px30-usb
3495b18f28SJohan Jonker              - rockchip,rk3036-usb
355032b269SJohan Jonker              - rockchip,rk3128-usb
3695b18f28SJohan Jonker              - rockchip,rk3188-usb
3795b18f28SJohan Jonker              - rockchip,rk3228-usb
3895b18f28SJohan Jonker              - rockchip,rk3288-usb
3956d42614STobias Schramm              - rockchip,rk3308-usb
4095b18f28SJohan Jonker              - rockchip,rk3328-usb
417334c822SJohan Jonker              - rockchip,rk3368-usb
4295b18f28SJohan Jonker              - rockchip,rv1108-usb
43f3ca745dSBenjamin Gaignard          - const: rockchip,rk3066-usb
44f3ca745dSBenjamin Gaignard          - const: snps,dwc2
45f3ca745dSBenjamin Gaignard      - const: lantiq,arx100-usb
4661dd457cSLinus Walleij      - const: lantiq,ase-usb
4761dd457cSLinus Walleij      - const: lantiq,danube-usb
48f3ca745dSBenjamin Gaignard      - const: lantiq,xrx200-usb
4961dd457cSLinus Walleij      - const: lantiq,xrx300-usb
50f3ca745dSBenjamin Gaignard      - items:
5128d5ee04SNeil Armstrong          - enum:
5228d5ee04SNeil Armstrong              - amlogic,meson8-usb
5328d5ee04SNeil Armstrong              - amlogic,meson8b-usb
5428d5ee04SNeil Armstrong              - amlogic,meson-gxbb-usb
5528d5ee04SNeil Armstrong              - amlogic,meson-g12a-usb
56448841d9SKrzysztof Kozlowski              - amlogic,meson-a1-usb
57f3ca745dSBenjamin Gaignard              - intel,socfpga-agilex-hsotg
58f3ca745dSBenjamin Gaignard          - const: snps,dwc2
59704c70faSChristian Lamparter      - const: amcc,dwc-otg
60f3ca745dSBenjamin Gaignard      - const: apm,apm82181-dwc-otg
61f3ca745dSBenjamin Gaignard      - const: snps,dwc2
62f3ca745dSBenjamin Gaignard      - const: st,stm32f4x9-fsotg
63f3ca745dSBenjamin Gaignard      - const: st,stm32f4x9-hsotg
64d4985011SAmelie Delaunay      - const: st,stm32f7-hsotg
651a21240dSBenjamin Gaignard      - const: st,stm32mp15-fsotg
66d4985011SAmelie Delaunay      - items:
671a21240dSBenjamin Gaignard          - const: st,stm32mp15-hsotg
68f3ca745dSBenjamin Gaignard          - const: snps,dwc2
69728390fcSDinh Nguyen      - const: samsung,s3c6400-hsotg
70f3ca745dSBenjamin Gaignard      - const: intel,socfpga-agilex-hsotg
71f3ca745dSBenjamin Gaignard
72f3ca745dSBenjamin Gaignard  reg:
73f3ca745dSBenjamin Gaignard    maxItems: 1
74f3ca745dSBenjamin Gaignard
75f3ca745dSBenjamin Gaignard  interrupts:
76f3ca745dSBenjamin Gaignard    maxItems: 1
77f3ca745dSBenjamin Gaignard
78*28f75a39SFabrice Gasnier  clocks:
79*28f75a39SFabrice Gasnier    minItems: 1
80f3ca745dSBenjamin Gaignard    maxItems: 2
81f3ca745dSBenjamin Gaignard
82f3ca745dSBenjamin Gaignard  clock-names:
83f3ca745dSBenjamin Gaignard    items:
84*28f75a39SFabrice Gasnier      - const: otg
85*28f75a39SFabrice Gasnier      - const: utmi
86f3ca745dSBenjamin Gaignard    minItems: 1
874b9ff41fSKrzysztof Kozlowski
884b9ff41fSKrzysztof Kozlowski  disable-over-current:
894b9ff41fSKrzysztof Kozlowski    type: boolean
904b9ff41fSKrzysztof Kozlowski    description: whether to disable detection of over-current condition.
911b5f9a04SKrzysztof Kozlowski
921b5f9a04SKrzysztof Kozlowski  iommus:
931b5f9a04SKrzysztof Kozlowski    maxItems: 1
94f3ca745dSBenjamin Gaignard
95f3ca745dSBenjamin Gaignard  resets:
96f3ca745dSBenjamin Gaignard    items:
97f3ca745dSBenjamin Gaignard      - description: common reset
98f3ca745dSBenjamin Gaignard      - description: ecc reset
99f3ca745dSBenjamin Gaignard    minItems: 1
100f3ca745dSBenjamin Gaignard
101f3ca745dSBenjamin Gaignard  reset-names:
102f3ca745dSBenjamin Gaignard    items:
103f3ca745dSBenjamin Gaignard      - const: dwc2
104f3ca745dSBenjamin Gaignard      - const: dwc2-ecc
105f3ca745dSBenjamin Gaignard    minItems: 1
106f3ca745dSBenjamin Gaignard
107f3ca745dSBenjamin Gaignard  phys:
108f3ca745dSBenjamin Gaignard    maxItems: 1
109f3ca745dSBenjamin Gaignard
110f3ca745dSBenjamin Gaignard  phy-names:
111f3ca745dSBenjamin Gaignard    const: usb2-phy
1120b714009SJohan Jonker
1130b714009SJohan Jonker  power-domains:
1140b714009SJohan Jonker    maxItems: 1
115f3ca745dSBenjamin Gaignard
116f3ca745dSBenjamin Gaignard  vbus-supply:
117f3ca745dSBenjamin Gaignard    description: reference to the VBUS regulator. Depending on the current mode
118f3ca745dSBenjamin Gaignard      this is enabled (in "host" mode") or disabled (in "peripheral" mode). The
119f3ca745dSBenjamin Gaignard      regulator is updated if the controller is configured in "otg" mode and the
120f3ca745dSBenjamin Gaignard      status changes between "host" and "peripheral".
121f3ca745dSBenjamin Gaignard
122f3ca745dSBenjamin Gaignard  vusb_d-supply:
123f3ca745dSBenjamin Gaignard    description: phandle to voltage regulator of digital section,
124f3ca745dSBenjamin Gaignard
125f3ca745dSBenjamin Gaignard  vusb_a-supply:
126f3ca745dSBenjamin Gaignard    description: phandle to voltage regulator of analog section.
1271a21240dSBenjamin Gaignard
128d4985011SAmelie Delaunay  usb33d-supply:
129d4985011SAmelie Delaunay    description: reference to the VBUS and ID sensing comparators supply, in
130d4985011SAmelie Delaunay      order to perform OTG operation, used on STM32MP15 SoCs.
131bb88dbbeSFabrice Gasnier
132f3ca745dSBenjamin Gaignard  dr_mode: true
133924e2b40SFabrice Gasnier
134924e2b40SFabrice Gasnier  otg-rev: true
135924e2b40SFabrice Gasnier
136924e2b40SFabrice Gasnier  hnp-disable: true
137924e2b40SFabrice Gasnier
138924e2b40SFabrice Gasnier  srp-disable: true
139bb88dbbeSFabrice Gasnier
14014793faeSAmelie Delaunay  usb-role-switch: true
141942cdbc1SFabrice Gasnier
142942cdbc1SFabrice Gasnier  role-switch-default-mode: true
143f3ca745dSBenjamin Gaignard
144f3ca745dSBenjamin Gaignard  g-rx-fifo-size:
145f3ca745dSBenjamin Gaignard    $ref: /schemas/types.yaml#/definitions/uint32
146f3ca745dSBenjamin Gaignard    description: size of rx fifo size in gadget mode.
147f3ca745dSBenjamin Gaignard
148f3ca745dSBenjamin Gaignard  g-np-tx-fifo-size:
149f3ca745dSBenjamin Gaignard    $ref: /schemas/types.yaml#/definitions/uint32
150f3ca745dSBenjamin Gaignard    description: size of non-periodic tx fifo size in gadget mode.
151f3ca745dSBenjamin Gaignard
152f3ca745dSBenjamin Gaignard  g-tx-fifo-size:
153f3ca745dSBenjamin Gaignard    $ref: /schemas/types.yaml#/definitions/uint32-array
154f3ca745dSBenjamin Gaignard    description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
155f3ca745dSBenjamin Gaignard
156f3ca745dSBenjamin Gaignard  snps,need-phy-for-wake:
157f516fb70SRob Herring    $ref: /schemas/types.yaml#/definitions/flag
158f516fb70SRob Herring    description: If present indicates that the phy needs to be left on for
159f3ca745dSBenjamin Gaignard      remote wakeup during suspend.
160f3ca745dSBenjamin Gaignard
161f3ca745dSBenjamin Gaignard  snps,reset-phy-on-wake:
162f516fb70SRob Herring    $ref: /schemas/types.yaml#/definitions/flag
163f516fb70SRob Herring    description: If present indicates that we need to reset the PHY when we
164f3ca745dSBenjamin Gaignard      detect a wakeup. This is due to a hardware errata.
165ba67723fSFabrice Gasnier
166ba67723fSFabrice Gasnier  port:
167ba67723fSFabrice Gasnier    description:
168ba67723fSFabrice Gasnier      Any connector to the data bus of this controller should be modelled
169ba67723fSFabrice Gasnier      using the OF graph bindings specified, if the "usb-role-switch"
170ba67723fSFabrice Gasnier      property is used.
171ba67723fSFabrice Gasnier    $ref: /schemas/graph.yaml#/properties/port
17254bd6c9aSFabrice Gasnier
17354bd6c9aSFabrice Gasnier  tpl-support: true
174ba67723fSFabrice Gasnier
175ba67723fSFabrice Gasnierdependencies:
176942cdbc1SFabrice Gasnier  port: [ usb-role-switch ]
177ba67723fSFabrice Gasnier  role-switch-default-mode: [ usb-role-switch ]
178f3ca745dSBenjamin Gaignard
179f3ca745dSBenjamin Gaignardrequired:
180f3ca745dSBenjamin Gaignard  - compatible
181f3ca745dSBenjamin Gaignard  - reg
182f3ca745dSBenjamin Gaignard  - interrupts
183f3ca745dSBenjamin Gaignard  - clocks
184f3ca745dSBenjamin Gaignard  - clock-names
185f3ca745dSBenjamin Gaignard
186f3ca745dSBenjamin GaignardadditionalProperties: false
187f3ca745dSBenjamin Gaignard
188f3ca745dSBenjamin Gaignardexamples:
189f3ca745dSBenjamin Gaignard  - |
190f3ca745dSBenjamin Gaignard      usb@101c0000 {
191f3ca745dSBenjamin Gaignard        compatible = "rockchip,rk3066-usb", "snps,dwc2";
192f3ca745dSBenjamin Gaignard        reg = <0x10180000 0x40000>;
193f3ca745dSBenjamin Gaignard        interrupts = <18>;
194f3ca745dSBenjamin Gaignard        clocks = <&usb_otg_ahb_clk>;
195f3ca745dSBenjamin Gaignard        clock-names = "otg";
196f3ca745dSBenjamin Gaignard        phys = <&usbphy>;
197f3ca745dSBenjamin Gaignard        phy-names = "usb2-phy";
198f3ca745dSBenjamin Gaignard      };
199f3ca745dSBenjamin Gaignard
200...
201