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

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>

authored by

Iskren Chernev and committed by
Bjorn Andersson
45dfa741 da8d4699

+25
+25
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
··· 566 566 567 567 usb_otg_vbus: usb-otg-vbus { }; 568 568 }; 569 + 570 + fuelgauge: max17048@36 { 571 + compatible = "maxim,max17048"; 572 + reg = <0x36>; 573 + 574 + maxim,double-soc; 575 + maxim,rcomp = /bits/ 8 <0x4d>; 576 + 577 + interrupt-parent = <&msmgpio>; 578 + interrupts = <9 IRQ_TYPE_EDGE_FALLING>; 579 + 580 + pinctrl-names = "default"; 581 + pinctrl-0 = <&fuelgauge_pin>; 582 + 583 + maxim,alert-low-soc-level = <2>; 584 + }; 569 585 }; 570 586 571 587 i2c@f9924000 { ··· 719 703 function = "normal"; 720 704 721 705 bias-pull-up; 706 + power-source = <PM8941_GPIO_S3>; 707 + }; 708 + 709 + fuelgauge_pin: fuelgauge-int { 710 + pins = "gpio9"; 711 + function = "normal"; 712 + 713 + bias-disable; 714 + input-enable; 722 715 power-source = <PM8941_GPIO_S3>; 723 716 }; 724 717