From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbcFWTde (ORCPT ); Thu, 23 Jun 2016 15:33:34 -0400 Received: from megous.com ([83.167.254.221]:35720 "EHLO xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbcFWTcZ (ORCPT ); Thu, 23 Jun 2016 15:32:25 -0400 From: megous@megous.com To: dev@linux-sunxi.org Cc: linux-arm-kernel@lists.infradead.org, Ondrej Jirman , Rob Herring , Mark Rutland , Russell King , Maxime Ripard , Chen-Yu Tsai , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 13/14] ARM: dts: sun8i: Add gpio-regulator used on Orange Pi One Date: Thu, 23 Jun 2016 21:21:03 +0200 Message-Id: <20160623192104.18720-14-megous@megous.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160623192104.18720-1-megous@megous.com> References: <20160623192104.18720-1-megous@megous.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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..ce4ba91 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"; + + 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 = ; }; + + soc_reg0: soc_reg@0 { + allwinner,pins = "PL6"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; }; &uart0 { -- 2.9.0