Skip to contentSkip to conversation

dt-bindings: usb: uhci: convert to dt schema

PATCH Superseded Mohammad Shehar Yaar Tausif 2 participants 2 messages Apr 20, 2024 – Apr 21, 2024

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: usb: uhci: convert to dt schema

Convert USB UHCI bindings to DT schema

---
 .../devicetree/bindings/usb/usb-uhci.txt      | 18 ---------
 .../devicetree/bindings/usb/usb-uhci.yaml     | 39 +++++++++++++++++++
 2 files changed, 39 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/usb-uhci.txt
 create mode 100644 Documentation/devicetree/bindings/usb/usb-uhci.yaml
Documentation/devicetree/bindings/usb/usb-uhci.txt deleted +0 -18
deleted file mode 100644
index d1702eb2c8bd..000000000000
@@ -1,18 +0,0 @@
-Generic Platform UHCI Controller
------------------------------------------------------
-
-Required properties:
-- compatible : "generic-uhci" (deprecated: "platform-uhci")
-- reg : Should contain 1 register ranges(address and length)
-- interrupts : UHCI controller interrupt
-
-additionally the properties from usb-hcd.yaml (in the current directory) are
-supported.
-
-Example:
-
-	uhci@d8007b00 {
-		compatible = "generic-uhci";
-		reg = <0xd8007b00 0x200>;
-		interrupts = <43>;
-	};
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +39 -0
new file mode 100644
index 000000000000..511c3ecd8d53
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/usb-uhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic Platform UHCI Controller
+
+allOf:
+  - $ref: usb-hcd.yaml#
+
+maintainers:
+  - Greg Kroah-Hartman <[email protected]>
+
+properties:
+  compatible:
+    const: generic-uhci
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    usb@d8007b00 {
+            compatible = "generic-uhci";
+            reg = <0xd8007b00 0x200>;
+            interrupts = <43>;
+    };
+...
Signature · 1 line
2.44.0
#1 lore raw
Quoted 4 lines · Mohammad Shehar Yaar Tausif

Convert USB UHCI bindings to DT schema

---

Thank you for your patch. There is something to discuss/improve.

Quoted 13 lines
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +7 -0
new file mode 100644
index 000000000000..511c3ecd8d53
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/usb-uhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic Platform UHCI Controller

Documentation/devicetree/bindings/usb/usb-uhci.yaml line 17

Quoted 10 lines
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +10 -0
+
+allOf:
+  - $ref: usb-hcd.yaml#
+
+maintainers:
+  - Greg Kroah-Hartman <[email protected]>
+
+properties:
+  compatible:
+    const: generic-uhci

You missed deprecated compatible. Also missed Aspeed compatibles.

Documentation/devicetree/bindings/usb/usb-uhci.yaml line 28

Quoted 11 lines
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +11 -0
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts

Please confirm that you tested DTS.

Documentation/devicetree/bindings/usb/usb-uhci.yaml line 35

Quoted 7 lines
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +7 -0
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    usb@d8007b00 {
+            compatible = "generic-uhci";

Use 4 spaces for example indentation.

Best regards,
Krzysztof