mbox series

[0/4] reset: introduct generic bit reset controller

Message ID 20250213020900.745551-1-inochiama@gmail.com (mailing list archive)
Headers show
Series reset: introduct generic bit reset controller | expand

Message

Inochi Amaoto Feb. 13, 2025, 2:08 a.m. UTC
Many SoC have a simple reset controller with toggling bit to perform
assert/deassert. It is annoyed to add compatiable for each device when
coming a new SoC. It is necessary to introduct a generic device to
simplify these things.

Add a simple generic bit reset controller, and migrate the Sophgo
SG2042 reset controller as an example.

Inochi Amaoto (4):
  dt-bindings: reset: add generic bit reset controller
  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          | 46 +++++++++++++++++++
 .../bindings/reset/sophgo,sg2042-reset.yaml   | 35 --------------
 arch/riscv/boot/dts/sophgo/sg2042.dtsi        |  2 +-
 drivers/reset/reset-simple.c                  |  3 ++
 4 files changed, 50 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

Comments

Philipp Zabel Feb. 13, 2025, 10:08 a.m. UTC | #1
On Do, 2025-02-13 at 10:08 +0800, Inochi Amaoto wrote:
> Many SoC have a simple reset controller with toggling bit to perform
> assert/deassert. It is annoyed to add compatiable for each device when
> coming a new SoC. It is necessary to introduct a generic device to
> simplify these things.

You'll still have to add a compatible to reset-simple.yaml for each new
SoC, see patch 3.

regards
Philipp
Inochi Amaoto Feb. 13, 2025, 11:33 a.m. UTC | #2
On Thu, Feb 13, 2025 at 11:08:03AM +0100, Philipp Zabel wrote:
> On Do, 2025-02-13 at 10:08 +0800, Inochi Amaoto wrote:
> > Many SoC have a simple reset controller with toggling bit to perform
> > assert/deassert. It is annoyed to add compatiable for each device when
> > coming a new SoC. It is necessary to introduct a generic device to
> > simplify these things.
> 
> You'll still have to add a compatible to reset-simple.yaml for each new
> SoC, see patch 3.
> 
> regards
> Philipp

Yeah, the binding is can not avoided, but it can avoided adding new
compatible in the driver. I will update the description.

Regards,
Inochi