diff options
author | Scott Collyer <scollyer@google.com> | 2019-01-09 18:32:31 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-30 13:06:37 -0800 |
commit | 53a9890eb203d7f5ba88d4e94fd86b58c3d1a204 (patch) | |
tree | ffc2e8cc26927e942074f5fede3511bec8eab777 /board/hatch | |
parent | 16ce90ccf29129157d5cea0bea79dcb29367cd08 (diff) | |
download | chrome-ec-53a9890eb203d7f5ba88d4e94fd86b58c3d1a204.tar.gz |
hatch: Fix battery name and add SMP-SDP battery support
This CL fixes the manufacturer name field for the battery used in
factory bring up and adds support for the battery being shipped with
P0 units.
BRANCH=none
BUG=b:123244947
TEST=Verifed that both the battery used in the factory and that being
shipped with P0 units are found at init time.
Change-Id: I572879fc32aaf8aad8289fc52a385262ea61cdc2
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1406495
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/hatch')
-rw-r--r-- | board/hatch/battery.c | 36 | ||||
-rw-r--r-- | board/hatch/board.h | 3 |
2 files changed, 34 insertions, 5 deletions
diff --git a/board/hatch/battery.c b/board/hatch/battery.c index ad8fe6c3d3..b81fa795b9 100644 --- a/board/hatch/battery.c +++ b/board/hatch/battery.c @@ -32,10 +32,38 @@ * address, mask, and disconnect value need to be provided. */ const struct board_batt_params board_battery_info[] = { - /* SMP Dell FMXMT Battery Information */ - [BATTERY_KEYSTONE] = { + /* SMP LIS Dell FMXMT Battery Information */ + [BATTERY_SMP_LIS] = { .fuel_gauge = { - .manuf_name = "SMP-LIS", + .manuf_name = "SMP-LIS3.78", + .ship_mode = { + .reg_addr = 0x0, + .reg_data = { 0x10, 0x10 }, + }, + .fet = { + .reg_addr = 0x0, + .reg_mask = 0x2000, + .disconnect_val = 0x2000, + } + }, + .batt_info = { + .voltage_max = 8800, + .voltage_normal = 7660, /* mV */ + .voltage_min = 6000, /* mV */ + .precharge_current = 256, /* mA */ + .start_charging_min_c = 0, + .start_charging_max_c = 60, + .charging_min_c = 0, + .charging_max_c = 60, + .discharging_min_c = 0, + .discharging_max_c = 60, + }, + }, + + /* SMP SDI Dell FMXMT Battery Information */ + [BATTERY_SMP_SDI] = { + .fuel_gauge = { + .manuf_name = "SMP-SDI-3727", .ship_mode = { .reg_addr = 0x0, .reg_data = { 0x10, 0x10 }, @@ -62,4 +90,4 @@ const struct board_batt_params board_battery_info[] = { }; BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); -const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_KEYSTONE; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SMP_SDI; diff --git a/board/hatch/board.h b/board/hatch/board.h index ad665c6867..3cfc6aff0a 100644 --- a/board/hatch/board.h +++ b/board/hatch/board.h @@ -88,7 +88,8 @@ enum temp_sensor_id { /* List of possible batteries */ enum battery_type { - BATTERY_KEYSTONE, + BATTERY_SMP_LIS, + BATTERY_SMP_SDI, BATTERY_TYPE_COUNT, }; |