Thread (50 messages) 50 messages, 5 authors, 2020-10-13
STALE2057d
Revisions (6)
  1. v1 current
  2. v1 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]

[PATCH 16/18] dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes

From: Serge Semin <hidden>
Date: 2020-10-10 23:08:24
Also in: linux-amlogic, linux-arm-kernel, linux-devicetree, lkml
Subsystem: open firmware and flattened device tree bindings, the rest, usb subsystem · Maintainers: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds, Greg Kroah-Hartman

Amlogic G12A USB DT sub-nodes are supposed to be compatible with the
generic DWC USB2 and USB3 devices. Since now we've got DT schemas for
both of the later IP cores let's make sure that the Amlogic G12A USB
DT nodes are fully evaluated including the DWC sub-nodes.

Signed-off-by: Serge Semin <redacted>
---
 .../bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml
index 88184d7e26cc..3e8ac0ff90de 100644
--- a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml
+++ b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml
@@ -78,7 +78,20 @@ properties:
 
 patternProperties:
   "^usb@[0-9a-f]+$":
-    type: object
+    allOf:
+      - if:
+          properties:
+            compatible:
+              contains:
+                const: snps,dwc2
+        then:
+          $ref: dwc2.yaml#
+      - if:
+          properties:
+            compatible:
+              const: snps,dwc3
+        then:
+          $ref: snps,dwc3.yaml#
 
 additionalProperties: false
 
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help