[PATCH 1/2] rng: rockchip_rng: Add compatible for RK3568
Jonas Karlman
jonas at kwiboo.se
Sun Mar 30 23:40:10 CEST 2025
Linux commit afeccc408496 ("arm64: dts: rockchip: add DT entry for RNG
to RK356x") merged for v6.12-rc1 add a proper rng node to the SoC DT.
The compatible used differs compared to what U-Boot is currently using.
Add support for the rk3568-rng used in upstream Linux. Support for the
cryptov2-rng compatible is still kept because PX30/RK3326 and RK3308 are
still using it.
Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
---
arch/arm/dts/rk356x-u-boot.dtsi | 9 ++++-----
drivers/rng/rockchip_rng.c | 4 ++++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/arm/dts/rk356x-u-boot.dtsi b/arch/arm/dts/rk356x-u-boot.dtsi
index 24a976cf7e21..871869739536 100644
--- a/arch/arm/dts/rk356x-u-boot.dtsi
+++ b/arch/arm/dts/rk356x-u-boot.dtsi
@@ -21,11 +21,6 @@
bootph-all;
};
- rng: rng at fe388000 {
- compatible = "rockchip,cryptov2-rng";
- reg = <0x0 0xfe388000 0x0 0x2000>;
- };
-
otp: nvmem at fe38c000 {
compatible = "rockchip,rk3568-otp";
reg = <0x0 0xfe38c000 0x0 0x4000>;
@@ -121,6 +116,10 @@
bootph-all;
};
+&rng {
+ status = "okay";
+};
+
&sdhci {
bootph-pre-ram;
bootph-some-ram;
diff --git a/drivers/rng/rockchip_rng.c b/drivers/rng/rockchip_rng.c
index 2426648fbd57..f673e2657c94 100644
--- a/drivers/rng/rockchip_rng.c
+++ b/drivers/rng/rockchip_rng.c
@@ -312,6 +312,10 @@ static const struct udevice_id rockchip_rng_match[] = {
.compatible = "rockchip,rk3399-crypto",
.data = (ulong)&rk_cryptov1_soc_data,
},
+ {
+ .compatible = "rockchip,rk3568-rng",
+ .data = (ulong)&rk_cryptov2_soc_data,
+ },
{
.compatible = "rockchip,cryptov2-rng",
.data = (ulong)&rk_cryptov2_soc_data,
--
2.49.0
More information about the U-Boot
mailing list