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 41832606A32D for ; Tue, 20 Oct 2026 14:03:40 +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=adhgw5vI; dkim=pass (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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pUI83F+vNn47A4zRNccyxKlCOIII3kxuZu0/rPY+a/I=; b=adhgw5vIfQG7uLB+KRXHcrSMKU SL6s3F2QGLxZtNnWp9KYq3LcGzRb/8ODY16moRkdALpXKh3i8lAj5xJf9nlA6/MgyY3e9bmj85BJR OaFTWjm5EBbJATD7WKR4PHgwNS15mHCjGPaX5GlnWdnUMu06BtTYMiNS8BIgLOcXuly74ccK6xIBN 5G/I0kzz4AbpBURTXld18Ptsg3iiGc/v36uPC0hgk+WdmqO79jvHFzqmD1PgFU+Q7JUyXq6Gon3eK rRaF0KAo5eptaArE0vj8ZTuFkjRb7gqL44ABwGPdiuURJBQZMq6NAs9QAk01Buj8fEbgAqIy1KcL+ gpVExjZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJAR7-00000009rzr-3j2t; Tue, 20 Oct 2026 14:03:29 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJAR5-00000009ryP-1Sfy for linux-arm-kernel@lists.infradead.org; Tue, 20 Oct 2026 14:03:28 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2e831e86ebfso15276115ad.1 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/rPY+a/I=; b=I6gxQZ5F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PzX8x7557fMca1pfaLW/mLAwRomwnqVjP V2oKjwQk2I= 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 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261020_070327_404427_0356870E X-CRM114-Status: GOOD ( 14.71 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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