Skip to contentSkip to conversation

ARM: dts: at91: sama5d27_som1_ek: enable ADC node

PATCH In review Eugen Hristev 2 participants 2 messages Jun 22, 2021 – Jul 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: at91: sama5d27_som1_ek: enable ADC node

Enable the ADC for AN pins on Mikrobus1 and Mikrobus2 on the board. These correspond to channels AD6 and AD7 in the controller.

 # cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
 240
 # cat /sys/bus/iio/devices/iio\:device0/in_voltage7_raw
 16380
---
 arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +3 -1
index a9e6fee55a2a..261a7dbcfdee 100644
@@ -224,8 +224,10 @@ i2c1: i2c@fc028000 {
 			adc: adc@fc030000 {
 				vddana-supply = <&vddana>;
 				vref-supply = <&advref>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_mikrobus1_an &pinctrl_mikrobus2_an>;
 
-				status = "disabled";
+				status = "okay";
 			};
 
 			pinctrl@fc038000 {
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Eugen Hristev

Enable the ADC for AN pins on Mikrobus1 and Mikrobus2 on the board. These correspond to channels AD6 and AD7 in the controller.

  # cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
  240
  # cat /sys/bus/iio/devices/iio\:device0/in_voltage7_raw
  16380

Queued on at91-dt for 5.15. Best regards,
Nicolas

Quoted 21 lines
---
  arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +3 -1
index a9e6fee55a2a..261a7dbcfdee 100644
@@ -224,8 +224,10 @@ i2c1: i2c@fc028000 {
  			adc: adc@fc030000 {
  				vddana-supply = <&vddana>;
  				vref-supply = <&advref>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_mikrobus1_an &pinctrl_mikrobus2_an>;
 
-				status = "disabled";
+				status = "okay";
  			};
 
  			pinctrl@fc038000 {
Signature · 1 line
Nicolas Ferre