From: Yaozhong Li <yaozhonguwl@gmail.com>
To: Lee Jones <lee@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Chris Zhong <zyw@rock-chips.com>,
Zhang Qing <zhangqing@rock-chips.com>,
Joseph Chen <chenjh@rock-chips.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Yaozhong Li <yaozhonguwl@gmail.com>,
mfd@lists.linux.dev, devicetree@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v6 1/3] dt-bindings: mfd: rk8xx: add board level power hold GPIOs
Date: Sun, 1 Nov 2026 23:40:50 +0800 [thread overview]
Message-ID: <20261101154053.3874-2-yaozhonguwl@gmail.com> (raw)
In-Reply-To: <20261101154053.3874-1-yaozhonguwl@gmail.com>
Some boards route "power hold" lines from the SoC into the board's power
circuitry. Those lines have to be held asserted while the system is
running and released before the PMIC shutdown request is written,
otherwise the rails can drop and come back up instead of staying off.
Add power-hold-gpios to describe those lines and power-hold-delay-ms for
the settle time. The driver reads them for every RK8xx variant that is
the system power controller, so define them once, in a schema shared by
the seven RK8xx bindings, and reference it from each. The bindings
switch to unevaluatedProperties: false so that the shared properties are
allowed, except rk817, which keeps additionalProperties: false and lists
the two properties: it also references dai-common, of which it only
allows a subset.
The array is bounded at two entries. Firefly's vendor kernel handles
exactly two such lines, pmic,hold-gpio and pmic,stby-gpio, and its board
files use one or both of them, with an RK808 and with an RK818.
The lines are released from the PMIC's power-off path, so they are only
meaningful when the PMIC is the system power controller. Require that.
A board adding these lines is expected to switch to the generic
system-power-controller property at the same time, so the deprecated
rockchip,system-power-controller spelling is not accepted here.
Assisted-by: LLM
Signed-off-by: Yaozhong Li <yaozhonguwl@gmail.com>
---
.../bindings/mfd/rockchip,rk801.yaml | 5 ++-
.../bindings/mfd/rockchip,rk805.yaml | 3 +-
.../bindings/mfd/rockchip,rk806.yaml | 1 +
.../bindings/mfd/rockchip,rk808.yaml | 5 ++-
.../bindings/mfd/rockchip,rk816.yaml | 5 ++-
.../bindings/mfd/rockchip,rk817.yaml | 4 ++
.../bindings/mfd/rockchip,rk818.yaml | 5 ++-
.../mfd/rockchip,rk8xx-power-hold.yaml | 42 +++++++++++++++++++
8 files changed, 65 insertions(+), 5 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/rockchip,rk8xx-power-hold.yaml
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml
index 7c71447..38108fe 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml
@@ -76,7 +76,10 @@ required:
- reg
- interrupts
-additionalProperties: false
+allOf:
+ - $ref: rockchip,rk8xx-power-hold.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
index da23915..ddf2b2f 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
@@ -87,6 +87,7 @@ properties:
unevaluatedProperties: false
allOf:
+ - $ref: rockchip,rk8xx-power-hold.yaml#
- if:
properties:
'#clock-cells':
@@ -108,7 +109,7 @@ required:
- interrupts
- "#clock-cells"
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml
index eb5bca3..5ca76dd 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml
@@ -136,6 +136,7 @@ patternProperties:
enum: [gpio_pwrctrl1, gpio_pwrctrl2, gpio_pwrctrl3]
allOf:
+ - $ref: rockchip,rk8xx-power-hold.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml
required:
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
index 50dfffa..d51f815 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
@@ -119,7 +119,10 @@ required:
- interrupts
- "#clock-cells"
-additionalProperties: false
+allOf:
+ - $ref: rockchip,rk8xx-power-hold.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml
index a58d945..c0c8dec 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml
@@ -107,7 +107,10 @@ required:
- interrupts
- '#clock-cells'
-additionalProperties: false
+allOf:
+ - $ref: rockchip,rk8xx-power-hold.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml
index 2cb6d17..6207c42 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml
@@ -55,6 +55,9 @@ properties:
system-power-controller: true
+ power-hold-gpios: true
+ power-hold-delay-ms: true
+
wakeup-source:
type: boolean
description:
@@ -157,6 +160,7 @@ properties:
additionalProperties: false
allOf:
+ - $ref: rockchip,rk8xx-power-hold.yaml#
- $ref: /schemas/sound/dai-common.yaml#
- if:
properties:
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
index 90d944c..c9b863a 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
@@ -111,7 +111,10 @@ required:
- interrupts
- "#clock-cells"
-additionalProperties: false
+allOf:
+ - $ref: rockchip,rk8xx-power-hold.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk8xx-power-hold.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk8xx-power-hold.yaml
new file mode 100644
index 0000000..6be3e1e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk8xx-power-hold.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/rockchip,rk8xx-power-hold.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip RK8xx PMIC board level power hold GPIOs
+
+maintainers:
+ - Yaozhong Li <yaozhonguwl@gmail.com>
+
+description:
+ Properties shared by the RK8xx PMIC bindings for boards that route power
+ hold lines from the SoC into the board's power circuitry, which have to
+ be released before the PMIC is asked to power the system off.
+
+properties:
+ power-hold-gpios:
+ minItems: 1
+ maxItems: 2
+ description: >
+ Board level power hold lines driven by the SoC. They have to be held
+ asserted while the system is running and released before the PMIC
+ shutdown request is written, otherwise the rails can drop and come
+ back up instead of staying off. Only meaningful when this PMIC is the
+ system power controller, as the lines are released as part of its
+ power-off path.
+
+ The lines are released in the order listed, and power-hold-delay-ms
+ elapses once, after the last of them.
+
+ power-hold-delay-ms:
+ default: 0
+ description:
+ Time to wait after releasing power-hold-gpios before the shutdown
+ request is written, to let the lines settle.
+
+dependentRequired:
+ power-hold-gpios: [ system-power-controller ]
+ power-hold-delay-ms: [ power-hold-gpios ]
+
+additionalProperties: true
--
2.55.0.windows.3
next prev parent reply other threads:[~2026-11-01 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 15:40 [PATCH v6 0/3] Fix poweroff restarting the board on Firefly-RK3399 Yaozhong Li
2026-11-01 15:40 ` Yaozhong Li [this message]
2026-11-01 15:40 ` [PATCH v6 2/3] mfd: rk8xx: Release the power hold GPIOs before powering off Yaozhong Li
2026-11-01 15:40 ` [PATCH v6 3/3] arm64: dts: rockchip: fix power-off on Firefly-RK3399 Yaozhong Li
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=20261101154053.3874-2-yaozhonguwl@gmail.com \
--to=yaozhonguwl@gmail.com \
--cc=chenjh@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mfd@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=zhangqing@rock-chips.com \
--cc=zyw@rock-chips.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®