summaryrefslogtreecommitdiff
path: root/baseboard/kukui/battery_mm8013.c
diff options
context:
space:
mode:
authorYilun Lin <yllin@chromium.org>2019-11-22 15:59:47 +0800
committerCommit Bot <commit-bot@chromium.org>2019-12-17 08:29:18 +0000
commita2804b7cc86962a28ede119cda23ea1d13d49922 (patch)
tree61540774ee57638b315fcb864dd8e825388da4e4 /baseboard/kukui/battery_mm8013.c
parentc0fac86829c4bf0345c568584f3ab1a981866595 (diff)
downloadchrome-ec-a2804b7cc86962a28ede119cda23ea1d13d49922.tar.gz
baseboard/kukui: request high voltage PDO if battery current drops
Request a higher voltage PDO (> 5V), when we requested 5V PDO and seeing a battery charging current drop. Ideally, when CONFIG_USB_PD_PREFER_MV enabled, the system will request 5V/3A PDO when system desired power under 15W. However, mt6370 has bad bulking efficiency and stops itself from sinking more power (only sink under around 11W). The bad bulking efficiency is getting worse if the gap between VBUS and VBAT getting closer. To overcome this, we need to watch the battery charging current when we switch to 5V. If we see a current drop after that, this means we are suffering the bulking issue, and slows down the charging. In this time, we will request a high voltage PDO by setting PD_PREFER_MV above 5000. After request a new PDO, It will attempts to switch to 5V in a few seconds or minutes, and see if we are still suffering the issue. TEST=1. When there is a battery current drop while switching from 9V to 5V, PD can switch back to 9V. 2. When no battery current drop while switching from 9V to 5V, PD won't switch back 3. ensure that pd_task can request 9V when board_get_desired_power() is between 15W and 11W. BUG=b:143318064 b:141903096 b:144073892 BRANCH=kukui Change-Id: I6c2c0c948c417b81e70ca6c6d360b89b941f3888 Signed-off-by: Yilun Lin <yllin@chromium.org> Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1899659 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'baseboard/kukui/battery_mm8013.c')
-rw-r--r--baseboard/kukui/battery_mm8013.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/baseboard/kukui/battery_mm8013.c b/baseboard/kukui/battery_mm8013.c
index 5c22675703..e7f422e561 100644
--- a/baseboard/kukui/battery_mm8013.c
+++ b/baseboard/kukui/battery_mm8013.c
@@ -105,9 +105,6 @@ int charger_profile_override(struct charge_state_data *curr)
}
}
- if (curr->state != ST_CHARGE)
- return 0;
-
switch (temp_zone) {
case TEMP_ZONE_0:
case TEMP_ZONE_1: