summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
diff options
context:
space:
mode:
authorIskren Chernev <iskren.chernev@gmail.com>2020-11-26 15:11:44 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-11-26 18:33:57 +0100
commit45dfa741df8607ee4a45455c194ce654badb2478 (patch)
tree7dcfb0269318bf7cb27605786773088a0e8c95e1 /arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
parentARM: dts: qcom: msm8974-klte: Add fuel gauge (diff)
downloadlinux-45dfa741df8607ee4a45455c194ce654badb2478.tar.xz
linux-45dfa741df8607ee4a45455c194ce654badb2478.zip
ARM: dts: qcom: msm8974-lge-nexus5: Add fuel gauge
The LG Nexus 5 uses a maxim17048 fuelgauge. The maxim,rcomp value is taken from downstream dt. Temperature-based compensation is not yet supported in the mainline driver, but the readings seem fine nevertheless. Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com> Tested-by: NĂ­colas F. R. A. Prado <nfraprado@protonmail.com> Link: https://lore.kernel.org/r/20201126141144.1763779-2-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts')
-rw-r--r--arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
index 32b474bfeec3..e769f638f205 100644
--- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -566,6 +566,22 @@
usb_otg_vbus: usb-otg-vbus { };
};
+
+ fuelgauge: max17048@36 {
+ compatible = "maxim,max17048";
+ reg = <0x36>;
+
+ maxim,double-soc;
+ maxim,rcomp = /bits/ 8 <0x4d>;
+
+ interrupt-parent = <&msmgpio>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&fuelgauge_pin>;
+
+ maxim,alert-low-soc-level = <2>;
+ };
};
i2c@f9924000 {
@@ -706,6 +722,15 @@
power-source = <PM8941_GPIO_S3>;
};
+ fuelgauge_pin: fuelgauge-int {
+ pins = "gpio9";
+ function = "normal";
+
+ bias-disable;
+ input-enable;
+ power-source = <PM8941_GPIO_S3>;
+ };
+
wlan_sleep_clk_pin: wl-sleep-clk {
pins = "gpio16";
function = "func2";