Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933723AbdGKQON (ORCPT ); Tue, 11 Jul 2017 12:14:13 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:27866 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932758AbdGKQOK (ORCPT ); Tue, 11 Jul 2017 12:14:10 -0400 From: Fabrice Gasnier To: , CC: , , , , , , Subject: [PATCH 2/2] ARM: dts: stm32: enable ADC on stm32h743i-eval board Date: Tue, 11 Jul 2017 18:13:10 +0200 Message-ID: <1499789590-13021-3-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499789590-13021-1-git-send-email-fabrice.gasnier@st.com> References: <1499789590-13021-1-git-send-email-fabrice.gasnier@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG4NODE1.st.com (10.75.127.10) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-11_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1152 Lines: 44 There's a potentiometer connected to ADC1 and ADC2 in0 on stm32h743i-eval board. - Add fixed-voltage 'vdda' regulator that supplies 'vref' pin. It's used as voltage reference for ADC and/or DAC. - Enable ADC1 in0 input (arbitrary choice: could be ADC2 as well). Note: No pinctrl is needed to use in0 dedicated analog input pin (e.g. ADC12_INP0). Signed-off-by: Fabrice Gasnier --- arch/arm/boot/dts/stm32h743i-eval.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/stm32h743i-eval.dts b/arch/arm/boot/dts/stm32h743i-eval.dts index c6effbb..6c07786 100644 --- a/arch/arm/boot/dts/stm32h743i-eval.dts +++ b/arch/arm/boot/dts/stm32h743i-eval.dts @@ -60,6 +60,24 @@ aliases { serial0 = &usart1; }; + + vdda: regulator-vdda { + compatible = "regulator-fixed"; + regulator-name = "vdda"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; +}; + +&adc_12 { + vref-supply = <&vdda>; + status = "okay"; + adc1: adc@0 { + /* potentiometer */ + st,adc-channels = <0>; + status = "okay"; + }; }; &clk_hse { -- 1.9.1