Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1908828pxu; Tue, 24 Nov 2020 11:48:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaYb7V1YRRMM2Ll1Xtdk8jWKLJbrTPeRL5SRcgSORqZnpy51oyQ+v1yGLJNQPIKhtwenLG X-Received: by 2002:aa7:d3cc:: with SMTP id o12mr69192edr.331.1606247310662; Tue, 24 Nov 2020 11:48:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606247310; cv=none; d=google.com; s=arc-20160816; b=S59RifZp8pReD1e0s0O/SxBnAeiPb9rDAlGZMohny1RWxJCa34q0CGTIV+q5RrRdTX HKu+U/izP1tR6uwOVAemBaQvVSfL9NsV3o4s1JEygrXbhDLNsLdHQ9crijnZ+Yg58HbB pbxuVQjAC3cTLCpbRIDgTMFqwzT3xMXDNyTi5JimMe5YUE2fwwIgCq8TI11mA4Ddpt7/ P/VLLdq7MN7OkCK2M1u19dhm85bKoeNPckRjVocAfm+WbwZ4rWH+JUzox7R/OajZBnyl 4/4vm3faMIeurbvj7/hRGx6eD1e7R0xyC7j/+ZrL2DuMCK3CdTfr+pBqYJgtBzSIWDa7 aXaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=qNg9BCPmUa7zVn4hdXCfbMqNTMndQjQt0tAc7CL5ayQ=; b=lJxO+f4LOi8BmH7uEQvcwB40SHS/P0xiCAUS6UX+K7/bdLPLmTB1VttUFIgGFfeNAl Ze/k3WVtJ4vPa82L9anMgDvZM7++NGeOoX+ike9mVlWgxmYkPcKMAUIOSl5YUtmqnuiY aTMiyNvVcZF/WJvoHdF0lJeN7Me/ff3N6Necswg9a5PM4RfX+yYL0N9koRZD4E0xDETa kd17TbyZBrQfE5JJFozUjsohYVgDUB0eP/mygLfy8xJlsNkHqeeI5DRvC97yqhvtM5+N no1RVq1fe0iEJjfNOsklyei5ChCdEnj34qnLAuOrclfrmwBq+PA/mQsrFD5G12ED+RUZ 8lGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si9351627edx.335.2020.11.24.11.48.08; Tue, 24 Nov 2020 11:48:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728982AbgKXElw (ORCPT + 99 others); Mon, 23 Nov 2020 23:41:52 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35102 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728941AbgKXElw (ORCPT ); Mon, 23 Nov 2020 23:41:52 -0500 Received: by mail-lj1-f195.google.com with SMTP id r18so5745324ljc.2; Mon, 23 Nov 2020 20:41:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qNg9BCPmUa7zVn4hdXCfbMqNTMndQjQt0tAc7CL5ayQ=; b=agOjJE7/fsrWkECADnvggGrOls34vqm+AIa0ue6u7MhP+LuzVDpocHrd3QPot33mH4 /TB7xUfzMykOPfikRFy25hsRtI1XLeokmGrclFfiiceHkbNyvKSND6Zer7fbROAsPYTf HjIWesaxk+fhLt+5UFXg8xTZJhMVoYquNhKN89vY5G7OElm4SFeHrw6xXjLlyNj64m+W np/0KFvNCQbK3krOjyp54/sUqWfUK4K6ch1qAAlqqbGrRGuEF9aGFa3Vhfupenrty1Zy QK1cmwb/eQCrcGXKHHm/mcWw6KXganMOiZyaRkDWAWjODxj8HP2B9qIMiyCOeqzQz6Xk kMpg== X-Gm-Message-State: AOAM533RVH3RiUaGa1XFKeaXnirg48K/FFMT8BL6jUFVwBQofCdXQ09D 3iOs+rO+MaXS+TxGx6MTu4z+56ezkjeMHg== X-Received: by 2002:a2e:9798:: with SMTP id y24mr1081828lji.151.1606192909470; Mon, 23 Nov 2020 20:41:49 -0800 (PST) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id m20sm1587216lfc.172.2020.11.23.20.41.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Nov 2020 20:41:48 -0800 (PST) Received: by mail-lj1-f177.google.com with SMTP id f24so7647759ljk.13; Mon, 23 Nov 2020 20:41:48 -0800 (PST) X-Received: by 2002:a2e:8546:: with SMTP id u6mr1085490ljj.125.1606192908700; Mon, 23 Nov 2020 20:41:48 -0800 (PST) MIME-Version: 1.0 References: <20201123161041.2304766-1-michael@fossekall.de> <4bf42c9e-9f70-bc30-1a88-44a127cd989a@sholland.org> In-Reply-To: <4bf42c9e-9f70-bc30-1a88-44a127cd989a@sholland.org> From: Chen-Yu Tsai Date: Tue, 24 Nov 2020 12:41:37 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-poweroff to DT To: Samuel Holland Cc: Michael Klein , Rob Herring , Maxime Ripard , devicetree , linux-kernel , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 24, 2020 at 12:14 PM Samuel Holland wrote: > > On 11/23/20 10:10 AM, Michael Klein wrote: > > Add gpio-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. > > The PSCI client will override this driver once the PSCI implementation > is upgraded to v0.2 or newer functions. So having this around should > cause no compatibility issues (although it would print an error in dmesg > at that point). This seems like a reasonable thing to do for the other > H2+/H3 boards that use a similar regulator layout. I wonder if this (gpio-poweroff) works if those regulators are also in the DT? > Reviewed-by: Samuel Holland > > > Signed-off-by: Michael Klein > > --- > > arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 5 +++++ > > 1 file changed, 5 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 4c6704e4c57e..76e79e6db733 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 { > > }; > > }; > > > > + gpio_poweroff { > > + compatible = "gpio-poweroff"; > > + gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ > > + }; > > + > > reg_vdd_cpux: vdd-cpux-regulator { > > compatible = "regulator-gpio"; > > regulator-name = "vdd-cpux"; > > >