All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] RNG clock property cleanup
@ 2022-10-31 21:32 ` Jayesh Choudhary
  0 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, robh+dt, afd, j-keerthy, krzysztof.kozlowski+dt, s-anna,
	linux-arm-kernel, devicetree, linux-kernel, j-choudhary

This series removes the clock property from the rng node of
K3 devices for TI SoCs as that clock is not dedicated to RNG
module and it cannot be controlled by the rng driver.

DT binding fix:
<https://lore.kernel.org/all/20220901171041.32056-1-afd@ti.com/>

Jayesh Choudhary (3):
  arm64: dts: ti: k3-am65-main: drop RNG clock
  arm64: dts: ti: k3-j721e-main: drop RNG clock
  arm64: dts: ti: k3-am64-main: drop RNG clock

 arch/arm64/boot/dts/ti/k3-am64-main.dtsi  | 1 -
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi  | 1 -
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 -
 3 files changed, 3 deletions(-)

-- 
2.25.1


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

* [PATCH 0/3] RNG clock property cleanup
@ 2022-10-31 21:32 ` Jayesh Choudhary
  0 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: devicetree, j-choudhary, kristo, j-keerthy, linux-kernel, afd,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel

This series removes the clock property from the rng node of
K3 devices for TI SoCs as that clock is not dedicated to RNG
module and it cannot be controlled by the rng driver.

DT binding fix:
<https://lore.kernel.org/all/20220901171041.32056-1-afd@ti.com/>

Jayesh Choudhary (3):
  arm64: dts: ti: k3-am65-main: drop RNG clock
  arm64: dts: ti: k3-j721e-main: drop RNG clock
  arm64: dts: ti: k3-am64-main: drop RNG clock

 arch/arm64/boot/dts/ti/k3-am64-main.dtsi  | 1 -
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi  | 1 -
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 -
 3 files changed, 3 deletions(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
  2022-10-31 21:32 ` Jayesh Choudhary
@ 2022-10-31 21:32   ` Jayesh Choudhary
  -1 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, robh+dt, afd, j-keerthy, krzysztof.kozlowski+dt, s-anna,
	linux-arm-kernel, devicetree, linux-kernel, j-choudhary

Drop RNG clock property as it is not controlled by rng-driver.

Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 4005a73cfea9..e166d7b7e3a1 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -126,7 +126,6 @@ rng: rng@4e10000 {
 			compatible = "inside-secure,safexcel-eip76";
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&k3_clks 136 1>;
 			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
-- 
2.25.1


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

* [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
@ 2022-10-31 21:32   ` Jayesh Choudhary
  0 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: devicetree, j-choudhary, kristo, j-keerthy, linux-kernel, afd,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel

Drop RNG clock property as it is not controlled by rng-driver.

Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 4005a73cfea9..e166d7b7e3a1 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -126,7 +126,6 @@ rng: rng@4e10000 {
 			compatible = "inside-secure,safexcel-eip76";
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&k3_clks 136 1>;
 			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/3] arm64: dts: ti: k3-j721e-main: drop RNG clock
  2022-10-31 21:32 ` Jayesh Choudhary
@ 2022-10-31 21:32   ` Jayesh Choudhary
  -1 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, robh+dt, afd, j-keerthy, krzysztof.kozlowski+dt, s-anna,
	linux-arm-kernel, devicetree, linux-kernel, j-choudhary

Drop RNG clock property as it is not controlled by rng-driver.

Fixes: 8ebcaaae8017 ("arm64: dts: ti: k3-j721e-main: Add crypto accelerator node")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
index 5c4a0e28cde5..f1403b79e7f5 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
@@ -355,7 +355,6 @@ rng: rng@4e10000 {
 			compatible = "inside-secure,safexcel-eip76";
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&k3_clks 264 2>;
 		};
 	};
 
-- 
2.25.1


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

* [PATCH 2/3] arm64: dts: ti: k3-j721e-main: drop RNG clock
@ 2022-10-31 21:32   ` Jayesh Choudhary
  0 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: devicetree, j-choudhary, kristo, j-keerthy, linux-kernel, afd,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel

Drop RNG clock property as it is not controlled by rng-driver.

Fixes: 8ebcaaae8017 ("arm64: dts: ti: k3-j721e-main: Add crypto accelerator node")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
index 5c4a0e28cde5..f1403b79e7f5 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
@@ -355,7 +355,6 @@ rng: rng@4e10000 {
 			compatible = "inside-secure,safexcel-eip76";
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&k3_clks 264 2>;
 		};
 	};
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/3] arm64: dts: ti: k3-am64-main: drop RNG clock
  2022-10-31 21:32 ` Jayesh Choudhary
@ 2022-10-31 21:32   ` Jayesh Choudhary
  -1 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, robh+dt, afd, j-keerthy, krzysztof.kozlowski+dt, s-anna,
	linux-arm-kernel, devicetree, linux-kernel, j-choudhary

Drop RNG clock property as it is not controlled by rng-driver.

Fixes: e170ae6dd67a ("arm64: dts: ti: k3-am64-main: Enable crypto accelerator")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index c96df4b9b3d7..ac04cf1d9c3e 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -1359,7 +1359,6 @@ rng: rng@40910000 {
 			compatible = "inside-secure,safexcel-eip76";
 			reg = <0x00 0x40910000 0x00 0x7d>;
 			interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&k3_clks 133 1>;
 			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
-- 
2.25.1


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

* [PATCH 3/3] arm64: dts: ti: k3-am64-main: drop RNG clock
@ 2022-10-31 21:32   ` Jayesh Choudhary
  0 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-10-31 21:32 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: devicetree, j-choudhary, kristo, j-keerthy, linux-kernel, afd,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel

Drop RNG clock property as it is not controlled by rng-driver.

Fixes: e170ae6dd67a ("arm64: dts: ti: k3-am64-main: Enable crypto accelerator")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index c96df4b9b3d7..ac04cf1d9c3e 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -1359,7 +1359,6 @@ rng: rng@40910000 {
 			compatible = "inside-secure,safexcel-eip76";
 			reg = <0x00 0x40910000 0x00 0x7d>;
 			interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&k3_clks 133 1>;
 			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
  2022-10-31 21:32   ` Jayesh Choudhary
@ 2022-11-02 15:17     ` Nishanth Menon
  -1 siblings, 0 replies; 16+ messages in thread
From: Nishanth Menon @ 2022-11-02 15:17 UTC (permalink / raw)
  To: Jayesh Choudhary
  Cc: vigneshr, kristo, robh+dt, afd, j-keerthy,
	krzysztof.kozlowski+dt, s-anna, linux-arm-kernel, devicetree,
	linux-kernel

On 03:02-20221101, Jayesh Choudhary wrote:
> Drop RNG clock property as it is not controlled by rng-driver.

Does'nt tell me what is the alternative? why is the hardware description
not sufficient for control?

https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
Looks like a perfectly valid description - do we have a bug and firmware
does'nt allow control here?

> 
> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> ---
>  arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index 4005a73cfea9..e166d7b7e3a1 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -126,7 +126,6 @@ rng: rng@4e10000 {
>  			compatible = "inside-secure,safexcel-eip76";
>  			reg = <0x0 0x4e10000 0x0 0x7d>;
>  			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> -			clocks = <&k3_clks 136 1>;

Does this mean that the crypto module's power-domains property should be
dropped as well?

>  			status = "disabled"; /* Used by OP-TEE */
>  		};
>  	};
> -- 
> 2.25.1
> 

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

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
@ 2022-11-02 15:17     ` Nishanth Menon
  0 siblings, 0 replies; 16+ messages in thread
From: Nishanth Menon @ 2022-11-02 15:17 UTC (permalink / raw)
  To: Jayesh Choudhary
  Cc: devicetree, vigneshr, kristo, j-keerthy, linux-kernel, afd,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel

On 03:02-20221101, Jayesh Choudhary wrote:
> Drop RNG clock property as it is not controlled by rng-driver.

Does'nt tell me what is the alternative? why is the hardware description
not sufficient for control?

https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
Looks like a perfectly valid description - do we have a bug and firmware
does'nt allow control here?

> 
> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> ---
>  arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index 4005a73cfea9..e166d7b7e3a1 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -126,7 +126,6 @@ rng: rng@4e10000 {
>  			compatible = "inside-secure,safexcel-eip76";
>  			reg = <0x0 0x4e10000 0x0 0x7d>;
>  			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> -			clocks = <&k3_clks 136 1>;

Does this mean that the crypto module's power-domains property should be
dropped as well?

>  			status = "disabled"; /* Used by OP-TEE */
>  		};
>  	};
> -- 
> 2.25.1
> 

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
  2022-11-02 15:17     ` Nishanth Menon
@ 2022-11-02 17:04       ` Andrew Davis
  -1 siblings, 0 replies; 16+ messages in thread
From: Andrew Davis @ 2022-11-02 17:04 UTC (permalink / raw)
  To: Nishanth Menon, Jayesh Choudhary
  Cc: vigneshr, kristo, robh+dt, j-keerthy, krzysztof.kozlowski+dt,
	s-anna, linux-arm-kernel, devicetree, linux-kernel

On 11/2/22 10:17 AM, Nishanth Menon wrote:
> On 03:02-20221101, Jayesh Choudhary wrote:
>> Drop RNG clock property as it is not controlled by rng-driver.
> 
> Does'nt tell me what is the alternative? why is the hardware description
> not sufficient for control?
> 
> https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
> Looks like a perfectly valid description - do we have a bug and firmware
> does'nt allow control here?
> 

We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes
to the PKA sub-module (isn't it nice when they make things simple). But x1 and
x2 are miscellaneous and bus clocks respectively and route to several sub-modules.

All we drop here is the clock handle in the RNG sub-module, as that sub-module is
not the owner of that clock (the parent SA2UL is). The alternative we could implement
is to move the clock node up to the parent SA2UL node.

>>
>> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>> ---
>>   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> index 4005a73cfea9..e166d7b7e3a1 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> @@ -126,7 +126,6 @@ rng: rng@4e10000 {
>>   			compatible = "inside-secure,safexcel-eip76";
>>   			reg = <0x0 0x4e10000 0x0 0x7d>;
>>   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>> -			clocks = <&k3_clks 136 1>;
> 
> Does this mean that the crypto module's power-domains property should be
> dropped as well?
> 

Why? the power-domains property is in the correct spot (up in the parent node).

Now it is true we cant actually shut the SA2UL down since it is owned
by the security processor, but since it is marked TI_SCI_PD_SHARED this
should be fine.

Andrew

>>   			status = "disabled"; /* Used by OP-TEE */
>>   		};
>>   	};
>> -- 
>> 2.25.1
>>
> 

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
@ 2022-11-02 17:04       ` Andrew Davis
  0 siblings, 0 replies; 16+ messages in thread
From: Andrew Davis @ 2022-11-02 17:04 UTC (permalink / raw)
  To: Nishanth Menon, Jayesh Choudhary
  Cc: devicetree, vigneshr, kristo, j-keerthy, linux-kernel, robh+dt,
	krzysztof.kozlowski+dt, linux-arm-kernel

On 11/2/22 10:17 AM, Nishanth Menon wrote:
> On 03:02-20221101, Jayesh Choudhary wrote:
>> Drop RNG clock property as it is not controlled by rng-driver.
> 
> Does'nt tell me what is the alternative? why is the hardware description
> not sufficient for control?
> 
> https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
> Looks like a perfectly valid description - do we have a bug and firmware
> does'nt allow control here?
> 

We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes
to the PKA sub-module (isn't it nice when they make things simple). But x1 and
x2 are miscellaneous and bus clocks respectively and route to several sub-modules.

All we drop here is the clock handle in the RNG sub-module, as that sub-module is
not the owner of that clock (the parent SA2UL is). The alternative we could implement
is to move the clock node up to the parent SA2UL node.

>>
>> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>> ---
>>   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> index 4005a73cfea9..e166d7b7e3a1 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> @@ -126,7 +126,6 @@ rng: rng@4e10000 {
>>   			compatible = "inside-secure,safexcel-eip76";
>>   			reg = <0x0 0x4e10000 0x0 0x7d>;
>>   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>> -			clocks = <&k3_clks 136 1>;
> 
> Does this mean that the crypto module's power-domains property should be
> dropped as well?
> 

Why? the power-domains property is in the correct spot (up in the parent node).

Now it is true we cant actually shut the SA2UL down since it is owned
by the security processor, but since it is marked TI_SCI_PD_SHARED this
should be fine.

Andrew

>>   			status = "disabled"; /* Used by OP-TEE */
>>   		};
>>   	};
>> -- 
>> 2.25.1
>>
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
  2022-11-02 17:04       ` Andrew Davis
@ 2022-11-02 19:44         ` Nishanth Menon
  -1 siblings, 0 replies; 16+ messages in thread
From: Nishanth Menon @ 2022-11-02 19:44 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Jayesh Choudhary, vigneshr, kristo, robh+dt, j-keerthy,
	krzysztof.kozlowski+dt, s-anna, linux-arm-kernel, devicetree,
	linux-kernel

On 12:04-20221102, Andrew Davis wrote:
> On 11/2/22 10:17 AM, Nishanth Menon wrote:
> > On 03:02-20221101, Jayesh Choudhary wrote:
> > > Drop RNG clock property as it is not controlled by rng-driver.
> > 
> > Does'nt tell me what is the alternative? why is the hardware description
> > not sufficient for control?
> > 
> > https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
> > Looks like a perfectly valid description - do we have a bug and firmware
> > does'nt allow control here?
> > 
> 
> We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes
> to the PKA sub-module (isn't it nice when they make things simple). But x1 and
> x2 are miscellaneous and bus clocks respectively and route to several sub-modules.
> 
> All we drop here is the clock handle in the RNG sub-module, as that sub-module is
> not the owner of that clock (the parent SA2UL is). The alternative we could implement
> is to move the clock node up to the parent SA2UL node.
> 
> > > 
> > > Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
> > > Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> > > ---
> > >   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
> > >   1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > index 4005a73cfea9..e166d7b7e3a1 100644
> > > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > @@ -126,7 +126,6 @@ rng: rng@4e10000 {
> > >   			compatible = "inside-secure,safexcel-eip76";
> > >   			reg = <0x0 0x4e10000 0x0 0x7d>;
> > >   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> > > -			clocks = <&k3_clks 136 1>;
> > 
> > Does this mean that the crypto module's power-domains property should be
> > dropped as well?
> > 
> 
> Why? the power-domains property is in the correct spot (up in the parent node).
> 
> Now it is true we cant actually shut the SA2UL down since it is owned
> by the security processor, but since it is marked TI_SCI_PD_SHARED this
> should be fine.

The idea of the descriptions were to describe what is controllable by
firmware, if there is no control due to the specified reason, it is a
device tree bug, and should be documented when dropping it. If it serves
a purpose in the firmware by indicating usage for example - it has valid
reason to stick around as it is expected to be used by firmware for some
specific reason.

The commit description does bring up the above mentioned questions and
must be explained appropriately.

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

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
@ 2022-11-02 19:44         ` Nishanth Menon
  0 siblings, 0 replies; 16+ messages in thread
From: Nishanth Menon @ 2022-11-02 19:44 UTC (permalink / raw)
  To: Andrew Davis
  Cc: devicetree, Jayesh Choudhary, vigneshr, kristo, j-keerthy,
	linux-kernel, robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel

On 12:04-20221102, Andrew Davis wrote:
> On 11/2/22 10:17 AM, Nishanth Menon wrote:
> > On 03:02-20221101, Jayesh Choudhary wrote:
> > > Drop RNG clock property as it is not controlled by rng-driver.
> > 
> > Does'nt tell me what is the alternative? why is the hardware description
> > not sufficient for control?
> > 
> > https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
> > Looks like a perfectly valid description - do we have a bug and firmware
> > does'nt allow control here?
> > 
> 
> We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes
> to the PKA sub-module (isn't it nice when they make things simple). But x1 and
> x2 are miscellaneous and bus clocks respectively and route to several sub-modules.
> 
> All we drop here is the clock handle in the RNG sub-module, as that sub-module is
> not the owner of that clock (the parent SA2UL is). The alternative we could implement
> is to move the clock node up to the parent SA2UL node.
> 
> > > 
> > > Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
> > > Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> > > ---
> > >   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
> > >   1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > index 4005a73cfea9..e166d7b7e3a1 100644
> > > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > @@ -126,7 +126,6 @@ rng: rng@4e10000 {
> > >   			compatible = "inside-secure,safexcel-eip76";
> > >   			reg = <0x0 0x4e10000 0x0 0x7d>;
> > >   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> > > -			clocks = <&k3_clks 136 1>;
> > 
> > Does this mean that the crypto module's power-domains property should be
> > dropped as well?
> > 
> 
> Why? the power-domains property is in the correct spot (up in the parent node).
> 
> Now it is true we cant actually shut the SA2UL down since it is owned
> by the security processor, but since it is marked TI_SCI_PD_SHARED this
> should be fine.

The idea of the descriptions were to describe what is controllable by
firmware, if there is no control due to the specified reason, it is a
device tree bug, and should be documented when dropping it. If it serves
a purpose in the firmware by indicating usage for example - it has valid
reason to stick around as it is expected to be used by firmware for some
specific reason.

The commit description does bring up the above mentioned questions and
must be explained appropriately.

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
  2022-11-02 19:44         ` Nishanth Menon
@ 2022-11-04 18:23           ` Jayesh Choudhary
  -1 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-11-04 18:23 UTC (permalink / raw)
  To: Nishanth Menon, Andrew Davis
  Cc: vigneshr, kristo, robh+dt, j-keerthy, krzysztof.kozlowski+dt,
	s-anna, linux-arm-kernel, devicetree, linux-kernel



On 03/11/22 01:14, Nishanth Menon wrote:
> On 12:04-20221102, Andrew Davis wrote:
>> On 11/2/22 10:17 AM, Nishanth Menon wrote:
>>> On 03:02-20221101, Jayesh Choudhary wrote:
>>>> Drop RNG clock property as it is not controlled by rng-driver.
>>>
>>> Does'nt tell me what is the alternative? why is the hardware description
>>> not sufficient for control?
>>>
>>> https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
>>> Looks like a perfectly valid description - do we have a bug and firmware
>>> does'nt allow control here?
>>>
>>
>> We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes
>> to the PKA sub-module (isn't it nice when they make things simple). But x1 and
>> x2 are miscellaneous and bus clocks respectively and route to several sub-modules.
>>
>> All we drop here is the clock handle in the RNG sub-module, as that sub-module is
>> not the owner of that clock (the parent SA2UL is). The alternative we could implement
>> is to move the clock node up to the parent SA2UL node.
>>
>>>>
>>>> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
>>>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>>>> ---
>>>>    arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
>>>>    1 file changed, 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> index 4005a73cfea9..e166d7b7e3a1 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> @@ -126,7 +126,6 @@ rng: rng@4e10000 {
>>>>    			compatible = "inside-secure,safexcel-eip76";
>>>>    			reg = <0x0 0x4e10000 0x0 0x7d>;
>>>>    			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>>>> -			clocks = <&k3_clks 136 1>;
>>>
>>> Does this mean that the crypto module's power-domains property should be
>>> dropped as well?
>>>
>>
>> Why? the power-domains property is in the correct spot (up in the parent node).
>>
>> Now it is true we cant actually shut the SA2UL down since it is owned
>> by the security processor, but since it is marked TI_SCI_PD_SHARED this
>> should be fine.
> 
> The idea of the descriptions were to describe what is controllable by
> firmware, if there is no control due to the specified reason, it is a
> device tree bug, and should be documented when dropping it. If it serves
> a purpose in the firmware by indicating usage for example - it has valid
> reason to stick around as it is expected to be used by firmware for some
> specific reason.

The x1-clk to sa2ul is always running and fixed. What we can do is gate
off the clock specific to trng module (x1-clk) by using TRNG_EN MMR to
disable TRNG.
Hence, uncontrollable.

> 
> The commit description does bring up the above mentioned questions and
> must be explained appropriately.
> 

Okay, I will update the description properly in v2 for dropping this
clock and for each patch (and not just in the cover-letter).

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

* Re: [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock
@ 2022-11-04 18:23           ` Jayesh Choudhary
  0 siblings, 0 replies; 16+ messages in thread
From: Jayesh Choudhary @ 2022-11-04 18:23 UTC (permalink / raw)
  To: Nishanth Menon, Andrew Davis
  Cc: devicetree, vigneshr, kristo, j-keerthy, linux-kernel, robh+dt,
	krzysztof.kozlowski+dt, linux-arm-kernel



On 03/11/22 01:14, Nishanth Menon wrote:
> On 12:04-20221102, Andrew Davis wrote:
>> On 11/2/22 10:17 AM, Nishanth Menon wrote:
>>> On 03:02-20221101, Jayesh Choudhary wrote:
>>>> Drop RNG clock property as it is not controlled by rng-driver.
>>>
>>> Does'nt tell me what is the alternative? why is the hardware description
>>> not sufficient for control?
>>>
>>> https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am65x_sr2/clocks.html#clocks-for-sa2-ul0-device
>>> Looks like a perfectly valid description - do we have a bug and firmware
>>> does'nt allow control here?
>>>
>>
>> We have three input clocks feeding the SA2UL module, x1, x2, pka. PKA goes
>> to the PKA sub-module (isn't it nice when they make things simple). But x1 and
>> x2 are miscellaneous and bus clocks respectively and route to several sub-modules.
>>
>> All we drop here is the clock handle in the RNG sub-module, as that sub-module is
>> not the owner of that clock (the parent SA2UL is). The alternative we could implement
>> is to move the clock node up to the parent SA2UL node.
>>
>>>>
>>>> Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node")
>>>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>>>> ---
>>>>    arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
>>>>    1 file changed, 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> index 4005a73cfea9..e166d7b7e3a1 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> @@ -126,7 +126,6 @@ rng: rng@4e10000 {
>>>>    			compatible = "inside-secure,safexcel-eip76";
>>>>    			reg = <0x0 0x4e10000 0x0 0x7d>;
>>>>    			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>>>> -			clocks = <&k3_clks 136 1>;
>>>
>>> Does this mean that the crypto module's power-domains property should be
>>> dropped as well?
>>>
>>
>> Why? the power-domains property is in the correct spot (up in the parent node).
>>
>> Now it is true we cant actually shut the SA2UL down since it is owned
>> by the security processor, but since it is marked TI_SCI_PD_SHARED this
>> should be fine.
> 
> The idea of the descriptions were to describe what is controllable by
> firmware, if there is no control due to the specified reason, it is a
> device tree bug, and should be documented when dropping it. If it serves
> a purpose in the firmware by indicating usage for example - it has valid
> reason to stick around as it is expected to be used by firmware for some
> specific reason.

The x1-clk to sa2ul is always running and fixed. What we can do is gate
off the clock specific to trng module (x1-clk) by using TRNG_EN MMR to
disable TRNG.
Hence, uncontrollable.

> 
> The commit description does bring up the above mentioned questions and
> must be explained appropriately.
> 

Okay, I will update the description properly in v2 for dropping this
clock and for each patch (and not just in the cover-letter).

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-11-04 18:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 21:32 [PATCH 0/3] RNG clock property cleanup Jayesh Choudhary
2022-10-31 21:32 ` Jayesh Choudhary
2022-10-31 21:32 ` [PATCH 1/3] arm64: dts: ti: k3-am65-main: drop RNG clock Jayesh Choudhary
2022-10-31 21:32   ` Jayesh Choudhary
2022-11-02 15:17   ` Nishanth Menon
2022-11-02 15:17     ` Nishanth Menon
2022-11-02 17:04     ` Andrew Davis
2022-11-02 17:04       ` Andrew Davis
2022-11-02 19:44       ` Nishanth Menon
2022-11-02 19:44         ` Nishanth Menon
2022-11-04 18:23         ` Jayesh Choudhary
2022-11-04 18:23           ` Jayesh Choudhary
2022-10-31 21:32 ` [PATCH 2/3] arm64: dts: ti: k3-j721e-main: " Jayesh Choudhary
2022-10-31 21:32   ` Jayesh Choudhary
2022-10-31 21:32 ` [PATCH 3/3] arm64: dts: ti: k3-am64-main: " Jayesh Choudhary
2022-10-31 21:32   ` Jayesh Choudhary

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.