Skip to contentSkip to conversation

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

PATCH Superseded Mohammad Shehar Yaar Tausif 2 participants 2 messages Apr 22, 2024

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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

Convert USB UHCI bindings to DT schema.

---

Changes v1->v2:
- add aspeed compatible and deprecated platform-uhci compatible

v1 patch : https://lore.kernel.org/all/[email protected]/

---
 .../devicetree/bindings/usb/usb-uhci.txt      | 18 -----
 .../devicetree/bindings/usb/usb-uhci.yaml     | 70 +++++++++++++++++++
 2 files changed, 70 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 +70 -0

70 lines not on this page · raw message

Signature · 1 line
2.44.0
#1 lore raw
Quoted 1 line · Mohammad Shehar Yaar Tausif

Convert USB UHCI bindings to DT schema.

Please mention changes from pure conversion, so documenting aspeed compatibles and missing properties.

Quoted 3 lines

---

...

...

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

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

This should be under allOf

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

Quoted 7 lines
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +7 -0
+  properties:
+    compatible:
+      contains:
+        const: generic-uhci
+then:
+  allOf:
+    - $ref: usb-hcd.yaml

This is confusing. Aspeed is not different here.

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

Quoted 12 lines
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +12 -0
+  if:
+    properties:
+      compatible:
+        contains:
+          enum:
+            - aspeed,ast2400-uhci
+            - aspeed,ast2500-uhci
+            - aspeed,ast2600-uhci
+  then:
+    properties:
+      '#ports':
+        $ref: /schemas/types.yaml#/definitions/uint32

And the #ports property looks valid for generic-ahci. Why do you think it is not valid?

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

Quoted 2 lines
Documentation/devicetree/bindings/usb/usb-uhci.yaml new file +2 -0
+      clocks:
+        maxItems: 1

Define properties top-level.

Review

Quoted 2 lines
(quoted diff) +2 -0
+    required:
+      - clocks

This looks required for generic-uhci as well. Why did you put it only for aspeed?

Best regards,
Krzysztof