diff options
author | Mike Lee <mike5@huaqin.corp-partner.google.com> | 2021-11-18 15:51:53 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-10 17:40:06 +0000 |
commit | 3be88c64f2cf3b8a7a815a7e7d14bcf3d5843d61 (patch) | |
tree | 1036761845da5ca28c7dd8a4954ecbaabdb51466 | |
parent | ad95230a2eaa04377768b7e15bb6bfb4d4a6139b (diff) | |
download | chrome-ec-3be88c64f2cf3b8a7a815a7e7d14bcf3d5843d61.tar.gz |
Storo: Add battery second source information
Add new battery config
BUG=b:206895271
BRANCH=dedede
TEST=Check battery info in console and cutoff function work.
Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Change-Id: I245bbe4a1333e3350b79d22958e888ce01ccadd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289579
Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com>
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | board/storo/battery.c | 37 | ||||
-rw-r--r-- | board/storo/board.h | 3 |
2 files changed, 36 insertions, 4 deletions
diff --git a/board/storo/battery.c b/board/storo/battery.c index d273b391e7..b28e5bbf37 100644 --- a/board/storo/battery.c +++ b/board/storo/battery.c @@ -32,8 +32,8 @@ * address, mask, and disconnect value need to be provided. */ const struct board_batt_params board_battery_info[] = { - /* C21N2018 Battery Information */ - [BATTERY_C21N2018] = { + /* C21N2018_AS3GXXD3KA Battery Information */ + [BATTERY_AS3GXXD3KA] = { .fuel_gauge = { .manuf_name = "AS3GXXD3KA", .device_name = "C110160", @@ -61,8 +61,39 @@ const struct board_batt_params board_battery_info[] = { .discharging_min_c = -20, .discharging_max_c = 60, }, + }, + + /* C21N2018_AS3FXXD3KA Battery Information */ + [BATTERY_AS3FXXD3KA] = { + .fuel_gauge = { + .manuf_name = "AS3FXXD3KA", + .device_name = "C110160", + .ship_mode = { + .reg_addr = 0x00, + .reg_data = { 0x0010, 0x0010 }, + }, + .fet = { + .reg_addr = 0x99, + .reg_mask = 0x000C, + .disconnect_val = 0x000C, + .cfet_mask = 0x0004, + .cfet_off_val = 0x0004 + } + }, + .batt_info = { + .voltage_max = 8800, + .voltage_normal = 7890, /* mV */ + .voltage_min = 6000, /* mV */ + .precharge_current = 256, /* mA */ + .start_charging_min_c = 0, + .start_charging_max_c = 45, + .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_C21N2018; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_AS3GXXD3KA; diff --git a/board/storo/board.h b/board/storo/board.h index cb738e8245..3ee8791e80 100644 --- a/board/storo/board.h +++ b/board/storo/board.h @@ -141,7 +141,8 @@ enum temp_sensor_id { /* List of possible batteries */ enum battery_type { - BATTERY_C21N2018, + BATTERY_AS3GXXD3KA, + BATTERY_AS3FXXD3KA, BATTERY_TYPE_COUNT, }; |