From 1d02c4bc42571dbe646c76ece2c587ec2cb5b3e7 Mon Sep 17 00:00:00 2001 From: Tommy Chung Date: Tue, 22 Jun 2021 14:15:48 +0800 Subject: drawcia: Add battery ATL GB-S20-4473A9-01H&020H BUG=b:191726915 BRANCH=dedede TEST=Make sure battery charging, battery cutoff works. Signed-off-by: Tommy Chung Change-Id: Ie5895499df9baea80b5966736c6d42a504ad68b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2977863 Reviewed-by: Devin Lu Reviewed-by: Diana Z Commit-Queue: Diana Z --- board/drawcia/battery.c | 33 +++++++++++++++++++++++++++++++++ board/drawcia/board.h | 1 + 2 files changed, 34 insertions(+) (limited to 'board/drawcia') diff --git a/board/drawcia/battery.c b/board/drawcia/battery.c index 2a4c59d476..a11dce7de9 100644 --- a/board/drawcia/battery.c +++ b/board/drawcia/battery.c @@ -310,6 +310,39 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 60, }, }, + + /* ATL GB-S20-4473A9-01H&020H Battery Information + * Gauge IC : RAJ240045 + */ + [BATTERY_ATL] = { + .fuel_gauge = { + .manuf_name = "313-B7-0D-A", + .ship_mode = { + .reg_addr = 0x0, + .reg_data = { 0x0010, 0x0010 }, + }, + .fet = { + .mfgacc_support = 0, + .reg_addr = 0x43, + .reg_mask = 0x0003, + .disconnect_val = 0x0, + .cfet_mask = 0x0002, + .cfet_off_val = 0x0, + }, + }, + .batt_info = { + .voltage_max = 8800, /* mV */ + .voltage_normal = 7700, /* 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 = 45, + .discharging_min_c = -10, + .discharging_max_c = 60, + }, + }, }; BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); diff --git a/board/drawcia/board.h b/board/drawcia/board.h index 04c2fcc70f..324992f9d7 100644 --- a/board/drawcia/board.h +++ b/board/drawcia/board.h @@ -144,6 +144,7 @@ enum battery_type { BATTERY_SIMPLO_HIGHPOWER, BATTERY_COS, BATTERY_COS_2, + BATTERY_ATL, BATTERY_TYPE_COUNT, }; -- cgit v1.2.1