Skip to contentSkip to conversation

dt-bindings: crypto: fsl-imx-sahara: Shorten the title

PATCH Superseded Fabio Estevam 2 participants 7 messages Sep 24, 2023 – Sep 25, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/4 dt-bindings: crypto: fsl-imx-sahara: Shorten the title

From: Fabio Estevam <[email protected]>

In the title, there is no need to mention "included in some i.MX chips" as it is too vague.

Remove it to make it simpler.

---
 Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +1 -1
index d531f3af3ea4..c7da09c58eff 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/crypto/fsl-imx-sahara.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Freescale SAHARA Cryptographic Accelerator included in some i.MX chips
+title: Freescale SAHARA Cryptographic Accelerator
 
 maintainers:
   - Steffen Trumtrar <[email protected]>
Signature · 1 line
2.34.1
author reviewer
#1 lore raw

PATCH 2/4 dt-bindings: crypto: fsl-imx-sahara: Remove leading space

From: Fabio Estevam <[email protected]>

Remove the leading space in the reg property as this is the standard.

---
 Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +1 -1
index c7da09c58eff..bad82491cd6a 100644
@@ -32,6 +32,6 @@ examples:
   - |
     crypto@10025000 {
         compatible = "fsl,imx27-sahara";
-        reg = < 0x10025000 0x800>;
+        reg = <0x10025000 0x800>;
         interrupts = <75>;
     };
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 2/4] dt-bindings: crypto: fsl-imx-sahara: Remove leading space

Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Remove the leading space in the reg property as this is the standard.

Squash this and previous. Such trivial cleanups, without any impact, do not make any sense on their own.

Best regards,
Krzysztof

author reviewer
#3 lore raw

PATCH 3/4 dt-bindings: crypto: fsl-imx-sahara: Document the clocks

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

The Sahara block needs to clocks (ipg and ahb) to operate.

Describe them.

---
 .../bindings/crypto/fsl-imx-sahara.yaml         | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +17 -0
index bad82491cd6a..9dbfc15510a8 100644
@@ -21,17 +21,34 @@ properties:
   interrupts:
     maxItems: 1
 
+  clocks:
+    items:
+      - description: Sahara IPG clock
+      - description: Sahara AHB clock
+
+  clock-names:
+    items:
+      - const: ipg
+      - const: ahb
+
 required:
   - compatible
   - reg
   - interrupts
+  - clocks
+  - clock-names
 
 additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/clock/imx27-clock.h>
+
     crypto@10025000 {
         compatible = "fsl,imx27-sahara";
         reg = <0x10025000 0x800>;
         interrupts = <75>;
+        clocks = <&clks IMX27_CLK_SAHARA_IPG_GATE>,
+                 <&clks IMX27_CLK_SAHARA_AHB_GATE>;
+        clock-names = "ipg", "ahb";
     };
Signature · 1 line
2.34.1
Reviewed-by on v1 3/4
#4 lore raw

Re: [PATCH 3/4] dt-bindings: crypto: fsl-imx-sahara: Document the clocks

Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

The Sahara block needs to clocks (ipg and ahb) to operate.

Describe them.

"Describe the clocks (ipg and ahb) needed by Sahara block to operate". One line, instead of three.

Best regards,
Krzysztof

author reviewer
#5 lore raw

PATCH 4/4 dt-bindings: crypto: fsl-imx-sahara: Fix the number of irqs

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Describe this difference.

---
 .../bindings/crypto/fsl-imx-sahara.yaml       | 23 ++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +22 -1
index 9dbfc15510a8..9d1d9c8f0955 100644
@@ -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:
@@ -40,6 +43,24 @@ required:
 
 additionalProperties: false
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,imx53-sahara
+    then:
+      properties:
+        interrupts:
+          minItems: 2
+          maxItems: 2
+    else:
+      properties:
+        interrupts:
+          minItems: 1
+          maxItems: 1
+
 examples:
   - |
     #include <dt-bindings/clock/imx27-clock.h>
Signature · 1 line
2.34.1
Reviewed-by on v1 4/4
#6 lore raw

Re: [PATCH 4/4] dt-bindings: crypto: fsl-imx-sahara: Fix the number of irqs

Quoted 28 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Describe this difference.

---
 .../bindings/crypto/fsl-imx-sahara.yaml       | 23 ++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +4 -1
index 9dbfc15510a8..9d1d9c8f0955 100644
@@ -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:

Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml required: · line 46

Quoted 4 lines
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +1 -0
@@ -40,6 +43,24 @@ required:
 
 additionalProperties: false
 
+allOf:

This goes before additionalProperties:.

Quoted 5 lines
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +5 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:

Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml required: · line 61

Quoted 10 lines
Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml +10 -0
+              - fsl,imx53-sahara
+    then:
+      properties:
+        interrupts:
+          minItems: 2
+          maxItems: 2
+    else:
+      properties:
+        interrupts:
+          minItems: 1

maxItems is enough.

Best regards,
Krzysztof