1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/phy/nvidia,tegra194-xusb-padctl.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: NVIDIA Tegra194 XUSB pad controller 8 9maintainers: 10 - Thierry Reding <thierry.reding@gmail.com> 11 - Jon Hunter <jonathanh@nvidia.com> 12 13description: | 14 The Tegra XUSB pad controller manages a set of I/O lanes (with differential 15 signals) which connect directly to pins/pads on the SoC package. Each lane 16 is controlled by a HW block referred to as a "pad" in the Tegra hardware 17 documentation. Each such "pad" may control either one or multiple lanes, 18 and thus contains any logic common to all its lanes. Each lane can be 19 separately configured and powered up. 20 21 Some of the lanes are high-speed lanes, which can be used for PCIe, SATA or 22 super-speed USB. Other lanes are for various types of low-speed, full-speed 23 or high-speed USB (such as UTMI, ULPI and HSIC). The XUSB pad controller 24 contains a software-configurable mux that sits between the I/O controller 25 ports (e.g. PCIe) and the lanes. 26 27 In addition to per-lane configuration, USB 3.0 ports may require additional 28 settings on a per-board basis. 29 30 Pads will be represented as children of the top-level XUSB pad controller 31 device tree node. Each lane exposed by the pad will be represented by its 32 own subnode and can be referenced by users of the lane using the standard 33 PHY bindings, as described by the phy-bindings.txt file in this directory. 34 35 The Tegra hardware documentation refers to the connection between the XUSB 36 pad controller and the XUSB controller as "ports". This is confusing since 37 "port" is typically used to denote the physical USB receptacle. The device 38 tree binding in this document uses the term "port" to refer to the logical 39 abstraction of the signals that are routed to a USB receptacle (i.e. a PHY 40 for the USB signal, the VBUS power supply, the USB 2.0 companion port for 41 USB 3.0 receptacles, ...). 42 43properties: 44 compatible: 45 const: nvidia,tegra194-xusb-padctl 46 47 reg: 48 items: 49 - description: pad controller registers 50 - description: AO registers 51 52 reg-names: 53 items: 54 - const: padctl 55 - const: ao 56 57 interrupts: 58 items: 59 - description: XUSB pad controller interrupt 60 61 resets: 62 items: 63 - description: pad controller reset 64 65 reset-names: 66 items: 67 - const: padctl 68 69 avdd-usb-supply: 70 description: USB I/Os, VBUS, ID, REXT, D+/D- power supply. Must 71 supply 3.3 V. 72 73 vclamp-usb-supply: 74 description: Bias rail for USB pad. Must supply 1.8 V. 75 76 pads: 77 description: A required child node named "pads" contains a list of 78 subnodes, one for each of the pads exposed by the XUSB pad controller. 79 Each pad may need additional resources that can be referenced in its 80 pad node. 81 82 The "status" property is used to enable or disable the use of a pad. 83 If set to "disabled", the pad will not be used on the given board. In 84 order to use the pad and any of its lanes, this property must be set 85 to "okay" or absent. 86 type: object 87 additionalProperties: false 88 properties: 89 usb2: 90 type: object 91 additionalProperties: false 92 properties: 93 clocks: 94 items: 95 - description: USB2 tracking clock 96 97 clock-names: 98 items: 99 - const: trk 100 101 lanes: 102 type: object 103 additionalProperties: false 104 properties: 105 usb2-0: 106 type: object 107 additionalProperties: false 108 properties: 109 "#phy-cells": 110 const: 0 111 112 nvidia,function: 113 description: Function selection for this lane. 114 $ref: /schemas/types.yaml#/definitions/string 115 enum: [ xusb ] 116 117 usb2-1: 118 type: object 119 additionalProperties: false 120 properties: 121 "#phy-cells": 122 const: 0 123 124 nvidia,function: 125 description: Function selection for this lane. 126 $ref: /schemas/types.yaml#/definitions/string 127 enum: [ xusb ] 128 129 usb2-2: 130 type: object 131 additionalProperties: false 132 properties: 133 "#phy-cells": 134 const: 0 135 136 nvidia,function: 137 description: Function selection for this lane. 138 $ref: /schemas/types.yaml#/definitions/string 139 enum: [ xusb ] 140 141 usb2-3: 142 type: object 143 additionalProperties: false 144 properties: 145 "#phy-cells": 146 const: 0 147 148 nvidia,function: 149 description: Function selection for this lane. 150 $ref: /schemas/types.yaml#/definitions/string 151 enum: [ xusb ] 152 153 usb3: 154 type: object 155 additionalProperties: false 156 properties: 157 lanes: 158 type: object 159 additionalProperties: false 160 properties: 161 usb3-0: 162 type: object 163 additionalProperties: false 164 properties: 165 "#phy-cells": 166 const: 0 167 168 nvidia,function: 169 description: Function selection for this lane. 170 $ref: /schemas/types.yaml#/definitions/string 171 enum: [ xusb ] 172 173 usb3-1: 174 type: object 175 additionalProperties: false 176 properties: 177 "#phy-cells": 178 const: 0 179 180 nvidia,function: 181 description: Function selection for this lane. 182 $ref: /schemas/types.yaml#/definitions/string 183 enum: [ xusb ] 184 185 usb3-2: 186 type: object 187 additionalProperties: false 188 properties: 189 "#phy-cells": 190 const: 0 191 192 nvidia,function: 193 description: Function selection for this lane. 194 $ref: /schemas/types.yaml#/definitions/string 195 enum: [ xusb ] 196 197 usb3-3: 198 type: object 199 additionalProperties: false 200 properties: 201 "#phy-cells": 202 const: 0 203 204 nvidia,function: 205 description: Function selection for this lane. 206 $ref: /schemas/types.yaml#/definitions/string 207 enum: [ xusb ] 208 209 ports: 210 description: A required child node named "ports" contains a list of 211 subnodes, one for each of the ports exposed by the XUSB pad controller. 212 Each port may need additional resources that can be referenced in its 213 port node. 214 215 The "status" property is used to enable or disable the use of a port. 216 If set to "disabled", the port will not be used on the given board. In 217 order to use the port, this property must be set to "okay". 218 type: object 219 additionalProperties: false 220 properties: 221 usb2-0: 222 type: object 223 additionalProperties: false 224 properties: 225 # no need to further describe this because the connector will 226 # match on gpio-usb-b-connector or usb-b-connector and cause 227 # that binding to be selected for the subnode 228 connector: 229 type: object 230 231 mode: 232 description: A string that determines the mode in which to 233 run the port. 234 $ref: /schemas/types.yaml#/definitions/string 235 enum: [ host, peripheral, otg ] 236 237 nvidia,internal: 238 description: A boolean property whose presence determines 239 that a port is internal. In the absence of this property 240 the port is considered to be external. 241 $ref: /schemas/types.yaml#/definitions/flag 242 243 usb-role-switch: 244 description: | 245 A boolean property whole presence indicates that the port 246 supports OTG or peripheral mode. If present, the port 247 supports switching between USB host and peripheral roles. 248 A connector must be added as a subnode in that case. 249 250 See ../connector/usb-connector.yaml. 251 252 vbus-supply: 253 description: A phandle to the regulator supplying the VBUS 254 voltage. 255 256 dependencies: 257 usb-role-switch: [ connector ] 258 259 usb2-1: 260 type: object 261 additionalProperties: false 262 properties: 263 # no need to further describe this because the connector will 264 # match on gpio-usb-b-connector or usb-b-connector and cause 265 # that binding to be selected for the subnode 266 connector: 267 type: object 268 269 mode: 270 description: A string that determines the mode in which to 271 run the port. 272 $ref: /schemas/types.yaml#/definitions/string 273 enum: [ host, peripheral, otg ] 274 275 nvidia,internal: 276 description: A boolean property whose presence determines 277 that a port is internal. In the absence of this property 278 the port is considered to be external. 279 $ref: /schemas/types.yaml#/definitions/flag 280 281 usb-role-switch: 282 description: | 283 A boolean property whole presence indicates that the port 284 supports OTG or peripheral mode. If present, the port 285 supports switching between USB host and peripheral roles. 286 A connector must be added as a subnode in that case. 287 288 See ../connector/usb-connector.yaml. 289 290 vbus-supply: 291 description: A phandle to the regulator supplying the VBUS 292 voltage. 293 294 dependencies: 295 usb-role-switch: [ connector ] 296 297 usb2-2: 298 type: object 299 additionalProperties: false 300 properties: 301 # no need to further describe this because the connector will 302 # match on gpio-usb-b-connector or usb-b-connector and cause 303 # that binding to be selected for the subnode 304 connector: 305 type: object 306 307 mode: 308 description: A string that determines the mode in which to 309 run the port. 310 $ref: /schemas/types.yaml#/definitions/string 311 enum: [ host, peripheral, otg ] 312 313 nvidia,internal: 314 description: A boolean property whose presence determines 315 that a port is internal. In the absence of this property 316 the port is considered to be external. 317 $ref: /schemas/types.yaml#/definitions/flag 318 319 usb-role-switch: 320 description: | 321 A boolean property whole presence indicates that the port 322 supports OTG or peripheral mode. If present, the port 323 supports switching between USB host and peripheral roles. 324 A connector must be added as a subnode in that case. 325 326 See ../connector/usb-connector.yaml. 327 328 vbus-supply: 329 description: A phandle to the regulator supplying the VBUS 330 voltage. 331 332 dependencies: 333 usb-role-switch: [ connector ] 334 335 usb2-3: 336 type: object 337 additionalProperties: false 338 properties: 339 # no need to further describe this because the connector will 340 # match on gpio-usb-b-connector or usb-b-connector and cause 341 # that binding to be selected for the subnode 342 connector: 343 type: object 344 345 mode: 346 description: A string that determines the mode in which to 347 run the port. 348 $ref: /schemas/types.yaml#/definitions/string 349 enum: [ host, peripheral, otg ] 350 351 nvidia,internal: 352 description: A boolean property whose presence determines 353 that a port is internal. In the absence of this property 354 the port is considered to be external. 355 $ref: /schemas/types.yaml#/definitions/flag 356 357 usb-role-switch: 358 description: | 359 A boolean property whole presence indicates that the port 360 supports OTG or peripheral mode. If present, the port 361 supports switching between USB host and peripheral roles. 362 A connector must be added as a subnode in that case. 363 364 See ../connector/usb-connector.yaml. 365 366 vbus-supply: 367 description: A phandle to the regulator supplying the VBUS 368 voltage. 369 370 dependencies: 371 usb-role-switch: [ connector ] 372 373 usb3-0: 374 type: object 375 additionalProperties: false 376 properties: 377 maximum-speed: 378 description: A string property that specifies the maximum 379 supported speed of a USB3 port. 380 $ref: /schemas/types.yaml#/definitions/string 381 oneOf: 382 - description: The USB3 port supports USB 3.1 Gen 2 speed. 383 This is the default. 384 const: super-speed-plus 385 - description: The USB3 port supports USB 3.1 Gen 1 speed 386 only. 387 const: super-speed 388 389 nvidia,internal: 390 description: A boolean property whose presence determines 391 that a port is internal. In the absence of this property 392 the port is considered to be external. 393 $ref: /schemas/types.yaml#/definitions/flag 394 395 nvidia,usb2-companion: 396 description: A single cell that specifies the physical port 397 number to map this super-speed USB port to. The range of 398 valid port numbers varies with the SoC generation. 399 $ref: /schemas/types.yaml#/definitions/uint32 400 enum: [ 0, 1, 2, 3 ] 401 402 vbus-supply: 403 description: A phandle to the regulator supplying the VBUS 404 voltage. 405 406 usb3-1: 407 type: object 408 additionalProperties: false 409 properties: 410 maximum-speed: 411 description: A string property that specifies the maximum 412 supported speed of a USB3 port. 413 $ref: /schemas/types.yaml#/definitions/string 414 oneOf: 415 - description: The USB3 port supports USB 3.1 Gen 2 speed. 416 This is the default. 417 const: super-speed-plus 418 - description: The USB3 port supports USB 3.1 Gen 1 speed 419 only. 420 const: super-speed 421 422 nvidia,internal: 423 description: A boolean property whose presence determines 424 that a port is internal. In the absence of this property 425 the port is considered to be external. 426 $ref: /schemas/types.yaml#/definitions/flag 427 428 nvidia,usb2-companion: 429 description: A single cell that specifies the physical port 430 number to map this super-speed USB port to. The range of 431 valid port numbers varies with the SoC generation. 432 $ref: /schemas/types.yaml#/definitions/uint32 433 enum: [ 0, 1, 2, 3 ] 434 435 vbus-supply: 436 description: A phandle to the regulator supplying the VBUS 437 voltage. 438 439 usb3-2: 440 type: object 441 additionalProperties: false 442 properties: 443 maximum-speed: 444 description: A string property that specifies the maximum 445 supported speed of a USB3 port. 446 $ref: /schemas/types.yaml#/definitions/string 447 oneOf: 448 - description: The USB3 port supports USB 3.1 Gen 2 speed. 449 This is the default. 450 const: super-speed-plus 451 - description: The USB3 port supports USB 3.1 Gen 1 speed 452 only. 453 const: super-speed 454 455 nvidia,internal: 456 description: A boolean property whose presence determines 457 that a port is internal. In the absence of this property 458 the port is considered to be external. 459 $ref: /schemas/types.yaml#/definitions/flag 460 461 nvidia,usb2-companion: 462 description: A single cell that specifies the physical port 463 number to map this super-speed USB port to. The range of 464 valid port numbers varies with the SoC generation. 465 $ref: /schemas/types.yaml#/definitions/uint32 466 enum: [ 0, 1, 2, 3 ] 467 468 vbus-supply: 469 description: A phandle to the regulator supplying the VBUS 470 voltage. 471 472 usb3-3: 473 type: object 474 additionalProperties: false 475 properties: 476 maximum-speed: 477 description: A string property that specifies the maximum 478 supported speed of a USB3 port. 479 $ref: /schemas/types.yaml#/definitions/string 480 oneOf: 481 - description: The USB3 port supports USB 3.1 Gen 2 speed. 482 This is the default. 483 const: super-speed-plus 484 - description: The USB3 port supports USB 3.1 Gen 1 speed 485 only. 486 const: super-speed 487 488 nvidia,internal: 489 description: A boolean property whose presence determines 490 that a port is internal. In the absence of this property 491 the port is considered to be external. 492 $ref: /schemas/types.yaml#/definitions/flag 493 494 nvidia,usb2-companion: 495 description: A single cell that specifies the physical port 496 number to map this super-speed USB port to. The range of 497 valid port numbers varies with the SoC generation. 498 $ref: /schemas/types.yaml#/definitions/uint32 499 enum: [ 0, 1, 2, 3 ] 500 501 vbus-supply: 502 description: A phandle to the regulator supplying the VBUS 503 voltage. 504 505additionalProperties: false 506 507required: 508 - compatible 509 - reg 510 - resets 511 - reset-names 512 - avdd-usb-supply 513 - vclamp-usb-supply 514 515examples: 516 - | 517 #include <dt-bindings/clock/tegra194-clock.h> 518 #include <dt-bindings/gpio/tegra194-gpio.h> 519 #include <dt-bindings/interrupt-controller/arm-gic.h> 520 #include <dt-bindings/reset/tegra194-reset.h> 521 522 padctl@3520000 { 523 compatible = "nvidia,tegra194-xusb-padctl"; 524 reg = <0x03520000 0x1000>, 525 <0x03540000 0x1000>; 526 reg-names = "padctl", "ao"; 527 interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; 528 529 resets = <&bpmp TEGRA194_RESET_XUSB_PADCTL>; 530 reset-names = "padctl"; 531 532 avdd-usb-supply = <&vdd_usb_3v3>; 533 vclamp-usb-supply = <&vdd_1v8ao>; 534 535 pads { 536 usb2 { 537 clocks = <&bpmp TEGRA194_CLK_USB2_TRK>; 538 clock-names = "trk"; 539 540 lanes { 541 usb2-0 { 542 nvidia,function = "xusb"; 543 status = "disabled"; 544 #phy-cells = <0>; 545 }; 546 547 usb2-1 { 548 nvidia,function = "xusb"; 549 #phy-cells = <0>; 550 }; 551 552 usb2-2 { 553 nvidia,function = "xusb"; 554 status = "disabled"; 555 #phy-cells = <0>; 556 }; 557 558 usb2-3 { 559 nvidia,function = "xusb"; 560 #phy-cells = <0>; 561 }; 562 }; 563 }; 564 565 usb3 { 566 lanes { 567 usb3-0 { 568 nvidia,function = "xusb"; 569 #phy-cells = <0>; 570 }; 571 572 usb3-1 { 573 nvidia,function = "xusb"; 574 status = "disabled"; 575 #phy-cells = <0>; 576 }; 577 578 usb3-2 { 579 nvidia,function = "xusb"; 580 status = "disabled"; 581 #phy-cells = <0>; 582 }; 583 584 usb3-3 { 585 nvidia,function = "xusb"; 586 #phy-cells = <0>; 587 }; 588 }; 589 }; 590 }; 591 592 ports { 593 usb2-0 { 594 status = "disabled"; 595 }; 596 597 usb2-1 { 598 vbus-supply = <&vdd_5v0_sys>; 599 mode = "host"; 600 }; 601 602 usb2-2 { 603 status = "disabled"; 604 }; 605 606 usb2-3 { 607 vbus-supply = <&vdd_5v_sata>; 608 mode = "host"; 609 }; 610 611 usb3-0 { 612 vbus-supply = <&vdd_5v0_sys>; 613 nvidia,usb2-companion = <1>; 614 }; 615 616 usb3-1 { 617 status = "disabled"; 618 }; 619 620 usb3-2 { 621 status = "disabled"; 622 }; 623 624 usb3-3 { 625 maximum-speed = "super-speed"; 626 vbus-supply = <&vdd_5v0_sys>; 627 nvidia,usb2-companion = <3>; 628 }; 629 }; 630 }; 631