dt-bindings: usb: genesys,gl850g: allow downstream device subnodes
authorIcenowy Zheng <uwu@icenowy.me>
Tue, 17 Sep 2024 09:40:08 +0000 (17:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 13:12:35 +0000 (15:12 +0200)
As this binding describes USB hubs, it's natural for them to have
downstream devices.

Change "additionalProperties" to "unevaluatedProperties" to allow
properties defined in usb-device.yaml (for DT cells properties) and add
a pattern-based downstream device subnode rule to match those subnodes.

These changes allow downstream devices get defined under the hub.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240917094008.283529-1-uwu@icenowy.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml

index fc833363cfb4925828ccfd7c136001ec15b7bf59..6fe2d356dcbdec20dd47e09c36174e1f0244e642 100644 (file)
@@ -62,7 +62,14 @@ allOf:
         peer-hub: true
         vdd-supply: true
 
-additionalProperties: false
+patternProperties:
+  "^.*@[0-9a-f]{1,2}$":
+    description: The hard wired USB devices
+    type: object
+    $ref: /schemas/usb/usb-device.yaml
+    additionalProperties: true
+
+unevaluatedProperties: false
 
 examples:
   - |