Linux Audio

Check our new training course

Embedded Linux Audio

Check our new training course
with Creative Commons CC-BY-SA
lecture materials

Bootlin logo

Elixir Cross Referencer

Loading...
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/nvidia,tegra210-xusb-padctl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NVIDIA Tegra210 XUSB pad controller

maintainers:
  - Thierry Reding <thierry.reding@gmail.com>
  - Jon Hunter <jonathanh@nvidia.com>

description: |
  The Tegra XUSB pad controller manages a set of I/O lanes (with differential
  signals) which connect directly to pins/pads on the SoC package. Each lane
  is controlled by a HW block referred to as a "pad" in the Tegra hardware
  documentation. Each such "pad" may control either one or multiple lanes,
  and thus contains any logic common to all its lanes. Each lane can be
  separately configured and powered up.

  Some of the lanes are high-speed lanes, which can be used for PCIe, SATA or
  super-speed USB. Other lanes are for various types of low-speed, full-speed
  or high-speed USB (such as UTMI, ULPI and HSIC). The XUSB pad controller
  contains a software-configurable mux that sits between the I/O controller
  ports (e.g. PCIe) and the lanes.

  In addition to per-lane configuration, USB 3.0 ports may require additional
  settings on a per-board basis.

  Pads will be represented as children of the top-level XUSB pad controller
  device tree node. Each lane exposed by the pad will be represented by its
  own subnode and can be referenced by users of the lane using the standard
  PHY bindings, as described by the phy-bindings.txt file in this directory.

  The Tegra hardware documentation refers to the connection between the XUSB
  pad controller and the XUSB controller as "ports". This is confusing since
  "port" is typically used to denote the physical USB receptacle. The device
  tree binding in this document uses the term "port" to refer to the logical
  abstraction of the signals that are routed to a USB receptacle (i.e. a PHY
  for the USB signal, the VBUS power supply, the USB 2.0 companion port for
  USB 3.0 receptacles, ...).

properties:
  compatible:
    const: nvidia,tegra210-xusb-padctl

  reg:
    maxItems: 1

  resets:
    items:
      - description: pad controller reset

  interrupts:
    items:
      - description: XUSB pad controller interrupt

  reset-names:
    items:
      - const: padctl

  avdd-pll-utmip-supply:
    description: UTMI PLL power supply. Must supply 1.8 V.

  avdd-pll-uerefe-supply:
    description: PLLE reference PLL power supply. Must supply 1.05 V.

  dvdd-pex-pll-supply:
    description: PCIe/USB3 PLL power supply. Must supply 1.05 V.

  hvdd-pex-pll-e-supply:
    description: High-voltage PLLE power supply. Must supply 1.8 V.

  nvidia,pmc:
    description: phandle to the Tegra Power Management Controller (PMC) node
    $ref: /schemas/types.yaml#/definitions/phandle

  pads:
    description: A required child node named "pads" contains a list of
      subnodes, one for each of the pads exposed by the XUSB pad controller.
      Each pad may need additional resources that can be referenced in its
      pad node.

      The "status" property is used to enable or disable the use of a pad.
      If set to "disabled", the pad will not be used on the given board. In
      order to use the pad and any of its lanes, this property must be set
      to "okay" or be absent.
    type: object
    additionalProperties: false
    properties:
      usb2:
        type: object
        additionalProperties: false
        properties:
          clocks:
            items:
              - description: USB2 tracking clock

          clock-names:
            items:
              - const: trk

          lanes:
            type: object
            additionalProperties: false
            properties:
              usb2-0:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ snps, xusb, uart ]

              usb2-1:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ snps, xusb, uart ]

              usb2-2:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ snps, xusb, uart ]

              usb2-3:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ snps, xusb, uart ]

      hsic:
        type: object
        additionalProperties: false
        properties:
          clocks:
            items:
              - description: HSIC tracking clock

          clock-names:
            items:
              - const: trk

          lanes:
            type: object
            additionalProperties: false
            properties:
              hsic-0:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ snps, xusb ]

              hsic-1:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ snps, xusb ]

      pcie:
        type: object
        additionalProperties: false
        properties:
          clocks:
            items:
              - description: PCIe PLL clock source

          clock-names:
            items:
              - const: pll

          resets:
            items:
              - description: PCIe PHY reset

          reset-names:
            items:
              - const: phy

          lanes:
            type: object
            additionalProperties: false
            properties:
              pcie-0:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ pcie-x1, usb3-ss, pcie-x4 ]

              pcie-1:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ pcie-x1, usb3-ss, pcie-x4 ]

              pcie-2:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ pcie-x1, usb3-ss, pcie-x4 ]

              pcie-3:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ pcie-x1, usb3-ss, pcie-x4 ]

              pcie-4:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ pcie-x1, usb3-ss, pcie-x4 ]

              pcie-5:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ pcie-x1, usb3-ss, pcie-x4 ]

              pcie-6:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ pcie-x1, usb3-ss, pcie-x4 ]

      sata:
        type: object
        additionalProperties: false
        properties:
          clocks:
            items:
              - description: SATA PLL clock source

          clock-names:
            items:
              - const: pll

          resets:
            items:
              - description: SATA PHY reset

          reset-names:
            items:
              - const: phy

          lanes:
            type: object
            additionalProperties: false
            properties:
              sata-0:
                type: object
                additionalProperties: false
                properties:
                  "#phy-cells":
                    const: 0

                  nvidia,function:
                    description: Function selection for this lane.
                    $ref: /schemas/types.yaml#/definitions/string
                    enum: [ usb3-ss, sata ]

  ports:
    description: A required child node named "ports" contains a list of
      subnodes, one for each of the ports exposed by the XUSB pad controller.
      Each port may need additional resources that can be referenced in its
      port node.

      The "status" property is used to enable or disable the use of a port.
      If set to "disabled", the port will not be used on the given board. In
      order to use the port, this property must be set to "okay".
    type: object
    additionalProperties: false
    properties:
      usb2-0:
        type: object
        additionalProperties: false
        properties:
          # no need to further describe this because the connector will
          # match on gpio-usb-b-connector or usb-b-connector and cause
          # that binding to be selected for the subnode
          connector:
            type: object

          mode:
            description: A string that determines the mode in which to
              run the port.
            $ref: /schemas/types.yaml#/definitions/string
            enum: [ host, peripheral, otg ]

          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          usb-role-switch:
            description: |
              A boolean property whole presence indicates that the port
              supports OTG or peripheral mode. If present, the port
              supports switching between USB host and peripheral roles.
              A connector must be added as a subnode in that case.

              See ../connector/usb-connector.yaml.

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

        dependencies:
          usb-role-switch: [ connector ]

      usb2-1:
        type: object
        additionalProperties: false
        properties:
          # no need to further describe this because the connector will
          # match on gpio-usb-b-connector or usb-b-connector and cause
          # that binding to be selected for the subnode
          connector:
            type: object

          mode:
            description: A string that determines the mode in which to
              run the port.
            $ref: /schemas/types.yaml#/definitions/string
            enum: [ host, peripheral, otg ]

          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          usb-role-switch:
            description: |
              A boolean property whole presence indicates that the port
              supports OTG or peripheral mode. If present, the port
              supports switching between USB host and peripheral roles.
              A connector must be added as a subnode in that case.

              See ../connector/usb-connector.yaml.

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

        dependencies:
          usb-role-switch: [ connector ]

      usb2-2:
        type: object
        additionalProperties: false
        properties:
          # no need to further describe this because the connector will
          # match on gpio-usb-b-connector or usb-b-connector and cause
          # that binding to be selected for the subnode
          connector:
            type: object

          mode:
            description: A string that determines the mode in which to
              run the port.
            $ref: /schemas/types.yaml#/definitions/string
            enum: [ host, peripheral, otg ]

          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          usb-role-switch:
            description: |
              A boolean property whole presence indicates that the port
              supports OTG or peripheral mode. If present, the port
              supports switching between USB host and peripheral roles.
              A connector must be added as a subnode in that case.

              See ../connector/usb-connector.yaml.

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

        dependencies:
          usb-role-switch: [ connector ]

      usb2-3:
        type: object
        additionalProperties: false
        properties:
          # no need to further describe this because the connector will
          # match on gpio-usb-b-connector or usb-b-connector and cause
          # that binding to be selected for the subnode
          connector:
            type: object

          mode:
            description: A string that determines the mode in which to
              run the port.
            $ref: /schemas/types.yaml#/definitions/string
            enum: [ host, peripheral, otg ]

          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          usb-role-switch:
            description: |
              A boolean property whole presence indicates that the port
              supports OTG or peripheral mode. If present, the port
              supports switching between USB host and peripheral roles.
              A connector must be added as a subnode in that case.

              See ../connector/usb-connector.yaml.

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

        dependencies:
          usb-role-switch: [ connector ]

      hsic-0:
        type: object
        additionalProperties: false
        properties:
          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

      hsic-1:
        type: object
        additionalProperties: false
        properties:
          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

      usb3-0:
        type: object
        additionalProperties: false
        properties:
          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          nvidia,usb2-companion:
            description: A single cell that specifies the physical port
              number to map this super-speed USB port to. The range of
              valid port numbers varies with the SoC generation.
            $ref: /schemas/types.yaml#/definitions/uint32
            enum: [ 0, 1, 2, 3 ]

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

      usb3-1:
        type: object
        additionalProperties: false
        properties:
          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          nvidia,usb2-companion:
            description: A single cell that specifies the physical port
              number to map this super-speed USB port to. The range of
              valid port numbers varies with the SoC generation.
            $ref: /schemas/types.yaml#/definitions/uint32
            enum: [ 0, 1, 2, 3 ]

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

      usb3-2:
        type: object
        additionalProperties: false
        properties:
          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          nvidia,usb2-companion:
            description: A single cell that specifies the physical port
              number to map this super-speed USB port to. The range of
              valid port numbers varies with the SoC generation.
            $ref: /schemas/types.yaml#/definitions/uint32
            enum: [ 0, 1, 2, 3 ]

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

      usb3-3:
        type: object
        additionalProperties: false
        properties:
          nvidia,internal:
            description: A boolean property whose presence determines
              that a port is internal. In the absence of this property
              the port is considered to be external.
            $ref: /schemas/types.yaml#/definitions/flag

          nvidia,usb2-companion:
            description: A single cell that specifies the physical port
              number to map this super-speed USB port to. The range of
              valid port numbers varies with the SoC generation.
            $ref: /schemas/types.yaml#/definitions/uint32
            enum: [ 0, 1, 2, 3 ]

          vbus-supply:
            description: A phandle to the regulator supplying the VBUS
              voltage.

additionalProperties: false

required:
  - avdd-pll-utmip-supply
  - avdd-pll-uerefe-supply
  - dvdd-pex-pll-supply
  - hvdd-pex-pll-e-supply

examples:
  - |
    #include <dt-bindings/clock/tegra210-car.h>
    #include <dt-bindings/gpio/tegra-gpio.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    padctl@7009f000 {
        compatible = "nvidia,tegra210-xusb-padctl";
        reg = <0x7009f000 0x1000>;
        interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
        resets = <&tegra_car 142>;
        reset-names = "padctl";

        avdd-pll-utmip-supply = <&vdd_1v8>;
        avdd-pll-uerefe-supply = <&vdd_pex_1v05>;
        dvdd-pex-pll-supply = <&vdd_pex_1v05>;
        hvdd-pex-pll-e-supply = <&vdd_1v8>;

        pads {
            usb2 {
                clocks = <&tegra_car TEGRA210_CLK_USB2_TRK>;
                clock-names = "trk";

                lanes {
                    usb2-0 {
                        nvidia,function = "xusb";
                        #phy-cells = <0>;
                    };

                    usb2-1 {
                        nvidia,function = "xusb";
                        #phy-cells = <0>;
                    };

                    usb2-2 {
                        nvidia,function = "xusb";
                        #phy-cells = <0>;
                    };

                    usb2-3 {
                        nvidia,function = "xusb";
                        #phy-cells = <0>;
                    };
                };
            };

            hsic {
                clocks = <&tegra_car TEGRA210_CLK_HSIC_TRK>;
                clock-names = "trk";
                status = "disabled";

                lanes {
                    hsic-0 {
                        status = "disabled";
                        #phy-cells = <0>;
                    };

                    hsic-1 {
                        status = "disabled";
                        #phy-cells = <0>;
                    };
                };
            };

            pcie {
                clocks = <&tegra_car TEGRA210_CLK_PLL_E>;
                clock-names = "pll";
                resets = <&tegra_car 205>;
                reset-names = "phy";

                lanes {
                    pcie-0 {
                        nvidia,function = "pcie-x1";
                        #phy-cells = <0>;
                    };

                    pcie-1 {
                        nvidia,function = "pcie-x4";
                        #phy-cells = <0>;
                    };

                    pcie-2 {
                        nvidia,function = "pcie-x4";
                        #phy-cells = <0>;
                    };

                    pcie-3 {
                        nvidia,function = "pcie-x4";
                        #phy-cells = <0>;
                    };

                    pcie-4 {
                        nvidia,function = "pcie-x4";
                        #phy-cells = <0>;
                    };

                    pcie-5 {
                        nvidia,function = "usb3-ss";
                        #phy-cells = <0>;
                    };

                    pcie-6 {
                        nvidia,function = "usb3-ss";
                        #phy-cells = <0>;
                    };
                };
            };

            sata {
                clocks = <&tegra_car TEGRA210_CLK_PLL_E>;
                clock-names = "pll";
                resets = <&tegra_car 204>;
                reset-names = "phy";

                lanes {
                    sata-0 {
                        nvidia,function = "sata";
                        #phy-cells = <0>;
                    };
                };
            };
        };

        ports {
            usb2-0 {
                mode = "peripheral";
                usb-role-switch;

                connector {
                    compatible = "gpio-usb-b-connector",
                                 "usb-b-connector";
                    label = "micro-USB";
                    type = "micro";
                    vbus-gpios = <&gpio TEGRA_GPIO(CC, 4) GPIO_ACTIVE_LOW>;
                };
            };

            usb2-1 {
                vbus-supply = <&vdd_5v0_rtl>;
                mode = "host";
            };

            usb2-2 {
                vbus-supply = <&vdd_usb_vbus>;
                mode = "host";
            };

            usb2-3 {
                mode = "host";
            };

            hsic-0 {
                status = "disabled";
            };

            hsic-1 {
                status = "disabled";
            };

            usb3-0 {
                nvidia,usb2-companion = <1>;
            };

            usb3-1 {
                nvidia,usb2-companion = <2>;
            };

            usb3-2 {
                status = "disabled";
            };

            usb3-3 {
                status = "disabled";
            };
        };
    };