devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] RK3576 Hardware RNG
@ 2025-04-30 16:16 Nicolas Frattaroli
  2025-04-30 16:16 ` [PATCH 1/3] dt-bindings: rng: rockchip,rk3588-rng: add rk3576-rng compatible Nicolas Frattaroli
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Nicolas Frattaroli @ 2025-04-30 16:16 UTC (permalink / raw)
  To: Daniel Golle, Aurelien Jarno, Olivia Mackall, Herbert Xu,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Jonas Karlman
  Cc: Sebastian Reichel, kernel, linux-crypto, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel,
	Nicolas Frattaroli

Gee Nicolas, how come your mom lets you write two Rockchip HWRNG drivers
in a year?

In short, RK3576 (and RK3562 and RK3528) introduce another HWRNG IP. It
actually has quite a few cool features, but I ignored the cool bits and
went straight for the true entropy. Some of the cool bits someone else
may wish to add in the future: AES-CTR PRNG that's regularly reseeded
from the entropy, adjustments for oscillator and oscillator ring lengths
to maximise entropy generation, automatic continuous quality checking of
the produced entropy by the hardware itself, etc.

In testing, it seems to produce about 2 mbit/s of high quality entropy
on the RK3576 with its default settings when we read the TRNG entropy
output directly. That's less than we'd get if we had the hardware use
the PRNG to stretch it, but I've decided to leave that up to Linux's
entropy pool implementation for now.

RK3562 and RK3528 probably just need a compatible and a DTS node to
enable it as well, but I don't have any RK3562/RK3528 boards to test
this with, so it's not done in this series.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
Nicolas Frattaroli (3):
      dt-bindings: rng: rockchip,rk3588-rng: add rk3576-rng compatible
      hwrng: rockchip - add support for RK3576's RNG
      arm64: dts: rockchip: add RK3576 RNG node

 .../bindings/rng/rockchip,rk3588-rng.yaml          |  5 +-
 arch/arm64/boot/dts/rockchip/rk3576.dtsi           |  8 +++
 drivers/char/hw_random/rockchip-rng.c              | 73 ++++++++++++++++++++++
 3 files changed, 84 insertions(+), 2 deletions(-)
---
base-commit: 4e0a9c660788594b5b49ac07f0fbdccd2218431e
change-id: 20250429-rk3576-hwrng-8c308b5711ae

Best regards,
-- 
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-05 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30 16:16 [PATCH 0/3] RK3576 Hardware RNG Nicolas Frattaroli
2025-04-30 16:16 ` [PATCH 1/3] dt-bindings: rng: rockchip,rk3588-rng: add rk3576-rng compatible Nicolas Frattaroli
2025-04-30 18:49   ` Krzysztof Kozlowski
2025-04-30 16:16 ` [PATCH 2/3] hwrng: rockchip - add support for RK3576's RNG Nicolas Frattaroli
2025-04-30 16:16 ` [PATCH 3/3] arm64: dts: rockchip: add RK3576 RNG node Nicolas Frattaroli
2025-05-05 12:27 ` [PATCH 0/3] RK3576 Hardware RNG Herbert Xu
2025-05-05 13:01 ` (subset) " Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).