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