Skip to contentSkip to conversation

dt-bindings: iommu: mediatek: mt8195: Fix max interrupts

PATCH Superseded [email protected] 2 participants 2 messages Sep 8, 2022

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: iommu: mediatek: mt8195: Fix max interrupts

From: Matthias Brugger <[email protected]>

The mt8195-iommu-infra has five banks and one interrupt for each. Reflect that in the binding.

---

 .../bindings/iommu/mediatek,iommu.yaml        | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +18 -1
index fee0241b50988..621aca2adfb7f 100644
@@ -91,7 +91,7 @@ properties:
     maxItems: 1
 
   interrupts:
-    maxItems: 1
+    description: each bank has one dedicated interrupt
 
   clocks:
     items:
@@ -183,6 +183,19 @@ allOf:
       required:
         - mediatek,infracfg
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: mediatek,mt8195-iommu-infra
+
+    then:
+      properties:
+        interrupts:
+          maxItems: 5
+      required:
+        - interrupts
+
   - if: # The IOMMUs don't have larbs.
       not:
         properties:
@@ -191,8 +204,12 @@ allOf:
               const: mediatek,mt8195-iommu-infra
 
     then:
+      properties:
+        interrupts:
+          maxItems: 1
       required:
         - mediatek,larbs
+        - interrupts
 
 additionalProperties: false
 
Signature · 1 line
2.37.3
#1 lore raw
Quoted 17 lines · On 08/09/2022 15:25, [email protected] wrote:

From: Matthias Brugger <[email protected]>

The mt8195-iommu-infra has five banks and one interrupt for each. Reflect that in the binding.

---

 .../bindings/iommu/mediatek,iommu.yaml        | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
index fee0241b50988..621aca2adfb7f 100644

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml properties: · line 94

Quoted 4 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -1
@@ -91,7 +91,7 @@ properties:
     maxItems: 1
 
   interrupts:
-    maxItems: 1

Keep here wide constraints - minItems:1, maxItems:5

Quoted 10 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +1 -0
+    description: each bank has one dedicated interrupt
 
 
 

clocks:
items:

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
@@ -183,6 +183,19 @@ allOf:
       required:
         - mediatek,infracfg
 

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml allOf: · line 195

Quoted 10 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +10 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: mediatek,mt8195-iommu-infra
+
+    then:
+      properties:
+        interrupts:
+          maxItems: 5

and then minItems:5

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml allOf: · line 197

Quoted 2 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +2 -0
+      required:
+        - interrupts

This seems unrelated and not really needed.

Quoted 5 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +1 -0
+
   - if: # The IOMMUs don't have larbs.
       not:
         properties:

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml allOf: · line 212

Quoted 9 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +4 -0
@@ -191,8 +204,12 @@ allOf:
               const: mediatek,mt8195-iommu-infra
 
     then:
+      properties:
+        interrupts:
+          maxItems: 1
       required:
         - mediatek,larbs
+        - interrupts

This seems unrelated and not really needed.

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml allOf: · line 215

Quoted 3 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
 additionalProperties: false
 

Best regards,
Krzysztof