Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/3] hwrng: add Microchip RNG90 support
@ 2026-10-24 20:18 Patrick Tudor
  2026-10-24 20:18 ` [PATCH 1/3] dt-bindings: trivial-devices: add Microchip RNG90 Patrick Tudor
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Patrick Tudor @ 2026-10-24 20:18 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Olivia Mackall,
	Herbert Xu
  Cc: devicetree, linux-kernel, linux-crypto, Patrick Tudor

The Microchip RNG90 is an I2C cryptographic random number generator at
the fixed 0x40 address. It combines a physical noise source with a
SHA-256 Hash_DRBG and returns a 256-bit result for each Random command.
The device performs runtime health tests and self-tests before releasing
output.

This series documents the compatible, adds the hwrng driver, and adds a
KUnit suite using a scripted I2C adapter. The driver wakes and identifies
the part, validates framing and CRCs, polls within data-sheet deadlines,
recovers once from transport or synchronization failures, and withholds
output after any device verdict or malformed response.

The data sheet specifies 128-bit security strength for each 256-bit
result, but that does not establish entropy per output bit. The driver
therefore starts at the hwrng framework's minimum nonzero quality of 1.
An administrator can raise rng_quality after qualifying the complete
platform and its operating conditions.

Validation against the base commit:

  - dt_binding_check for trivial-devices.yaml
  - full x86_64 defconfig build and a separate W=1 module rebuild
  - UML KUnit: 32 tests passed

The driver was also exercised on physical RNG90 hardware through the
in-tree hid-cp2112 adapter: three 500-block streams, hot unplug/replug,
unbind/rebind, and S3 suspend/resume completed without driver errors.

Signed-off-by: Patrick Tudor <ptudor@ptudor.net>
---
Patrick Tudor (3):
      dt-bindings: trivial-devices: add Microchip RNG90
      hwrng: add Microchip RNG90 driver
      hwrng: rng90: add KUnit tests

 .../devicetree/bindings/trivial-devices.yaml       |   2 +
 drivers/char/hw_random/Kconfig                     |  26 +
 drivers/char/hw_random/Makefile                    |   1 +
 drivers/char/hw_random/rng90-kunit.c               | 820 +++++++++++++++++++++
 drivers/char/hw_random/rng90.c                     | 555 ++++++++++++++
 5 files changed, 1404 insertions(+)
---
base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
change-id: 20261024-rng90-submit-v1-705c3c70a116

Best regards,
-- 
Patrick Tudor <ptudor@ptudor.net>


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

end of thread, other threads:[~2026-10-26 12:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24 20:18 [PATCH 0/3] hwrng: add Microchip RNG90 support Patrick Tudor
2026-10-24 20:18 ` [PATCH 1/3] dt-bindings: trivial-devices: add Microchip RNG90 Patrick Tudor
2026-10-26 12:43   ` Krzysztof Kozlowski
2026-10-24 20:18 ` [PATCH 2/3] hwrng: add Microchip RNG90 driver Patrick Tudor
2026-10-24 20:18 ` [PATCH 3/3] hwrng: rng90: add KUnit tests Patrick Tudor
2026-10-24 23:22   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox