diff options
author | Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> | 2022-04-18 16:33:32 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-22 07:40:34 +0000 |
commit | 5bfdd74b541491303d8448667e8129c18a8cbb84 (patch) | |
tree | 45606e8df93dd658b89418f2d72ba84a79193a6f /board | |
parent | 788f5d4099f53cefd6617af5c69ac4e4cd19131a (diff) | |
download | chrome-ec-5bfdd74b541491303d8448667e8129c18a8cbb84.tar.gz |
osiris: Add battery AP19B8M
Copy kano battery AP19B8M for early support,
It should remove before FSI
BUG=b:229947325
BRANCH=none
TEST=make BOARD=osiris
Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
Change-Id: Ifd59db844d502dddd71a0608a27940a21655c761
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3595409
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/osiris/battery.c | 73 | ||||
-rw-r--r-- | board/osiris/board.h | 3 |
2 files changed, 24 insertions, 52 deletions
diff --git a/board/osiris/battery.c b/board/osiris/battery.c index b3b1cc039a..d148e6856b 100644 --- a/board/osiris/battery.c +++ b/board/osiris/battery.c @@ -33,70 +33,43 @@ * address, mask, and disconnect value need to be provided. */ const struct board_batt_params board_battery_info[] = { - /* POW-TECH GQA05 Battery Information */ - [BATTERY_POWER_TECH] = { - /* BQ40Z50 Fuel Gauge */ - .fuel_gauge = { - .manuf_name = "POW-TECH", - .device_name = "BATGQA05L22", - .ship_mode = { - .reg_addr = 0x00, - .reg_data = { 0x0010, 0x0010 }, - }, - .fet = { - .mfgacc_support = 1, - .reg_addr = 0x00, - .reg_mask = 0x2000, /* XDSG */ - .disconnect_val = 0x2000, - } - }, - .batt_info = { - .voltage_max = TARGET_WITH_MARGIN(13050, 5), - .voltage_normal = 11400, /* mV */ - .voltage_min = 9000, /* mV */ - .precharge_current = 280, /* mA */ - .start_charging_min_c = 0, - .start_charging_max_c = 45, - .charging_min_c = 0, - .charging_max_c = 45, - .discharging_min_c = -10, - .discharging_max_c = 60, - }, - }, - /* LGC L17L3PB0 Battery Information */ /* - * Battery info provided by ODM on b/143477210, comment #11 + * TODO(b:229947325): Copy kano battery AP19B8M for early support, + * It should remove before FSI. */ - [BATTERY_LGC011] = { + /* LGC AP19B8M Battery Information */ + [BATTERY_AP19B8M] = { .fuel_gauge = { - .manuf_name = "LGC", + .manuf_name = "LGC KT0030G024", .ship_mode = { - .reg_addr = 0x00, - .reg_data = { 0x0010, 0x0010 }, + .reg_addr = 0x3A, + .reg_data = { 0xC574, 0xC574 }, }, .fet = { - .reg_addr = 0x0, - .reg_mask = 0x6000, - .disconnect_val = 0x6000, + .reg_addr = 0x43, + .reg_mask = 0x0001, + .disconnect_val = 0x0, + .cfet_mask = 0x0002, + .cfet_off_val = 0x0000, } }, .batt_info = { - .voltage_max = TARGET_WITH_MARGIN(13200, 5), - .voltage_normal = 11550, /* mV */ - .voltage_min = 9000, /* 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 = 0, - .discharging_max_c = 75, + .voltage_max = 13350, + .voltage_normal = 11610, + .voltage_min = 9000, + .precharge_current = 256, + .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_POWER_TECH; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_AP19B8M; enum battery_present battery_hw_present(void) { diff --git a/board/osiris/board.h b/board/osiris/board.h index 58cf91c215..c61508ed18 100644 --- a/board/osiris/board.h +++ b/board/osiris/board.h @@ -246,8 +246,7 @@ enum ioex_port { }; enum battery_type { - BATTERY_POWER_TECH, - BATTERY_LGC011, + BATTERY_AP19B8M, BATTERY_TYPE_COUNT }; |