diff options
author | tongjian <tongjian@huaqin.corp-partner.google.com> | 2021-04-22 14:29:52 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-23 09:49:04 +0000 |
commit | 964b2d90ffc87a2366a0d2e436bef65ed2dcc84f (patch) | |
tree | 11a6de210b7abb05f79fdca7d63c8cd431042db7 | |
parent | 9d01265429449f7d0e23807b9381a505eebfb568 (diff) | |
download | chrome-ec-964b2d90ffc87a2366a0d2e436bef65ed2dcc84f.tar.gz |
Homestar:Battery:SMP:add batteryinfo for SMP-L21D4PG0
BUG=b:185664761
TEST=make -j BOARD=homestar
Verify build on EVT board
BRANCH=Trogdor
Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com>
Change-Id: I84ac4b468d9966b22bade74d3603cace3ba4d35c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845561
Reviewed-by: Wai-Hong Tam <waihong@google.com>
-rw-r--r-- | board/homestar/battery.c | 31 | ||||
-rw-r--r-- | board/homestar/board.h | 1 |
2 files changed, 31 insertions, 1 deletions
diff --git a/board/homestar/battery.c b/board/homestar/battery.c index cea3098fb7..4c5cda9400 100644 --- a/board/homestar/battery.c +++ b/board/homestar/battery.c @@ -149,7 +149,36 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 60, }, }, + /* SMP L21D4PG0 */ + [BATTERY_L21D4PG0] = { + .fuel_gauge = { + .manuf_name = "SMP", + .device_name = "Lenovo", + .ship_mode = { + .reg_addr = 0x34, + .reg_data = { 0x0000, 0x0100 }, + }, + .fet = { + .mfgacc_support = 1, + .reg_addr = 0x34, + .reg_mask = 0x0100, + .disconnect_val = 0x0, + } + }, + .batt_info = { + .voltage_max = 8900, /* mV */ + .voltage_normal = 7720, /* mV */ + .voltage_min = 6000, /* mV */ + .precharge_current = 274, /* mA */ + .start_charging_min_c = 0, + .start_charging_max_c = 50, + .charging_min_c = 0, + .charging_max_c = 60, + .discharging_min_c = -20, + .discharging_max_c = 60, + }, + }, }; BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); -const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DS02032XL; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_L21D4PG0; diff --git a/board/homestar/board.h b/board/homestar/board.h index 0e715b9078..12bfb53879 100644 --- a/board/homestar/board.h +++ b/board/homestar/board.h @@ -102,6 +102,7 @@ enum battery_type { BATTERY_GH02047XL, BATTERY_DS02032XL, BATTERY_DS02032XL_1C, + BATTERY_L21D4PG0, BATTERY_TYPE_COUNT, }; |