diff options
author | Tommy Chung <tommy.chung@quanta.corp-partner.google.com> | 2020-12-09 10:46:14 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-11 01:32:05 +0000 |
commit | ea56421c9b616669898b6cea3a57fc824e1e4340 (patch) | |
tree | 668e6bc2911bafe904e101322d59b4848e006d51 | |
parent | bc64c3cbedaf3e45780717dc807058b2f1570445 (diff) | |
download | chrome-ec-ea56421c9b616669898b6cea3a57fc824e1e4340.tar.gz |
lantis: Update battery configuration
Note that this CL updates the battery config on lantis. Also, we update
the comment in that lantis was initialed with drawcia's EC image.
BUG=b:175184763
BRANCH=dedede
TEST=Make sure battery charging, battery cutoff works.
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: Id8ca23b3c17a09680fd1267624f7a1fc06fbfaf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2581159
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | board/lantis/battery.c | 103 | ||||
-rw-r--r-- | board/lantis/board.c | 2 | ||||
-rw-r--r-- | board/lantis/board.h | 5 |
3 files changed, 15 insertions, 95 deletions
diff --git a/board/lantis/battery.c b/board/lantis/battery.c index 3052f93dcc..9df6861471 100644 --- a/board/lantis/battery.c +++ b/board/lantis/battery.c @@ -10,7 +10,7 @@ #include "common.h" /* - * Battery info for all drawcia battery types. Note that the fields + * Battery info for all lantis battery types. Note that the fields * start_charging_min/max and charging_min/max are not used for the charger. * The effective temperature limits are given by discharging_min/max_c. * @@ -45,6 +45,8 @@ const struct board_batt_params board_battery_info[] = { .reg_addr = 0x0, .reg_mask = 0x0006, .disconnect_val = 0x0, + .cfet_mask = 0x0004, + .cfet_off_val = 0x0, }, }, .batt_info = { @@ -74,93 +76,8 @@ const struct board_batt_params board_battery_info[] = { .reg_addr = 0x0, .reg_mask = 0x0006, .disconnect_val = 0x0, - }, - }, - .batt_info = { - .voltage_max = 8800, /* mV */ - .voltage_normal = 7700, - .voltage_min = 6000, - .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, - }, - }, - - /* DynaPack HIGHPOWER Battery Information */ - [BATTERY_DANAPACK_HIGHPOWER] = { - .fuel_gauge = { - .manuf_name = "333-2D-0D-A", - .ship_mode = { - .reg_addr = 0x00, - .reg_data = { 0x0010, 0x0010 }, - }, - .fet = { - .mfgacc_support = 1, - .reg_addr = 0x0, - .reg_mask = 0x0006, - .disconnect_val = 0x0, - }, - }, - .batt_info = { - .voltage_max = 8800, /* mV */ - .voltage_normal = 7700, - .voltage_min = 6000, - .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, - }, - }, - - /* DynaPack BYD Battery Information */ - [BATTERY_DANAPACK_BYD] = { - .fuel_gauge = { - .manuf_name = "333-2E-0D-A", - .ship_mode = { - .reg_addr = 0x00, - .reg_data = { 0x0010, 0x0010 }, - }, - .fet = { - .mfgacc_support = 1, - .reg_addr = 0x0, - .reg_mask = 0x0006, - .disconnect_val = 0x0, - }, - }, - .batt_info = { - .voltage_max = 8800, /* mV */ - .voltage_normal = 7700, - .voltage_min = 6000, - .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, - }, - }, - - /* Samsung SDI Battery Information */ - [BATTERY_SAMSUNG_SDI] = { - .fuel_gauge = { - .manuf_name = "333-54-DA-A", - .ship_mode = { - .reg_addr = 0x00, - .reg_data = { 0x0010, 0x0010 }, - }, - .fet = { - .mfgacc_support = 1, - .reg_addr = 0x0, - .reg_mask = 0x0006, - .disconnect_val = 0x0, + .cfet_mask = 0x0004, + .cfet_off_val = 0x0, }, }, .batt_info = { @@ -190,6 +107,8 @@ const struct board_batt_params board_battery_info[] = { .reg_addr = 0x0, .reg_mask = 0x0006, .disconnect_val = 0x0, + .cfet_mask = 0x0004, + .cfet_off_val = 0x0, }, }, .batt_info = { @@ -219,6 +138,8 @@ const struct board_batt_params board_battery_info[] = { .reg_addr = 0x0, .reg_mask = 0x0006, .disconnect_val = 0x0, + .cfet_mask = 0x0004, + .cfet_off_val = 0x0, }, }, .batt_info = { @@ -235,10 +156,10 @@ const struct board_batt_params board_battery_info[] = { }, }, - /* CosMX Battery Information */ + /* CosMX B00C4473A9D0002 Battery Information */ [BATTERY_COS] = { .fuel_gauge = { - .manuf_name = "333-AC-0D-A", + .manuf_name = "333-AC-DA-A", .ship_mode = { .reg_addr = 0x00, .reg_data = { 0x0010, 0x0010 }, @@ -248,6 +169,8 @@ const struct board_batt_params board_battery_info[] = { .reg_addr = 0x0, .reg_mask = 0x0006, .disconnect_val = 0x0, + .cfet_mask = 0x0004, + .cfet_off_val = 0x0, }, }, .batt_info = { diff --git a/board/lantis/board.c b/board/lantis/board.c index 821a508ac8..95a8b49528 100644 --- a/board/lantis/board.c +++ b/board/lantis/board.c @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Drawcia board-specific configuration */ +/* Lantis board-specific configuration */ #include "adc_chip.h" #include "button.h" diff --git a/board/lantis/board.h b/board/lantis/board.h index bcdaf4112d..a12ff478c1 100644 --- a/board/lantis/board.h +++ b/board/lantis/board.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Drawcia board configuration */ +/* Lantis board configuration */ #ifndef __CROS_EC_BOARD_H #define __CROS_EC_BOARD_H @@ -137,9 +137,6 @@ enum temp_sensor_id { enum battery_type { BATTERY_DANAPACK_COS, BATTERY_DANAPACK_ATL, - BATTERY_DANAPACK_HIGHPOWER, - BATTERY_DANAPACK_BYD, - BATTERY_SAMSUNG_SDI, BATTERY_SIMPLO_COS, BATTERY_SIMPLO_HIGHPOWER, BATTERY_COS, |