From patchwork Mon Mar 26 09:21:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixun Lan X-Patchwork-Id: 10307491 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 2F511600F6 for ; Mon, 26 Mar 2018 09:22:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CAE629067 for ; Mon, 26 Mar 2018 09:22:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10BA82906D; Mon, 26 Mar 2018 09:22:33 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable 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 9C29629067 for ; Mon, 26 Mar 2018 09:22:32 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=PepfLjZRlClEkrC36hQo5Y63C8++RxdMaCAaZBMLIH4=; b=MRSPAi6rf6eSnd hItPNq918pWxL63UrwnXrgBP+L8bCUGpw31KIwVuNFXbQbHbYrHYnYQTdVe2VT1s7Dr6r3BWIRXNd VfLiM8/b8Bn1VterLrSyPgurw0O4YMI+0A7dgbbezLZ5q2WClEP2+31w8Q8Vf10D1ZGyIvzOyPQhI 8Ho57Y1FZ+q0VQ2EFotycxdR5polKisVed+6/njNojMr/sNwdK+cE6hTm7XAWMHFI4E5hrwRAwwJk K6JuBMQo8MYpY2ctInwcQUfegtQs4C4bujV4VTjoLGN6CgiQvSPFbwtGh4v50oAoWt08jeQUOFMfE cdQZ5uhHP0i6edOIjsSA==; 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 1f0OKk-0004tG-R0; Mon, 26 Mar 2018 09:22:30 +0000 Received: from mail-sh2.amlogic.com ([58.32.228.45]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0OKU-0004fM-HT; Mon, 26 Mar 2018 09:22:16 +0000 Received: from ofmlt.linux-actions.org (10.18.20.235) by mail-sh2.amlogic.com (10.18.11.6) with Microsoft SMTP Server id 15.0.1320.4; Mon, 26 Mar 2018 17:21:37 +0800 From: Yixun Lan To: Kevin Hilman Subject: [PATCH] ARM64: dts: meson-axg: add saradc support Date: Mon, 26 Mar 2018 17:21:17 +0800 Message-ID: <20180326092117.208416-1-yixun.lan@amlogic.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 X-Originating-IP: [10.18.20.235] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180326_022214_579116_73CA607C X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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, Yixun Lan , linux-kernel@vger.kernel.org, Rob Herring , Xingyu Chen , Carlo Caione , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xingyu Chen Add the DT info for SAR ADC of the Amlogic's Meson-AXG SoC. Signed-off-by: Xingyu Chen Signed-off-by: Yixun Lan --- Hi Kevin: Please note, the saradc driver in Meson-AXG platfrom actually depend on the AO clock driver [0] & saradc patch itself [1]. And I've rebased this patch on top of your v4.17/dt64 branch [0] https://lkml.kernel.org/r/20180323143816.200573-1-yixun.lan@amlogic.com [1] https://lkml.kernel.org/r/20180326084629.100070-1-yixun.lan@amlogic.com Yixun --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 5 +++++ arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index 57eedced5a51..bbb88debbc04 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -47,3 +47,8 @@ pinctrl-0 = <&i2c1_z_pins>; pinctrl-names = "default"; }; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao18>; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 40ca49fb94a6..105884efc033 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -818,6 +818,27 @@ interrupts = ; status = "disabled"; }; + + saradc: adc@9000 { + compatible = "amlogic,meson-axg-saradc", + "amlogic,meson-saradc"; + reg = <0x0 0x9000 0x0 0x38>; + #io-channel-cells = <1>; + interrupts = ; + clocks = <&xtal>, + <&clkc_AO CLKID_AO_SAR_ADC>, + <&clkc_AO CLKID_AO_SAR_ADC_CLK>, + <&clkc_AO CLKID_AO_SAR_ADC_SEL>; + clock-names = "clkin", "core", "adc_clk", "adc_sel"; + status = "disabled"; + }; }; }; + + vddio_ao18: regulator-vddio_ao18 { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_AO18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; };