2022-07-08 11:29:59

by Jayesh Choudhary

[permalink] [raw]
Subject: [PATCH 0/2] Enable SA2UL support on AM64X

This series enables sa2ul support for TI SoC AM64X.
It is based on another series posted by Suman Anna:
<https://lore.kernel.org/linux-arm-kernel/[email protected]/>

rng node has been dropped due to its indirect access from OP-TEE.

Since the sa2ul hardware is being used by OP-TEE as well,
it should be requested using shared TI-SCI flag. So the flag
has been changed from TI-SCI-EXCLUSIVE to TI-SCI-SHARED.

I have tried crypto tests on my local setup, and tcrypt and
self-tests are passing.

Peter Ujfalusi (1):
arm64: dts: ti: k3-am64-main: Enable crypto accelerator

Suman Anna (1):
arm64: dts: ti: k3-am64: Add SA2UL address space to Main CBASS ranges

arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 12 ++++++++++++
arch/arm64/boot/dts/ti/k3-am64.dtsi | 1 +
2 files changed, 13 insertions(+)

--
2.17.1


2022-07-08 11:30:14

by Jayesh Choudhary

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: ti: k3-am64-main: Enable crypto accelerator

From: Peter Ujfalusi <[email protected]>

Add the node for SA2UL.

Signed-off-by: Peter Ujfalusi <[email protected]>
[[email protected]: drop label, minor cleanups]
Signed-off-by: Suman Anna <[email protected]>
[[email protected]: drop rng-node, change flag to shared]
Signed-off-by: Jayesh Choudhary <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index ada00575f0f2..dd2848cd0740 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -1308,4 +1308,16 @@
interrupt-names = "int0", "int1";
bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
};
+
+ crypto: crypto@40900000 {
+ compatible = "ti,am64-sa2ul";
+ reg = <0x00 0x40900000 0x00 0x1200>;
+ power-domains = <&k3_pds 133 TI_SCI_PD_SHARED>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
+ dmas = <&main_pktdma 0xc001 0>, <&main_pktdma 0x4002 0>,
+ <&main_pktdma 0x4003 0>;
+ dma-names = "tx", "rx1", "rx2";
+ };
};
--
2.17.1

2022-07-08 12:03:13

by Jayesh Choudhary

[permalink] [raw]
Subject: [PATCH 1/2] arm64: dts: ti: k3-am64: Add SA2UL address space to Main CBASS ranges

From: Suman Anna <[email protected]>

Add the address space for the SA2UL in MAIN domain to the ranges property
of the cbass_main interconnect node so that the addresses within the
corresponding sram nodes and its children can be translated properly by
the relevant OF address API.

Signed-off-by: Suman Anna <[email protected]>
Signed-off-by: Jayesh Choudhary <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am64.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am64.dtsi b/arch/arm64/boot/dts/ti/k3-am64.dtsi
index 016dd8511ca6..c858725133af 100644
--- a/arch/arm64/boot/dts/ti/k3-am64.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64.dtsi
@@ -82,6 +82,7 @@
<0x00 0x3b000000 0x00 0x3b000000 0x00 0x00000400>, /* GPMC0_CFG */
<0x00 0x3cd00000 0x00 0x3cd00000 0x00 0x00000200>, /* TIMERMGR0_CONFIG */
<0x00 0x3f004000 0x00 0x3f004000 0x00 0x00000400>, /* GICSS0_REGS */
+ <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA2_UL0 */
<0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>, /* CTRL_MMR0 */
<0x00 0x44043000 0x00 0x44043000 0x00 0x00000fe0>, /* TI SCI DEBUG */
<0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>, /* DMASS */
--
2.17.1

2022-07-08 22:14:55

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: ti: k3-am64-main: Enable crypto accelerator

On 16:57-20220708, Jayesh Choudhary wrote:
> From: Peter Ujfalusi <[email protected]>
>
> Add the node for SA2UL.
>
> Signed-off-by: Peter Ujfalusi <[email protected]>
> [[email protected]: drop label, minor cleanups]
> Signed-off-by: Suman Anna <[email protected]>
> [[email protected]: drop rng-node, change flag to shared]


See thread: https://lore.kernel.org/all/[email protected]/

lets be consistent as to having the RNG node with disable and logic for
doing the same.

> Signed-off-by: Jayesh Choudhary <[email protected]>
> ---
> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
> index ada00575f0f2..dd2848cd0740 100644
> --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
> @@ -1308,4 +1308,16 @@
> interrupt-names = "int0", "int1";
> bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
> };
> +
> + crypto: crypto@40900000 {
> + compatible = "ti,am64-sa2ul";
> + reg = <0x00 0x40900000 0x00 0x1200>;
> + power-domains = <&k3_pds 133 TI_SCI_PD_SHARED>;
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
> + dmas = <&main_pktdma 0xc001 0>, <&main_pktdma 0x4002 0>,
> + <&main_pktdma 0x4003 0>;
> + dma-names = "tx", "rx1", "rx2";
> + };
> };
> --
> 2.17.1
>

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2022-07-11 09:08:23

by Jayesh Choudhary

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: ti: k3-am64-main: Enable crypto accelerator



On 09/07/22 3:38 am, Nishanth Menon wrote:
> On 16:57-20220708, Jayesh Choudhary wrote:
>> From: Peter Ujfalusi <[email protected]>
>>
>> Add the node for SA2UL.
>>
>> Signed-off-by: Peter Ujfalusi <[email protected]>
>> [[email protected]: drop label, minor cleanups]
>> Signed-off-by: Suman Anna <[email protected]>
>> [[email protected]: drop rng-node, change flag to shared]
>
>
> See thread: https://lore.kernel.org/all/[email protected]/
>
> lets be consistent as to having the RNG node with disable and logic for
> doing the same.

Okay. Will send a v2 patch.


>
>> Signed-off-by: Jayesh Choudhary <[email protected]>
>> ---
>> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>> index ada00575f0f2..dd2848cd0740 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
>> @@ -1308,4 +1308,16 @@
>> interrupt-names = "int0", "int1";
>> bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
>> };
>> +
>> + crypto: crypto@40900000 {
>> + compatible = "ti,am64-sa2ul";
>> + reg = <0x00 0x40900000 0x00 0x1200>;
>> + power-domains = <&k3_pds 133 TI_SCI_PD_SHARED>;
>> + #address-cells = <2>;
>> + #size-cells = <2>;
>> + ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
>> + dmas = <&main_pktdma 0xc001 0>, <&main_pktdma 0x4002 0>,
>> + <&main_pktdma 0x4003 0>;
>> + dma-names = "tx", "rx1", "rx2";
>> + };
>> };
>> --
>> 2.17.1
>>
>