mirror of
https://github.com/torvalds/linux.git
synced 2026-05-04 22:43:04 -04:00
There have been some cases of droid4 battery bulging that seem to be related to being left connected to the charger for several weeks. It is suspected that the 4.35V charge voltage configured for the battery is too much in the long run, so lets limit the charge voltage to 4.2V. It could also be that the batteries are just getting old. We don't really want to just change the charge voltage to 4.2V as Android may have charged the battery to 4.35V as pointed out by Pavel Machek. To add checks for battery voltage, the driver needs to understand the voltage it's charging at, and also needs to better understand it's charger state. Right now it only understands connect and disconnect, while now we need to know also a connected state but not charging. So let's add better charger state handling with help of chrgcurr2 interrupt for detecting charge full and retry, and add a check for battery voltage before we start charging. And then we finally can lower the charge voltage to 4.2V. Note that we've been using the same register values as the Android distros on droid4, so it is suspected that the same problem also exists in Android. Cc: Pavel Machek <pavel@ucw.cz> Cc: Rob Herring <robh+dt@kernel.org> Reported-by: Merlijn Wajer <merlijn@wizzup.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
Motorola CPCAP PMIC battery charger binding
|
|
|
|
Required properties:
|
|
- compatible: Shall be "motorola,mapphone-cpcap-charger"
|
|
- interrupts: Interrupt specifier for each name in interrupt-names
|
|
- interrupt-names: Should contain the following entries:
|
|
"chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
|
|
"rvrs_mode", "chrgcurr2", "chrgcurr1", "vbusvld",
|
|
"battdetb"
|
|
- io-channels: IIO ADC channel specifier for each name in io-channel-names
|
|
- io-channel-names: Should contain the following entries:
|
|
"battdetb", "battp", "vbus", "chg_isense", "batti"
|
|
|
|
Optional properties:
|
|
- mode-gpios: Optionally CPCAP charger can have a companion wireless
|
|
charge controller that is controlled with two GPIOs
|
|
that are active low.
|
|
|
|
Example:
|
|
|
|
cpcap_charger: charger {
|
|
compatible = "motorola,mapphone-cpcap-charger";
|
|
interrupts-extended = <
|
|
&cpcap 13 0 &cpcap 12 0 &cpcap 29 0 &cpcap 28 0
|
|
&cpcap 22 0 &cpcap 21 0 &cpcap 20 0 &cpcap 19 0
|
|
&cpcap 54 0
|
|
>;
|
|
interrupt-names =
|
|
"chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
|
|
"rvrs_mode", "chrgcurr2", "chrgcurr1", "vbusvld",
|
|
"battdetb";
|
|
mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW
|
|
&gpio3 23 GPIO_ACTIVE_LOW>;
|
|
io-channels = <&cpcap_adc 0 &cpcap_adc 1
|
|
&cpcap_adc 2 &cpcap_adc 5
|
|
&cpcap_adc 6>;
|
|
io-channel-names = "battdetb", "battp",
|
|
"vbus", "chg_isense",
|
|
"batti";
|
|
};
|