]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3308: Enable random generator
authorJonas Karlman <jonas@kwiboo.se>
Mon, 8 Apr 2024 18:14:02 +0000 (18:14 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 26 Apr 2024 07:47:03 +0000 (15:47 +0800)
The RK3308 SoC contain a crypto engine block that can generate random
numbers.

Add rng node to soc u-boot.dtsi and enable Kconfig options to take
advantage of the random generator.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/dts/rk3308-u-boot.dtsi
arch/arm/mach-rockchip/Kconfig

index 436f66d1b87db008095cad13b1448b9c9757fcd2..fa31c838d34dba6303704be61de7300557a73c8f 100644 (file)
                        reg = <0x07 0x10>;
                };
        };
+
+       rng: rng@ff2f0000 {
+               compatible = "rockchip,cryptov2-rng";
+               reg = <0x0 0xff2f0000 0x0 0x4000>;
+       };
 };
 
 &cru {
index 2707d3fdfb31ccfceeabfb9f6358112ecb5e08ea..c17dbb615c2afbb19e9ca411378cc99e21f7d53d 100644 (file)
@@ -162,9 +162,11 @@ config ROCKCHIP_RK3308
        select SPL_LOAD_FIT
        imply ARMV8_CRYPTO
        imply ARMV8_SET_SMPEN
+       imply DM_RNG
        imply LEGACY_IMAGE_FORMAT
        imply MISC
        imply MISC_INIT_R
+       imply RNG_ROCKCHIP
        imply ROCKCHIP_COMMON_BOARD
        imply ROCKCHIP_OTP
        imply SPL_CLK