diff options
Diffstat (limited to 'board/kingoftown')
-rw-r--r-- | board/kingoftown/battery.c | 130 | ||||
-rw-r--r-- | board/kingoftown/board.c | 2 | ||||
-rw-r--r-- | board/kingoftown/board.h | 7 | ||||
-rw-r--r-- | board/kingoftown/usbc_config.c | 2 | ||||
-rw-r--r-- | board/kingoftown/usbc_config.h | 2 |
5 files changed, 117 insertions, 26 deletions
diff --git a/board/kingoftown/battery.c b/board/kingoftown/battery.c index 5c05124465..c039fb3e45 100644 --- a/board/kingoftown/battery.c +++ b/board/kingoftown/battery.c @@ -10,7 +10,7 @@ #include "util.h" /* - * Battery info for all trogdor battery types. Note that the fields + * Battery info for all kingoftown 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. * @@ -33,36 +33,124 @@ */ const struct board_batt_params board_battery_info[] = { - /* AP16L5J */ - [BATTERY_AP16L5J] = { + /* DynaPack HIGHPOWER Battery Information */ + [BATTERY_DYNAPACK_HIGHPOWER] = { .fuel_gauge = { - .manuf_name = "PANASONIC", - .device_name = "AP16L5J", + .manuf_name = "333-2D-0D-A", .ship_mode = { - .reg_addr = 0x3A, - .reg_data = { 0xC574, 0xC574 }, + .reg_addr = 0x00, + .reg_data = { 0x0010, 0x0010 }, }, .fet = { - .mfgacc_support = 0, + .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_DYNAPACK_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 = 0x4000, + .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, + }, + }, + + /* CosMX Battery Information */ + [BATTERY_COS] = { + .fuel_gauge = { + .manuf_name = "333-AC-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, + }, + }, + + /* 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, + }, }, .batt_info = { - .voltage_max = 8800, - .voltage_normal = 7700, /* 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, + .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); -const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_AP16L5J; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DYNAPACK_HIGHPOWER; diff --git a/board/kingoftown/board.c b/board/kingoftown/board.c index cb6c302c98..cc0005d775 100644 --- a/board/kingoftown/board.c +++ b/board/kingoftown/board.c @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Trogdor board-specific configuration */ +/* Kingoftown board-specific configuration */ #include "adc_chip.h" #include "button.h" diff --git a/board/kingoftown/board.h b/board/kingoftown/board.h index 5652f1ed22..b1d9cc3c5c 100644 --- a/board/kingoftown/board.h +++ b/board/kingoftown/board.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Trogdor board configuration */ +/* Kingoftown board configuration */ #ifndef __CROS_EC_BOARD_H #define __CROS_EC_BOARD_H @@ -99,7 +99,10 @@ enum pwm_channel { /* List of possible batteries */ enum battery_type { - BATTERY_AP16L5J, + BATTERY_DYNAPACK_HIGHPOWER, + BATTERY_DYNAPACK_BYD, + BATTERY_COS, + BATTERY_ATL, BATTERY_TYPE_COUNT, }; diff --git a/board/kingoftown/usbc_config.c b/board/kingoftown/usbc_config.c index dddc1d87a6..81a63be9b3 100644 --- a/board/kingoftown/usbc_config.c +++ b/board/kingoftown/usbc_config.c @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Trogdor board-specific USB-C configuration */ +/* Kingoftown board-specific USB-C configuration */ #include "bc12/pi3usb9201_public.h" #include "charge_manager.h" diff --git a/board/kingoftown/usbc_config.h b/board/kingoftown/usbc_config.h index 75adf93b3c..654da35f74 100644 --- a/board/kingoftown/usbc_config.h +++ b/board/kingoftown/usbc_config.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Trogdor board-specific USB-C configuration */ +/* Kingoftown board-specific USB-C configuration */ #ifndef __CROS_EC_USBC_CONFIG_H #define __CROS_EC_USBC_CONFIG_H |