drivers: rng: add smccc trng driver
Adds random number generator driver using Arm SMCCC TRNG interface to
get entropy bytes from secure monitor. The driver registers as an
Arm SMCCC feature driver to allow PSCI driver to bind a device for
when secure monitor exposes RNG support from Arm SMCCC TRNG interface.
Cc: Sughosh Ganu <sughosh.ganu@linaro.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
diff --git a/drivers/rng/Kconfig b/drivers/rng/Kconfig
index c0c49c3..21a9ff0 100644
--- a/drivers/rng/Kconfig
+++ b/drivers/rng/Kconfig
@@ -65,4 +65,13 @@
depends on DM_RNG
help
Enable random number generator for RPI4.
+
+config RNG_SMCCC_TRNG
+ bool "Arm SMCCC TRNG interface"
+ depends on DM_RNG && ARM_PSCI_FW
+ default y if ARM_SMCCC_FEATURES
+ help
+ Enable random number generator for platforms that support Arm
+ SMCCC TRNG interface.
+
endif