From patchwork Sat Jun 25 03:45:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 9198383 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 3A9176075F for ; Sat, 25 Jun 2016 03:49:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29D62284EB for ; Sat, 25 Jun 2016 03:49:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CB79284EE; Sat, 25 Jun 2016 03:49:57 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AC498284EB for ; Sat, 25 Jun 2016 03:49:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGeZ3-0001A6-Ga; Sat, 25 Jun 2016 03:47:25 +0000 Received: from megous.com ([83.167.254.221] helo=xff.cz) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGeYC-0000LT-De for linux-arm-kernel@lists.infradead.org; Sat, 25 Jun 2016 03:46:35 +0000 Received: from core.localdomain (ip-89-177-100-244.net.upcbroadband.cz [89.177.100.244]) by xff.cz (Postfix) with ESMTPSA id 32C455000D7; Sat, 25 Jun 2016 05:45:24 +0200 (CEST) From: megous@megous.com To: dev@linux-sunxi.org Subject: [PATCH v2 13/14] ARM: dts: sun8i: Add gpio-regulator used on Orange Pi One Date: Sat, 25 Jun 2016 05:45:10 +0200 Message-Id: <20160625034511.7966-14-megous@megous.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160625034511.7966-1-megous@megous.com> References: <20160625034511.7966-1-megous@megous.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160624_204632_846077_F77FA390 X-CRM114-Status: UNSURE ( 7.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Russell King , open list , Chen-Yu Tsai , Rob Herring , Maxime Ripard , linux-arm-kernel@lists.infradead.org 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 From: Ondrej Jirman Xulong Orange Pi One uses GPIO based regulator that switches between two voltages: 1.1V and 1.3V. The regulator is controlled from the PL6 pin. Signed-off-by: Ondrej Jirman --- v2 - add missing pinctrl-names for gpio-regulator --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts index 0adf932..b1bd6b0 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts @@ -88,6 +88,25 @@ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; }; }; + + vdd_soc: gpio-regulator { + compatible = "regulator-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&vdd_reg_r_opc>; + + regulator-name = "soc-vdd-supply"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-boot-on; + regulator-type = "voltage"; + + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; + states = <1100000 0x0 + 1300000 0x1>; + + startup-delay-us = <100000>; + enable-active-high; + }; }; &ehci1 { @@ -131,6 +150,13 @@ allwinner,drive = ; allwinner,pull = ; }; + + vdd_reg_r_opc: regulator_pins@0 { + allwinner,pins = "PL6"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; }; &uart0 {