Skip to contentSkip to conversation

dt-bindings: crypto: eip93: add clock gate and reset line

PATCH Superseded Aleksander Jan Bajkowski 3 participants 7 messages Mar 3 – Mar 4

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: crypto: eip93: add clock gate and reset line

Add the clock gate and reset line, both of which are available on the Airoha AN7581. Both properties are optional.

---
 .../crypto/inside-secure,safexcel-eip93.yaml         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml +12 -0
index 997bf9717f9e..058454b679b4 100644
@@ -48,6 +48,12 @@ properties:
   interrupts:
     maxItems: 1
 
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
 required:
   - compatible
   - reg
@@ -57,11 +63,17 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/clock/en7523-clk.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/reset/airoha,en7581-reset.h>
 
     crypto@1e004000 {
       compatible = "airoha,en7581-eip93", "inside-secure,safexcel-eip93ies";
       reg = <0x1fb70000 0x1000>;
 
+      clocks = <&scuclk EN7523_CLK_CRYPTO>;
+
       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+
+      resets = <&scuclk EN7581_CRYPTO_RST>;
     };
Signature · 1 line
2.47.3
#1 lore raw

PATCH 2/2 arm64: dts: airoha: en7581: add crypto offload support

Add support for the built-in cryptographic accelerator. This accelerator supports 3DES, AES (128/192/256 bit), ARC4, MD5, SHA1, SHA224, and SHA256. It also supports full IPSEC, SRTP and TLS offload.

---
 arch/arm64/boot/dts/airoha/en7581.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/airoha/en7581.dtsi +12 -0
index ff6908a76e8e..4931b704235a 100644
@@ -300,6 +300,18 @@ rng@1faa1000 {
 			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		crypto@1e004000 {
+			compatible = "airoha,en7581-eip93",
+				"inside-secure,safexcel-eip93ies";
+			reg = <0x0 0x1fb70000 0x0 0x1000>;
+
+			clocks = <&scuclk EN7523_CLK_CRYPTO>;
+
+			interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+
+			resets = <&scuclk EN7581_CRYPTO_RST>;
+		};
+
 		system-controller@1fbf0200 {
 			compatible = "airoha,en7581-gpio-sysctl", "syscon",
 				     "simple-mfd";
Signature · 1 line
2.47.3
#2 lore raw

Re: [PATCH 2/2] arm64: dts: airoha: en7581: add crypto offload support

Quoted 17 lines · Aleksander Jan Bajkowski

Add support for the built-in cryptographic accelerator. This accelerator supports 3DES, AES (128/192/256 bit), ARC4, MD5, SHA1, SHA224, and SHA256. It also supports full IPSEC, SRTP and TLS offload.

---
 arch/arm64/boot/dts/airoha/en7581.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/airoha/en7581.dtsi +0 -0
index ff6908a76e8e..4931b704235a 100644
@@ -300,6 +300,18 @@ rng@1faa1000 {
 			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
 		};
 

arch/arm64/boot/dts/airoha/en7581.dtsi rng@1faa1000 { · line 312

Quoted 10 lines
arch/arm64/boot/dts/airoha/en7581.dtsi +10 -0
+		crypto@1e004000 {
+			compatible = "airoha,en7581-eip93",
+				"inside-secure,safexcel-eip93ies";
+			reg = <0x0 0x1fb70000 0x0 0x1000>;
+
+			clocks = <&scuclk EN7523_CLK_CRYPTO>;
+
+			interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+
+			resets = <&scuclk EN7581_CRYPTO_RST>;

I guess you can drop the extra new line between clocks interrupts and resets.

Does the driver supports these property tho? For example the clock is just enabled or tweaked to a specific frequency? Same question for resets.

Quoted 8 lines
arch/arm64/boot/dts/airoha/en7581.dtsi +2 -0
+		};
+
 		system-controller@1fbf0200 {
 			compatible = "airoha,en7581-gpio-sysctl", "syscon",
 				     "simple-mfd";
Signature · 1 line
2.47.3
Signature · 1 line
	Ansuel
#3 lore raw

Re: [PATCH 2/2] arm64: dts: airoha: en7581: add crypto offload support

Hi Christian,

Quoted 18 lines · Christian Marangi
Quoted 17 lines · Aleksander Jan Bajkowski

Add support for the built-in cryptographic accelerator. This accelerator supports 3DES, AES (128/192/256 bit), ARC4, MD5, SHA1, SHA224, and SHA256. It also supports full IPSEC, SRTP and TLS offload.

---
  arch/arm64/boot/dts/airoha/en7581.dtsi | 12 ++++++++++++
  1 file changed, 12 insertions(+)
arch/arm64/boot/dts/airoha/en7581.dtsi +0 -0
index ff6908a76e8e..4931b704235a 100644
@@ -300,6 +300,18 @@ rng@1faa1000 {
  			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
  		};
 
Quoted 11 lines

arch/arm64/boot/dts/airoha/en7581.dtsi rng@1faa1000 { · line 312

Quoted 10 lines
arch/arm64/boot/dts/airoha/en7581.dtsi +10 -0
+		crypto@1e004000 {
+			compatible = "airoha,en7581-eip93",
+				"inside-secure,safexcel-eip93ies";
+			reg = <0x0 0x1fb70000 0x0 0x1000>;
+
+			clocks = <&scuclk EN7523_CLK_CRYPTO>;
+
+			interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+
+			resets = <&scuclk EN7581_CRYPTO_RST>;

I guess you can drop the extra new line between clocks interrupts and resets.

It makes sense.

Quoted 3 lines

Does the driver supports these property tho? For example the clock is just enabled or tweaked to a specific frequency? Same question for resets.

As far as I know, the driver doesn't use these properties. They may be used in the future.

Quoted 9 lines
Quoted 9 lines
arch/arm64/boot/dts/airoha/en7581.dtsi +2 -0
+		};
+
  		system-controller@1fbf0200 {
  			compatible = "airoha,en7581-gpio-sysctl", "syscon",
  				     "simple-mfd";
Signature · 1 line
2.47.3
#4 lore raw
In reply to Aleksander Jan Bajkowski
Quoted 2 lines · Aleksander Jan Bajkowski

Add the clock gate and reset line, both of which are available on the Airoha AN7581. Both properties are optional.

Why are they optional?

Quoted 44 lines
---
 .../crypto/inside-secure,safexcel-eip93.yaml         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml +12 -0
index 997bf9717f9e..058454b679b4 100644
@@ -48,6 +48,12 @@ properties:
   interrupts:
     maxItems: 1
 
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
 required:
   - compatible
   - reg
@@ -57,11 +63,17 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/clock/en7523-clk.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/reset/airoha,en7581-reset.h>
 
     crypto@1e004000 {
       compatible = "airoha,en7581-eip93", "inside-secure,safexcel-eip93ies";
       reg = <0x1fb70000 0x1000>;
 
+      clocks = <&scuclk EN7523_CLK_CRYPTO>;
+
       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+
+      resets = <&scuclk EN7581_CRYPTO_RST>;
     };
Signature · 1 line
2.47.3
#5 lore raw

Hi Conor,

Quoted 4 lines · Conor Dooley
Quoted 2 lines · Aleksander Jan Bajkowski

Add the clock gate and reset line, both of which are available on the Airoha AN7581. Both properties are optional.

Why are they optional?

No reason. In theory, a hardware designer could connect the reset to a fixed input signal. In practice, all SoCs on the market have a built-in reset and clock controller. I can mark them as required in the next revision.

Quoted 34 lines
Quoted 34 lines
---
  .../crypto/inside-secure,safexcel-eip93.yaml         | 12 ++++++++++++
  1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml +8 -0
index 997bf9717f9e..058454b679b4 100644
@@ -48,6 +48,12 @@ properties:
    interrupts:
      maxItems: 1
 
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
  required:
    - compatible
    - reg
@@ -57,11 +63,17 @@ additionalProperties: false
 
  examples:
    - |
+    #include <dt-bindings/clock/en7523-clk.h>
      #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/reset/airoha,en7581-reset.h>
 
      crypto@1e004000 {
        compatible = "airoha,en7581-eip93", "inside-secure,safexcel-eip93ies";
        reg = <0x1fb70000 0x1000>;
 
Quoted 9 lines
Quoted 9 lines
Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml +4 -0
+      clocks = <&scuclk EN7523_CLK_CRYPTO>;
+
        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+
+      resets = <&scuclk EN7581_CRYPTO_RST>;
      };
Signature · 1 line
2.47.3

Best regards,
Aleksander

#6 lore raw
Quoted 4 lines · Aleksander Jan Bajkowski

Hi Conor,

Quoted 1 line · Conor Dooley

On Tue, Mar 03, 2026 at 08:39:17PM +0100, Aleksander Jan Bajkowski wrote:

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Add the clock gate and reset line, both of which are available on the Airoha AN7581. Both properties are optional.

Why are they optional?

No reason. In theory, a hardware designer could connect the reset to a fixed input signal. In practice, all SoCs on the market have a built-in reset and clock controller. I can mark them as required in the next revision.

Right, the reset could be optional on some systems, but sounds like it is always there on the an7581. The clock is probably mandatory always. I think you should make it required in the binding, but not in the driver since that needs to work with existing devicetrees. Technically this is an ABI break (new required property), so at least mention in the commit message that you're aware of this.

Quoted 44 lines
Quoted 32 lines
Quoted 32 lines
---
  .../crypto/inside-secure,safexcel-eip93.yaml         | 12 ++++++++++++
  1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml +9 -0
index 997bf9717f9e..058454b679b4 100644
@@ -48,6 +48,12 @@ properties:
    interrupts:
      maxItems: 1
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
  required:
    - compatible
    - reg
@@ -57,11 +63,17 @@ additionalProperties: false
  examples:
    - |
+    #include <dt-bindings/clock/en7523-clk.h>
      #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/reset/airoha,en7581-reset.h>
      crypto@1e004000 {
        compatible = "airoha,en7581-eip93", "inside-secure,safexcel-eip93ies";
        reg = <0x1fb70000 0x1000>;
+      clocks = <&scuclk EN7523_CLK_CRYPTO>;
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml +3 -0
+
        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+
+      resets = <&scuclk EN7581_CRYPTO_RST>;
      };
Signature · 1 line
2.47.3

Best regards,
Aleksander