[PATCH v2 07/18] rockchip: rk3399: Enable random generator on all boards

Dragan Simic dsimic at manjaro.org
Wed May 1 10:43:46 CEST 2024


On 2024-04-30 17:30, Jonas Karlman wrote:
> The RK3399 SoC contain a crypto engine block that can generate random
> numbers.
> 
> Imply DM_RNG and RNG_ROCKCHIP Kconfig options to take advantage of the
> random generator on all RK3399 boards. Also remove the unnecessary use
> of a status = "okay" prop.
> 
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
> Reviewed-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>
> Reviewed-by: Peter Robinson <pbrobinson at gmail.com>
> Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Looking good to me.

Reviewed-by: Dragan Simic <dsimic at manjaro.org>

> ---
> v2: Move rng node cleanup to this patch
> v2: Collect r-b tags
> ---
>  arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi | 4 ----
>  arch/arm/dts/rk3399-u-boot.dtsi               | 1 -
>  arch/arm/mach-rockchip/Kconfig                | 2 ++
>  configs/chromebook_bob_defconfig              | 2 --
>  configs/chromebook_kevin_defconfig            | 2 --
>  configs/evb-rk3399_defconfig                  | 2 --
>  configs/firefly-rk3399_defconfig              | 2 --
>  configs/pinebook-pro-rk3399_defconfig         | 2 --
>  configs/pinephone-pro-rk3399_defconfig        | 2 --
>  configs/roc-pc-rk3399_defconfig               | 2 --
>  configs/rock960-rk3399_defconfig              | 2 --
>  configs/rockpro64-rk3399_defconfig            | 2 --
>  12 files changed, 2 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi
> b/arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi
> index cabf0a9dae89..0e46e87e1fa0 100644
> --- a/arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi
> @@ -12,10 +12,6 @@
>  	};
>  };
> 
> -&rng {
> -	status = "okay";
> -};
> -
>  &sdhci {
>  	max-frequency = <25000000>;
>  	bootph-all;
> diff --git a/arch/arm/dts/rk3399-u-boot.dtsi 
> b/arch/arm/dts/rk3399-u-boot.dtsi
> index 87b173e59579..0b0a90acf431 100644
> --- a/arch/arm/dts/rk3399-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-u-boot.dtsi
> @@ -32,7 +32,6 @@
>  	rng: rng at ff8b8000 {
>  		compatible = "rockchip,rk3399-crypto";
>  		reg = <0x0 0xff8b8000 0x0 0x1000>;
> -		status = "okay";
>  	};
> 
>  	dmc: dmc {
> diff --git a/arch/arm/mach-rockchip/Kconfig 
> b/arch/arm/mach-rockchip/Kconfig
> index 7c0116da4921..f580d69ed879 100644
> --- a/arch/arm/mach-rockchip/Kconfig
> +++ b/arch/arm/mach-rockchip/Kconfig
> @@ -265,12 +265,14 @@ config ROCKCHIP_RK3399
>  	imply ARMV8_SET_SMPEN
>  	imply BOOTSTD_FULL
>  	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
> +	imply DM_RNG
>  	imply LEGACY_IMAGE_FORMAT
>  	imply MISC
>  	imply MISC_INIT_R
>  	imply OF_LIVE
>  	imply PARTITION_TYPE_GUID
>  	imply PRE_CONSOLE_BUFFER
> +	imply RNG_ROCKCHIP
>  	imply ROCKCHIP_COMMON_BOARD
>  	imply ROCKCHIP_EFUSE
>  	imply ROCKCHIP_SDRAM_COMMON
> diff --git a/configs/chromebook_bob_defconfig 
> b/configs/chromebook_bob_defconfig
> index 400b2d7ed7de..5ffd5195ea19 100644
> --- a/configs/chromebook_bob_defconfig
> +++ b/configs/chromebook_bob_defconfig
> @@ -89,8 +89,6 @@ CONFIG_DM_REGULATOR_GPIO=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_CROS_EC=y
>  CONFIG_PWM_ROCKCHIP=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550_MEM32=y
>  CONFIG_ROCKCHIP_SPI=y
> diff --git a/configs/chromebook_kevin_defconfig
> b/configs/chromebook_kevin_defconfig
> index a881028cc7eb..bacdcc367bda 100644
> --- a/configs/chromebook_kevin_defconfig
> +++ b/configs/chromebook_kevin_defconfig
> @@ -90,8 +90,6 @@ CONFIG_DM_REGULATOR_GPIO=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_CROS_EC=y
>  CONFIG_PWM_ROCKCHIP=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550_MEM32=y
>  CONFIG_ROCKCHIP_SPI=y
> diff --git a/configs/evb-rk3399_defconfig 
> b/configs/evb-rk3399_defconfig
> index d81c7f9604e1..c4936768ffb6 100644
> --- a/configs/evb-rk3399_defconfig
> +++ b/configs/evb-rk3399_defconfig
> @@ -47,8 +47,6 @@ CONFIG_PMIC_RK8XX=y
>  CONFIG_REGULATOR_PWM=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550_MEM32=y
> diff --git a/configs/firefly-rk3399_defconfig 
> b/configs/firefly-rk3399_defconfig
> index 545c047c6df8..8f68ffbd3a49 100644
> --- a/configs/firefly-rk3399_defconfig
> +++ b/configs/firefly-rk3399_defconfig
> @@ -45,8 +45,6 @@ CONFIG_PMIC_RK8XX=y
>  CONFIG_REGULATOR_PWM=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550_MEM32=y
> diff --git a/configs/pinebook-pro-rk3399_defconfig
> b/configs/pinebook-pro-rk3399_defconfig
> index 23ac24a0bffe..e4aad1b710cb 100644
> --- a/configs/pinebook-pro-rk3399_defconfig
> +++ b/configs/pinebook-pro-rk3399_defconfig
> @@ -75,8 +75,6 @@ CONFIG_REGULATOR_PWM=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
>  CONFIG_RAM_ROCKCHIP_LPDDR4=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550_MEM32=y
> diff --git a/configs/pinephone-pro-rk3399_defconfig
> b/configs/pinephone-pro-rk3399_defconfig
> index 8c6323f6c516..285c47d76b6e 100644
> --- a/configs/pinephone-pro-rk3399_defconfig
> +++ b/configs/pinephone-pro-rk3399_defconfig
> @@ -65,8 +65,6 @@ CONFIG_REGULATOR_PWM=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
>  CONFIG_RAM_ROCKCHIP_LPDDR4=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_ROCKCHIP_SPI=y
> diff --git a/configs/roc-pc-rk3399_defconfig 
> b/configs/roc-pc-rk3399_defconfig
> index a41f71d9e167..5d6e6b17091f 100644
> --- a/configs/roc-pc-rk3399_defconfig
> +++ b/configs/roc-pc-rk3399_defconfig
> @@ -60,8 +60,6 @@ CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
>  # CONFIG_RAM_ROCKCHIP_DEBUG is not set
>  CONFIG_RAM_ROCKCHIP_LPDDR4=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550_MEM32=y
> diff --git a/configs/rock960-rk3399_defconfig 
> b/configs/rock960-rk3399_defconfig
> index 13575c580054..7a4a3df85b1b 100644
> --- a/configs/rock960-rk3399_defconfig
> +++ b/configs/rock960-rk3399_defconfig
> @@ -52,8 +52,6 @@ CONFIG_PMIC_RK8XX=y
>  CONFIG_REGULATOR_PWM=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550_MEM32=y
> diff --git a/configs/rockpro64-rk3399_defconfig
> b/configs/rockpro64-rk3399_defconfig
> index 062477286708..368ef7c4b5db 100644
> --- a/configs/rockpro64-rk3399_defconfig
> +++ b/configs/rockpro64-rk3399_defconfig
> @@ -68,8 +68,6 @@ CONFIG_REGULATOR_PWM=y
>  CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
>  CONFIG_RAM_ROCKCHIP_LPDDR4=y
> -CONFIG_DM_RNG=y
> -CONFIG_RNG_ROCKCHIP=y
>  CONFIG_SCSI=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2


More information about the U-Boot mailing list