Skip to contentSkip to conversation

arm: dts: rockchip: rk3399: enable rng at the SoC level

PATCH New Peter Robinson 1 participant 2 messages Dec 16, 2020 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm: dts: rockchip: rk3399: enable rng at the SoC level

The rng is embedded in the SoC so enable it in the device tree universally, the use of it can be controlled by enabling/disabling at the device config level.

---
 arch/arm/dts/rk3399-evb-u-boot.dtsi          | 4 ----
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 4 ----
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi    | 4 ----
 arch/arm/dts/rk3399-u-boot.dtsi              | 2 +-
 4 files changed, 1 insertion(+), 13 deletions(-)
arch/arm/dts/rk3399-evb-u-boot.dtsi +0 -4
index 8056dc843e..398b205ec2 100644
@@ -13,10 +13,6 @@
 	};
 };
 
-&rng {
-	status = "okay";
-};
-
 &i2c0 {
 	u-boot,dm-pre-reloc;
 };
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +0 -4
index ded7db0aef..c3e866a779 100644
@@ -28,10 +28,6 @@
 	u-boot,dm-pre-reloc;
 };
 
-&rng {
-	status = "okay";
-};
-
 &sdhci {
 	max-frequency = <25000000>;
 	u-boot,dm-pre-reloc;
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +0 -4
index 6317b47e41..37dff04adf 100644
@@ -15,10 +15,6 @@
 	};
 };
 
-&rng {
-	status = "okay";
-};
-
 &spi1 {
 	spi_flash: flash at 0 {
 		u-boot,dm-pre-reloc;
arch/arm/dts/rk3399-u-boot.dtsi +1 -1
index ecd230c720..73922c328a 100644
@@ -32,7 +32,7 @@
 	rng: rng at ff8b8000 {
 		compatible = "rockchip,cryptov1-rng";
 		reg = <0x0 0xff8b8000 0x0 0x1000>;
-		status = "disabled";
+		status = "okay";
 	};
 
 	dmc: dmc {
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/2 configs: rk3399: enable rng on firefly/rock960/rockpro64

Enable the RNG on the Firefly, rock960 and RockPro64 devices to enable KASLR on devices that support it.

Cc Akash Gajjar <[email protected]>
Cc Jagan Teki <[email protected]>
Cc Kever Yang <[email protected]>
Cc Manivannan Sadhasivam <[email protected]>
---
 configs/firefly-rk3399_defconfig   | 2 ++
 configs/rock960-rk3399_defconfig   | 2 ++
 configs/rockpro64-rk3399_defconfig | 2 ++
 3 files changed, 6 insertions(+)
configs/firefly-rk3399_defconfig +2 -0
index c453b82dc5..cfbaae40aa 100644
@@ -35,6 +35,8 @@ CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_ROCKCHIP=y
 CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
configs/rock960-rk3399_defconfig +2 -0
index 65dce3cd73..aadbc55f57 100644
@@ -39,6 +39,8 @@ CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_ROCKCHIP=y
 CONFIG_DM_ETH=y
 CONFIG_NVME=y
 CONFIG_PCI=y
configs/rockpro64-rk3399_defconfig +2 -0
index 575b7a20d5..f78dfcc8f7 100644
@@ -42,6 +42,8 @@ CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_ROCKCHIP=y
 CONFIG_SF_DEFAULT_BUS=1
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_DM_ETH=y
Signature · 1 line
2.29.2