From ed1c78ec150bd32349ce26069d76b0ee5668ab9e Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Tue, 14 May 2024 20:31:10 +1000 Subject: [PATCH] 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 --- .../nordic/thingy53/thingy53_nrf5340_common.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/boards/nordic/thingy53/thingy53_nrf5340_common.dtsi b/boards/nordic/thingy53/thingy53_nrf5340_common.dtsi index 694a6960584..017fa9e8a26 100644 --- a/boards/nordic/thingy53/thingy53_nrf5340_common.dtsi +++ b/boards/nordic/thingy53/thingy53_nrf5340_common.dtsi @@ -88,7 +88,7 @@ regulator-boot-on; }; - vbatt { + vbatt: vbatt { compatible = "voltage-divider"; io-channels = <&adc 2>; output-ohms = <180000>; @@ -155,7 +155,19 @@ }; &adc { + #address-cells = <1>; + #size-cells = <0>; status = "okay"; + + channel@2 { + reg = <2>; + zephyr,gain = "ADC_GAIN_1"; + zephyr,reference = "ADC_REF_INTERNAL"; + zephyr,vref-mv = <600>; + zephyr,acquisition-time = ; + zephyr,resolution = <12>; + zephyr,input-positive = ; + }; }; &gpiote {