power: qpnp-charger: workaround for coupling issue
On 8x26, the IADC current readings are off when the battery is charging
and is below 3.8V.
This bug is attributed to charger buck switching with high frequency
especially when the battery voltage is significantly lower than the input
charger voltage. As the battery charges up its voltage increases,
charger starts going towards high duty cycle mode thereby reducing the
switches. This reduction in switches improves the IADC accuracy.
Implement workarounds when the battery voltage is lower than 3.8V and is
in a fast charging state. Reduce the number of power stages helps with
improving the IADC accuracy.
Note that this workaround only needs to be applied when a USB Wall
charger or USB CDP is present. With USB SDP the input current is low to
cause IADC inaccuracies.
Change-Id: Ie7e067973a96d478005ddfdddae7c8c0dc394071
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
diff --git a/arch/arm/boot/dts/msm-pm8226.dtsi b/arch/arm/boot/dts/msm-pm8226.dtsi
index 51b3f2f..2c5e57f 100644
--- a/arch/arm/boot/dts/msm-pm8226.dtsi
+++ b/arch/arm/boot/dts/msm-pm8226.dtsi
@@ -22,7 +22,7 @@
#address-cells = <1>;
#size-cells = <1>;
- qcom,revid@100 {
+ pm8226_revid: qcom,revid@100 {
compatible = "qcom,qpnp-revid";
reg = <0x100 0x100>;
};
@@ -85,6 +85,7 @@
qcom,tchg-mins = <150>;
qcom,chg-vadc = <&pm8226_vadc>;
qcom,chg-adc_tm = <&pm8226_adc_tm>;
+ qcom,pmic-revid = <&pm8226_revid>;
qcom,ibatmax-warm-ma = <350>;
qcom,warm-bat-decidegc = <450>;
qcom,warm-bat-mv = <4100>;