Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Iskren Chernev and committed by
Bjorn Andersson
da8d4699 5434dcef

+39
+39
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
··· 406 406 }; 407 407 }; 408 408 409 + i2c12_pins: i2c12 { 410 + mux { 411 + pins = "gpio87", "gpio88"; 412 + function = "blsp_i2c12"; 413 + 414 + drive-strength = <2>; 415 + bias-disable; 416 + }; 417 + }; 418 + 409 419 i2c_touchkey_pins: i2c-touchkey { 410 420 mux { 411 421 pins = "gpio95", "gpio96"; ··· 676 666 }; 677 667 }; 678 668 }; 669 + 670 + i2c@f9968000 { 671 + status = "okay"; 672 + 673 + pinctrl-names = "default"; 674 + pinctrl-0 = <&i2c12_pins>; 675 + 676 + fuelgauge@36 { 677 + compatible = "maxim,max17048"; 678 + reg = <0x36>; 679 + 680 + maxim,double-soc; 681 + maxim,rcomp = /bits/ 8 <0x56>; 682 + 683 + interrupt-parent = <&pma8084_gpios>; 684 + interrupts = <21 IRQ_TYPE_EDGE_FALLING>; 685 + 686 + pinctrl-names = "default"; 687 + pinctrl-0 = <&fuelgauge_pin>; 688 + }; 689 + }; 679 690 }; 680 691 681 692 &spmi_bus { ··· 733 702 output-high; 734 703 power-source = <PMA8084_GPIO_S4>; 735 704 qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>; 705 + }; 706 + 707 + fuelgauge_pin: fuelgauge-int-pin { 708 + pins = "gpio21"; 709 + function = "normal"; 710 + bias-disable; 711 + input-enable; 712 + power-source = <PMA8084_GPIO_S4>; 736 713 }; 737 714 }; 738 715 };