From: Lei YU Date: Wed, 22 Aug 2018 07:47:28 +0000 (+0800) Subject: ARM: dts: aspeed: romulus: Enable iio-hwmon-battery X-Git-Tag: v5.15~7280^2~35^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=163d88c4bf92721c297ce828c96f4d85367208d9;p=platform%2Fkernel%2Flinux-starfive.git ARM: dts: aspeed: romulus: Enable iio-hwmon-battery Add iio-hwmon-battery using adc channel 12 and enable adc to make adc running. This channel is used to read RTC battery voltage. Note with Romulus hardware design, it requires GPIOR3 to be pulled high to read the voltage, otherwise the reading is 0. When GPIOR3 is high, it consumes battery and impacts the battery life. So it is left for user space to toggle the GPIO when trying to read the voltage. Signed-off-by: Lei YU Signed-off-by: Joel Stanley --- diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts index 1c6c8cc..76fe994 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts @@ -85,6 +85,11 @@ linux,code = ; }; }; + + iio-hwmon-battery { + compatible = "iio-hwmon"; + io-channels = <&adc 12>; + }; }; &fmc { @@ -287,3 +292,7 @@ &vhub { status = "okay"; }; + +&adc { + status = "okay"; +};