From: Fil Dunsky via B4 Relay <devnull+filipp.dunsky.gmail.com@kernel.org>
To: Olivia Mackall <olivia@selenic.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] hwrng: Add Cortina Systems CS7542 random number generator
Date: Tue, 24 Nov 2026 11:20:18 +0300 [thread overview]
Message-ID: <20261124-b4-cs7542-trng-v2-0-0192937b44be@gmail.com> (raw)
Add the Elliptic random number generator integrated in the CS7542,
based on the GPL vendor and OpenWrt implementations. Use a syscon
regmap for its shared global scratch bit and provide bounded polling,
nonblocking pending requests and partial output through the hwrng core.
Hardware ring reseeding is limited to the documented CS7542 A1 path.
The vendor driver avoids it on A0 for erratum 28891 and substitutes a
RTC/timer-derived nonce. Reject unsupported revisions using the global
syscon identification register instead of adopting that workaround.
The saved Almond+ capture identifies the tested board as CS7542 A1.
The binding, driver and MAINTAINERS entry apply to Linux v7.4-rc4
without the pending CS75xx platform or clock/pinctrl series.
The existing OpenWrt entropy quality setting of 512 is retained for
review. The output smoke tests do not establish an entropy estimate.
The v1 sources passed binding/example checks, ARM built-in and module
builds and RAM hardware smoke tests on Almond+. The hardware test
returned EAGAIN for the first nonblocking read, then provided 4096
bytes without all-zero or repeated-block output.
No additional hardware run is claimed for v2. The generating path on
A1 is unchanged; revision checks and their error paths were tested
with the actual C code and mocked resource/regmap/hwrng interfaces.
Full ARM W=1 built-in and module builds were repeated for v2.
---
Changes in v2:
- Drop the redundant linux/mod_devicetable.h include as suggested by
Uwe Kleine-König. The existing linux/of.h provides the OF device ID.
- Restrict hardware reseeding to CS7542 A1 after inspecting the vendor
erratum 28891 workaround. Propagate revision-read failures and reject
unsupported silicon before registering the hwrng.
- Describe the hardware revision restriction and identification register
in the binding.
- Link to v1: https://lore.kernel.org/all/20261123-b4-cs7542-trng-v1-0-92d9ffcee531@gmail.com/
To: Fil Dunsky <filipp.dunsky@gmail.com>
To: Olivia Mackall <olivia@selenic.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: linux-crypto@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Fil Dunsky (3):
dt-bindings: rng: Add Cortina Systems CS7542 TRNG
hwrng: Add Cortina Systems CS7542 TRNG driver
MAINTAINERS: Add Cortina Systems CS7542 TRNG support
.../bindings/rng/cortina,cs7542-trng.yaml | 43 +++++
MAINTAINERS | 7 +
drivers/char/hw_random/Kconfig | 11 ++
drivers/char/hw_random/Makefile | 1 +
drivers/char/hw_random/cs75xx-trng.c | 187 +++++++++++++++++++++
5 files changed, 249 insertions(+)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-b4-cs7542-trng-1a1b9f1cd392
Best regards,
--
Fil Dunsky <filipp.dunsky@gmail.com>
next reply other threads:[~2026-11-24 8:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 8:20 Fil Dunsky via B4 Relay [this message]
2026-11-24 8:20 ` [PATCH v2 1/3] dt-bindings: rng: Add Cortina Systems CS7542 TRNG Fil Dunsky via B4 Relay
2026-11-24 8:20 ` [PATCH v2 2/3] hwrng: Add Cortina Systems CS7542 TRNG driver Fil Dunsky via B4 Relay
2026-11-24 8:20 ` [PATCH v2 3/3] MAINTAINERS: Add Cortina Systems CS7542 TRNG support Fil Dunsky via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124-b4-cs7542-trng-v2-0-0192937b44be@gmail.com \
--to=devnull+filipp.dunsky.gmail.com@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=filipp.dunsky@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olivia@selenic.com \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®