[PATCH linux dev-4.18] ARM: dts: aspeed: wspoon: Enable iio-hwmon battery

Matt Spinler mspinler at linux.vnet.ibm.com
Sat Oct 13 02:29:15 AEDT 2018


The BMC can read the RTC battery voltage via ADC
channel 12.

Signed-off-by: Matt Spinler <spinler at linux.vnet.ibm.com>
---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index f4739ec..b933ced 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -63,6 +63,11 @@
 		};
 	};
 
+	iio-hwmon-battery {
+		compatible = "iio-hwmon";
+		io-channels = <&adc 12>;
+	};
+
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
 		#address-cells = <1>;
@@ -651,4 +656,8 @@
 	status = "okay";
 };
 
+&adc {
+	status = "okay";
+};
+
 #include "ibm-power9-dual.dtsi"
-- 
1.8.3.1



More information about the openbmc mailing list