diff options
author | xiong.huang <xiong.huang@bitland.corp-partner.google.com> | 2019-10-28 14:11:58 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-05 07:32:17 +0000 |
commit | 43a07d429fd245b1ae50c0fb46939f8013887943 (patch) | |
tree | 9133695786cd175522523f2931cbc9a678b1304f /board | |
parent | c89aaa084464795e75810dc5249f3a0b8f7eb07d (diff) | |
download | chrome-ec-43a07d429fd245b1ae50c0fb46939f8013887943.tar.gz |
Kodama: battery discharge power to system when battery charged to 4.1v at 45 deg C
After battery charged to 4.1V at 45 deg C, the desired voltage of the smart
battery is still 4.4V, and battery will discharge power to system.
When smart battery temperature is more than 45 deg C, the max charging
voltage for battery is set as 4.1V.
BUG=b:142669003
BRANCH=kukui
TEST=Verified on four DUTs in 45 deg C and passed.
Change-Id: I2c2b0d43ed29b33beb37ba4d75ecb653f156c9a7
Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1880774
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/kodama/battery.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/kodama/battery.c b/board/kodama/battery.c index bc032172f0..21e5672879 100644 --- a/board/kodama/battery.c +++ b/board/kodama/battery.c @@ -83,6 +83,16 @@ enum battery_present battery_hw_present(void) int charger_profile_override(struct charge_state_data *curr) { + /* battery temp in 0.1 deg C */ + int bat_temp_c = curr->batt.temperature - 2731; + + /* + * When smart battery temperature is more than 45 deg C, the max + * charging voltage is 4100mV. + */ + if (curr->state == ST_CHARGE && bat_temp_c >= 450) + curr->requested_voltage = 4100; + #ifdef VARIANT_KUKUI_CHARGER_MT6370 mt6370_charger_profile_override(curr); #endif /* CONFIG_CHARGER_MT6370 */ |