From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792505007; b=ScPLlZDxRBcMrFecy3ztoqJyfnQvV5gTYlb7xxU2lJKUY9OnWYgKRtvb1HrCEmLeMNK0 d2eyfCKqJD/4qVL8XsLjyXLdntZhGshBB8PxCvnbu2XQhMfnH0cmLk7psNV2OK7EEwRb6 BAEgvis0DFeYXRJje/32iA45p5VUkH+1uasIxU7d8pqP3oLXUEB+cvbXfxd9x4H8zKjMn OHgu+5t5gtkUOL/miKyCnkXp3ZkwN8FNOAREdyuX/mIxnd0WqFYjo98UKGpfQAc3TJauD UzdI6SAf9RRNIyP2oVlcb6NZUORC+fJWLtonqxMcsndUQBz1N13OAl0rRsMp5r7rkoQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792505007; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=pUI83F+vNn47A4zRNccyxKlCOIII3kxuZu0/rPY+a/I=; b=Nx8uUkrBU1ItjQfv9Z9+OcirECNbbMR30cM4QLpMm1xeibtj8jwuAxre5+t3OIeaBq// H/VaBkLMRYm65xlveq8Rcck9odGSPaAITk44xk+Lq5uLFUavP14jMXz7xWveWSTmRTxbV gcBzTfkMMoNmcUpKN9efYo6WbKzlZlt54qhV61acoqN0s428l/JMMxDau/zinknYR2t9n n9kemYkKuhjL8TJSbcJUY7OSi1r8FGNHDsAQPiMGwUzaeqCtjl3aSr+wg2sdNJT5QZb2z BUP1It4hurpJ4+hxNAUZ78bvyVyNpdGDQOSIlSt5AM/rMN5KNj4vzf/6FPSdAR7ik9A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=bzOyA8D1; arc=none smtp.remote-ip=209.85.214.169 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26097606A31C for ; Tue, 20 Oct 2026 14:03:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 26097606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=bzOyA8D1 Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2ea138a3497so8084605ad.2 for ; Tue, 20 Oct 2026 07:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792505006; x=1793109806; darn=vger.kernel.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=bzOyA8D1o7tzU8aPzMA88tVzSTY7eK69edveH/y5VPe3Gyr8aR5EDzQrCJfrVuit3x 7mThg5r/0FHXHshjY/nuWitlE7MZkRTPFL1bTV/GapmMdRPQWFj9Om0qnXb6NqxCrZpN sZSulCcJ3r63DJCj6wBmP+jQFm0/00E4vaXrn0gswYUvBFjiUvA9b3noP6sZuwPLe3OA CfhR/iFTQgR1f5nGN0AOtVXs6UvOgut+JeUTKb2coIli2Xav7BmtWq2hVFCEZFvElCqn QkvgDGflnz74TgRRs+qRVS/qawtYIBFPIxxb29CZgdXB9tlzgSpZXhBc1vTMo/0lGK2G SQ+w== 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=gFA7rNHKqTaoGvUdiM/9NK5S5k6dPRwzZ+1n76RMdaBMokHgGHigm4w+1iQprSYcvQ fintDpCLl6elnrvQTbnaiQGpytP0JYea3Sm2Puo4EV9z0CzUs6dNRsUqgIsqbuzrjnQE kJvca/QDtXFEswmE6O6yAm8JtGxlGXLDQUgAkhC6UGYOk4iHswFTB7IQ790U/Hq8gJSQ lh+zLYZMWGkucyXarsdkn7hl9nyB6sJLjjI6fLE75tQn4hd6x7CpMkIJxmzVTcG4JcBN FNTV2B25QDBvvJ9nkxsuTYXY7f/hzEO8axWGxFe+pu4qfPKpe6s1W89voihsh8xy1Thx hPgw== X-Forwarded-Encrypted: i=1; AKwUvBwlFr4dBkA2tRkMJGJ6yYAjMC8MPt0F+FQMkZFI6uXrMd+QmhBZE0uwmnbBB4d4NzXWkmLuPjFl2nAX@vger.kernel.org X-Gm-Message-State: AFq9FYJz8kpsqJI511uuJGw+StnaGh6kAYGfWnpLf1SQEEABX0Rv57AR +J6ZSojW3Mv97HBKcFIta8dPUrdE4mhFv6r9jT6C3YLrevEkAJN/YfNL X-Gm-Gg: AYBFou2DkK1cZlZdxyODJau5k4j1seMvgwFKCnFAK0cVKgUytVqDFkzFId8QX61Tabj GmDo5GL5K9IdMbfcgt9JFfsTVz5qpl2+uYS7wG4OGuN8+b01upACKWSscZsroIXqFvadJYpuuju Zjbv7/s1j8QjO0qmilK6oa0/HgDjhHhtxU7amip8B1Lsp8lbs+hilhmglCatQYpoDaxmStFlqpD rmxxrfTtbVOrhaBb5v+TzYWgzdfc3Si+1UzwvVHY1WWcXerRMahXu6ljyGkcfpAP3zt7WmCO7bc OVMdSgJeyYkR160Nu2x6n0BZBWaICoXQ3C/tIwfK/Lqb/RK27/wubpS127KDy90Bg8PV3GSjUU5 99UwyB7BXsFAwBbmJjxhGivsLOYGI23CNm+5APpyA42c/icG4ay57xA4Cvh49fTmTHzGp8bHriY M1ilWnrTFBUnhH5sK/4bm1W2AiH7tLpmzN0UeTnVf26GikhPs6wj+XA+3IEEQ1t0D3WSAOnoLmS 6padN8HUqc= 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-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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/rPY+a/I=; b=DdxKH0WAj49XsqJ13QjJuDmlnLS5zFy6NHp5ec1T5DFIBJpuJ9A87Hm1YEveWR0jmM EKGtg7x2oRyvA2ztEFbZvVGQkGw7RLBdwVHEYzp1NRB5GTc418UaKbEo9gLe6B7lRKoq yLUBkweDqoMIFSRsPBHRHUvmkqFFVprFxJwgUajamm9IQSxms/UFpfSXhufKsmk+GVJY 5JwzP9qoZyce5XtV37FUYNXMABUfmVZpCF3SnOdP19M3cI36Vgw9LO5wXlUxVptFCUCg o3HPFzLVNjlyQSB9FvsRkBVnjppCbhqLqWl/0fTv8Ulh5jynMMZB/d0MaglTBk/p7PZE +liA== X-Forwarded-Encrypted: i=1; AKwUvBz+5DwgAEpPOcD+T7zjUopxcGr7bHBFWMSbHSucyYqkASJv0unemWeDN8ocRJha1i7p5tdntvN4kYaPSzscYw==@lists.infradead.org X-Gm-Message-State: AFq9FYK6kM2LawKUFaOK4Y68mkBPau4oJ6EE4+LMvxw8uJmRwlP4LYtT 20A0saF2B3MKwW0JSvsfJYEh4QIfyW9iIh+Pe11H6zduglFk4qnodZ50 X-Gm-Gg: AYBFou3eclpLQXa2LM1YaJpKFI4fy/5Cj+1DquQilEhht2dRC2xzGb03f9yloZRRomx rcfQGUQ+qGGNTWW4HsX5tWgncvuL65wundEssMP86uFu8kKtl+z1aHHNdHJkxcY8hTHK30BInlL KGc3ZAMf0Fw31PZZN8v86/vuaRVLhTaAizflfMN0rQ69BT1+XcNt+qvvP2MBIDdkJhabAeoJo/g P2BW0lP5di2IZppo+T1dSCI8b1jwO5+kk1mcx2M/eC7gSb/PVyYrdmglkWelR9Lbv6bZmJnwTh+ wVd0bZYnu1W8Dwi6Se6x+mpUcEe/SBmymmMcRSwiKnoBiDrs8Ta6NisVFTo7z559qA7YtR9Vcj4 DSzVUsjy7L3hVutwZAPc9vqeo/DRFnEhG32ZlESz9s0sE4qhIOmVIAA+Vs8UHb/Ae5v3FKXNZQt GkduWFn+E/9kLzfhdDWps6jKrIhL8Cx97+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