diff options
author | Jett Rink <jettrink@chromium.org> | 2018-10-22 12:07:47 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-25 15:19:05 -0700 |
commit | 7104dd8145679fa68b78a936ce09570fcc370206 (patch) | |
tree | f49ee485154d200be8d29c075c721e1858f5756b /baseboard | |
parent | d1b3ebc265a2631edee3ea0d9ab8da0d2f5ad246 (diff) | |
download | chrome-ec-7104dd8145679fa68b78a936ce09570fcc370206.tar.gz |
octopus: limit charging current
Through empirical testing, fleex/bobba were pulling 3.130A instead of 3.0A
from the 45W charger. Limiting the current to 95% of 3A ensures that the
board does not draw more than 3A from the 45W charger. This will also
help the 20V at 2.25A case as well.
BRANCH=none
BUG=b:117907836,b:118338454
TEST=With this setting, maximum draw is 2.95A on charger for 2A setting.
Change-Id: I4b9aa721d0db57724860f8cf78b87ca165cb3fdd
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1294255
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/octopus/baseboard.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c index beb2e1754d..225ef9745d 100644 --- a/baseboard/octopus/baseboard.c +++ b/baseboard/octopus/baseboard.c @@ -251,6 +251,13 @@ int board_set_active_charge_port(int port) void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma, int charge_mv) { + /* + * Empirically, the charger seems to draw a little more current that + * it is set to, so we reduce our limit by 5%. + */ +#ifdef VARIANT_OCTOPUS_CHARGER_ISL9238 + charge_ma = (charge_ma * 95) / 100; +#endif charge_set_input_current_limit(MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv); |