From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 89C74C2D0E4 for ; Tue, 24 Nov 2020 22:32:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EC422086A for ; Tue, 24 Nov 2020 22:32:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dungeseO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=fossekall.de header.i=@fossekall.de header.b="IKIBt4iM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EC422086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fossekall.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FpE4bDrydaev9rH99+E9N0d6I+urIy4hrJSmXTwsvjE=; b=dungeseONP3aXS1y/9j6OQu38 ZgTzN1giSsOakq2OZC6Epf9NIaIJwI7yTnok71WFZLgB2FvKyulxJtimyr1NkX78+e0+rACZQnkD6 1F3XCrkKHWXMK2e3jL+ry8VeeuDru0OTeWlBXACyjuBi33lY1VSZGsp5fB3ze3Fe2x/qz/12c4EwB cIhDe0Q+dFidCvjiSkhjmPU5jJ4JBFSBMYpDkh3LirrdQLNeL/dsHSWSupBxQWtRlQqTBO+DG0alP yk6B35sFgUY3pBu36h0Z5JH8aB2nE0fgMo3xVa0wV1oWjL6m3Rg3fDyxgM91FwgcsbokpEntFpNrD xs0oJamag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khgr7-00010t-Qz; Tue, 24 Nov 2020 22:32:13 +0000 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.219]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khgr4-00010P-OR for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 22:32:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606257127; s=strato-dkim-0002; d=fossekall.de; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=qxl537xXYJE6736NWNsfKVJUQk4AmvYtC+J9SjGR+Lw=; b=IKIBt4iM5uTvFUnj+/xnc4s4SUPr+6n9Vaeo0IJYOrIaIv1zUHoPMCoPVDSrlA2aOp pabWP7ySXtFP2QC6+PYe2zKwGe+J9QgQQXRnrtBl3PqCW8SKzDUIVamfq3Bq/qhFR1CO vRwGeM0IwdRJPULmSV39ssB4Hy3/kRDwKYPQ471OPO1EJYPC1jvHDOOVMIXXDlK8CClI XzvYsvB9V/kOtdikY2n9Y6goE19NKDMG1EGwooi0Qk25/k0GXgv32QVouoqsaDCbUbuE c8EWHMkbbdNz7JK1wTtx4MC2TDxSzvTypS8LSuwRS1Drx+M3C1bYTK79ipFnlM4A/6xq cvuQ== 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 g02087wAOMW2GNh (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); Tue, 24 Nov 2020 23:32:02 +0100 (CET) Received: from koltrast.a98shuttle.de ([192.168.1.27] helo=a98shuttle.de) by aerfugl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1khgqv-0007xh-1q; Tue, 24 Nov 2020 23:32:01 +0100 Date: Tue, 24 Nov 2020 23:31:59 +0100 From: Michael Klein To: Maxime Ripard Subject: Re: [PATCH v2] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add poweroff node to DT Message-ID: <20201124223159.GA2865084@a98shuttle.de> References: <20201124131933.2l2go6z6ltar5fpa@gilmour> <20201124133633.672259-1-michael@fossekall.de> <20201124142656.wz6ipwa2xayn433x@gilmour> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201124142656.wz6ipwa2xayn433x@gilmour> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_173211_033746_B4D78B53 X-CRM114-Status: GOOD ( 21.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Chen-Yu Tsai , Rob Herring , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Nov 24, 2020 at 03:26:56PM +0100, Maxime Ripard wrote: >On Tue, Nov 24, 2020 at 02:36:33PM +0100, Michael Klein wrote: >> Add poweroff node to allow the board to power itself off after shutdown >> by disabling the SYSTEM and CPUX regulators (U5 resp. U6). The RST >> button can be used to restart the board. >> >> Signed-off-by: Michael Klein >> --- >> arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 5 +++++ >> 1 file changed, 5 insertions(+) > >You should have a summary of the changes between versions here > >> 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 4c6704e4c57e..ea2fa48a1647 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 >> @@ -46,6 +46,11 @@ sw4 { >> }; >> }; >> >> + poweroff { >> + compatible = "gpio-poweroff"; >> + gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ >> + }; >> + > >Like I said in the previous version, this should really be modelled as a >regulator instead of just a GPIO Please excuse my ignorance, do you mean something like this? reg_vdd_sys: vdd-sys { compatible = "regulator-fixed"; regulator-name = "vdd-sys"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-always-on; regulator-boot-on; enable-active-high; gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ vin-supply = <®_vcc5v0>; }; With this, the board still draws 60mA (cheap USB ampere meter) after shutdown, presumably because of "regulator-always-on". Without this property the board powers off shortly after booting up. Michael _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.8 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 autolearn=ham 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 95F95C2D0E4 for ; Tue, 24 Nov 2020 22:38:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02C22206D4 for ; Tue, 24 Nov 2020 22:38:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fossekall.de header.i=@fossekall.de header.b="JSmXXhOr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389830AbgKXWiJ (ORCPT ); Tue, 24 Nov 2020 17:38:09 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]:9200 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389837AbgKXWiJ (ORCPT ); Tue, 24 Nov 2020 17:38:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606257487; s=strato-dkim-0002; d=fossekall.de; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=qxl537xXYJE6736NWNsfKVJUQk4AmvYtC+J9SjGR+Lw=; b=JSmXXhOrkpP1Ts0ga33gNBJFxAcbwb3NsrOG1biIawBsawe0jpcjmuWb7pMVSzieg9 OeV0CU1tZJa04Y5a96w7B0HwKtx7CZDmT2M5AAqPzKxo4h5x0hM0pfsbs1cwIhLi9LxC q2xHW7IV3LpkJzdz2Gjh+QmGzKHHITUHJJMgN9iZXeeO1RE5UBmtp2MQNBTSPjiLuX9w PxZbL3dMCtcfvqhqLmmqV9BoQduNo5B+X93cUW5DNuCZVKeAR1lKc1inFXqNiFOC/dc/ qFKtjx0tsMPQm+ccdCe2D+I3ZANcgNVAZobLzSLlTlOD8h0/1SE7zeA/sliR1AkVe1C+ PZ1A== 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 g02087wAOMW2GNh (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); Tue, 24 Nov 2020 23:32:02 +0100 (CET) Received: from koltrast.a98shuttle.de ([192.168.1.27] helo=a98shuttle.de) by aerfugl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1khgqv-0007xh-1q; Tue, 24 Nov 2020 23:32:01 +0100 Date: Tue, 24 Nov 2020 23:31:59 +0100 From: Michael Klein To: Maxime Ripard Cc: Rob Herring , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add poweroff node to DT Message-ID: <20201124223159.GA2865084@a98shuttle.de> References: <20201124131933.2l2go6z6ltar5fpa@gilmour> <20201124133633.672259-1-michael@fossekall.de> <20201124142656.wz6ipwa2xayn433x@gilmour> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201124142656.wz6ipwa2xayn433x@gilmour> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Nov 24, 2020 at 03:26:56PM +0100, Maxime Ripard wrote: >On Tue, Nov 24, 2020 at 02:36:33PM +0100, Michael Klein wrote: >> Add poweroff node to allow the board to power itself off after shutdown >> by disabling the SYSTEM and CPUX regulators (U5 resp. U6). The RST >> button can be used to restart the board. >> >> Signed-off-by: Michael Klein >> --- >> arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 5 +++++ >> 1 file changed, 5 insertions(+) > >You should have a summary of the changes between versions here > >> 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 4c6704e4c57e..ea2fa48a1647 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 >> @@ -46,6 +46,11 @@ sw4 { >> }; >> }; >> >> + poweroff { >> + compatible = "gpio-poweroff"; >> + gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ >> + }; >> + > >Like I said in the previous version, this should really be modelled as a >regulator instead of just a GPIO Please excuse my ignorance, do you mean something like this? reg_vdd_sys: vdd-sys { compatible = "regulator-fixed"; regulator-name = "vdd-sys"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-always-on; regulator-boot-on; enable-active-high; gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ vin-supply = <®_vcc5v0>; }; With this, the board still draws 60mA (cheap USB ampere meter) after shutdown, presumably because of "regulator-always-on". Without this property the board powers off shortly after booting up. Michael