ARM: dts: stm32: enable ADC on stm32f429i-eval board
authorFabrice GASNIER <fabrice.gasnier@st.com>
Mon, 9 Jan 2017 13:08:32 +0000 (14:08 +0100)
committerAlexandre TORGUE <alexandre.torgue@st.com>
Fri, 20 Jan 2017 13:59:39 +0000 (14:59 +0100)
Enable analog to digital converter on stm32f429i-eval board.
It has on-board potentimeter wired to ADC3 in8 analog pin and
uses fixed regulator to provide reference voltage.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
arch/arm/boot/dts/stm32429i-eval.dts

index 5436e88..2181220 100644 (file)
                dma-ranges = <0xc0000000 0x0 0x10000000>;
        };
 
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_vref: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "vref";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                green {
        };
 };
 
+&adc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&adc3_in8_pin>;
+       vref-supply = <&reg_vref>;
+       status = "okay";
+       adc3: adc@200 {
+               st,adc-channels = <8>;
+               status = "okay";
+       };
+};
+
 &clk_hse {
        clock-frequency = <25000000>;
 };