xref: /freebsd/sys/contrib/device-tree/Bindings/usb/cdns,usb3.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
16be33864SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/usb/cdns,usb3.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Cadence USBSS-DRD controller
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
106be33864SEmmanuel Vadot  - Pawel Laszczak <pawell@cadence.com>
116be33864SEmmanuel Vadot
126be33864SEmmanuel Vadotproperties:
136be33864SEmmanuel Vadot  compatible:
146be33864SEmmanuel Vadot    const: cdns,usb3
156be33864SEmmanuel Vadot
166be33864SEmmanuel Vadot  reg:
176be33864SEmmanuel Vadot    items:
186be33864SEmmanuel Vadot      - description: OTG controller registers
196be33864SEmmanuel Vadot      - description: XHCI Host controller registers
206be33864SEmmanuel Vadot      - description: DEVICE controller registers
216be33864SEmmanuel Vadot
226be33864SEmmanuel Vadot  reg-names:
236be33864SEmmanuel Vadot    items:
246be33864SEmmanuel Vadot      - const: otg
256be33864SEmmanuel Vadot      - const: xhci
266be33864SEmmanuel Vadot      - const: dev
276be33864SEmmanuel Vadot
286be33864SEmmanuel Vadot  interrupts:
295def4c47SEmmanuel Vadot    minItems: 3
306be33864SEmmanuel Vadot    items:
316be33864SEmmanuel Vadot      - description: XHCI host controller interrupt
326be33864SEmmanuel Vadot      - description: Device controller interrupt
335956d97fSEmmanuel Vadot      - description: OTG/DRD controller interrupt
345def4c47SEmmanuel Vadot      - description: interrupt used to wake up core, e.g when usbcmd.rs is
355def4c47SEmmanuel Vadot                     cleared by xhci core, this interrupt is optional
366be33864SEmmanuel Vadot
376be33864SEmmanuel Vadot  interrupt-names:
385def4c47SEmmanuel Vadot    minItems: 3
396be33864SEmmanuel Vadot    items:
406be33864SEmmanuel Vadot      - const: host
416be33864SEmmanuel Vadot      - const: peripheral
426be33864SEmmanuel Vadot      - const: otg
435def4c47SEmmanuel Vadot      - const: wakeup
446be33864SEmmanuel Vadot
45*0e8011faSEmmanuel Vadot  port:
46*0e8011faSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/port
47*0e8011faSEmmanuel Vadot    description:
48*0e8011faSEmmanuel Vadot      This port is used with the 'usb-role-switch' property to connect the
49*0e8011faSEmmanuel Vadot      cdns3 to type C connector.
506be33864SEmmanuel Vadot
516be33864SEmmanuel Vadot  maximum-speed:
526be33864SEmmanuel Vadot    enum: [super-speed, high-speed, full-speed]
536be33864SEmmanuel Vadot
546be33864SEmmanuel Vadot  phys:
556be33864SEmmanuel Vadot    minItems: 1
566be33864SEmmanuel Vadot    maxItems: 2
576be33864SEmmanuel Vadot
586be33864SEmmanuel Vadot  phy-names:
596be33864SEmmanuel Vadot    minItems: 1
606be33864SEmmanuel Vadot    maxItems: 2
616be33864SEmmanuel Vadot    items:
626be33864SEmmanuel Vadot      anyOf:
636be33864SEmmanuel Vadot        - const: cdns3,usb2-phy
646be33864SEmmanuel Vadot        - const: cdns3,usb3-phy
656be33864SEmmanuel Vadot
666be33864SEmmanuel Vadot  cdns,on-chip-buff-size:
676be33864SEmmanuel Vadot    description:
686be33864SEmmanuel Vadot      size of memory intended as internal memory for endpoints
696be33864SEmmanuel Vadot      buffers expressed in KB
70fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint16
716be33864SEmmanuel Vadot
726be33864SEmmanuel Vadot  cdns,phyrst-a-enable:
736be33864SEmmanuel Vadot    description: Enable resetting of PHY if Rx fail is detected
746be33864SEmmanuel Vadot    type: boolean
756be33864SEmmanuel Vadot
76*0e8011faSEmmanuel Vadotdependencies:
77*0e8011faSEmmanuel Vadot  port: [ usb-role-switch ]
78*0e8011faSEmmanuel Vadot
796be33864SEmmanuel Vadotrequired:
806be33864SEmmanuel Vadot  - compatible
816be33864SEmmanuel Vadot  - reg
826be33864SEmmanuel Vadot  - reg-names
836be33864SEmmanuel Vadot  - interrupts
845956d97fSEmmanuel Vadot  - interrupt-names
856be33864SEmmanuel Vadot
86*0e8011faSEmmanuel VadotallOf:
87*0e8011faSEmmanuel Vadot  - $ref: usb-drd.yaml#
88*0e8011faSEmmanuel Vadot
89*0e8011faSEmmanuel VadotunevaluatedProperties: false
906be33864SEmmanuel Vadot
916be33864SEmmanuel Vadotexamples:
926be33864SEmmanuel Vadot  - |
936be33864SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
946be33864SEmmanuel Vadot    bus {
956be33864SEmmanuel Vadot        #address-cells = <2>;
966be33864SEmmanuel Vadot        #size-cells = <2>;
976be33864SEmmanuel Vadot
986be33864SEmmanuel Vadot        usb@6000000 {
996be33864SEmmanuel Vadot            compatible = "cdns,usb3";
1006be33864SEmmanuel Vadot            reg = <0x00 0x6000000 0x00 0x10000>,
1016be33864SEmmanuel Vadot                  <0x00 0x6010000 0x00 0x10000>,
1026be33864SEmmanuel Vadot                  <0x00 0x6020000 0x00 0x10000>;
1036be33864SEmmanuel Vadot            reg-names = "otg", "xhci", "dev";
1046be33864SEmmanuel Vadot            interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
1056be33864SEmmanuel Vadot                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
1066be33864SEmmanuel Vadot                         <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
1076be33864SEmmanuel Vadot            interrupt-names = "host", "peripheral", "otg";
1086be33864SEmmanuel Vadot            maximum-speed = "super-speed";
1096be33864SEmmanuel Vadot            dr_mode = "otg";
1106be33864SEmmanuel Vadot        };
1116be33864SEmmanuel Vadot    };
112