mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Enable TRNG support
@ 2024-12-06  7:20 Md Sadre Alam
  2024-12-06  7:20 ` [PATCH 1/3] arm64: dts: qcom: ipq5424: Add TRNG node Md Sadre Alam
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Md Sadre Alam @ 2024-12-06  7:20 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel
  Cc: quic_srichara, quic_varada, quic_mdalam

This patch series enables support for Truly Random Number
Generators (TRNG) across various targets, including IPQ95xx,
IPQ32xx, and IPQ54xx.

Md Sadre Alam (3):
  arm64: dts: qcom: ipq5424: Add TRNG node
  arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG
  arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG

 arch/arm64/boot/dts/qcom/ipq5332.dtsi | 2 +-
 arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.34.1


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

* [PATCH 1/3] arm64: dts: qcom: ipq5424: Add TRNG node
  2024-12-06  7:20 [PATCH 0/3] Enable TRNG support Md Sadre Alam
@ 2024-12-06  7:20 ` Md Sadre Alam
  2024-12-12 23:56   ` Konrad Dybcio
  2024-12-06  7:20 ` [PATCH 2/3] arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG Md Sadre Alam
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Md Sadre Alam @ 2024-12-06  7:20 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel
  Cc: quic_srichara, quic_varada, quic_mdalam

add TRNG (Truly Random Number Generator) node for ipq5424

Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index 5e219f900412..c51879daa68c 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -145,6 +145,13 @@ soc@0 {
 		#size-cells = <2>;
 		ranges = <0 0 0 0 0x10 0>;
 
+		rng: rng@4c3000 {
+			compatible = "qcom,trng";
+			reg = <0 0x004c3000 0 0x1000>;
+			clocks = <&gcc GCC_PRNG_AHB_CLK>;
+			clock-names = "core";
+		};
+
 		tlmm: pinctrl@1000000 {
 			compatible = "qcom,ipq5424-tlmm";
 			reg = <0 0x01000000 0 0x300000>;
-- 
2.34.1


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

* [PATCH 2/3] arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG
  2024-12-06  7:20 [PATCH 0/3] Enable TRNG support Md Sadre Alam
  2024-12-06  7:20 ` [PATCH 1/3] arm64: dts: qcom: ipq5424: Add TRNG node Md Sadre Alam
@ 2024-12-06  7:20 ` Md Sadre Alam
  2024-12-12 23:55   ` Konrad Dybcio
  2024-12-06  7:20 ` [PATCH 3/3] arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG Md Sadre Alam
  2024-12-06  7:29 ` [PATCH 0/3] Enable TRNG support Manikanta Mylavarapu
  3 siblings, 1 reply; 10+ messages in thread
From: Md Sadre Alam @ 2024-12-06  7:20 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel
  Cc: quic_srichara, quic_varada, quic_mdalam

RNG hardware versions greater than 3.0 are Truly
Random Number Generators (TRNG). In IPQ95xx RNG
block is TRNG. Update the corresponding compatible
property to ensure the hardware block is registered
with the hw_random framework, which feeds the Linux
entropy pool.

Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index d1fd35ebc4a2..db1afa0d5422 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -227,7 +227,7 @@ rpm_msg_ram: sram@60000 {
 		};
 
 		rng: rng@e3000 {
-			compatible = "qcom,prng-ee";
+			compatible = "qcom,trng";
 			reg = <0x000e3000 0x1000>;
 			clocks = <&gcc GCC_PRNG_AHB_CLK>;
 			clock-names = "core";
-- 
2.34.1


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

* [PATCH 3/3] arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG
  2024-12-06  7:20 [PATCH 0/3] Enable TRNG support Md Sadre Alam
  2024-12-06  7:20 ` [PATCH 1/3] arm64: dts: qcom: ipq5424: Add TRNG node Md Sadre Alam
  2024-12-06  7:20 ` [PATCH 2/3] arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG Md Sadre Alam
@ 2024-12-06  7:20 ` Md Sadre Alam
  2024-12-06  7:29 ` [PATCH 0/3] Enable TRNG support Manikanta Mylavarapu
  3 siblings, 0 replies; 10+ messages in thread
From: Md Sadre Alam @ 2024-12-06  7:20 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, linux-kernel
  Cc: quic_srichara, quic_varada, quic_mdalam

RNG hardware versions greater than 3.0 are Truly
Random Number Generators (TRNG). In IPQ53xx RNG
block is TRNG. Update the corresponding compatible
property to ensure the hardware block is registered
with the hw_random framework, which feeds the Linux
entropy pool.

Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq5332.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index d3c3e215a15c..5e71c86c6935 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -180,7 +180,7 @@ cpu_speed_bin: cpu-speed-bin@1d {
 		};
 
 		rng: rng@e3000 {
-			compatible = "qcom,prng-ee";
+			compatible = "qcom,trng";
 			reg = <0x000e3000 0x1000>;
 			clocks = <&gcc GCC_PRNG_AHB_CLK>;
 			clock-names = "core";
-- 
2.34.1


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

* Re: [PATCH 0/3] Enable TRNG support
  2024-12-06  7:20 [PATCH 0/3] Enable TRNG support Md Sadre Alam
                   ` (2 preceding siblings ...)
  2024-12-06  7:20 ` [PATCH 3/3] arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG Md Sadre Alam
@ 2024-12-06  7:29 ` Manikanta Mylavarapu
  2024-12-09  5:32   ` Md Sadre Alam
  2024-12-13  8:46   ` Md Sadre Alam
  3 siblings, 2 replies; 10+ messages in thread
From: Manikanta Mylavarapu @ 2024-12-06  7:29 UTC (permalink / raw)
  To: Md Sadre Alam, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel
  Cc: quic_srichara, quic_varada



On 12/6/2024 12:50 PM, Md Sadre Alam wrote:
> This patch series enables support for Truly Random Number
> Generators (TRNG) across various targets, including IPQ95xx,
> IPQ32xx, and IPQ54xx.
> 

It should be IPQ53xx, not IPQ32xx.

--Manikanta.

> Md Sadre Alam (3):
>   arm64: dts: qcom: ipq5424: Add TRNG node
>   arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG
>   arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG
> 
>  arch/arm64/boot/dts/qcom/ipq5332.dtsi | 2 +-
>  arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++
>  arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2 +-
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 


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

* Re: [PATCH 0/3] Enable TRNG support
  2024-12-06  7:29 ` [PATCH 0/3] Enable TRNG support Manikanta Mylavarapu
@ 2024-12-09  5:32   ` Md Sadre Alam
  2024-12-13  8:46   ` Md Sadre Alam
  1 sibling, 0 replies; 10+ messages in thread
From: Md Sadre Alam @ 2024-12-09  5:32 UTC (permalink / raw)
  To: Manikanta Mylavarapu, andersson, konradybcio, robh, krzk+dt,
	conor+dt, linux-arm-msm, devicetree, linux-kernel
  Cc: quic_srichara, quic_varada



On 12/6/2024 12:59 PM, Manikanta Mylavarapu wrote:
> 
> 
> On 12/6/2024 12:50 PM, Md Sadre Alam wrote:
>> This patch series enables support for Truly Random Number
>> Generators (TRNG) across various targets, including IPQ95xx,
>> IPQ32xx, and IPQ54xx.
>>
> 
> It should be IPQ53xx, not IPQ32xx.
Thank you for pointing that out. I'll address this in the next revision
> 
> --Manikanta.
> 
>> Md Sadre Alam (3):
>>    arm64: dts: qcom: ipq5424: Add TRNG node
>>    arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG
>>    arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG
>>
>>   arch/arm64/boot/dts/qcom/ipq5332.dtsi | 2 +-
>>   arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++
>>   arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2 +-
>>   3 files changed, 9 insertions(+), 2 deletions(-)
>>
> 

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

* Re: [PATCH 2/3] arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG
  2024-12-06  7:20 ` [PATCH 2/3] arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG Md Sadre Alam
@ 2024-12-12 23:55   ` Konrad Dybcio
  2024-12-13  8:44     ` Md Sadre Alam
  0 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2024-12-12 23:55 UTC (permalink / raw)
  To: Md Sadre Alam, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel
  Cc: quic_srichara, quic_varada

On 6.12.2024 8:20 AM, Md Sadre Alam wrote:
> RNG hardware versions greater than 3.0 are Truly
> Random Number Generators (TRNG). In IPQ95xx RNG
> block is TRNG. Update the corresponding compatible
> property to ensure the hardware block is registered
> with the hw_random framework, which feeds the Linux
> entropy pool.

Line wrapping should be around 72 chars, this looks funny

Please change the commit title to 'update TRNG compatible', as
'enable' implies the functionality is not present as of current.

The latter part of the last sentence is misleading, as both
compatibles do the same thing in the driver. Instead, put emphasis
on the wrong compatible being used and the patch making sure the
hardware is described properly, without functional changes.

Same for patch 3

Konrad

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

* Re: [PATCH 1/3] arm64: dts: qcom: ipq5424: Add TRNG node
  2024-12-06  7:20 ` [PATCH 1/3] arm64: dts: qcom: ipq5424: Add TRNG node Md Sadre Alam
@ 2024-12-12 23:56   ` Konrad Dybcio
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2024-12-12 23:56 UTC (permalink / raw)
  To: Md Sadre Alam, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel
  Cc: quic_srichara, quic_varada

On 6.12.2024 8:20 AM, Md Sadre Alam wrote:
> add TRNG (Truly Random Number Generator) node for ipq5424
> 
> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH 2/3] arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG
  2024-12-12 23:55   ` Konrad Dybcio
@ 2024-12-13  8:44     ` Md Sadre Alam
  0 siblings, 0 replies; 10+ messages in thread
From: Md Sadre Alam @ 2024-12-13  8:44 UTC (permalink / raw)
  To: Konrad Dybcio, andersson, konradybcio, robh, krzk+dt, conor+dt,
	linux-arm-msm, devicetree, linux-kernel
  Cc: quic_srichara, quic_varada



On 12/13/2024 5:25 AM, Konrad Dybcio wrote:
> On 6.12.2024 8:20 AM, Md Sadre Alam wrote:
>> RNG hardware versions greater than 3.0 are Truly
>> Random Number Generators (TRNG). In IPQ95xx RNG
>> block is TRNG. Update the corresponding compatible
>> property to ensure the hardware block is registered
>> with the hw_random framework, which feeds the Linux
>> entropy pool.
> 
> Line wrapping should be around 72 chars, this looks funny
Ok
> 
> Please change the commit title to 'update TRNG compatible', as
> 'enable' implies the functionality is not present as of current.
Ok
> 
> The latter part of the last sentence is misleading, as both
> compatibles do the same thing in the driver. Instead, put emphasis
> on the wrong compatible being used and the patch making sure the
> hardware is described properly, without functional changes.
Ok, will update in next revision.
> 
> Same for patch 3
Ok
> 
> Konrad

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

* Re: [PATCH 0/3] Enable TRNG support
  2024-12-06  7:29 ` [PATCH 0/3] Enable TRNG support Manikanta Mylavarapu
  2024-12-09  5:32   ` Md Sadre Alam
@ 2024-12-13  8:46   ` Md Sadre Alam
  1 sibling, 0 replies; 10+ messages in thread
From: Md Sadre Alam @ 2024-12-13  8:46 UTC (permalink / raw)
  To: Manikanta Mylavarapu, andersson, konradybcio, robh, krzk+dt,
	conor+dt, linux-arm-msm, devicetree, linux-kernel
  Cc: quic_srichara, quic_varada



On 12/6/2024 12:59 PM, Manikanta Mylavarapu wrote:
> 
> 
> On 12/6/2024 12:50 PM, Md Sadre Alam wrote:
>> This patch series enables support for Truly Random Number
>> Generators (TRNG) across various targets, including IPQ95xx,
>> IPQ32xx, and IPQ54xx.
>>
> 
> It should be IPQ53xx, not IPQ32xx.
Ok
> 
> --Manikanta.
> 
>> Md Sadre Alam (3):
>>    arm64: dts: qcom: ipq5424: Add TRNG node
>>    arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG
>>    arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG
>>
>>   arch/arm64/boot/dts/qcom/ipq5332.dtsi | 2 +-
>>   arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++
>>   arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2 +-
>>   3 files changed, 9 insertions(+), 2 deletions(-)
>>
> 

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

end of thread, other threads:[~2024-12-13  8:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-06  7:20 [PATCH 0/3] Enable TRNG support Md Sadre Alam
2024-12-06  7:20 ` [PATCH 1/3] arm64: dts: qcom: ipq5424: Add TRNG node Md Sadre Alam
2024-12-12 23:56   ` Konrad Dybcio
2024-12-06  7:20 ` [PATCH 2/3] arm64: dts: qcom: ipq9574: Enable TRNG instead PRNG Md Sadre Alam
2024-12-12 23:55   ` Konrad Dybcio
2024-12-13  8:44     ` Md Sadre Alam
2024-12-06  7:20 ` [PATCH 3/3] arm64: dts: qcom: ipq5332: Enable TRNG instead of PRNG Md Sadre Alam
2024-12-06  7:29 ` [PATCH 0/3] Enable TRNG support Manikanta Mylavarapu
2024-12-09  5:32   ` Md Sadre Alam
2024-12-13  8:46   ` Md Sadre Alam

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®