From: "André Draszik" <andre.draszik@linaro.org>
To: Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: "Peter Griffin" <peter.griffin@linaro.org>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Will McVicker" <willmcvicker@google.com>,
kernel-team@android.com, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"André Draszik" <andre.draszik@linaro.org>
Subject: [PATCH 1/2] dt-bindings: reset: syscon-reboot: support reset modes
Date: Wed, 26 Feb 2025 14:08:20 +0000 [thread overview]
Message-ID: <20250226-syscon-reboot-reset-mode-v1-1-91c1b62166ae@linaro.org> (raw)
In-Reply-To: <20250226-syscon-reboot-reset-mode-v1-0-91c1b62166ae@linaro.org>
Add support for specifying different register/mask/value combinations
for different types of reset.
In particular, update the binding to allow platforms to specify the
following reset modes: soft, warm, cold, hard.
Linux can perform different types of reset using its reboot= kernel
command line argument, and some platforms also wish to reset
differently based on whether or not e.g. contents of RAM should be
retained across the reboot.
The new properties match the existing properties, just prefixed with
one of the reset modes mentioned above.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
.../bindings/power/reset/syscon-reboot.yaml | 74 ++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
index 19d3093e6cd2f7e39d94c56636dc202a4427ffc3..a34b1c08b7e0f34574a0257e13c02fceac0243ae 100644
--- a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
+++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
@@ -18,6 +18,11 @@ description: |+
parental dt-node. So the SYSCON reboot node should be represented as a
sub-node of a "syscon", "simple-mfd" node. Though the regmap property
pointing to the system controller node is also supported.
+ This also supports specification of separate sets of register/mask/value
+ pairs for different types of reset: cold, hard, soft and warm, using
+ the respective properties with the respective reset type prefix. If prefixed
+ properties are not specified for a reset type, the non-prefixed properties
+ will be used for that reset type.
properties:
compatible:
@@ -49,12 +54,41 @@ properties:
priority:
default: 192
+patternProperties:
+ "^(cold|hard|soft|warm)-(mask|offset|value)$":
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Optional alternative offset / mask / value combinations for specific
+ reboot modes. The mask is optional.
+
+ "^(cold|hard|soft|warm)-reg$":
+ description:
+ Optional alternative base address and size for the reboot register for
+ specific reboot modes.
+
oneOf:
- required:
- offset
- required:
- reg
+dependencies:
+ cold-mask: [ cold-value ]
+ cold-offset: [ cold-value ]
+ cold-reg: [ cold-value ]
+
+ hard-mask: [ hard-value ]
+ hard-offset: [ hard-value ]
+ hard-reg: [ hard-value ]
+
+ soft-mask: [ soft-value ]
+ soft-offset: [ soft-value ]
+ soft-reg: [ soft-value ]
+
+ warm-mask: [ warm-value ]
+ warm-offset: [ warm-value ]
+ warm-reg: [ warm-value ]
+
required:
- compatible
@@ -70,6 +104,46 @@ allOf:
required:
- value
+ - if:
+ required:
+ - cold-value
+ then:
+ oneOf:
+ - required:
+ - cold-offset
+ - required:
+ - cold-reg
+
+ - if:
+ required:
+ - hard-value
+ then:
+ oneOf:
+ - required:
+ - hard-offset
+ - required:
+ - hard-reg
+
+ - if:
+ required:
+ - soft-value
+ then:
+ oneOf:
+ - required:
+ - soft-offset
+ - required:
+ - soft-reg
+
+ - if:
+ required:
+ - warm-value
+ then:
+ oneOf:
+ - required:
+ - warm-offset
+ - required:
+ - warm-reg
+
examples:
- |
reboot {
--
2.48.1.658.g4767266eb4-goog
next prev parent reply other threads:[~2025-02-26 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 14:08 [PATCH 0/2] support Linux reboot modes in syscon-reboot André Draszik
2025-02-26 14:08 ` André Draszik [this message]
2025-02-26 15:29 ` [PATCH 1/2] dt-bindings: reset: syscon-reboot: support reset modes Rob Herring (Arm)
2025-02-26 15:42 ` André Draszik
2025-02-26 16:20 ` André Draszik
2025-02-26 14:08 ` [PATCH 2/2] power: reset: syscon-reboot: support different " André Draszik
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=20250226-syscon-reboot-reset-mode-v1-1-91c1b62166ae@linaro.org \
--to=andre.draszik@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel-team@android.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.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®