]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwrng: rockchip - add hwrng driver for Rockchip RK3568 SoC
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 30 Jul 2024 16:11:04 +0000 (17:11 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 10 Aug 2024 04:25:34 +0000 (12:25 +0800)
commitdcf4fef6631c302f9bdd188979fe3172e47a29c7
tree2cde68b94866e7ea5993bf0380aa54b929c5eece
parent16fd38ab651ecebf1ff3d637f437f17e88cdc777
hwrng: rockchip - add hwrng driver for Rockchip RK3568 SoC

Rockchip SoCs used to have a random number generator as part of their
crypto device, and support for it has to be added to the corresponding
driver. However newer Rockchip SoCs like the RK3568 have an independent
True Random Number Generator device. This patch adds a driver for it,
greatly inspired from the downstream driver.

The TRNG device does not seem to have a signal conditionner and the FIPS
140-2 test returns a lot of failures. They can be reduced by increasing
RK_RNG_SAMPLE_CNT, in a tradeoff between quality and speed. This value
has been adjusted to get ~90% of successes and the quality value has
been set accordingly.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
[daniel@makrotpia.org: code style fixes]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
MAINTAINERS
drivers/char/hw_random/Kconfig
drivers/char/hw_random/Makefile
drivers/char/hw_random/rockchip-rng.c [new file with mode: 0644]