From: Inochi Amaoto <inochiama@gmail.com>
To: "Philipp Zabel" <p.zabel@pengutronix.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Chen Wang" <unicorn_wang@outlook.com>,
"Inochi Amaoto" <inochiama@gmail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Guo Ren" <guoren@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
sophgo@lists.linux.dev, linux-riscv@lists.infradead.org,
Yixun Lan <dlan@gentoo.org>, Longbin Li <looong.bin@gmail.com>
Subject: [PATCH v2 0/5] reset: introduce generic reset-simple controller
Date: Thu, 27 Feb 2025 07:42:28 +0800 [thread overview]
Message-ID: <20250226234234.125305-1-inochiama@gmail.com> (raw)
Many SoC have a simple reset controller with toggling bit to perform
assert/deassert. It is annoyed to add device id to the reset-simple
driver for each device when coming a new SoC.
This patch series introduce a generic binding to collect devices
match the following requirement:
- There is a single, contiguous range of 32-bit registers.
- All bits in each register directly control a reset line.
- There are no self-deasserting resets.
- There are no timing requirements.
- The bits are exclusively resets, nothing else.
- All bits behave the same, so all reset bits are either
active-high or all are active-low.
- The bits can be read back, but the read status may
be active-low independently from the writes.
If the device follows the requirement, it can set the compatiable
and reuse the provided "reset-simple" as base compatiable without
changing the reset-simple driver with unnecessary new device id.
Add a generic reset-simple controller, and migrate the Sophgo
SG2042 reset controller as an example.
Change from v1:
- https://lore.kernel.org/all/20250213020900.745551-1-inochiama@gmail.com/
1. fix title to mark it introduce new generic device for
reset-simple driver
2. add "active-low" property support for the generic reset-simple
device.
3. patch 1: update the binding description to illustrate the
suitable scenarios to use this binding.
Inochi Amaoto (5):
dt-bindings: reset: add generic bit reset controller
reset: simple: Add active-low property support.
reset: simple: add support generic reset-simple device
dt-bindings: reset: simple: migrate sophgo sg2042 reset controller
riscv: dts: sg2042: Adapt reset generator for new binding
.../bindings/reset/reset-simple.yaml | 66 +++++++++++++++++++
.../bindings/reset/sophgo,sg2042-reset.yaml | 35 ----------
arch/riscv/boot/dts/sophgo/sg2042.dtsi | 3 +-
drivers/reset/reset-simple.c | 7 ++
4 files changed, 75 insertions(+), 36 deletions(-)
create mode 100644 Documentation/devicetree/bindings/reset/reset-simple.yaml
delete mode 100644 Documentation/devicetree/bindings/reset/sophgo,sg2042-reset.yaml
--
2.48.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2025-02-26 23:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 23:42 Inochi Amaoto [this message]
2025-02-26 23:42 ` [PATCH v2 1/5] dt-bindings: reset: add generic bit reset controller Inochi Amaoto
2025-02-27 13:35 ` Rob Herring
2025-02-28 0:39 ` Inochi Amaoto
2025-02-26 23:42 ` [PATCH v2 2/5] reset: simple: Add active-low property support Inochi Amaoto
2025-02-26 23:42 ` [PATCH v2 3/5] reset: simple: add support generic reset-simple device Inochi Amaoto
2025-02-26 23:42 ` [PATCH v2 4/5] dt-bindings: reset: simple: migrate sophgo sg2042 reset controller Inochi Amaoto
2025-02-26 23:42 ` [PATCH v2 5/5] riscv: dts: sg2042: Adapt reset generator for new binding Inochi Amaoto
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=20250226234234.125305-1-inochiama@gmail.com \
--to=inochiama@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=guoren@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=looong.bin@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=u.kleine-koenig@baylibre.com \
--cc=unicorn_wang@outlook.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