diff options
author | Iskren Chernev <iskren.chernev@gmail.com> | 2020-11-26 17:11:43 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-11-26 20:33:56 +0300 |
commit | da8d46992e672ec7300b5b6857d0a4eebf0727ac (patch) | |
tree | e3ba2754fbaa054e80c9e213d7c5edf3efe5acb8 /arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | |
parent | 5434dcef54964e1f8a293e43b93ba6b45cc477ae (diff) | |
download | linux-da8d46992e672ec7300b5b6857d0a4eebf0727ac.tar.xz |
ARM: dts: qcom: msm8974-klte: Add fuel gauge
The Samsung Galaxy S5 uses a maxim17048 fuelgauge. The maxim,rcomp value
is taken from downstream kernel. Model data and temperature-based
compensation are not yet supported in the mainline driver, but the
readings seem fine nevertheless.
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Link: https://lore.kernel.org/r/20201126141144.1763779-1-iskren.chernev@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts')
-rw-r--r-- | arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index b0899107f3ce..97352de91314 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -406,6 +406,16 @@ }; }; + i2c12_pins: i2c12 { + mux { + pins = "gpio87", "gpio88"; + function = "blsp_i2c12"; + + drive-strength = <2>; + bias-disable; + }; + }; + i2c_touchkey_pins: i2c-touchkey { mux { pins = "gpio95", "gpio96"; @@ -666,6 +676,27 @@ }; }; }; + + i2c@f9968000 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c12_pins>; + + fuelgauge@36 { + compatible = "maxim,max17048"; + reg = <0x36>; + + maxim,double-soc; + maxim,rcomp = /bits/ 8 <0x56>; + + interrupt-parent = <&pma8084_gpios>; + interrupts = <21 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&fuelgauge_pin>; + }; + }; }; &spmi_bus { @@ -703,6 +734,14 @@ power-source = <PMA8084_GPIO_S4>; qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>; }; + + fuelgauge_pin: fuelgauge-int-pin { + pins = "gpio21"; + function = "normal"; + bias-disable; + input-enable; + power-source = <PMA8084_GPIO_S4>; + }; }; }; }; |