mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: ti: k3-j721s2-main: Enable crypto accelerator
@ 2022-06-28  5:45 Jayesh Choudhary
  2022-06-28  6:33 ` Vignesh Raghavendra
  0 siblings, 1 reply; 2+ messages in thread
From: Jayesh Choudhary @ 2022-06-28  5:45 UTC (permalink / raw)
  To: devicetree
  Cc: nm, vigneshr, kristo, robh+dt, krzysztof.kozlowski+dt,
	j-choudhary, linux-arm-kernel, linux-kernel

Add the node for SA2UL for supporting hardware crypto algorithms,
including SHA1, SHA256, SHA512, AES, 3DES and AEAD suites.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---

There is a dependency of this patch on a dmaengine patch:
<https://lore.kernel.org/all/20220628050232.331956-1-j-choudhary@ti.com/>
This patch adds the PSIL threads for main domain SA2UL.

Without the above patch, dma-controller fails to get the channel
and tcrypt module does software crypto. But it does not break boot
since its runtime and not compile-time.

Testing log: <https://gist.github.com/Jayesh2000/e429c78a545809602e6473886a2a6ae4>

 arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index 34e7d577ae13..79ca34a7e34f 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -72,6 +72,20 @@
 		pinctrl-single,function-mask = <0xffffffff>;
 	};
 
+	main_crypto: crypto@4e00000 {
+		compatible = "ti,j721e-sa2ul";
+		reg = <0x00 0x4e00000 0x00 0x1200>;
+		power-domains = <&k3_pds 297 TI_SCI_PD_SHARED>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges = <0x00 0x04e00000 0x00 0x04e00000 0x00 0x30000>;
+
+		dmas = <&main_udmap 0xca40>, <&main_udmap 0x4a40>,
+				<&main_udmap 0x4a41>;
+		dma-names = "tx", "rx1", "rx2";
+		dma-coherent;
+	};
+
 	main_uart0: serial@2800000 {
 		compatible = "ti,j721e-uart", "ti,am654-uart";
 		reg = <0x00 0x02800000 0x00 0x200>;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: dts: ti: k3-j721s2-main: Enable crypto accelerator
  2022-06-28  5:45 [PATCH] arm64: dts: ti: k3-j721s2-main: Enable crypto accelerator Jayesh Choudhary
@ 2022-06-28  6:33 ` Vignesh Raghavendra
  0 siblings, 0 replies; 2+ messages in thread
From: Vignesh Raghavendra @ 2022-06-28  6:33 UTC (permalink / raw)
  To: Jayesh Choudhary, devicetree
  Cc: nm, kristo, robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel

Hi,

On 28/06/22 11:15, Jayesh Choudhary wrote:
> +	main_crypto: crypto@4e00000 {
> +		compatible = "ti,j721e-sa2ul";
> +		reg = <0x00 0x4e00000 0x00 0x1200>;
> +		power-domains = <&k3_pds 297 TI_SCI_PD_SHARED>;
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges = <0x00 0x04e00000 0x00 0x04e00000 0x00 0x30000>;
> +
> +		dmas = <&main_udmap 0xca40>, <&main_udmap 0x4a40>,
> +				<&main_udmap 0x4a41>;
> +		dma-names = "tx", "rx1", "rx2";


> +		dma-coherent;


Crytpo device itself is not dma-coherent as it can never be bus master.
Its the DMAengine that does data movement and the buffers are to be
mapped to dmaengine provider. So this property should be dropped

> +	};
> +

-- 
Regards
Vignesh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-28  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28  5:45 [PATCH] arm64: dts: ti: k3-j721s2-main: Enable crypto accelerator Jayesh Choudhary
2022-06-28  6:33 ` Vignesh Raghavendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®