From patchwork Mon Dec 7 14:27:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Klein X-Patchwork-Id: 339400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01860C4361B for ; Mon, 7 Dec 2020 14:37:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFF362337F for ; Mon, 7 Dec 2020 14:37:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbgLGOhK (ORCPT ); Mon, 7 Dec 2020 09:37:10 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.50]:21910 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbgLGOhK (ORCPT ); Mon, 7 Dec 2020 09:37:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1607351658; s=strato-dkim-0002; d=fossekall.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=9SYLzlFgBXzuvKKzJL8JRRj5vw51OfuroQA/clOun08=; b=KK79hKHlUYATG2KA8lAb3b14Uk8W/Wc6mmW5PIHDXgU5fTgXvlWLPjHrqIIqDI3z8j Gu56Rud7omTG2HFPJ5Ln+eOnL9RDHdZpkvOKs2N7jZNLaFLfSGpVpbQhojVrOGEpoYjE fhgJ2k/ZsvT3UqotJgblyvPu2F8GtKc3Ch9fAOC3Jev/cs39RCyhMB1vK2tS90TUSlc0 WC0UI0cpZDc8DOadx3jTx+JvuG0RncuaQz2HWay9VXJFj5t4MN3QBLN9an/+jdhzn8JL sAFnH+Alp9WaeLvbmBq0IvMbZNU2zXCFoOK6bZ+BUENCzEkwxMvBp/i6YGHLOm9FISnm dG5w== X-RZG-AUTH: ":O2kGeEG7b/pS1EzgE2y7nF0STYsSLflpbjNKxx7cGrBOdI6BL9pkS3QW19mO7I+/JwRspuzJFZuRzQ==" X-RZG-CLASS-ID: mo00 Received: from aerfugl by smtp.strato.de (RZmta 47.3.4 AUTH) with ESMTPSA id g02087wB7ES9OVc (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 7 Dec 2020 15:28:09 +0100 (CET) Received: from koltrast.a98shuttle.de ([192.168.1.27] helo=a98shuttle.de) by aerfugl with smtp (Exim 4.89) (envelope-from ) id 1kmHUh-0001TH-CZ; Mon, 07 Dec 2020 15:28:03 +0100 Received: (nullmailer pid 17908 invoked by uid 502); Mon, 07 Dec 2020 14:28:03 -0000 From: Michael Klein To: Sebastian Reichel , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Michael Klein Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/3] Documentation: DT: binding documentation for regulator-poweroff Date: Mon, 7 Dec 2020 15:27:55 +0100 Message-Id: <20201207142756.17819-3-michael@fossekall.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201207142756.17819-1-michael@fossekall.de> References: <20201128103958.q6glewhhch7vtczr@gilmour> <20201207142756.17819-1-michael@fossekall.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add devicetree binding documentation for regulator-poweroff driver. Signed-off-by: Michael Klein --- .../power/reset/regulator-poweroff.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml diff --git a/Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml new file mode 100644 index 000000000000..8c8ce6bb031a --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/regulator-poweroff.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Force-disable power regulators to turn the power off. + +maintainers: + - Michael Klein + +description: | + When the power-off handler is called, one more regulators are disabled + by calling regulator_force_disable(). If the power is still on and the + CPU still running after a 3000ms delay, a WARN_ON(1) is emitted. + +properties: + compatible: + const: "regulator-poweroff" + + regulator-names: + description: + Array of regulator names + $ref: /schemas/types.yaml#/definitions/string-array + + REGULATOR-supply: + description: + For any REGULATOR listed in regulator-names, a phandle + to the corresponding regulator node + $ref: /schemas/types.yaml#/definitions/phandle + + timeout-ms: + description: + Time to wait before asserting a WARN_ON(1). If nothing is + specified, 3000 ms is used. + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - regulator-names + - REGULATOR-supply + +additionalProperties: false + +examples: + - | + regulator-poweroff { + compatible = "regulator-poweroff"; + regulator-names = "vcc1v2", "vcc-dram"; + vcc1v2-supply = <®_vcc1v2>; + vcc-dram-supply = <®_vcc_dram>; + }; +... From patchwork Mon Dec 7 14:27:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Klein X-Patchwork-Id: 339399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3837DC4167B for ; Mon, 7 Dec 2020 14:37:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0573723601 for ; Mon, 7 Dec 2020 14:37:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726459AbgLGOhN (ORCPT ); Mon, 7 Dec 2020 09:37:13 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.81]:34404 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbgLGOhN (ORCPT ); Mon, 7 Dec 2020 09:37:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1607351661; s=strato-dkim-0002; d=fossekall.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=3BsUH/fQnBe7pD71RIvs7F5DD1I9z0fShCsbyNynJq0=; b=PB6dpzkAi1Efzg8/cIY4BGahytqfkHH7KmbLXGasVYgIQuWslia8mInyt+6cK17XPY iwe7EIEd/TzzOUM8zyCzLAkcBxCROCbb63hGOTGEHyIdBpLw0CfNXEmzajYEAlgjMAGe YQeCrvsjYauZAxwR16tW09F/+QoOyPY7LtySEBQBiDVCeCrMtBwGZs3a0M+xIMRiQSCl FQPSb+LdACzxnmh6cJV1VOtQerxFzuSexxtiRmibXWIulALnkZo3DoXaSxTJYjMQEeUc m1bMeJRem7lQNqppnIhTffoO1o+GDDPVp1uPvT0NtGSh2i6w8kepDmYRno++JbZ5Ytgl w3wg== X-RZG-AUTH: ":O2kGeEG7b/pS1EzgE2y7nF0STYsSLflpbjNKxx7cGrBOdI6BL9pkS3QW19mO7I+/JwRspuzJFZuRzQ==" X-RZG-CLASS-ID: mo00 Received: from aerfugl by smtp.strato.de (RZmta 47.3.4 AUTH) with ESMTPSA id g02087wB7ESDOVd (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 7 Dec 2020 15:28:13 +0100 (CET) Received: from koltrast.a98shuttle.de ([192.168.1.27] helo=a98shuttle.de) by aerfugl with smtp (Exim 4.89) (envelope-from ) id 1kmHUh-0001TR-PB; Mon, 07 Dec 2020 15:28:04 +0100 Received: (nullmailer pid 17921 invoked by uid 502); Mon, 07 Dec 2020 14:28:03 -0000 From: Michael Klein To: Sebastian Reichel , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Michael Klein Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/3] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add poweroff node Date: Mon, 7 Dec 2020 15:27:56 +0100 Message-Id: <20201207142756.17819-4-michael@fossekall.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201207142756.17819-1-michael@fossekall.de> References: <20201128103958.q6glewhhch7vtczr@gilmour> <20201207142756.17819-1-michael@fossekall.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add add devicetree information for the regulator-poweroff driver. Signed-off-by: Michael Klein --- This patch depends on the regulator names added in https://lore.kernel.org/linux-arm-kernel/20201130183841.136708-1-michael@fossekall.de/ arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts index b43028f9e6df..408c6e581700 100644 --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts @@ -86,6 +86,13 @@ reg_vcc1v2: vcc1v2 { vin-supply = <®_vcc5v0>; }; + poweroff { + compatible = "regulator-poweroff"; + regulator-names = "vcc1v2", "vcc-dram"; + vcc1v2-supply = <®_vcc1v2>; + vcc-dram-supply = <®_vcc_dram>; + }; + wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */