From patchwork Thu Oct 4 19:34:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10626539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C529A174A for ; Thu, 4 Oct 2018 19:35:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3B7A29502 for ; Thu, 4 Oct 2018 19:35:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A678B29633; Thu, 4 Oct 2018 19:35:11 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 B976029502 for ; Thu, 4 Oct 2018 19:35:10 +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:References: In-Reply-To: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:List-Owner; bh=EMZjqTQSAIiEN28+lcxLmTS/XlOJwKj28/UhFdKcVL8=; b=hqU+uC+VaEI34fzkZl9drDklEB wugWo/NiYtcX5ZI1pa1aSU2r7LSISUaBjzCFYp3ghseDSVmA//F9tRvgY2I6KzbfoK3a5IJVhU84F o5fkQO59b8U/hrhdCKegBcv2ayFP34ZcPz5EFG9v8ZpOx+K1nEYtB5/QeG+ehLS9nEWo12cQChdJG T6xq96FRutMOtBxdc6Jio+mwccSeJ6CuFog+2PmOyZ96aAEDxZGmiB3xxbEZKCxepIoBD5Rvm1anB hc+SICaRWO8+J02A38KPw/t9msaQ2hLctydoaLqMXfYPZhvJ8GycavNVPWvdefQQIQBwlFNa/v35w mVAIPCBA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g89Oq-0004At-FF; Thu, 04 Oct 2018 19:35:04 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g89Oj-00046N-S2 for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 19:35:00 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id C093720657; Thu, 4 Oct 2018 21:34:44 +0200 (CEST) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1538681683; x= 1541273684; bh=/PFfFkGU2tveO+f1uD/iVS5pMKTkgRs5f1tx974Fqsg=; b=W s5OQI5dIBTo6sicaSx6tQN/hV30Uz+kGjyvobhMh7q193ONXVJllGxIU7JRC4Jt8 txtAzRkRSet4YNyyn8nlaLsp0oMELYlayT77PnBSNwuVEdl96uUbb8XXQ4jp+ZpU PurWiMy9h1RbvLhDGHlHHSe5Pzsr9yuMNVKvQAo69OXe5BJRxutO6M6j3UkhyGZ2 dObasgJov4VCv+pGZ6BoVS97VeBO9XNgQODGdAUEkk6JKoX9FBI8zVW/0BPp4EWw gduNlK6CZNSNeyuSYexOXDqbHGOCQtWBcBaq5gB1QmhGenr90K1oqavhN5n4k5Tt Dg6cFgw9KYZOEHxQFfgPlc4F19HFT4IO4EVfxeX/qxJfG40GSHGCm7CFiJoqdpbR ChXAHfYT4W5wSYfREhehX/fCMBCIvSUd4xLGxVDJle5727MZRnLV8XvRqtnKUXBP gp+yOStBK0quCz8XXruaDKKv0HDWNYqjUeOFa6IWh1EncWf5evxR40ddqwFdRMg8 ssYX/uVaJ0bJ0ZCOhfbg48Qx8zc/GbpVa++Hz13F9ZNQZfEiTLCSVS4JR3/0vMiK TRI+yXkEK3L7YUCSOINSKx8z9/PKbV/syGm2LiCMyEdnuog+ecXsZK67AqgQw9OC ZH8aH2485EfmdldDvQ4Z0qf5LGp/ljICdlzUjpmDmM= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LgYUfUWXGgUJ; Thu, 4 Oct 2018 21:34:43 +0200 (CEST) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id 39E041FBED; Thu, 4 Oct 2018 21:34:43 +0200 (CEST) From: Oskari Lemmela To: Maxime Ripard , Sebastian Reichel , Jonathan Cameron , Chen-Yu Tsai , Mark Rutland , Rob Herring , Linus Walleij Subject: [PATCH 3/4] arm64: allwinner: a64: add battery and AC power supply support Date: Thu, 4 Oct 2018 22:34:09 +0300 Message-Id: <20181004193410.7265-4-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181004193410.7265-1-oskari@lemmela.net> References: <20181004193410.7265-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_123458_647298_AA5BAD8A X-CRM114-Status: GOOD ( 10.27 ) 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: devicetree@vger.kernel.org, Lars-Peter Clausen , linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Quentin Schulz , Oskari Lemmela , Peter Meerwald-Stadler , Hartmut Knaack , Lee Jones , 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 Add AXP803 DT nodes for AC and battery power supplies. Enable AC and battery power supplies for sopine-baseboard. Signed-off-by: Oskari Lemmela --- arch/arm64/boot/dts/allwinner/axp803.dtsi | 31 +++++++++++++++++++ .../allwinner/sun50i-a64-sopine-baseboard.dts | 8 +++++ 2 files changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi index e5eae8bafc42..d23e5d1e9310 100644 --- a/arch/arm64/boot/dts/allwinner/axp803.dtsi +++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi @@ -49,6 +49,37 @@ interrupt-controller; #interrupt-cells = <1>; + axp_adc: adc { + compatible = "x-powers,axp803-adc"; + #io-channel-cells = <1>; + }; + + axp_gpio: gpio { + compatible = "x-powers,axp803-gpio"; + gpio-controller; + #gpio-cells = <2>; + + gpio0_ldo: gpio0-ldo { + pins = "GPIO0"; + function = "ldo"; + }; + + gpio1_ldo: gpio1-ldo { + pins = "GPIO1"; + function = "ldo"; + }; + }; + + ac_power_supply: ac-power-supply { + compatible = "x-powers,axp803-ac-power-supply"; + status = "disabled"; + }; + + battery_power_supply: battery-power-supply { + compatible = "x-powers,axp803-battery-power-supply"; + status = "disabled"; + }; + regulators { /* Default work frequency for buck regulators */ x-powers,dcdc-freq = <3000>; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts index c21f2331add6..335cf2263d19 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts @@ -69,6 +69,14 @@ }; }; +&ac_power_supply { + status = "okay"; +}; + +&battery_power_supply { + status = "okay"; +}; + &ehci0 { status = "okay"; };