[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250430-rk3576-hwrng-v1-0-480c15b5843e@collabora.com>
Date: Wed, 30 Apr 2025 18:16:33 +0200
From: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
To: Daniel Golle <daniel@...rotopia.org>,
Aurelien Jarno <aurelien@...el32.net>, Olivia Mackall <olivia@...enic.com>,
Herbert Xu <herbert@...dor.apana.org.au>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Heiko Stuebner <heiko@...ech.de>,
Jonas Karlman <jonas@...boo.se>
Cc: Sebastian Reichel <sebastian.reichel@...labora.com>,
kernel@...labora.com, linux-crypto@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
Subject: [PATCH 0/3] RK3576 Hardware RNG
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@...labora.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@...labora.com>
Powered by blists - more mailing lists