OrangePi_CM5/drivers/power/supply
Hans de Goede 9538563d31 power: supply: axp288-charger: Set Vhold to 4.4V
[ Upstream commit 5ac121b81b4051e7fc83d5b3456a5e499d5bd147 ]

The AXP288's recommended and factory default Vhold value (minimum
input voltage below which the input current draw will be reduced)
is 4.4V. This lines up with other charger IC's such as the TI
bq2419x/bq2429x series which use 4.36V or 4.44V.

For some reason some BIOS-es initialize Vhold to 4.6V or even 4.7V
which combined with the typical voltage drop over typically low
wire gauge micro-USB cables leads to the input-current getting
capped below 1A (with a 2A capable dedicated charger) based on Vhold.

This leads to slow charging, or even to the device slowly discharging
if the device is in heavy use.

As the Linux AXP288 drivers use the builtin BC1.2 charger detection
and send the input-current-limit according to the detected charger
there really is no reason not to use the recommended 4.4V Vhold.

Set Vhold to 4.4V to fix the slow charging issue on various devices.

There is one exception, the special-case of the HP X2 2-in-1s which
combine this BC1.2 capable PMIC with a Type-C port and a 5V/3A factory
provided charger with a Type-C plug which does not do BC1.2. These
have their input-current-limit hardcoded to 3A (like under Windows)
and use a higher Vhold on purpose to limit the current when used
with other chargers. To avoid touching Vhold on these HP X2 laptops
the code setting Vhold is added to an else branch of the if checking
for these models.

Note this also fixes the sofar unused VBUS_ISPOUT_VHOLD_SET_MASK
define, which was wrong.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 21:00:57 +02:00
..
88pm860x_battery.c
…
88pm860x_charger.c
…
Kconfig power: supply: rt5033_battery: Fix device tree enumeration 2021-07-20 16:05:50 +02:00
Makefile
…
ab8500_bmdata.c
…
ab8500_btemp.c power: supply: ab8500: add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:49 +02:00
ab8500_charger.c power: supply: ab8500: add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:49 +02:00
ab8500_fg.c power: supply: ab8500: Fix memory leak in ab8500_fg_sysfs_init 2022-04-08 14:40:15 +02:00
abx500_chargalg.c
…
act8945a_charger.c
…
adp5061.c
…
apm_power.c
…
axp20x_ac_power.c
…
axp20x_battery.c power: supply: axp20x_battery: properly report current when discharging 2022-04-13 21:00:56 +02:00
axp20x_usb_power.c power: supply: axp20x_usb_power: Init work before enabling IRQs 2021-03-04 11:37:59 +01:00
axp288_charger.c power: supply: axp288-charger: Set Vhold to 4.4V 2022-04-13 21:00:57 +02:00
axp288_fuel_gauge.c power: supply: axp288_fuel_gauge: Report register-address on readb / writeb errors 2021-09-15 09:50:24 +02:00
bd70528-charger.c
…
bd99954-charger.c
…
bd99954-charger.h
…
bq27xxx_battery.c power: supply: bq27xxx: fix power_avg for newer ICs 2021-05-11 14:47:24 +02:00
bq27xxx_battery_hdq.c power supply and reset changes for the v5.10 series 2020-10-20 10:56:34 -07:00
bq27xxx_battery_i2c.c power: supply: bq27xxx: Fix kernel crash on IRQ handler register error 2021-11-18 14:04:21 +01:00
bq2415x_charger.c
…
bq2515x_charger.c
…
bq24190_charger.c power: supply: bq24190_charger: Fix bq24190_vbus_is_enabled() wrong false return 2022-04-08 14:40:18 +02:00
bq24257_charger.c
…
bq24735-charger.c
…
bq25890_charger.c power: bq25890: Enable continuous conversion for ADC at charging 2022-01-11 15:25:01 +01:00
bq25980_charger.c power: supply: bq25980: Move props from battery node 2021-05-14 09:50:25 +02:00
bq25980_charger.h
…
charger-manager.c power: supply: charger-manager: add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:48 +02:00
collie_battery.c
…
cpcap-battery.c power: supply: cpcap-battery: fix invalid usage of list cursor 2021-05-11 14:47:32 +02:00
cpcap-charger.c power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce 2021-05-11 14:47:27 +02:00
cros_usbpd-charger.c
…
cw2015_battery.c power: supply: cw2015: use dev_err_probe to allow deferred probe 2021-09-15 09:50:27 +02:00
da9030_battery.c
…
da9052-battery.c
…
da9150-charger.c
…
da9150-fg.c
…
ds2760_battery.c power: supply: Constify static w1_family_ops structs 2020-10-05 13:21:49 +02:00
ds2780_battery.c
…
ds2781_battery.c
…
ds2782_battery.c
…
generic-adc-battery.c power: supply: generic-adc-battery: fix possible use-after-free in gab_remove() 2021-05-11 14:47:28 +02:00
goldfish_battery.c
…
gpio-charger.c
…
ingenic-battery.c
…
ipaq_micro_battery.c
…
isp1704_charger.c
…
lego_ev3_battery.c
…
lp8727_charger.c
…
lp8788-charger.c power: supply: Use IRQF_ONESHOT 2021-05-11 14:47:24 +02:00
lt3651-charger.c
…
ltc2941-battery-gauge.c power: supply: ltc2941: Fix ptr to enum cast 2020-10-10 22:16:43 +02:00
max1721x_battery.c power: supply: Constify static w1_family_ops structs 2020-10-05 13:21:49 +02:00
max8903_charger.c
…
max8925_power.c
…
max8997_charger.c
…
max8998_charger.c
…
max14577_charger.c
…
max14656_charger_detector.c
…
max17040_battery.c power: supply: max17040: fix null-ptr-deref in max17040_probe() 2021-11-18 14:04:18 +01:00
max17042_battery.c power: supply: max17042_battery: Clear status bits in interrupt handler 2021-11-18 14:03:52 +01:00
max77650-charger.c
…
max77693_charger.c
…
mp2629_charger.c
…
olpc_battery.c
…
pcf50633-charger.c
…
pda_power.c
…
pm2301_charger.c power: supply: Use IRQF_ONESHOT 2021-05-11 14:47:24 +02:00
pm2301_charger.h
…
pmu_battery.c
…
power_supply.h
…
power_supply_core.c power: supply: core: Break capacity loop 2022-01-11 15:25:01 +01:00
power_supply_hwmon.c
…
power_supply_leds.c
…
power_supply_sysfs.c
…
qcom_smbb.c
…
rn5t618_power.c
…
rt5033_battery.c power: supply: rt5033_battery: Change voltage values to µV 2021-11-18 14:04:17 +01:00
rt9455_charger.c
…
rx51_battery.c
…
s3c_adc_battery.c power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove() 2021-05-11 14:47:28 +02:00
sbs-battery.c power supply and reset changes for the v5.10 series 2020-10-20 10:56:34 -07:00
sbs-charger.c
…
sbs-manager.c
…
sc27xx_fuel_gauge.c power: supply: sc27xx: Add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:46 +02:00
sc2731_charger.c power: supply: sc2731_charger: Add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:46 +02:00
smb347-charger.c power: supply: smb347-charger: Add missing pin control activation 2021-09-15 09:50:25 +02:00
test_power.c power: supply: test-power: revise parameter printing to use sprintf 2020-10-09 01:02:30 +02:00
tosa_battery.c
…
tps65090-charger.c power: supply: Use IRQF_ONESHOT 2021-05-11 14:47:24 +02:00
tps65217_charger.c power: supply: Use IRQF_ONESHOT 2021-05-11 14:47:24 +02:00
twl4030_charger.c
…
twl4030_madc_battery.c
…
ucs1002_power.c
…
wilco-charger.c
…
wm97xx_battery.c
…
wm831x_backup.c
…
wm831x_power.c
…
wm8350_power.c power: supply: wm8350-power: Add missing free in free_charger_irq 2022-04-08 14:40:19 +02:00
z2_battery.c
…