Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp561688imm; Wed, 11 Jul 2018 07:17:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe1/bml6ngs2YrjDG0ofZybwhAG2lM4/G1aBjDFCQrhNISb0l+UsHJ00mnVhr+ZUzoBnRNC X-Received: by 2002:a63:6345:: with SMTP id x66-v6mr20967444pgb.43.1531318636496; Wed, 11 Jul 2018 07:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531318636; cv=none; d=google.com; s=arc-20160816; b=IbVe+cIGVIz7UO9CdoZYlxe+PHafUffp1vJ+g4e5jyjXsUJwa5R546Nn+d4cRsw7Uz dbvsFN6+GBrx+raDg6HB5eLy6HXVXTCySoXV3BIU+53/ZQbPKIGc07TopWk8Nm27vmuk 0twv2XmpeV6u7ZaKAHx7rRxec8sF8xqzDLC2PvRNaOGhcjNPAMRrbboq+6iXbkFbWPVH Vggiz98/g1cHHRFW6XHihj4dCZeVBfgAw8DinjEQokz9O43lvOgxiKHxz2ADIc3Lgdhe sTqWm/a13kLpQRO7F+t/EcIz682hUG4Qi8tDpwWBFThQy1q4CoUZcVUIh+CaOpZ/p+K7 iWlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=ODXZMbx30JIE4Kur5s7l1zRtBUt4f8LDdPbMKD40TRg=; b=Fk7ifh8n2QL5YIeOJrH1CIclDd29O8gcLLaIQvjhclbyoPT36gkpDo9fydG2d6rs+6 bFpT6HCV38oG445pgCW7Bt/dhdBJod7xGqATDRlp8JNwFqULVg6Azuxo8ciJOdAM87Te q3KKXN/J6pSFMNnytPc5aQIUnbSC3/SNYPmq80bvmbrOBsPbBFKTArCqqD4A4lCeXQaz TUepmbSrSoI9vUsjD71gpExoYPFCL6ifOJaBWRl0r7FfCTA69hh3pBvAmCFvRCax/rtf DKc3N3hGLfkzDhQRDThzYePOJej17qnZs+OX5XCEFkV9wl9g1WtBK5AfkvzgbKgF3B+U uYRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1-v6si13462947pga.480.2018.07.11.07.17.00; Wed, 11 Jul 2018 07:17:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388235AbeGKOUh (ORCPT + 99 others); Wed, 11 Jul 2018 10:20:37 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:44713 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726639AbeGKOUh (ORCPT ); Wed, 11 Jul 2018 10:20:37 -0400 Received: by mail-ed1-f68.google.com with SMTP id d17-v6so7246807eds.11; Wed, 11 Jul 2018 07:16:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ODXZMbx30JIE4Kur5s7l1zRtBUt4f8LDdPbMKD40TRg=; b=pEWfBzPeqH4IRR4ux+3yfLVY19rX0j0b/pCdeCTmwzbZt5hY+Yqrx3TqKfRqSew/Bz 3wwOu/XGbUrP2s7gIWeDP8tLF899kL/8GIItbmozEkW0q9tl7TIASeJ+xJ3D9W1AwgMD h/hdy+081RarG99do0gJdzubn0beiX4uopxHqilPL1E/fKyh+FtYtcjZDI06AXdo8ZGW RaXoM/WTENo9/8kKpwYkLK5RgT1a5AktvLVYQxcLPpLfLK6v7tCoW/koEXfbQt+XUjpP 8SssW/Gik/+xT72lx1fEiPQb+DpWUA1kYe+Gyc9AQbW1eqrn9T6hcFPf/p6gEhitvXRi 06TA== X-Gm-Message-State: APt69E0/F82qas2PuPWulBP+0uLGExFnd75SFQ7FnGmm68Un+LpTaq5K B98ORsdOO+am0m0A+Mh7z8dIONmS X-Received: by 2002:a50:94c4:: with SMTP id t4-v6mr30873121eda.128.1531318562533; Wed, 11 Jul 2018 07:16:02 -0700 (PDT) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com. [209.85.221.48]) by smtp.gmail.com with ESMTPSA id r25-v6sm4640810edb.45.2018.07.11.07.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 07:16:02 -0700 (PDT) Received: by mail-wr1-f48.google.com with SMTP id r16-v6so18360396wrt.11; Wed, 11 Jul 2018 07:16:01 -0700 (PDT) X-Received: by 2002:adf:c98d:: with SMTP id f13-v6mr20579050wrh.148.1531318561796; Wed, 11 Jul 2018 07:16:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:a15a:0:0:0:0:0 with HTTP; Wed, 11 Jul 2018 07:15:41 -0700 (PDT) In-Reply-To: <20180711134450.43148-1-icenowy@aosc.io> References: <20180711134450.43148-1-icenowy@aosc.io> From: Chen-Yu Tsai Date: Wed, 11 Jul 2018 22:15:41 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-sunxi] [PATCH 2/2] ARM: sun8i: h3: add SY8113B regulator on Banana Pi M2 Zero board To: Icenowy Zheng Cc: Maxime Ripard , devicetree , linux-arm-kernel , linux-kernel , linux-sunxi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Jul 11, 2018 at 9:44 PM, Icenowy Zheng wrote: > Banana Pi M2 Zero board has a SY8113B regulator, which is controlled via > GPIO and capable of outputing 1.1V when the PL1 GPIO is set to output 0 > or 1.1V when the PL6 GPIO is set to input or output 1, and the output is > the power supply of the ARM cores in H3 SoC. > > Add the device tree node of this regulator and set the cpu's cpu-supply > property to it. > > Signed-off-by: Icenowy Zheng > --- > .../dts/sun8i-h2-plus-bananapi-m2-zero.dts | 21 +++++++++++++++++++ > 1 file changed, 21 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 eb61dcf32797..abc8dc750f4b 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 > @@ -59,6 +59,23 @@ > }; > }; > > + reg_vdd_cpux: vdd-cpux-regulator { > + compatible = "regulator-gpio"; > + regulator-name = "vdd-cpux"; > + regulator-type = "voltage"; > + regulator-boot-on; > + regulator-always-on; > + regulator-min-microvolt = <1100000>; > + regulator-max-microvolt = <1300000>; > + regulator-ramp-delay = <50>; /* 4ms */ > + > + gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */ > + enable-active-high; > + gpios-states = <0x1>; > + states = <1100000 0x0 So looking at the schematics with the resistor values, this calculates to roughly 1.108475 (0.6 * (1 + 10 / 11.8)) ... > + 1300000 0x1>; and this to 1.308475. ChenYu > + }; > + > wifi_pwrseq: wifi_pwrseq { > compatible = "mmc-pwrseq-simple"; > pinctrl-names = "default"; > @@ -66,6 +83,10 @@ > }; > }; > > +&cpu0 { > + cpu-supply = <®_vdd_cpux>; > +}; > + > &de { > status = "okay"; > }; > -- > 2.17.1 > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.