From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 850C8606A33F for ; Tue, 20 Oct 2026 14:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=O9wuC8zk; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=Z3cG9iSc DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cv4DXxjBbL+VqD4nfOrAKFH2DiIEA7H+jQviI6ffubA=; b=O9wuC8zkOly2wR ltS5Y4HiqxVJPbY/UWE3akb6k6Ok/hJStLaa71tGbbK2Xb+Q3tHcFhA8qD4VEmMEElqkJUai89Xrr KKERrqrOazoxzEX04852zp2d5dno5Nc65+4Y0L0Dp1gtBSXX2HYt6c4Ox5kXmF9jmtVXI6+y07cyT /IR1NpVW7yje/e6Yb8Uz1qbSFMd+REKYQiWXe+6LKsdBF5nS4mLg/5bNpCCVRGxc1+bZ+NF4oXGYL g/druOvvnlMh6gj1X0LKsei8YPS/Jxezoh94xRyF4jtZ0nHnaDaSntHGSHgEGDjGLef0grDV50Gw5 E2SS6q7Pz59bD0LotYfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJAR7-00000009rzg-3IxO; Tue, 20 Oct 2026 14:03:29 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJAR5-00000009ryO-1hAy for linux-rockchip@lists.infradead.org; Tue, 20 Oct 2026 14:03:28 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2e99b1e5b4cso17258435ad.0 for ; Tue, 20 Oct 2026 07:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792505006; x=1793109806; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=pUI83F+vNn47A4zRNccyxKlCOIII3kxuZu0/rPY+a/I=; b=Z3cG9iScZ1xjKIEuJPOEiVoG+uPrj2DndrD3qxHMIlrmYpid8v3ArCnRAChquRysZr 2pyjE6hA6bgS6fiwUqLBCbZJK40YsWbHu7kxLqqf6yz2D6nmp0dK5dyIUAAK3SH/QVQg +Kw2BfwEjDdBy1LVwgHbDt0jAHE3mRBqucOFqfyyqmZrk/n+4XUW4FtqTTfHnxAyFIjR uwCTnibXalhfR6L8L4xSv5PqyyExpnjkFic+RsknUHlglgCzA093W9f/9nRwFLeODICp 6fqniEuV4hOBosFIiponppxf1nwRU3xw82i3f5JhmdvXUgcFDx4skUzLm+Gq5u1hER+X AwrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792505006; x=1793109806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=pUI83F+vNn47A4zRNccyxKlCOIII3kxuZu0/rP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8Cx97+WuJ+F1P6IzH4gR1qtjzzzoy5B4mDM8r2TboZ50l8d +QqnE9CSo0= X-Received: by 2002:a17:902:e547:b0:2e8:93b5:c555 with SMTP id d9443c01a7336-2e9a6e5296emr88242645ad.61.1792505006159; Tue, 20 Oct 2026 07:03:26 -0700 (PDT) Received: from Aaron-M6 ([188.253.120.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ea1502971csm12434865ad.51.2026.10.20.07.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2026 07:03:25 -0700 (PDT) From: Yaozhong Li To: Lee Jones Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Chris Zhong , Zhang Qing , Joseph Chen , Sebastian Reichel , mfd@lists.linux.dev, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yaozhong Li Subject: [PATCH v4 1/3] dt-bindings: mfd: rk8xx: add board level power hold GPIOs Date: Tue, 20 Oct 2026 22:01:12 +0800 Message-ID: <20261020140127.720-2-yaozhonguwl@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261020140127.720-1-yaozhonguwl@gmail.com> References: <20261020140127.720-1-yaozhonguwl@gmail.com> X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261020_070327_445980_AC8E96B1 X-CRM114-Status: GOOD ( 13.30 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 add them to all seven RK8xx schemas. 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, accepting whichever spellings of the property each schema allows. Assisted-by: LLM Signed-off-by: Yaozhong Li --- .../bindings/mfd/rockchip,rk801.yaml | 23 +++++++++++++++ .../bindings/mfd/rockchip,rk805.yaml | 29 +++++++++++++++++++ .../bindings/mfd/rockchip,rk806.yaml | 23 +++++++++++++++ .../bindings/mfd/rockchip,rk808.yaml | 29 +++++++++++++++++++ .../bindings/mfd/rockchip,rk816.yaml | 23 +++++++++++++++ .../bindings/mfd/rockchip,rk817.yaml | 29 +++++++++++++++++++ .../bindings/mfd/rockchip,rk818.yaml | 29 +++++++++++++++++++ 7 files changed, 185 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml index 7c71447..2f9554d 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml @@ -29,6 +29,25 @@ properties: description: Telling whether or not this PMIC is controlling the system power. + 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. + wakeup-source: type: boolean description: @@ -71,6 +90,10 @@ properties: unevaluatedProperties: false additionalProperties: false +dependencies: + power-hold-delay-ms: [ power-hold-gpios ] + power-hold-gpios: [ system-power-controller ] + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml index da23915..1a11c98 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml @@ -48,6 +48,26 @@ properties: system-power-controller: true + 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, through either system-power-controller or + the deprecated rockchip,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. + wakeup-source: type: boolean description: @@ -102,6 +122,15 @@ allOf: clock-output-names: maxItems: 2 +dependencies: + power-hold-delay-ms: [ power-hold-gpios ] + +dependentSchemas: + power-hold-gpios: + anyOf: + - required: [ system-power-controller ] + - required: [ 'rockchip,system-power-controller' ] + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml index eb5bca3..3df5501 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml @@ -31,6 +31,25 @@ properties: system-power-controller: true + 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. + rockchip,reset-mode: $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1, 2] @@ -138,6 +157,10 @@ patternProperties: allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml +dependencies: + power-hold-delay-ms: [ power-hold-gpios ] + power-hold-gpios: [ system-power-controller ] + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml index 50dfffa..a331a2f 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml @@ -43,6 +43,26 @@ properties: system-power-controller: true + 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, through either system-power-controller or + the deprecated rockchip,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. + wakeup-source: type: boolean description: @@ -113,6 +133,15 @@ properties: unevaluatedProperties: false unevaluatedProperties: false +dependencies: + power-hold-delay-ms: [ power-hold-gpios ] + +dependentSchemas: + power-hold-gpios: + anyOf: + - required: [ system-power-controller ] + - required: [ 'rockchip,system-power-controller' ] + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml index a58d945..f90e5d5 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml @@ -44,6 +44,25 @@ properties: description: Telling whether or not this PMIC is controlling the system power. + 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. + wakeup-source: true vcc1-supply: @@ -101,6 +120,10 @@ patternProperties: $ref: /schemas/types.yaml#/definitions/string const: gpio0 +dependencies: + power-hold-delay-ms: [ power-hold-gpios ] + power-hold-gpios: [ system-power-controller ] + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml index 2cb6d17..b1cc54e 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml @@ -55,6 +55,26 @@ properties: system-power-controller: true + 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, through either system-power-controller or + the deprecated rockchip,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. + wakeup-source: type: boolean description: @@ -189,6 +209,15 @@ allOf: patternProperties: "^(BOOST|OTG_SWITCH)$": false +dependencies: + power-hold-delay-ms: [ power-hold-gpios ] + +dependentSchemas: + power-hold-gpios: + anyOf: + - required: [ system-power-controller ] + - required: [ 'rockchip,system-power-controller' ] + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml index 90d944c..96ec07a 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml @@ -43,6 +43,26 @@ properties: system-power-controller: true + 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, through either system-power-controller or + the deprecated rockchip,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. + wakeup-source: type: boolean description: @@ -105,6 +125,15 @@ properties: unevaluatedProperties: false unevaluatedProperties: false +dependencies: + power-hold-delay-ms: [ power-hold-gpios ] + +dependentSchemas: + power-hold-gpios: + anyOf: + - required: [ system-power-controller ] + - required: [ 'rockchip,system-power-controller' ] + required: - compatible - reg -- 2.55.0.windows.3 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip