summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei YU <mine260309@gmail.com>2018-08-22 10:47:28 +0300
committerJoel Stanley <joel@jms.id.au>2018-12-03 01:44:05 +0300
commit163d88c4bf92721c297ce828c96f4d85367208d9 (patch)
treecb3037d91348b0cebdd315d57484c50b6f53a6d2
parent89b32a47e36ec6cd0243c1e573f46bb8d09d2fcb (diff)
downloadlinux-163d88c4bf92721c297ce828c96f4d85367208d9.tar.xz
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 <mine260309@gmail.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
index 1c6c8cc03ea0..76fe994f2ba4 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 = <ASPEED_GPIO(Q, 7)>;
};
};
+
+ iio-hwmon-battery {
+ compatible = "iio-hwmon";
+ io-channels = <&adc 12>;
+ };
};
&fmc {
@@ -287,3 +292,7 @@
&vhub {
status = "okay";
};
+
+&adc {
+ status = "okay";
+};