From patchwork Sat Apr 8 18:50:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9671203 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD2EA601EB for ; Sat, 8 Apr 2017 18:53:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B16B425F31 for ; Sat, 8 Apr 2017 18:53:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3777283ED; Sat, 8 Apr 2017 18:53:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3857B25F31 for ; Sat, 8 Apr 2017 18:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=5ZAtndZyIbzkDSYHymUX/MYEYnBKsJfJ55AvS1QLiRg=; b=WBx6oQHBjesdiXsEyKCWqG1tey moToW/+EozNHejIzizHqYYoIc265nxhVUbp9wD5J9HsW+ouPpo91NoBGB5lA/7wjzgbiXCdvUM7LE 1FLJ706fW97GQfyLUOPxu8BqqP3oOp585fNy+zVLtruuj4tZDV2A2iCLvqLAZMkGF14lHWQ15+/ef letBT0lBl6IRZBLLBphA0ynAxnodebaE7bmxybezw0IFEJ7D7J6iF74E/fegOJsIZcv+mS+wywZmO Ld1QJOBoJn7Pb/Ta3IVbNYkE5rh2m1tHhCr+gxCPNZs7EQ/xCCWXzYAxzU0scM2GFKZK25GOvABqH X0718E9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cwvUT-0001e5-Lh; Sat, 08 Apr 2017 18:53:41 +0000 Received: from dragonfly.birch.relay.mailchannels.net ([23.83.209.51]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cwvUO-0001EM-Hm for linux-arm-kernel@lists.infradead.org; Sat, 08 Apr 2017 18:53:38 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6FD641020BB; Sat, 8 Apr 2017 18:53:12 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.135.247]) by relay.mailchannels.net (Postfix) with ESMTPA id B63EF102090; Sat, 8 Apr 2017 18:53:11 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.20.63.242]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.37); Sat, 08 Apr 2017 18:53:12 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Trail-Broad: 37a3ac91336f296e_1491677592264_84478994 X-MC-Loop-Signature: 1491677592264:3405309558 X-MC-Ingress-Time: 1491677592263 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 85B8F451B6; Sat, 8 Apr 2017 18:52:58 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , Quentin Schulz Subject: [PATCH 5/5] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board Date: Sun, 9 Apr 2017 02:50:25 +0800 Message-Id: <20170408185025.53841-6-icenowy@aosc.io> In-Reply-To: <20170408185025.53841-1-icenowy@aosc.io> References: <20170408185025.53841-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170408_115336_750540_9D905040 X-CRM114-Status: UNSURE ( 7.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Orange Pi Zero board has a SY8113B regulator, which is controlled via GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0 or 1.3V when the PL6 GPIO is set to input or output 1, and the output is the power supply of the ARM cores in H2+ SoC. Add the device tree node of this regulator and set the cpu's cpu-supply property to it. Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts index 9e8b082c134f..8f6acca7d12d 100644 --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts @@ -93,6 +93,27 @@ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; post-power-on-delay-ms = <200>; }; + + reg_sy8113b: gpio-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 6 GPIO_ACTIVE_HIGH>; /* PL6 */ + gpios-states = <0x1>; + states = <1100000 0x0 + 1300000 0x1>; + }; +}; + +&cpu0 { + cpu-supply = <®_sy8113b>; }; &ehci0 {