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