diff options
author | xiong.huang <xiong.huang@bitland.corp-partner.google.com> | 2020-01-21 22:50:43 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-14 12:31:06 +0000 |
commit | b4ae96731536f40724f425df3c3a6506d9fef724 (patch) | |
tree | 994a723d433d0921aefbedc64b62b152122daf5d /board/kodama | |
parent | d9d96f85a40d70aaf5e5d8eff456765868547bce (diff) | |
download | chrome-ec-b4ae96731536f40724f425df3c3a6506d9fef724.tar.gz |
Kodama: delay to enable charger EOC and TE function
When the battery is activated in shutdown mode, the battery needs
H/W Initialization and Cu Deposition Checking in 4.2 second.
Meanwhile, if the charger EOC function is enabled, charger will
close/open the charging path repeatedly and will pull PMIC's VSYSSNS
power.
It's a workaround to delay 4.5 second to enable charger EOC and TE
function.
BUG=b:148045048
TEST=The adapter can boot the DUT automatically when the battery
enters shutdown mode or ship mode.
BRANCH=kukui
Change-Id: Ie00d0f7ad506a273dc1b51f03b5d28dfa582f14f
Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2012102
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'board/kodama')
-rw-r--r-- | board/kodama/battery.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/board/kodama/battery.c b/board/kodama/battery.c index 4328ff02d8..99dc3f4845 100644 --- a/board/kodama/battery.c +++ b/board/kodama/battery.c @@ -158,37 +158,9 @@ __override void board_battery_compensate_params(struct batt_params *batt) int charger_profile_override(struct charge_state_data *curr) { const struct battery_info *batt_info = battery_get_info(); - static int normal_charge_lock, over_discharge_lock; /* battery temp in 0.1 deg C */ int bat_temp_c = curr->batt.temperature - 2731; - /* - * SMP battery uses HW pre-charge circuit and pre-charge current is - * limited to ~50mA. Once the charge current is lower than IEOC level - * within CHG_TEDG_EOC, and TE is enabled, the charging power path will - * be turned off. Disable EOC and TE when battery stays over discharge - * state, otherwise enable EOC and TE. - */ - if (!(curr->batt.flags & BATT_FLAG_BAD_VOLTAGE)) { - if (curr->batt.voltage < batt_info->voltage_min) { - normal_charge_lock = 0; - - if (!over_discharge_lock && curr->state == ST_CHARGE) { - over_discharge_lock = 1; - rt946x_enable_charge_eoc(0); - rt946x_enable_charge_termination(0); - } - } else { - over_discharge_lock = 0; - - if (!normal_charge_lock) { - normal_charge_lock = 1; - rt946x_enable_charge_eoc(1); - rt946x_enable_charge_termination(1); - } - } - } - #ifdef VARIANT_KUKUI_CHARGER_MT6370 mt6370_charger_profile_override(curr); #endif /* CONFIG_CHARGER_MT6370 */ |