[PATCH RFC 1/5] dt-bindings: add binding for CDNSP-DRD controller

Pawel Laszczak
2020-06-26T04:58:25Z

This patch aim at documenting USB related dt-bindings for the
Cadence CDNSP-DRD controller.

Signed-off-by: Pawel Laszczak <pawell@cadence.com>
---
.../devicetree/bindings/usb/cdns-cdnsp.yaml | 104 ++++++++++++++++++
1 file changed, 104 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/cdns-cdnsp.yaml

diff --git a/Documentation/devicetree/bindings/usb/cdns-cdnsp.yaml b/Documentation/devicetree/bindings/usb/cdns-cdnsp.yaml
new file mode 100644
index 000000000000..83d353711e31
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/cdns-cdnsp.yaml
@@ -0,0 +1,104 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/usb/cdns-cdnsp.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Device tree binding for Cadence CDNSP (Super Speed Plus) controller
+
+maintainers:
+ - Pawel Laszczak <pawell@cadence.com>
+
+description:
+ The Cadence CDNSP controller support Host, Device and DRD mode.
+ It also supports Full Speed, Hight Speed, Super Speed and
+ Super Speed Plus protocols.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - cdns,usbssp
+
+ reg:
+ description: Physical base address and size of the
+ controller's register areas. Controller has
+ three different regions.
+ minItems: 2
+ maxItems: 3
+ items:
+ - description: HOST registers area.
+ - description: DEVICE registers area.
+ - description: OTG/DRD registers area.
+
+ reg-names:
+ items:
+ - const: xhci
+ - const: dev
+ - const: otg
+
+ interrupts:
+ minItems: 2
+ maxItems: 3
+ items:
+ - description: Interrupt used by XHCI driver.
+ - description: Interrupt used by device driver.
+ - description: Interrupt used by DRD part of driver.
+
+ interrupt-names:
+ items:
+ - const: host
+ - const: peripheral
+ - const: otg
+
+ maximum-speed:
+ enum:
+ - full-speed
+ - high-speed
+ - super-speed
+ - super-speed-plus
+
+ dr_mode:
+ enum:
+ - host
+ - peripheral
+ - otg
+
+ phys:
+ description:
+ Reference to the USB PHY.
+ Must contain an entry for each entry in phy-names.
+ See ../phy/phy-bindings.txt for details.
+
+ phy-names:
+ items:
+ - const: cdnsp,usb2-phy
+ - const: cdnsp,usb3-phy
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - interrupt-names
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ usb_otg: usb@f3000000 {
+ compatible = "cdns,usbssp";
+ reg = <0x00 0x01c13000 0x00 0x0400>,
+ <0x00 0xf3010000 0x00 0x10000>,
+ <0x00 0xf3020000 0x00 0x10000>;
+ reg-names = "xhci", "dev", "otg";
+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "host", "peripheral", "otg";
+ phys = <&usbphy 0>;
+ phy-names = "cdnsp,usb2-phy", "cdnsp,usb3-phy";
+ dr_mode = "peripheral";
+ };
+
+...
--
2.17.1