cdns,usb3.yaml 2.39 KB
Newer Older
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
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/cdns,usb3.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cadence USBSS-DRD controller bindings

maintainers:
  - Pawel Laszczak <pawell@cadence.com>

properties:
  compatible:
    const: cdns,usb3

  reg:
    items:
      - description: OTG controller registers
      - description: XHCI Host controller registers
      - description: DEVICE controller registers

  reg-names:
    items:
      - const: otg
      - const: xhci
      - const: dev

  interrupts:
29
    minItems: 3
30 31 32
    items:
      - description: XHCI host controller interrupt
      - description: Device controller interrupt
33
      - description: OTG/DRD controller interrupt
34 35
      - description: interrupt used to wake up core, e.g when usbcmd.rs is
                     cleared by xhci core, this interrupt is optional
36 37

  interrupt-names:
38
    minItems: 3
39 40 41 42
    items:
      - const: host
      - const: peripheral
      - const: otg
43
      - const: wakeup
44 45 46 47 48 49 50 51

  dr_mode:
    enum: [host, otg, peripheral]

  maximum-speed:
    enum: [super-speed, high-speed, full-speed]

  phys:
52 53
    minItems: 1
    maxItems: 2
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68

  phy-names:
    minItems: 1
    maxItems: 2
    items:
      anyOf:
        - const: cdns3,usb2-phy
        - const: cdns3,usb3-phy

  cdns,on-chip-buff-size:
    description:
      size of memory intended as internal memory for endpoints
      buffers expressed in KB
    $ref: /schemas/types.yaml#/definitions/uint32

69 70 71 72
  cdns,phyrst-a-enable:
    description: Enable resetting of PHY if Rx fail is detected
    type: boolean

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
required:
  - compatible
  - reg
  - reg-names
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    bus {
        #address-cells = <2>;
        #size-cells = <2>;

        usb@6000000 {
            compatible = "cdns,usb3";
            reg = <0x00 0x6000000 0x00 0x10000>,
                  <0x00 0x6010000 0x00 0x10000>,
                  <0x00 0x6020000 0x00 0x10000>;
            reg-names = "otg", "xhci", "dev";
            interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "host", "peripheral", "otg";
            maximum-speed = "super-speed";
            dr_mode = "otg";
        };
    };