From patchwork Thu Nov 23 17:35:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10073173 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 3A24A60375 for ; Thu, 23 Nov 2017 17:41:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26A7B2A014 for ; Thu, 23 Nov 2017 17:41:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19CBD2A0EE; Thu, 23 Nov 2017 17:41:26 +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, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable 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 920412A014 for ; Thu, 23 Nov 2017 17:41:25 +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: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:In-Reply-To: References:List-Owner; bh=NlAVIt+rYjRuM3+jkbA7MdPPmZCd5klolw8vllW84Ak=; b=j/1 RcnKDersqjPL6W3OdOtprL90KA7GpLUQQWkmM+4fRYPMaq19q2Y6/zq9tM1hECYD4YOvd8X3eI6Dn V88uBNOSWUA8hMCIRV0AHdBBBoAWa2/CBS8YNQ0I2Pvw1uP6dhUQLvpFzYUIKps7/2R9FS3sxSm8o vXtcJ8if1ARg72Mac8NAJRZVHdH0nI6pX5z/22E3370yKWgZMjthJm1WXnVgeZrvQTXx3carUj2/j OPjb726ZBDeJljLcqXYZ+Z/tcgvJZxrQcJYOAPKywwEVwrDawsnlIxMbfNZWqVOl+crQOKo8usQMD h/Q29EKLO91tIynrnr7eSNQ2rhXgckg==; 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 1eHvUy-0000t6-94; Thu, 23 Nov 2017 17:41:16 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eHvUu-0000d1-P2 for linux-arm-kernel@lists.infradead.org; Thu, 23 Nov 2017 17:41:14 +0000 Received: by mail-pf0-x244.google.com with SMTP id 17so13745160pfn.12 for ; Thu, 23 Nov 2017 09:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SiJey3oshLdFHLXmHhL32exElzcpNmJifkNNQ/irBYU=; b=VHkBXrYWP5m9q4LCUoFruu392VHrnj6zSabZcWacdzN4afhSyQuNJIzoPnwKyz9C91 1tuRXS/rPNtVqLJxSQw3xulCIqALUVFgmK6EsUxXoz103GA/1M21Wy9upAL1QmjkPOSR LqACrqLti/fNGbpgwaRAJyNNTQrux2OsW/AyO3MFt02euG/wHlLa7PSxvEMwTRbvJ8J5 84NGxLHo56uChpBv1UMtibbSMR+latQOhIi/q3xZUdeDqGp0KXn/WbaEWsiUrj+RICYK lMa876hqiqvPw4oFWqVykZQWaGjdMDH0wknak5uKya27mwVLdoRswUWiNdsl5uE35eH1 yXYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SiJey3oshLdFHLXmHhL32exElzcpNmJifkNNQ/irBYU=; b=qod3+DwQ4Nj3HGCx2YZ/rd61HG7gej8ie/s2HOAlei7Ut8w1DUbzwccORHsAlVzzd7 pvjhgltA1Gs5SYYNotS7JVRgLPvnxSkfm3y5J2sxAGKYcS7zcvhBqBnc2A6nQObPhrBz nLeVvn5aTdLGTutc0xhxwZNlKt50JHifsSQpXZg0DB3w07IjlYyz4qx24uHU3/csopbn mJpzXF5s7K1fkIzfq1zS0rLmmlAiNaEZ2ZCctZBNtS13w6UhwIV3no7g+Hgf5cr6pL4x Y3kXaeTLc4W9Sy2GXUb0hFznlE46WwYg9MtSggLa/Q+aSdoJivAqeoD5QjyIDhe4h/CV 1tZw== X-Gm-Message-State: AJaThX6UERYKYvHeTfAC5ZQHasLs9hTeufoFoUU6z3AihVpqCmIjJWd5 uWlScUVySxzLi/H8NP7gDCQ= X-Google-Smtp-Source: AGs4zMaIaefMEzE4BftfgEMKVeZBfTi3zafCNowi9iqaVYRELZeUujJMgIpZMbCiYXCXMANchzE5cg== X-Received: by 10.99.36.195 with SMTP id k186mr10187227pgk.171.1511458850492; Thu, 23 Nov 2017 09:40:50 -0800 (PST) Received: from localhost.localdomain ([115.97.180.212]) by smtp.gmail.com with ESMTPSA id h69sm34021221pfk.166.2017.11.23.09.40.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 09:40:49 -0800 (PST) From: Jagan Teki X-Google-Original-From: Jagan Teki To: Maxime Ripard Subject: [PATCH] arm64: allwinner: a64: Enable AXP803 for Orangepi Win Date: Thu, 23 Nov 2017 23:05:36 +0530 Message-Id: <1511458536-5315-1-git-send-email-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171123_094112_875603_E31D3A0A X-CRM114-Status: GOOD ( 11.30 ) 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: Mark Rutland , devicetree@vger.kernel.org, Catalin Marinas , linux-sunxi@googlegroups.com, Will Deacon , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Jagan Teki , Michael Trimarchi , 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 Enable AXP803 PMIC and regulators for Orangepi Win. Signed-off-by: Jagan Teki --- .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 125 +++++++++++++++++++-- 1 file changed, 117 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts index 5f8ff40..240d357 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts @@ -57,13 +57,6 @@ chosen { stdout-path = "serial0:115200n8"; }; - - reg_vcc3v3: vcc3v3 { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; }; &ehci1 { @@ -73,7 +66,7 @@ &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; - vmmc-supply = <®_vcc3v3>; + vmmc-supply = <®_dcdc1>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; cd-inverted; status = "okay"; @@ -83,6 +76,122 @@ status = "okay"; }; +&r_rsb { + status = "okay"; + + axp803: pmic@3a3 { + compatible = "x-powers,axp803"; + reg = <0x3a3>; + interrupt-parent = <&r_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +#include "axp803.dtsi" + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "afvcc-csi"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pl"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-pll-avcc"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1040000>; + regulator-max-microvolt = <1300000>; + regulator-name = "vdd-cpux"; +}; + +/* DCDC3 is polyphased with DCDC2 */ + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_dcdc6 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-sys"; +}; + +®_dldo1 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-hdmi-dsi"; +}; + +®_dldo2 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi"; +}; + +®_dldo3 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avdd-csi"; +}; + +®_dldo4 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi-io"; +}; + +®_eldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "cpvdd"; +}; + +®_fldo1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "vcc-1v2-hsic"; +}; + +/* + * The A64 chip cannot work without this regulator off, although + * it seems to be only driving the AR100 core. + * Maybe we don't still know well about CPUs domain. + */ +®_fldo2 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-cpus"; +}; + +®_rtc_ldo { + regulator-name = "vcc-rtc"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>;