On Sat 2020-04-11 14:09:02, Greg Kroah-Hartman wrote:
From: Hans de Goede hdegoede@redhat.com
commit 9c80662a74cd2a5d1113f5c69d027face963a556 upstream.
Some HP Pavilion x2 10 models use an AXP288 for charging and fuel-gauge. We use a native power_supply / PMIC driver in this case, because on most models with an AXP288 the ACPI AC / Battery code is either completely missing or relies on custom / proprietary ACPI OpRegions which Linux does not implement.
The native drivers mostly work fine, but there are 2 problems:
- These model uses a Type-C connector for charging which the AXP288 does
not support. As long as a Type-A charger (which uses the USB data pins for charger type detection) is used everything is fine. But if a Type-C charger is used (such as the charger shipped with the device) then the charger is not recognized.
So we end up slowly discharging the device even though a charger is connected, because we are limiting the current from the charger to 500mA. To make things worse this happens with the device's official charger.
Looking at the ACPI tables HP has "solved" the problem of the AXP288 not being able to recognize Type-C chargers by simply always programming the input-current-limit at 3000mA and relying on a Vhold setting of 4.7V (normally 4.4V) to limit the current intake if the charger cannot handle this.
Hmm.. Drawing 3A from port designed for .5A... is not that a bit dangerous? It is certainly against the specs.
I believe it will work okay 90% of time, but maybe something overheats or some fuse trips in the remaining cases. I believe I've seen fuse triping on USB port of my home router..
Best regards, Pavel