From: "lianfeng.ouyang" <lianfeng.ouyang@starfivetech.com>
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>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>
Subject: [PATCH v5 0/2] hwrng: starfive: add JHB100 support and fix clk/reset teardown
Date: Mon, 29 Jun 2026 16:36:56 +0800 [thread overview]
Message-ID: <20260629083658.300191-1-lianfeng.ouyang@starfivetech.com> (raw)
From: Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>
This patch series adds support for the JHB100 SoC TRNG and fixes
clock/reset teardown ordering issues.
The first patch updates the device tree bindings by removing the
obsolete JH8100 compatible string and adding JHB100 support
while updating the maintainer.
The second patch reworks the driver to ensure proper clock gating
before reset assertion for JHB100 to avoid reset-domain crossing
glitches, fixes RPM usage count handling, and improves error
path cleanup through devm actions.
Changes in v1:
- Remove jh8100-trng and Fix the compatible description in .yaml
- add JHB100 and fix clk/reset teardown logic code
Changes in v2:
- Balance the PM via pm_runtime_set_active() in ->probe
- Add devm_add_action_or_reset() to register a resource rollback function
Changes in v3:
- Supplement .yaml commit message
- Add pm_runtime_get_if_active() to check PM in irq
- Balances pm_runtime_get/put calls in init, read, and cleanup paths
- Add per-compatible match data for the teardown order
Changes in v4:
- Modify .yaml commit information to non point description
- serialise the command sequences with a mutex.
Changes in v5:
- Run the reseed from a workqueue instead of hard IRQ context.
- Balance the probe reset_control_deassert() via a ->cleanup flag in the
PM suspend/resume callbacks (was skipped when already suspended).
- Use devm_pm_runtime_set_active_enabled() instead of manual PM enable.
- Register the IRQ after clk/reset/PM setup; reuse
starfive_trng_release() on request_irq() failure.
- Check reset_control_deassert();
- drop of_match_ptr() from the match table.
Lianfeng Ouyang (2):
dt-bindings: rng: starfive,jh7110-trng: add jhb100, drop jh8100
hwrng: starfive: rework clk/reset teardown order for JHB100
.../bindings/rng/starfive,jh7110-trng.yaml | 10 +-
MAINTAINERS | 2 +-
drivers/char/hw_random/jh7110-trng.c | 312 ++++++++++++++----
3 files changed, 249 insertions(+), 75 deletions(-)
--
2.43.0
next reply other threads:[~2026-06-29 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 8:36 lianfeng.ouyang [this message]
2026-06-29 8:36 ` [PATCH v5 1/2] dt-bindings: rng: starfive,jh7110-trng: add jhb100, drop jh8100 lianfeng.ouyang
2026-06-29 8:36 ` [PATCH v5 2/2] hwrng: starfive: rework clk/reset teardown order for JHB100 lianfeng.ouyang
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=20260629083658.300191-1-lianfeng.ouyang@starfivetech.com \
--to=lianfeng.ouyang@starfivetech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=krzk+dt@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olivia@selenic.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
/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