diff options
author | Ben Chen <ben.chen2@quanta.corp-partner.google.com> | 2021-01-15 15:23:28 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-22 09:25:27 +0000 |
commit | 94a436afae45007cbb06f03bd933aab3f57c63a6 (patch) | |
tree | ba25bce72989b8377fe61a0fcaebd3df37e8698d /board | |
parent | b8eeefccf35a5ac2e13e3ca6463f3c40aeb5be6b (diff) | |
download | chrome-ec-94a436afae45007cbb06f03bd933aab3f57c63a6.tar.gz |
magolor: Add new battery
new battery: AP18C7M, AP19B8M
BUG=b:177628598, b:177631044
BRANCH=none
TEST=Make sure battery can cutoff by console "cutoff" or "ectool cutoff"
and resume by plug in adapter.
Change-Id: Iaf4628fc35c0ea5d96c1c8307b1bc3b4fea27085
Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2632115
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/magolor/battery.c | 59 | ||||
-rw-r--r-- | board/magolor/board.h | 2 |
2 files changed, 61 insertions, 0 deletions
diff --git a/board/magolor/battery.c b/board/magolor/battery.c index e7572946b2..4f100fcf33 100644 --- a/board/magolor/battery.c +++ b/board/magolor/battery.c @@ -93,6 +93,65 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 75, }, }, + /* AP19B8M */ + [BATTERY_AP19B8M] = { + .fuel_gauge = { + .manuf_name = "LGC KT0030G024", + .ship_mode = { + .reg_addr = 0x3A, + .reg_data = { 0xC574, 0xC574 }, + }, + .fet = { + .reg_addr = 0x43, + .reg_mask = 0x0001, + .disconnect_val = 0x0, + .cfet_mask = 0x0002, + .cfet_off_val = 0x0000, + } + }, + .batt_info = { + .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, + }, + }, + /* AP18C7M */ + [BATTERY_AP18C7M] = { + .fuel_gauge = { + .manuf_name = "SMP KT00407008", + .ship_mode = { + .reg_addr = 0x3A, + .reg_data = { 0xC574, 0xC574 }, + }, + .fet = { + .mfgacc_support = 1, + .reg_addr = 0x0, + .reg_mask = 0x0002, + .disconnect_val = 0x0000, + .cfet_mask = 0x4000, + .cfet_off_val = 0x4000, + } + }, + .batt_info = { + .voltage_max = 17600, + .voltage_normal = 15400, + .voltage_min = 12000, + .precharge_current = 256, + .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 = 70, + }, + }, }; BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); diff --git a/board/magolor/board.h b/board/magolor/board.h index 6aafd5bd1e..2a9aecefea 100644 --- a/board/magolor/board.h +++ b/board/magolor/board.h @@ -182,6 +182,8 @@ enum pwm_channel { }; enum battery_type { + BATTERY_AP19B8M, + BATTERY_AP18C7M, BATTERY_LGC_AP18C8K, BATTERY_MURATA_AP18C4K, BATTERY_TYPE_COUNT, |