From b7c284cc45cc101b05e48ff97d995f6a2d34cdc7 Mon Sep 17 00:00:00 2001 From: Ben Chen Date: Fri, 19 Mar 2021 15:39:14 +0800 Subject: spherion : Add battery AP15O5L Add new battery AP15O5L BUG=b:183159433, b:183140396 BRANCH=asurada TEST=1) See "[found batt:PANASONIC KT00305013]" on EC console 2) battery readings looks reasonable. 3) cutoff workable. Change-Id: I5d27a25fd0bc3211545cb9220384671be21aea6e Signed-off-by: Ben Chen Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2772409 Reviewed-by: Ting Shen Commit-Queue: Ting Shen --- board/spherion/battery.c | 30 +++++++++++++++++++++++++++++- board/spherion/board.h | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'board/spherion') diff --git a/board/spherion/battery.c b/board/spherion/battery.c index 73d71b3220..0bdbfbfee1 100644 --- a/board/spherion/battery.c +++ b/board/spherion/battery.c @@ -35,7 +35,35 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 60, }, }, + /* Panasonic AP1505L Battery Information */ + [BATTERY_PANASONIC_AP15O5L] = { + .fuel_gauge = { + .manuf_name = "PANASONIC KT00305013", + .device_name = "AP15O5L", + .ship_mode = { + .reg_addr = 0x3A, + .reg_data = { 0xC574, 0xC574 }, + }, + .fet = { + .reg_addr = 0x0, + .reg_mask = 0x4000, + .disconnect_val = 0x0, + } + }, + .batt_info = { + .voltage_max = 13200, + .voltage_normal = 11550, /* mV */ + .voltage_min = 9000, /* mV */ + .precharge_current = 256, /* mA */ + .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_C235; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_PANASONIC_AP15O5L; diff --git a/board/spherion/board.h b/board/spherion/board.h index 8bce87a17a..fea15a0f4e 100644 --- a/board/spherion/board.h +++ b/board/spherion/board.h @@ -71,6 +71,7 @@ enum battery_type { BATTERY_C235, + BATTERY_PANASONIC_AP15O5L, BATTERY_TYPE_COUNT, }; -- cgit v1.2.1