diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-07-16 16:40:13 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-22 00:54:46 +0000 |
commit | 989b932ce14b6a15fb4191d33951419b0d01f17e (patch) | |
tree | 8bed8b5aab03624d5232245e5c579f60d2f14f2d /board/lazor/battery.c | |
parent | 27ee378bb78a299a0983379be83eb6d55860b4ae (diff) | |
download | chrome-ec-989b932ce14b6a15fb4191d33951419b0d01f17e.tar.gz |
lazor: Add a new battery and enable battery revive disconnect
Add a new battery and define its ship_mode an fet registers.
Enable the battery revive disconnect, that the PD Try.SRC feature will
not be enabled if the battery discharge FET is not active. It helps the
first time boot from battery cutoff. The battery needs more time to
sample the board present. During that time the discharge FET is
inactive. Enabling Try.SRC will cause the power lost and then reboot
loop. We should not enable Try.SRC in this case.
BRANCH=None
BUG=b:159319530
TEST=Cut off the battery; the first time boot is successful.
Change-Id: Icbf2a5b958da823af0b79facb9c1e806f37c712a
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2303432
Reviewed-by: Udaya Kiran Ammu <udaykiran@google.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/lazor/battery.c')
-rw-r--r-- | board/lazor/battery.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/board/lazor/battery.c b/board/lazor/battery.c index d0c1bcbf31..a39ccff7c0 100644 --- a/board/lazor/battery.c +++ b/board/lazor/battery.c @@ -43,6 +43,7 @@ const struct board_batt_params board_battery_info[] = { .reg_data = { 0xC574, 0xC574 }, }, .fet = { + .mfgacc_support = 0, .reg_addr = 0x0, .reg_mask = 0x4000, .disconnect_val = 0x0, @@ -71,6 +72,7 @@ const struct board_batt_params board_battery_info[] = { .reg_data = { 0xC574, 0xC574 }, }, .fet = { + .mfgacc_support = 0, .reg_addr = 0x0, .reg_mask = 0x4000, .disconnect_val = 0x0, @@ -89,6 +91,35 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 75, }, }, + /* AP16L8J */ + [BATTERY_AP16L8J] = { + .fuel_gauge = { + .manuf_name = "LGC KT0020G010", + .device_name = "AP16L8J", + .ship_mode = { + .reg_addr = 0x3A, + .reg_data = { 0xC574, 0xC574 }, + }, + .fet = { + .mfgacc_support = 1, + .reg_addr = 0x23, + .reg_mask = 0x1, + .disconnect_val = 0x0, + } + }, + .batt_info = { + .voltage_max = 8700, + .voltage_normal = 7500, /* mV */ + .voltage_min = 6000, /* 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); |