blob: d2a7d2ecf48a84af4dda36ef46bf4c7fa4730cbc [file] [log] [blame]
Tom Rini762f85b2024-07-20 11:15:10 -06001# 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-common.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: USB2 ChipIdea USB controller Common Properties
8
9maintainers:
10 - Xu Yang <xu.yang_2@nxp.com>
11
12properties:
13 reg:
14 minItems: 1
15 maxItems: 2
16
17 interrupts:
18 minItems: 1
19 maxItems: 2
20
21 clocks:
22 minItems: 1
23 maxItems: 3
24
25 clock-names:
26 minItems: 1
27 maxItems: 3
28
29 dr_mode: true
30
31 power-domains:
32 maxItems: 1
33
34 resets:
35 maxItems: 1
36
37 reset-names:
38 maxItems: 1
39
40 "#reset-cells":
41 const: 1
42
43 phy_type: true
44
45 itc-setting:
46 description:
47 interrupt threshold control register control, the setting should be
48 aligned with ITC bits at register USBCMD.
49 $ref: /schemas/types.yaml#/definitions/uint32
50
51 ahb-burst-config:
52 description:
53 it is vendor dependent, the required value should be aligned with
54 AHBBRST at SBUSCFG, the range is from 0x0 to 0x7. This property is
55 used to change AHB burst configuration, check the chipidea spec for
56 meaning of each value. If this property is not existed, it will use
57 the reset value.
58 $ref: /schemas/types.yaml#/definitions/uint32
59 minimum: 0x0
60 maximum: 0x7
61
62 tx-burst-size-dword:
63 description:
64 it is vendor dependent, the tx burst size in dword (4 bytes), This
65 register represents the maximum length of a the burst in 32-bit
66 words while moving data from system memory to the USB bus, the value
67 of this property will only take effect if property "ahb-burst-config"
68 is set to 0, if this property is missing the reset default of the
69 hardware implementation will be used.
70 $ref: /schemas/types.yaml#/definitions/uint32
71 minimum: 0x0
72 maximum: 0x20
73
74 rx-burst-size-dword:
75 description:
76 it is vendor dependent, the rx burst size in dword (4 bytes), This
77 register represents the maximum length of a the burst in 32-bit words
78 while moving data from the USB bus to system memory, the value of
79 this property will only take effect if property "ahb-burst-config"
80 is set to 0, if this property is missing the reset default of the
81 hardware implementation will be used.
82 $ref: /schemas/types.yaml#/definitions/uint32
83 minimum: 0x0
84 maximum: 0x20
85
86 extcon:
87 description:
88 Phandles to external connector devices. First phandle should point
89 to external connector, which provide "USB" cable events, the second
90 should point to external connector device, which provide "USB-HOST"
91 cable events. If one of the external connector devices is not
92 required, empty <0> phandle should be specified.
93 $ref: /schemas/types.yaml#/definitions/phandle-array
94 minItems: 1
95 items:
96 - description: vbus extcon
97 - description: id extcon
98
99 phy-clkgate-delay-us:
100 description:
101 The delay time (us) between putting the PHY into low power mode and
102 gating the PHY clock.
103
104 non-zero-ttctrl-ttha:
105 description:
106 After setting this property, the value of register ttctrl.ttha
107 will be 0x7f; if not, the value will be 0x0, this is the default
108 value. It needs to be very carefully for setting this property, it
109 is recommended that consult with your IC engineer before setting
110 this value. On the most of chipidea platforms, the "usage_tt" flag
111 at RTL is 0, so this property only affects siTD.
112
113 If this property is not set, the max packet size is 1023 bytes, and
114 if the total of packet size for previous transactions are more than
115 256 bytes, it can't accept any transactions within this frame. The
116 use case is single transaction, but higher frame rate.
117
118 If this property is set, the max packet size is 188 bytes, it can
119 handle more transactions than above case, it can accept transactions
120 until it considers the left room size within frame is less than 188
121 bytes, software needs to make sure it does not send more than 90%
122 maximum_periodic_data_per_frame. The use case is multiple
123 transactions, but less frame rate.
124 type: boolean
125
126 mux-controls:
127 description:
128 The mux control for toggling host/device output of this controller.
129 It's expected that a mux state of 0 indicates device mode and a mux
130 state of 1 indicates host mode.
131 maxItems: 1
132
133 mux-control-names:
134 const: usb_switch
135
136 pinctrl-names:
137 description:
138 Names for optional pin modes in "default", "host", "device".
139 In case of HSIC-mode, "idle" and "active" pin modes are mandatory.
140 In this case, the "idle" state needs to pull down the data and
141 strobe pin and the "active" state needs to pull up the strobe pin.
142 oneOf:
143 - items:
144 - const: idle
145 - const: active
146 - items:
147 - const: default
148 - const: host
149 - const: device
150 - items:
151 - const: default
152 - enum:
153 - host
154 - device
155 - items:
156 - const: default
157
158 pinctrl-0:
159 maxItems: 1
160
161 pinctrl-1:
162 maxItems: 1
163
164 phys:
165 maxItems: 1
166
167 phy-names:
168 const: usb-phy
169
170 vbus-supply:
171 description: reference to the VBUS regulator.
172
173 usb-phy:
174 description: phandle for the PHY device. Use "phys" instead.
175 maxItems: 1
176 deprecated: true
177
178 port:
179 description:
180 Any connector to the data bus of this controller should be modelled
181 using the OF graph bindings specified, if the "usb-role-switch"
182 property is used.
183 $ref: /schemas/graph.yaml#/properties/port
184
185 reset-gpios:
186 maxItems: 1
187
188dependencies:
189 port: [ usb-role-switch ]
190 mux-controls: [ mux-control-names ]
191
192required:
193 - reg
194 - interrupts
195
196allOf:
197 - $ref: usb-hcd.yaml#
198 - $ref: usb-drd.yaml#
199
200additionalProperties: true