boards: thingy53: define ADC channel for battery

Define the ADC channel for battery monitoring so that `voltage-divider`
driver works.

Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
Jordan Yates 2024-05-14 20:31:10 +10:00 committed by Alberto Escolar
commit ed1c78ec15

View file

@ -88,7 +88,7 @@
regulator-boot-on; regulator-boot-on;
}; };
vbatt { vbatt: vbatt {
compatible = "voltage-divider"; compatible = "voltage-divider";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <180000>; output-ohms = <180000>;
@ -155,7 +155,19 @@
}; };
&adc { &adc {
#address-cells = <1>;
#size-cells = <0>;
status = "okay"; status = "okay";
channel@2 {
reg = <2>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,vref-mv = <600>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
zephyr,input-positive = <NRF_SAADC_AIN2>;
};
}; };
&gpiote { &gpiote {