From patchwork Wed Jul 6 09:10:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 9215843 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 9EA0560752 for ; Wed, 6 Jul 2016 09:13:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E09F287AE for ; Wed, 6 Jul 2016 09:13:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82A4B287B3; Wed, 6 Jul 2016 09:13:29 +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 146D2287AE for ; Wed, 6 Jul 2016 09:13:29 +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 1bKisL-0002LW-7L; Wed, 06 Jul 2016 09:12:09 +0000 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKiru-0001n0-Lk for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2016 09:11:43 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id 423E85F9FB; Wed, 6 Jul 2016 17:10:56 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 8/9] ARM: dts: sun7i: bananapi-m1-plus: Add PMIC regulators and OPPs for cpufreq Date: Wed, 6 Jul 2016 17:10:49 +0800 Message-Id: <1467796250-22010-9-git-send-email-wens@csie.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1467796250-22010-1-git-send-email-wens@csie.org> References: <1467796250-22010-1-git-send-email-wens@csie.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160706_021142_912758_1BDFD26D X-CRM114-Status: UNSURE ( 7.65 ) 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: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, Chen-Yu Tsai , 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 The Bananapi M1+, like other Allwinner A20 based boards, uses the AXP209 PMIC to supply its power. The vendor FEX file's DVFS table suggests the board's CPU power rail has a voltage drop of 25 ~ 50 mV. Add the PMIC regulator nodes and copy the DVFS table from the FEX file. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 48 ++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts index ba5bca0fe997..7bb418bd1b6e 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts @@ -105,6 +105,22 @@ status = "okay"; }; +&cpu0 { + cpu-supply = <®_dcdc2>; + + /* The custom DVFS table suggests a voltage drop of 25 ~ 50 mV */ + operating-points = < + /* kHz uV */ + 1080000 1450000 + 912000 1425000 + 864000 1350000 + 720000 1250000 + 528000 1150000 + 312000 1100000 + 144000 1050000 + >; +}; + &ehci0 { status = "okay"; }; @@ -132,13 +148,9 @@ status = "okay"; axp209: pmic@34 { - compatible = "x-powers,axp209"; reg = <0x34>; interrupt-parent = <&nmi_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - - interrupt-controller; - #interrupt-cells = <1>; }; }; @@ -222,6 +234,34 @@ }; }; +#include "axp209.dtsi" + +®_dcdc2 { + /* The custom DVFS table suggests a voltage drop of 25 ~ 50 mV */ + regulator-always-on; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1450000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>;