ARM: dts: at91: sama5d2 Xplained: enable the adc device
authorLudovic Desroches <ludovic.desroches@atmel.com>
Thu, 14 Jan 2016 15:38:16 +0000 (16:38 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 18 Feb 2016 02:10:05 +0000 (03:10 +0100)
Enable the adc on the sama5d2 Xplained board.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
arch/arm/boot/dts/at91-sama5d2_xplained.dts

index 77ddff036409f7cb84d28342f8b973ce9792d09e..c3102a0a1643642294cdfa885ba6f2212cfbcd63 100644 (file)
                                };
                        };
 
+                       adc: adc@fc030000 {
+                               vddana-supply = <&vdd_3v3_lp_reg>;
+                               vref-supply = <&vdd_3v3_lp_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_adc_default>;
+                               status = "okay";
+                       };
+
                        pinctrl@fc038000 {
+                               /*
+                                * There is no real pinmux for ADC, if the pin
+                                * is not requested by another peripheral then
+                                * the muxing is done when channel is enabled.
+                                * Requesting pins for ADC is GPIO is
+                                * encouraged to prevent conflicts and to
+                                * disable bias in order to be in the same
+                                * state when the pin is not muxed to the adc.
+                                */
+                               pinctrl_adc_default: adc_default {
+                                       pinmux = <PIN_PD23__GPIO>;
+                                       bias-disable;
+                               };
+
                                pinctrl_flx0_default: flx0_default {
                                        pinmux = <PIN_PB28__FLEXCOM0_IO0>,
                                                 <PIN_PB29__FLEXCOM0_IO1>;