Skip to contentSkip to conversation

arm64: dts: rockchip: enable rng on all rk356x

PATCH In review Peter Robinson 5 participants 6 messages Dec 1, 2024 – Dec 2, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: enable rng on all rk356x

The rk356x rng is available on both the rk3566 and rk3568 parts, the IP is all self contained within the SoCs so it's enabled already by default on rk3568 so let's enable it in the base rk356x.dtsi so it's enabled consistently everywhere.

---
 arch/arm64/boot/dts/rockchip/rk3568.dtsi      | 4 ----
 arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 1 -
 2 files changed, 5 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568.dtsi +0 -4
index ecaefe208e3e..9dc09db5034d 100644
@@ -397,10 +397,6 @@ power-domain@RK3568_PD_PIPE {
 	};
 };
 
-&rng {
-	status = "okay";
-};
-
 &usb_host0_xhci {
 	phys = <&usb2phy0_otg>, <&combphy0 PHY_TYPE_USB3>;
 	phy-names = "usb2-phy", "usb3-phy";
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +0 -1
index 62be06f3b863..2994cddb3464 100644
@@ -1038,7 +1038,6 @@ rng: rng@fe388000 {
 		clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
 		clock-names = "core", "ahb";
 		resets = <&cru SRST_TRNG_NS>;
-		status = "disabled";
 	};
 
 	i2s0_8ch: i2s@fe400000 {
Signature · 1 line
2.47.1
#1 lore raw

Hello Peter,

Quoted 5 lines · Peter Robinson

The rk356x rng is available on both the rk3566 and rk3568 parts, the IP is all self contained within the SoCs so it's enabled already by default on rk3568 so let's enable it in the base rk356x.dtsi so it's enabled consistently everywhere.

Please, go through the mailing list threads [1][2] that have led us to the current state. To sum it up, it isn't about what's supported in the two RK356x SoC variants, but about the RK3566's HWRNG being disabled because the testing showed that it produces unacceptably low quality of random data, for some yet unknown reason.

[1] https://lore.kernel.org/linux-rockchip/[email protected]/T/#u
[2] https://lore.kernel.org/linux-rockchip/[email protected]/T/#u

Quoted 35 lines
---
 arch/arm64/boot/dts/rockchip/rk3568.dtsi      | 4 ----
 arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 1 -
 2 files changed, 5 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568.dtsi +0 -4
index ecaefe208e3e..9dc09db5034d 100644
@@ -397,10 +397,6 @@ power-domain@RK3568_PD_PIPE {
 	};
 };
 
-&rng {
-	status = "okay";
-};
-
 &usb_host0_xhci {
 	phys = <&usb2phy0_otg>, <&combphy0 PHY_TYPE_USB3>;
 	phy-names = "usb2-phy", "usb3-phy";
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +0 -1
index 62be06f3b863..2994cddb3464 100644
@@ -1038,7 +1038,6 @@ rng: rng@fe388000 {
 		clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
 		clock-names = "core", "ahb";
 		resets = <&cru SRST_TRNG_NS>;
-		status = "disabled";
 	};
 
 	i2s0_8ch: i2s@fe400000 {
#2 lore raw

W dniu 2.12.2024 o 04:55, Dragan Simic pisze:

Quoted 7 lines · Peter Robinson
Quoted 5 lines

The rk356x rng is available on both the rk3566 and rk3568 parts, the IP is all self contained within the SoCs so it's enabled already by default on rk3568 so let's enable it in the base rk356x.dtsi so it's enabled consistently everywhere.

Quoted 5 lines

Please, go through the mailing list threads [1][2] that have led us to the current state. To sum it up, it isn't about what's supported in the two RK356x SoC variants, but about the RK3566's HWRNG being disabled because the testing showed that it produces unacceptably low quality of random data, for some yet unknown reason.

So maybe there should be a comment in rockchip/rk3568.dtsi so we would not get back to it again.

#3 lore raw
Quoted 8 lines · Marcin Juszkiewicz

W dniu 2.12.2024 o 04:55, Dragan Simic pisze:

Quoted 7 lines · Peter Robinson
Quoted 5 lines

The rk356x rng is available on both the rk3566 and rk3568 parts, the IP is all self contained within the SoCs so it's enabled already by default on rk3568 so let's enable it in the base rk356x.dtsi so it's enabled consistently everywhere.

Quoted 8 lines
Quoted 5 lines

Please, go through the mailing list threads [1][2] that have led us to the current state. To sum it up, it isn't about what's supported in the two RK356x SoC variants, but about the RK3566's HWRNG being disabled because the testing showed that it produces unacceptably low quality of random data, for some yet unknown reason.

So maybe there should be a comment in rockchip/rk3568.dtsi so we would not get back to it again.

I suggested to put that in the (original) commit message:
https://lore.kernel.org/linux-rockchip/6690040.iosknibmi9@bagend/
precisely because this was quite predictable to happen.

So a +1 on a comment in the dtsi with a link to the discussion in the commit message.

#4 lore raw

Hello Diederik and Marcin,

Quoted 19 lines · Diederik de Haas
Quoted 10 lines · Marcin Juszkiewicz

W dniu 2.12.2024 o 04:55, Dragan Simic pisze:

Quoted 9 lines · Peter Robinson
Quoted 5 lines

The rk356x rng is available on both the rk3566 and rk3568 parts, the IP is all self contained within the SoCs so it's enabled already by default on rk3568 so let's enable it in the base rk356x.dtsi so it's enabled consistently everywhere.

Please, go through the mailing list threads [1][2] that have led us to the current state. To sum it up, it isn't about what's

Quoted 7 lines

supported

Quoted 3 lines

in the two RK356x SoC variants, but about the RK3566's HWRNG being disabled because the testing showed that it produces unacceptably low quality of random data, for some yet unknown reason.

So maybe there should be a comment in rockchip/rk3568.dtsi so we would not get back to it again.

Quoted 6 lines

I suggested to put that in the (original) commit message:
https://lore.kernel.org/linux-rockchip/6690040.iosknibmi9@bagend/
precisely because this was quite predictable to happen.

So a +1 on a comment in the dtsi with a link to the discussion in the commit message.

Totally agreed on adding a brief summary to the RK356x base SoC dtsi, so I went ahead and sent a patch that adds it. [1] I also expected that to be described in the base dtsi back when the HWRNG support was added, but it somehow went in without the description.

[1] https://lore.kernel.org/linux-rockchip/6b272e2f8f916c04b05db50df621659a5a7f29ab.1733149874.git.dsimic@manjaro.org/

maintainer
#5 lore raw

Am Montag, 2. Dezember 2024, 15:50:07 CET schrieb Dragan Simic:

Quoted 26 lines

Hello Diederik and Marcin,

Quoted 23 lines · Diederik de Haas
Quoted 10 lines · Marcin Juszkiewicz

W dniu 2.12.2024 o 04:55, Dragan Simic pisze:

Quoted 9 lines · Peter Robinson
Quoted 5 lines

The rk356x rng is available on both the rk3566 and rk3568 parts, the IP is all self contained within the SoCs so it's enabled already by default on rk3568 so let's enable it in the base rk356x.dtsi so it's enabled consistently everywhere.

Please, go through the mailing list threads [1][2] that have led us to the current state. To sum it up, it isn't about what's

Quoted 7 lines

supported

Quoted 3 lines

in the two RK356x SoC variants, but about the RK3566's HWRNG being disabled because the testing showed that it produces unacceptably low quality of random data, for some yet unknown reason.

So maybe there should be a comment in rockchip/rk3568.dtsi so we would not get back to it again.

I suggested to put that in the (original) commit message:
https://lore.kernel.org/linux-rockchip/6690040.iosknibmi9@bagend/
precisely because this was quite predictable to happen.

Quoted 7 lines
Quoted 2 lines

So a +1 on a comment in the dtsi with a link to the discussion in the commit message.

Totally agreed on adding a brief summary to the RK356x base SoC dtsi, so I went ahead and sent a patch that adds it. [1] I also expected that to be described in the base dtsi back when the HWRNG support was added, but it somehow went in without the description.

thanks a lot for doing that, so I'll drop this patch here now from my inbox.

Heiko