diff options
author | Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> | 2022-05-24 17:15:28 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-31 03:48:33 +0000 |
commit | 4c3d93b213d052c0f51abe0f63fdf0d3a0f32ad7 (patch) | |
tree | 205733aba091992aff2c6d07ed72e50803a6edfa | |
parent | f136334948d928052f7c77ba293aec424f49ad9a (diff) | |
download | chrome-ec-4c3d93b213d052c0f51abe0f63fdf0d3a0f32ad7.tar.gz |
osiris: Add battery AP22ABN
Add battery AP22ABN
BUG=b:229947325
BRANCH=none
TEST=Check battery charge/discharge/cutoff working
Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
Change-Id: I8e2d3cfd08932c0a066fa53f0502ee2a1a26b721
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3662668
Commit-Queue: Kenny Pan <kennypan@google.com>
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Reviewed-by: Kenny Pan <kennypan@google.com>
-rw-r--r-- | board/osiris/battery.c | 33 | ||||
-rw-r--r-- | board/osiris/board.h | 1 |
2 files changed, 33 insertions, 1 deletions
diff --git a/board/osiris/battery.c b/board/osiris/battery.c index d148e6856b..61c0f7f886 100644 --- a/board/osiris/battery.c +++ b/board/osiris/battery.c @@ -66,10 +66,41 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 75, }, }, + /* COSMX AP22ABN Battery Information */ + [BATTERY_COSMX_AP22ABN] = { + .fuel_gauge = { + .manuf_name = "COSMX KT0030B003", + .device_name = "AP22ABN", + .ship_mode = { + .reg_addr = 0x3A, + .reg_data = { 0xC574, 0xC574 }, + }, + .fet = { + .mfgacc_support = 1, + .reg_addr = 0x0, + .reg_mask = 0x8000, + .disconnect_val = 0x8000, + .cfet_mask = 0x4000, + .cfet_off_val = 0x4000, + }, + }, + .batt_info = { + .voltage_max = 13440, + .voltage_normal = 11670, + .voltage_min = 9000, + .precharge_current = 567, + .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 = 75, + }, + }, }; BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); -const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_AP19B8M; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_COSMX_AP22ABN; enum battery_present battery_hw_present(void) { diff --git a/board/osiris/board.h b/board/osiris/board.h index 52b6e16f6b..f98d8beba4 100644 --- a/board/osiris/board.h +++ b/board/osiris/board.h @@ -173,6 +173,7 @@ enum temp_sensor_id { enum battery_type { BATTERY_AP19B8M, + BATTERY_COSMX_AP22ABN, BATTERY_TYPE_COUNT }; |