xref: /linux/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml (revision c5288cda69ee2d8607f5026bd599a5cebf0ee783)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/usb/chipidea,usb2-imx.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP USB2 ChipIdea USB controller
8
9maintainers:
10  - Xu Yang <xu.yang_2@nxp.com>
11
12properties:
13  compatible:
14    oneOf:
15      - enum:
16          - fsl,imx27-usb
17      - items:
18          - enum:
19              - fsl,imx23-usb
20              - fsl,imx25-usb
21              - fsl,imx28-usb
22              - fsl,imx35-usb
23              - fsl,imx50-usb
24              - fsl,imx51-usb
25              - fsl,imx53-usb
26              - fsl,imx6q-usb
27              - fsl,imx6sl-usb
28              - fsl,imx6sx-usb
29              - fsl,imx6ul-usb
30              - fsl,imx7d-usb
31              - fsl,vf610-usb
32          - const: fsl,imx27-usb
33      - items:
34          - enum:
35              - fsl,imx8dxl-usb
36              - fsl,imx8ulp-usb
37          - const: fsl,imx7ulp-usb
38          - const: fsl,imx6ul-usb
39      - items:
40          - enum:
41              - fsl,imx8mm-usb
42              - fsl,imx8mn-usb
43              - fsl,imx93-usb
44          - const: fsl,imx7d-usb
45          - const: fsl,imx27-usb
46      - items:
47          - enum:
48              - fsl,imx6sll-usb
49              - fsl,imx7ulp-usb
50          - const: fsl,imx6ul-usb
51          - const: fsl,imx27-usb
52
53  reg:
54    maxItems: 1
55
56  interrupts:
57    maxItems: 1
58
59  clocks:
60    minItems: 1
61    maxItems: 3
62
63  clock-names:
64    minItems: 1
65    maxItems: 3
66
67  fsl,usbmisc:
68    description:
69      Phandler of non-core register device, with one argument that
70      indicate usb controller index
71    $ref: /schemas/types.yaml#/definitions/phandle-array
72    items:
73      - items:
74          - description: phandle to usbmisc node
75          - description: index of usb controller
76
77  disable-over-current:
78    type: boolean
79    description: disable over current detect
80
81  over-current-active-low:
82    type: boolean
83    description: over current signal polarity is active low
84
85  over-current-active-high:
86    type: boolean
87    description:
88      Over current signal polarity is active high. It's recommended to
89      specify the over current polarity.
90
91  power-active-high:
92    type: boolean
93    description: power signal polarity is active high
94
95  external-vbus-divider:
96    type: boolean
97    description: enables off-chip resistor divider for Vbus
98
99  samsung,picophy-pre-emp-curr-control:
100    description:
101      HS Transmitter Pre-Emphasis Current Control. This signal controls
102      the amount of current sourced to the USB_OTG*_DP and USB_OTG*_DN
103      pins after a J-to-K or K-to-J transition. The range is from 0x0 to
104      0x3, the default value is 0x1. Details can refer to TXPREEMPAMPTUNE0
105      bits of USBNC_n_PHY_CFG1.
106    $ref: /schemas/types.yaml#/definitions/uint32
107    minimum: 0x0
108    maximum: 0x3
109
110  samsung,picophy-dc-vol-level-adjust:
111    description:
112      HS DC Voltage Level Adjustment. Adjust the high-speed transmitter DC
113      level voltage. The range is from 0x0 to 0xf, the default value is
114      0x3. Details can refer to TXVREFTUNE0 bits of USBNC_n_PHY_CFG1.
115    $ref: /schemas/types.yaml#/definitions/uint32
116    minimum: 0x0
117    maximum: 0xf
118
119  fsl,picophy-rise-fall-time-adjust:
120    description:
121      HS Transmitter Rise/Fall Time Adjustment. Adjust the rise/fall times
122      of the high-speed transmitter waveform. It has no unit. The rise/fall
123      time will be increased or decreased by a certain percentage relative
124      to design default time. (0:-10%; 1:design default; 2:+15%; 3:+20%)
125      Details can refer to TXRISETUNE0 bit of USBNC_n_PHY_CFG1.
126    $ref: /schemas/types.yaml#/definitions/uint32
127    minimum: 0
128    maximum: 3
129    default: 1
130
131  fsl,usbphy:
132    description: phandle of usb phy that connects to the port. Use "phys" instead.
133    $ref: /schemas/types.yaml#/definitions/phandle
134    deprecated: true
135
136required:
137  - compatible
138
139allOf:
140  - $ref: chipidea,usb2-common.yaml#
141  - if:
142      properties:
143        phy_type:
144          const: hsic
145      required:
146        - phy_type
147    then:
148      properties:
149        pinctrl-names:
150          items:
151            - const: idle
152            - const: active
153
154  # imx27 Soc needs three clocks
155  - if:
156      properties:
157        compatible:
158          const: fsl,imx27-usb
159    then:
160      properties:
161        clocks:
162          minItems: 3
163        clock-names:
164          items:
165            - const: ipg
166            - const: ahb
167            - const: per
168
169  # imx25 and imx35 Soc need three clocks
170  - if:
171      properties:
172        compatible:
173          contains:
174            enum:
175              - fsl,imx25-usb
176              - fsl,imx35-usb
177    then:
178      properties:
179        clocks:
180          minItems: 3
181        clock-names:
182          items:
183            - const: ipg
184            - const: ahb
185            - const: per
186
187  # imx93 Soc needs two clocks
188  - if:
189      properties:
190        compatible:
191          contains:
192            enum:
193              - fsl,imx93-usb
194    then:
195      properties:
196        clocks:
197          minItems: 2
198          maxItems: 2
199        clock-names:
200          items:
201            - const: usb_ctrl_root
202            - const: usb_wakeup
203
204  # imx7d Soc need one clock
205  - if:
206      properties:
207        compatible:
208          items:
209            - const: fsl,imx7d-usb
210            - const: fsl,imx27-usb
211    then:
212      properties:
213        clocks:
214          maxItems: 1
215        clock-names: false
216
217  # other Soc need one clock
218  - if:
219      properties:
220        compatible:
221          contains:
222            enum:
223              - fsl,imx23-usb
224              - fsl,imx28-usb
225              - fsl,imx50-usb
226              - fsl,imx51-usb
227              - fsl,imx53-usb
228              - fsl,imx6q-usb
229              - fsl,imx6sl-usb
230              - fsl,imx6sx-usb
231              - fsl,imx6ul-usb
232              - fsl,imx8mm-usb
233              - fsl,imx8mn-usb
234              - fsl,vf610-usb
235    then:
236      properties:
237        clocks:
238          maxItems: 1
239        clock-names: false
240
241unevaluatedProperties: false
242
243examples:
244  - |
245    #include <dt-bindings/interrupt-controller/arm-gic.h>
246    #include <dt-bindings/clock/imx7d-clock.h>
247
248    usb@30b10000 {
249        compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
250        reg = <0x30b10000 0x200>;
251        interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
252        clocks = <&clks IMX7D_USB_CTRL_CLK>;
253        fsl,usbphy = <&usbphynop1>;
254        fsl,usbmisc = <&usbmisc1 0>;
255        phy-clkgate-delay-us = <400>;
256    };
257
258  # Example for HSIC:
259  - |
260    #include <dt-bindings/interrupt-controller/arm-gic.h>
261    #include <dt-bindings/clock/imx6qdl-clock.h>
262
263    usb@2184400 {
264        compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
265        reg = <0x02184400 0x200>;
266        interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>;
267        clocks = <&clks IMX6QDL_CLK_USBOH3>;
268        fsl,usbphy = <&usbphynop1>;
269        fsl,usbmisc = <&usbmisc 2>;
270        phy_type = "hsic";
271        dr_mode = "host";
272        ahb-burst-config = <0x0>;
273        tx-burst-size-dword = <0x10>;
274        rx-burst-size-dword = <0x10>;
275        pinctrl-names = "idle", "active";
276        pinctrl-0 = <&pinctrl_usbh2_idle>;
277        pinctrl-1 = <&pinctrl_usbh2_active>;
278        #address-cells = <1>;
279        #size-cells = <0>;
280
281        ethernet@1 {
282            compatible = "usb424,9730";
283            reg = <1>;
284        };
285    };
286
287...
288