2022-12-11 03:48:29

by Jeremy Kerr

[permalink] [raw]
Subject: [RFC PATCH v3 0/2] Add reset control for mfd syscon devices

This RFC series adds a facility for syscon devices to control a reset
line when probed; we have instances of simple register-only syscon
resources that need deassertion of a reset line for the register set to
be accessible.

Rather than requiring a specific driver to implement this, it'd be nice
to use the generic syscon device and the generic resets linkage to do
so.

Any comments/queries/etc are most welcome.

Cheers,


Jeremy
---
v2:
- use direct syscon registration interface, rather than the (unused)
syscon platform device code
- consequently, add regmap infrastructure to attach a reset
controller, in a similar way to attaching clocks
v3:
- drop regmap reset attach and just do a direct deassert from the syscon
driver

Jeremy Kerr (2):
dt-bindings: mfd/syscon: Add resets property
mfd: syscon: allow reset control for syscon devices

.../devicetree/bindings/mfd/syscon.yaml | 3 +++
drivers/mfd/syscon.c | 27 ++++++++++++++-----
2 files changed, 24 insertions(+), 6 deletions(-)

--
2.35.1


2022-12-11 03:48:55

by Jeremy Kerr

[permalink] [raw]
Subject: [RFC PATCH v3 1/2] dt-bindings: mfd/syscon: Add resets property

Simple syscon devices may require deassertion of a reset signal in order
to access their register set. This change adds the `resets` property from
reset.yaml#/properties/resets (referenced through core.yaml), specifying
a maxItems of 1 for a single (optional) reset descriptor.

This will allow a future change to the syscon driver to implement reset
control.

Signed-off-by: Jeremy Kerr <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index 4e4baf53796d..9dc5984d9147 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -86,6 +86,9 @@ properties:
on the device.
enum: [1, 2, 4, 8]

+ resets:
+ maxItems: 1
+
hwlocks:
maxItems: 1
description:
--
2.35.1