diff mbox series

[v1] dt-bindings: iommu: mediatek: mt8195: Fix max interrupts

Message ID 20220908132535.9350-1-matthias.bgg@kernel.org (mailing list archive)
State New, archived
Headers show
Series [v1] dt-bindings: iommu: mediatek: mt8195: Fix max interrupts | expand

Commit Message

Matthias Brugger Sept. 8, 2022, 1:25 p.m. UTC
From: Matthias Brugger <mbrugger@suse.com>

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

Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

 .../bindings/iommu/mediatek,iommu.yaml        | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Sept. 8, 2022, 1:30 p.m. UTC | #1
On 08/09/2022 15:25, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <mbrugger@suse.com>
> 
> The mt8195-iommu-infra has five banks and one interrupt for each.
> Reflect that in the binding.
> 
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> 
> ---
> 
>  .../bindings/iommu/mediatek,iommu.yaml        | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> index fee0241b50988..621aca2adfb7f 100644
> --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> @@ -91,7 +91,7 @@ properties:
>      maxItems: 1
>  
>    interrupts:
> -    maxItems: 1

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

> +    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

and then minItems:5

> +      required:
> +        - interrupts

This seems unrelated and not really needed.

> +
>    - 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

This seems unrelated and not really needed.

>  
>  additionalProperties: false
>  


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
index fee0241b50988..621aca2adfb7f 100644
--- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
@@ -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