[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4f66af3b47ba241380f8092e08879aca6d7c35b3.1548052878.git.baolin.wang@linaro.org>
Date: Mon, 21 Jan 2019 15:38:31 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: robh+dt@...nel.org, mark.rutland@....com, arnd@...db.de,
olof@...om.net, orsonzhai@...il.com, zhang.lyra@...il.com
Cc: devicetree@...r.kernel.org, arm@...nel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
broonie@...nel.org, baolin.wang@...aro.org
Subject: [PATCH 4/4] arm64: dts: sprd: Add SC27XX fuel gauge device
Add Spreadtrum SC27XX fuel gauge device node to calculate the
battery capacity.
Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
arch/arm64/boot/dts/sprd/sc2731.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi
index b52eaf0..1110d13 100644
--- a/arch/arm64/boot/dts/sprd/sc2731.dtsi
+++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi
@@ -70,6 +70,11 @@
#size-cells = <1>;
hwlocks = <&hwlock 12>;
+ fgu_calib: calib@6 {
+ reg = <0x6 0x2>;
+ bits = <0 9>;
+ };
+
adc_big_scale: calib@24 {
reg = <0x24 0x2>;
};
@@ -90,6 +95,19 @@
nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
};
+ fgu@a00 {
+ compatible = "sprd,sc27xx-fgu", "sprd,sc2731-fgu";
+ reg = <0xa00>;
+ bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
+ io-channels = <&pmic_adc 3>, <&pmic_adc 6>;
+ io-channel-names = "bat-temp", "charge-vol";
+ monitored-battery = <&bat>;
+ nvmem-cell-names = "fgu_calib";
+ nvmem-cells = <&fgu_calib>;
+ interrupt-parent = <&sc2731_pmic>;
+ interrupts = <4>;
+ };
+
vibrator@ec8 {
compatible = "sprd,sc27xx-vibrator", "sprd,sc2731-vibrator";
reg = <0xec8>;
--
1.7.9.5
Powered by blists - more mailing lists