ARM: dts: stm32: add ADC support to stm32mp157c-ed1
authorFabrice Gasnier <fabrice.gasnier@st.com>
Fri, 8 Nov 2019 16:37:39 +0000 (17:37 +0100)
committerAlexandre Torgue <alexandre.torgue@st.com>
Mon, 9 Dec 2019 08:19:15 +0000 (09:19 +0100)
Add ADC support to stm32mp157c-ed1 board.
Following ADC signals are dedicated for analog and routed to connectors:
- ADC1/2 in0 (ANA0)
- ADC1/2 in1 (ANA1)
- ADC1 in6 (PF12)
Configure ADC1 with these signals. But keep it disabled by default, so
PF12 can be used as gpio by default.
Add VDD and VDDA supplies to ADC on stm32mp157c-ed1 board. This allows to
get full ADC analog performances in case VDDA is below 2.7V (not the case
by default).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
arch/arm/boot/dts/stm32mp157c-ed1.dts

index 207146c..341fb60 100644 (file)
        };
 };
 
+&adc {
+       /* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
+       pinctrl-0 = <&adc1_in6_pins_a>;
+       pinctrl-names = "default";
+       vdd-supply = <&vdd>;
+       vdda-supply = <&vdda>;
+       vref-supply = <&vdda>;
+       status = "disabled";
+       adc1: adc@0 {
+               st,adc-channels = <0 1 6>;
+               /* 16.5 ck_cycles sampling time */
+               st,min-sample-time-nsecs = <400>;
+               status = "okay";
+       };
+};
+
 &dac {
        pinctrl-names = "default";
        pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;