[PATCH 04/14] media: dt-bindings: media: rockchip,px30-vip: allow for different variants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move the documentation of clocks and resets to a allOf: structure in order
to allow for different variants of the IP block.

Signed-off-by: Michael Riesch <michael.riesch@xxxxxxxxxxxxxx>
---
 .../bindings/media/rockchip,px30-vip.yaml          | 58 ++++++++++++++--------
 1 file changed, 37 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/rockchip,px30-vip.yaml b/Documentation/devicetree/bindings/media/rockchip,px30-vip.yaml
index 675a1ea47210..7168f166798c 100644
--- a/Documentation/devicetree/bindings/media/rockchip,px30-vip.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,px30-vip.yaml
@@ -24,32 +24,16 @@ properties:
   interrupts:
     maxItems: 1
 
-  clocks:
-    items:
-      - description: ACLK
-      - description: HCLK
-      - description: PCLK
-
-  clock-names:
-    items:
-      - const: aclk
-      - const: hclk
-      - const: pclk
+  clocks: true
+
+  clock-names: true
 
   iommus:
     maxItems: 1
 
-  resets:
-    items:
-      - description: AXI
-      - description: AHB
-      - description: PCLK IN
+  resets: true
 
-  reset-names:
-    items:
-      - const: axi
-      - const: ahb
-      - const: pclkin
+  reset-names: true
 
   power-domains:
     maxItems: 1
@@ -85,6 +69,38 @@ required:
   - clocks
   - ports
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,px30-vip
+    then:
+      properties:
+        clocks:
+          items:
+            - description: ACLK
+            - description: HCLK
+            - description: PCLK
+
+        clock-names:
+          items:
+            - const: aclk
+            - const: hclk
+            - const: pclk
+
+        resets:
+          items:
+            - description: AXI
+            - description: AHB
+            - description: PCLK IN
+
+        reset-names:
+          items:
+            - const: axi
+            - const: ahb
+            - const: pclkin
+
 additionalProperties: false
 
 examples:

-- 
2.30.2





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux