From: Roger Quadros <rogerq@ti.com>
To: <balbi@kernel.org>
Cc: <pawell@cadence.com>, <kurahul@cadence.com>, <nsekhar@ti.com>,
<vigneshr@ti.com>, <robh+dt@kernel.org>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>, Roger Quadros <rogerq@ti.com>
Subject: [PATCH v3 1/3] dt-bindings: usb: Convert cdns-usb3.txt to YAML schema
Date: Tue, 15 Sep 2020 14:45:41 +0300 [thread overview]
Message-ID: <20200915114543.2599-2-rogerq@ti.com> (raw)
In-Reply-To: <20200915114543.2599-1-rogerq@ti.com>
Converts cdns-usb3.txt to YAML schema cdns,usb3.yaml
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
.../devicetree/bindings/usb/cdns,usb3.yaml | 92 +++++++++++++++++++
.../devicetree/bindings/usb/cdns-usb3.txt | 45 ---------
2 files changed, 92 insertions(+), 45 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/cdns,usb3.yaml
delete mode 100644 Documentation/devicetree/bindings/usb/cdns-usb3.txt
diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
new file mode 100644
index 000000000000..9b14c8443d39
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
@@ -0,0 +1,92 @@
+# 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:
+ items:
+ - description: OTG/DRD controller interrupt
+ - description: XHCI host controller interrupt
+ - description: Device controller interrupt
+
+ interrupt-names:
+ items:
+ - const: host
+ - const: peripheral
+ - const: otg
+
+ dr_mode:
+ enum: [host, otg, peripheral]
+
+ maximum-speed:
+ enum: [super-speed, high-speed, full-speed]
+
+ phys:
+ minItems: 1
+ maxItems: 2
+
+ 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
+
+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";
+ };
+ };
diff --git a/Documentation/devicetree/bindings/usb/cdns-usb3.txt b/Documentation/devicetree/bindings/usb/cdns-usb3.txt
deleted file mode 100644
index b7dc606d37b5..000000000000
--- a/Documentation/devicetree/bindings/usb/cdns-usb3.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-Binding for the Cadence USBSS-DRD controller
-
-Required properties:
- - reg: Physical base address and size of the controller's register areas.
- Controller has 3 different regions:
- - HOST registers area
- - DEVICE registers area
- - OTG/DRD registers area
- - reg-names - register memory area names:
- "xhci" - for HOST registers space
- "dev" - for DEVICE registers space
- "otg" - for OTG/DRD registers space
- - compatible: Should contain: "cdns,usb3"
- - interrupts: Interrupts used by cdns3 controller:
- "host" - interrupt used by XHCI driver.
- "peripheral" - interrupt used by device driver
- "otg" - interrupt used by DRD/OTG part of driver
-
-Optional properties:
- - maximum-speed : valid arguments are "super-speed", "high-speed" and
- "full-speed"; refer to usb/generic.txt
- - dr_mode: Should be one of "host", "peripheral" or "otg".
- - phys: reference to the USB PHY
- - phy-names: from the *Generic PHY* bindings;
- Supported names are:
- - cdns3,usb2-phy
- - cdns3,usb3-phy
-
- - cdns,on-chip-buff-size : size of memory intended as internal memory for endpoints
- buffers expressed in KB
-
-Example:
- usb@f3000000 {
- compatible = "cdns,usb3";
- interrupts = <GIC_USB_IRQ 7 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_USB_IRQ 7 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_USB_IRQ 8 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "host", "peripheral", "otg";
- reg = <0xf3000000 0x10000>, /* memory area for HOST registers */
- <0xf3010000 0x10000>, /* memory area for DEVICE registers */
- <0xf3020000 0x10000>; /* memory area for OTG/DRD registers */
- reg-names = "xhci", "dev", "otg";
- phys = <&usb2_phy>, <&usb3_phy>;
- phy-names = "cdns3,usb2-phy", "cnds3,usb3-phy";
- };
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2020-09-15 12:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 11:45 [PATCH v3 0/3] usb: cdns,usb3: Convert DT binding to YAML Roger Quadros
2020-09-15 11:45 ` Roger Quadros [this message]
2020-09-23 1:27 ` [PATCH v3 1/3] dt-bindings: usb: Convert cdns-usb3.txt to YAML schema Rob Herring
2020-09-15 11:45 ` [PATCH v3 2/3] dt-bindings: usb: cdns,usb3: Add cdns,phyrst-a-enable property Roger Quadros
2020-09-15 16:15 ` Sergei Shtylyov
2020-09-24 9:51 ` Roger Quadros
2020-09-15 11:45 ` [PATCH v3 3/3] usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockup Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200915114543.2599-2-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=balbi@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kurahul@cadence.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=pawell@cadence.com \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).