diff options
author | Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> | 2020-06-02 10:23:42 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-26 11:44:03 +0000 |
commit | 6e1b5df127621fb56f8f799f072be5048d26f6cd (patch) | |
tree | 19a3e512a8c3860be26f5e115d545b01de1a29f5 /board/halvor | |
parent | 42c6420befd7304eb50b762923f503ddaa569982 (diff) | |
download | chrome-ec-6e1b5df127621fb56f8f799f072be5048d26f6cd.tar.gz |
Halvor: Implement new battery parameter
Halvor support AEC new battery.
This patch makes EC configure battery parameters differently based
on manufacturer name.
BUG=b:162908664
BRANCH=none
TEST=Verify AEC battery can charge/discharge/cutoff.
Change-Id: I65fb9ab5ae0d13393d649d0a16f9fa714f9122b7
Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2224682
Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
Reviewed-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
Diffstat (limited to 'board/halvor')
-rw-r--r-- | board/halvor/battery.c | 31 | ||||
-rw-r--r-- | board/halvor/board.h | 2 |
2 files changed, 17 insertions, 16 deletions
diff --git a/board/halvor/battery.c b/board/halvor/battery.c index 9b356a8efd..828220fd49 100644 --- a/board/halvor/battery.c +++ b/board/halvor/battery.c @@ -32,37 +32,38 @@ * address, mask, and disconnect value need to be provided. */ const struct board_batt_params board_battery_info[] = { - /* LGC\011 L17L3PB0 Battery Information */ + /* AEC AEC335181 Battery Information */ /* - * Battery info provided by ODM on b/143477210, comment #11 + * Battery info provided by ODM on b/162908664, comment #4 */ - [BATTERY_LGC011] = { + [BATTERY_AEC] = { .fuel_gauge = { - .manuf_name = "LGC", + .manuf_name = "AEC", .ship_mode = { .reg_addr = 0x00, - .reg_data = { 0x10, 0x10 }, + .reg_data = { 0x0010, 0x0010 }, }, .fet = { + .mfgacc_support = 1, .reg_addr = 0x0, - .reg_mask = 0x6000, - .disconnect_val = 0x6000, + .reg_mask = 0x2000, + .disconnect_val = 0x2000, } }, .batt_info = { - .voltage_max = TARGET_WITH_MARGIN(13200, 5), - .voltage_normal = 11550, /* mV */ - .voltage_min = 9000, /* mV */ + .voltage_max = 8700, /* mV */ + .voltage_normal = 7600, /* mV */ + .voltage_min = 6000, /* mV */ .precharge_current = 256, /* mA */ .start_charging_min_c = 0, - .start_charging_max_c = 45, + .start_charging_max_c = 50, .charging_min_c = 0, - .charging_max_c = 60, - .discharging_min_c = 0, - .discharging_max_c = 75, + .charging_max_c = 50, + .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_AEC; diff --git a/board/halvor/board.h b/board/halvor/board.h index bd0c033e9c..2e9de3252f 100644 --- a/board/halvor/board.h +++ b/board/halvor/board.h @@ -138,7 +138,7 @@ #include "registers.h" enum battery_type { - BATTERY_LGC011, + BATTERY_AEC, BATTERY_TYPE_COUNT, }; |