Skip to contentSkip to conversation

media: dt-bindings: coda: Add missing 'additionalProperties'

PATCH In review Rob Herring 2 participants 5 messages Nov 17, 2020 – Dec 18, 2020

Subsystems (3)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH v2 1/1 media: dt-bindings: coda: Add missing 'additionalProperties'

'additionalProperties' is now required by the meta-schema. Add it for coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains' need to be reworked to be defined at the top level.

Cc Philipp Zabel <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/media/coda.yaml +21 -21
index 7bac0057faf7..36781ee4617f 100644
@@ -44,6 +44,21 @@ properties:
       - const: per
       - const: ahb
 
+  interrupts:
+    minItems: 1
+    items:
+      - description: BIT processor interrupt
+      - description: JPEG unit interrupt
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: bit
+      - const: jpeg
+
+  power-domains:
+    maxItems: 1
+
   resets:
     maxItems: 1
 
@@ -59,6 +74,8 @@ required:
   - clocks
   - clock-names
 
+additionalProperties: false
+
 allOf:
   - if:
       properties:
@@ -68,34 +85,17 @@ allOf:
     then:
       properties:
         interrupts:
-          items:
-            - description: BIT processor interrupt
-            - description: JPEG unit interrupt
+          minItems: 2
 
         interrupt-names:
-          items:
-            - const: bit
-            - const: jpeg
+          minItems: 2
     else:
       properties:
         interrupts:
-          items:
-            - description: BIT processor interrupt
-
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - fsl,imx6dl-vpu
-              - fsl,imx6q-vpu
-    then:
-      properties:
-        power-domains:
-          $ref: /schemas/types.yaml#/definitions/phandle
-          description: phandle pointing to the PU power domain
           maxItems: 1
 
+        power-domains: false
+
 examples:
   - |
     vpu: video-codec@63ff4000 {
Signature · 1 line
2.25.1
author maintainer
#1 lore raw
Quoted 9 lines · Rob Herring

'additionalProperties' is now required by the meta-schema. Add it for coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains' need to be reworked to be defined at the top level.

Cc Philipp Zabel <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>

---

Ping! In case it wasn't clear, this should go in via the media tree.

Quoted 80 lines
 .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/media/coda.yaml +21 -21
index 7bac0057faf7..36781ee4617f 100644
@@ -44,6 +44,21 @@ properties:
       - const: per
       - const: ahb
 
+  interrupts:
+    minItems: 1
+    items:
+      - description: BIT processor interrupt
+      - description: JPEG unit interrupt
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: bit
+      - const: jpeg
+
+  power-domains:
+    maxItems: 1
+
   resets:
     maxItems: 1
 
@@ -59,6 +74,8 @@ required:
   - clocks
   - clock-names
 
+additionalProperties: false
+
 allOf:
   - if:
       properties:
@@ -68,34 +85,17 @@ allOf:
     then:
       properties:
         interrupts:
-          items:
-            - description: BIT processor interrupt
-            - description: JPEG unit interrupt
+          minItems: 2
 
         interrupt-names:
-          items:
-            - const: bit
-            - const: jpeg
+          minItems: 2
     else:
       properties:
         interrupts:
-          items:
-            - description: BIT processor interrupt
-
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - fsl,imx6dl-vpu
-              - fsl,imx6q-vpu
-    then:
-      properties:
-        power-domains:
-          $ref: /schemas/types.yaml#/definitions/phandle
-          description: phandle pointing to the PU power domain
           maxItems: 1
 
+        power-domains: false
+
 examples:
   - |
     vpu: video-codec@63ff4000 {
Signature · 1 line
2.25.1
maintainer
#2 lore raw
In reply to Rob Herring
Quoted 21 lines · Rob Herring

'additionalProperties' is now required by the meta-schema. Add it for coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains' need to be reworked to be defined at the top level.

Cc Philipp Zabel <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/media/coda.yaml +1 -0
index 7bac0057faf7..36781ee4617f 100644
@@ -44,6 +44,21 @@ properties:
       - const: per
       - const: ahb
 
+  interrupts:

Documentation/devicetree/bindings/media/coda.yaml properties: · line 57

Quoted 10 lines
Documentation/devicetree/bindings/media/coda.yaml +10 -0
+    minItems: 1
+    items:
+      - description: BIT processor interrupt
+      - description: JPEG unit interrupt
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: bit
+      - const: jpeg

I understand this would require a property

	interrupt-names = "bit";

in the arch/arm/boot/dts/imx{27,51,53}.dtsi device trees. That property is currently not required nor present, with only one interrupt on those devices. Is it possible to set "minItems: 0"?

regards
Philipp

maintainer Reviewed-by
#3 lore raw
Quoted 35 lines · Philipp Zabel
Quoted 21 lines · Rob Herring

'additionalProperties' is now required by the meta-schema. Add it for coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains' need to be reworked to be defined at the top level.

Cc Philipp Zabel <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/media/coda.yaml +1 -0
index 7bac0057faf7..36781ee4617f 100644
@@ -44,6 +44,21 @@ properties:
       - const: per
       - const: ahb
 
+  interrupts:

Documentation/devicetree/bindings/media/coda.yaml properties: · line 57

Quoted 10 lines
Documentation/devicetree/bindings/media/coda.yaml +10 -0
+    minItems: 1
+    items:
+      - description: BIT processor interrupt
+      - description: JPEG unit interrupt
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: bit
+      - const: jpeg

I understand this would require a property

Quoted 5 lines
	interrupt-names = "bit";

in the arch/arm/boot/dts/imx{27,51,53}.dtsi device trees. That property is currently not required nor present, with only one interrupt on those devices. Is it possible to set "minItems: 0"?

Never mind, sorry for the noise. interrupt-names is still not required.

regards
Philipp

author maintainer
#4 lore raw
In reply to Rob Herring
Quoted 4 lines · Rob Herring

'additionalProperties' is now required by the meta-schema. Add it for coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains' need to be reworked to be defined at the top level.

Quoted 8 lines
Cc Philipp Zabel <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)

As this wasn't picked up for rc1, I've applied it.