diff mbox series

[v2,3/4] dt-bindings: usb: realtek,rts5411: Adapt usb-hub.yaml

Message ID 20250415094227.3629916-4-treapking@chromium.org (mailing list archive)
State New
Headers show
Series Introduce usb-hub.yaml binding and add support for Parade PS5511 | expand

Commit Message

Pin-yen Lin April 15, 2025, 9:42 a.m. UTC
Inherit usb-hub.yaml and remove duplicated schemas.

Signed-off-by: Pin-yen Lin <treapking@chromium.org>

---

Changes in v2:
- New in v2

 .../bindings/usb/realtek,rts5411.yaml         | 47 +++++--------------
 1 file changed, 13 insertions(+), 34 deletions(-)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
index 6577a61cc07531..52fad201a56c82 100644
--- a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
+++ b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
@@ -10,7 +10,7 @@  maintainers:
   - Matthias Kaehlcke <mka@chromium.org>
 
 allOf:
-  - $ref: usb-device.yaml#
+  - $ref: usb-hub.yaml#
 
 properties:
   compatible:
@@ -21,51 +21,30 @@  properties:
 
   reg: true
 
-  '#address-cells':
-    const: 1
+  '#address-cells': true
 
-  '#size-cells':
-    const: 0
+  '#size-cells': true
 
   vdd-supply:
     description:
       phandle to the regulator that provides power to the hub.
 
-  peer-hub:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description:
-      phandle to the peer hub on the controller.
+  peer-hub: true
 
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
-
     properties:
-      port@1:
-        $ref: /schemas/graph.yaml#/properties/port
-        description:
-          1st downstream facing USB port
-
-      port@2:
-        $ref: /schemas/graph.yaml#/properties/port
-        description:
-          2nd downstream facing USB port
-
-      port@3:
-        $ref: /schemas/graph.yaml#/properties/port
-        description:
-          3rd downstream facing USB port
-
-      port@4:
-        $ref: /schemas/graph.yaml#/properties/port
-        description:
-          4th downstream facing USB port
+      '#address-cells': true
+
+      '#size-cells': true
+
+    patternProperties:
+      '^port@[1-4]$': true
+
+    additionalProperties: false
 
 patternProperties:
-  '^.*@[1-4]$':
-    description: The hard wired USB devices
-    type: object
-    $ref: /schemas/usb/usb-device.yaml
-    additionalProperties: true
+  '^.*@[1-4]$': true
 
 required:
   - peer-hub