diff mbox series

[v2,3/3] dt-bindings: crypto: fsl-imx-sahara: Fix the number of irqs

Message ID 20230925111220.924090-3-festevam@gmail.com
State New
Headers show
Series [v2,1/3] dt-bindings: crypto: fsl-imx-sahara: Shorten the title | expand

Commit Message

Fabio Estevam Sept. 25, 2023, 11:12 a.m. UTC
From: Fabio Estevam <festevam@denx.de>

i.MX27 has only one Sahara interrupt. i.MX53 has two.

Describe this difference.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v1:
- Placed the if block before additionalProperties. (Krzysztof)
- Remove extra minItems = 1. (Krzysztof)

 .../bindings/crypto/fsl-imx-sahara.yaml       | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
index 9dbfc15510a8..41df80bcdcd9 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
+++ b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
@@ -19,7 +19,10 @@  properties:
     maxItems: 1
 
   interrupts:
-    maxItems: 1
+    items:
+      - description: SAHARA Interrupt for Host 0
+      - description: SAHARA Interrupt for Host 1
+    minItems: 1
 
   clocks:
     items:
@@ -38,6 +41,23 @@  required:
   - clocks
   - clock-names
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,imx53-sahara
+    then:
+      properties:
+        interrupts:
+          minItems: 2
+          maxItems: 2
+    else:
+      properties:
+        interrupts:
+          maxItems: 1
+
 additionalProperties: false
 
 examples: