From patchwork Fri Apr 11 09:38:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 3967321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FC619F2BA for ; Fri, 11 Apr 2014 10:21:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED163207F2 for ; Fri, 11 Apr 2014 10:21:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D5E16207DE for ; Fri, 11 Apr 2014 10:21:50 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WYXv9-0001Ie-ER; Fri, 11 Apr 2014 09:38:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WYXuR-0008Ub-Sy; Fri, 11 Apr 2014 09:38:07 +0000 Received: from bombadil.infradead.org ([2001:1868:205::9]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WYXtM-0008QJ-Tb for linux-arm-kernel@merlin.infradead.org; Fri, 11 Apr 2014 09:37:01 +0000 Received: from mail-ee0-f41.google.com ([74.125.83.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WYXtK-0001D7-Ka for linux-arm-kernel@lists.infradead.org; Fri, 11 Apr 2014 09:37:00 +0000 Received: by mail-ee0-f41.google.com with SMTP id t10so3928767eei.14 for ; Fri, 11 Apr 2014 02:36:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l+ma60l0Iwkb4gbl3FsRm1u6vZk3C27V+WZnjxEoDeo=; b=j2Kz+tx4AUDmKFXsRxgMvNJMi6xmL2Dr/gv2PvDp4Na49v6oUK8unvFgbz4kyxMEMO nTKI3E4bP0oZ6nEJrqEyhPh4UUkD/NVkYhZmzUU8ebxQ5A9MHjMXsUo/CQvt+qTsNYcq p0zR5ZD77hZuNr6BimV/Ew8g9NH4kQX0jfNZGrhfOpRXwELbI4HPgdbslro8Fj/t1/1W IDZ+qZuZp2quevU2bq2ldzLbZM2pz8DwvXXgid4VzisKR7Fg4bOcj/w4IcBZmI8fN8mn Z8q5JZ2oUTipgiwgXbAkB86rj4iHACudnitKW/nWiAwZpnI1JeLb7VATHP/jWssM230f F6TQ== X-Received: by 10.14.219.137 with SMTP id m9mr1479552eep.77.1397208996293; Fri, 11 Apr 2014 02:36:36 -0700 (PDT) Received: from localhost-002.homenet.telecomitalia.it (host43-8-static.10-188-b.business.telecomitalia.it. [188.10.8.43]) by mx.google.com with ESMTPSA id l42sm16344939eew.19.2014.04.11.02.36.33 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 11 Apr 2014 02:36:35 -0700 (PDT) From: Carlo Caione To: linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, maxime.ripard@free-electrons.com, hdegoede@redhat.com, emilio@elopez.com.ar, wens@csie.org, sameo@linux.intel.com, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-doc@vger.kernel.org, lgirdwood@gmail.com, broonie@kernel.org, lee.jones@linaro.org, boris.brezillon@free-electrons.com Subject: [PATCH v4 7/9] ARM: sun7i/sun4i: dt: Add AXP209 support to various boards Date: Fri, 11 Apr 2014 11:38:11 +0200 Message-Id: <1397209093-10077-8-git-send-email-carlo@caione.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1397209093-10077-1-git-send-email-carlo@caione.org> References: <1397209093-10077-1-git-send-email-carlo@caione.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140411_023658_984118_6AB24F57 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Carlo Caione X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Hans de Goede Signed-off-by: Carlo Caione --- In all the DTs the min and max microvolt allowed for each regulator are actually the min and max voltage possible for the regulator itself. This is not safe but we do not have the ranges allowed for each board and the original Allwinner driver does exactly this way. AXP20x has the so called Power Path Management (IPS) that can select the proper power supply according to the status of the external power and the Li-battery status. The output of the IPS block is usually a 5V fixed voltage used as input supply for all the other regulators. This fixed voltage is represented in the DT as a fixed voltage regulator in the "regulator" subnode. arch/arm/boot/dts/sun4i-a10-a1000.dts | 69 +++++++++++++++++++++++ arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 69 +++++++++++++++++++++++ arch/arm/boot/dts/sun4i-a10-hackberry.dts | 75 +++++++++++++++++++++++++ arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 69 +++++++++++++++++++++++ arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 75 +++++++++++++++++++++++++ arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 75 +++++++++++++++++++++++++ arch/arm/boot/dts/sun4i-a10-pcduino.dts | 69 +++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 70 +++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 70 +++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 70 +++++++++++++++++++++++ 10 files changed, 711 insertions(+) diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts index fa746aea..029a880 100644 --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts @@ -88,6 +88,75 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; }; diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts index 4684cbe..635fd4b 100644 --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts @@ -80,6 +80,75 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; i2c1: i2c@01c2b000 { diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts index d7c17e4..8f2db9c 100644 --- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts +++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts @@ -82,6 +82,81 @@ pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + + i2c0: i2c@01c2ac00 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; + }; }; reg_emac_3v3: emac-3v3 { diff --git a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts index fe9272e..c1d6fdb 100644 --- a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts +++ b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts @@ -34,6 +34,75 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; usbphy: phy@01c13400 { diff --git a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts index dd84a9e..e472034 100644 --- a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts +++ b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts @@ -47,6 +47,81 @@ pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + + i2c0: i2c@01c2ac00 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; + }; }; reg_usb1_vbus: usb1-vbus { diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts index 66cf0c7..84e6e20 100644 --- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts +++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts @@ -81,6 +81,81 @@ pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + + i2c0: i2c@01c2ac00 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; + }; }; leds { diff --git a/arch/arm/boot/dts/sun4i-a10-pcduino.dts b/arch/arm/boot/dts/sun4i-a10-pcduino.dts index 255b47e..42b15d2 100644 --- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts +++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts @@ -66,6 +66,75 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; }; diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index 68de89f..9f64f56 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts @@ -66,6 +66,76 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 8>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; i2c1: i2c@01c2b000 { diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index cb25d3c..c8e6f1b 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts @@ -73,6 +73,76 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 8>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; i2c1: i2c@01c2b000 { diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts index eeadf76..6ec7137 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts @@ -95,6 +95,76 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 8>; + + interrupt-controller; + #interrupt-cells = <1>; + + acin-supply = <&axp_ipsout_reg>; + vin2-supply = <&axp_ipsout_reg>; + vin3-supply = <&axp_ipsout_reg>; + ldo24in-supply = <&axp_ipsout_reg>; + ldo3in-supply = <&axp_ipsout_reg>; + ldo5in-supply = <&axp_ipsout_reg>; + + regulators { + compatible = "x-powers,axp20x-reg"; + + x-powers,dcdc-freq = <1500>; + + axp_ipsout_reg: axp_ipsout { + compatible = "regulator-fixed"; + regulator-name = "axp-ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + axp_vcore_reg: dcdc2 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <2275000>; + regulator-always-on; + }; + + axp_ddr_reg: dcdc3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + regulator-always-on; + }; + + axp_rtc_reg: ldo1 { + regulator-always-on; + }; + + axp_analog_reg: ldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + axp_pll_reg: ldo3 { + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3500000>; + }; + + axp_hdmi_reg: ldo4 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + }; + + axp_mic_reg: ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; i2c1: i2c@01c2b000 {