diff options
author | Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> | 2020-11-18 16:43:49 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-24 02:18:03 +0000 |
commit | 90482ffee42bd9c1da5a8827464e001b35718e46 (patch) | |
tree | defa6667a2d807757177885047948a9223654ad0 /board/drobit | |
parent | 50e0e9991ef1904fc6759a7f757510645a0f04c3 (diff) | |
download | chrome-ec-90482ffee42bd9c1da5a8827464e001b35718e46.tar.gz |
drobit: Config the EC battery setting.
Config the EC battery setting depend on battery spec.
BUG=b:173534296
BRANCH=firmware-volteer-13521.B
TEST=manual
1. Check battery found on EC log.
2. Check battery cutoff function on EC console.
3. Check battery charging FET status when battery full.
Signed-off-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
Change-Id: I4fbdcc18a5d8727ee2d1f2571310b3b7cc4b3c21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546720
Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'board/drobit')
-rw-r--r-- | board/drobit/battery.c | 23 | ||||
-rw-r--r-- | board/drobit/board.h | 2 |
2 files changed, 11 insertions, 14 deletions
diff --git a/board/drobit/battery.c b/board/drobit/battery.c index 9b356a8efd..f8f3eb296f 100644 --- a/board/drobit/battery.c +++ b/board/drobit/battery.c @@ -32,25 +32,22 @@ * address, mask, and disconnect value need to be provided. */ const struct board_batt_params board_battery_info[] = { - /* LGC\011 L17L3PB0 Battery Information */ - /* - * Battery info provided by ODM on b/143477210, comment #11 - */ - [BATTERY_LGC011] = { + /* C490-42 Battery Information */ + [BATTERY_C490] = { .fuel_gauge = { - .manuf_name = "LGC", + .manuf_name = "AS3GWQd3jB", .ship_mode = { .reg_addr = 0x00, .reg_data = { 0x10, 0x10 }, }, .fet = { - .reg_addr = 0x0, - .reg_mask = 0x6000, - .disconnect_val = 0x6000, + .reg_addr = 0x99, + .reg_mask = 0x000c, + .disconnect_val = 0x000c, } }, .batt_info = { - .voltage_max = TARGET_WITH_MARGIN(13200, 5), + .voltage_max = 13200, /* mV */ .voltage_normal = 11550, /* mV */ .voltage_min = 9000, /* mV */ .precharge_current = 256, /* mA */ @@ -58,11 +55,11 @@ const struct board_batt_params board_battery_info[] = { .start_charging_max_c = 45, .charging_min_c = 0, .charging_max_c = 60, - .discharging_min_c = 0, - .discharging_max_c = 75, + .discharging_min_c = -20, + .discharging_max_c = 60, }, }, }; BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); -const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_LGC011; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_C490; diff --git a/board/drobit/board.h b/board/drobit/board.h index 0595161e41..19866743f4 100644 --- a/board/drobit/board.h +++ b/board/drobit/board.h @@ -142,7 +142,7 @@ #include "registers.h" enum battery_type { - BATTERY_LGC011, + BATTERY_C490, BATTERY_TYPE_COUNT, }; |