summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2019-03-15 16:48:11 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-26 04:43:46 -0700
commitdc4167822126a4cb3412e3e6c1255b014924b7d5 (patch)
tree386af812c714f10e4b2c0733066a7952a4789263
parent8d034db01d9ca539240eaa616b983c4df7bb0c26 (diff)
downloadchrome-ec-dc4167822126a4cb3412e3e6c1255b014924b7d5.tar.gz
bloog: add batteries configuration
Add batteries configuration as following: bloog: 1. LGC MPPHPPMD021C 2. Coslight B00C368598D0001 bloogaurd: 1. DynaPack DAK126150-W0P0703HT 2. DynaPack DAK126150-W020703HT 3. DynaPack DAK126150-W0G0703HT 4. Simplo 996QA149H 5. Simplo 996QA150H 6. SDI P21GGH-03-N02 BUG=b:128371185 BRANCH=none TEST=make buildall -j Change-Id: If68a4dd6f34e314ee1fd24d5ef5f896af69bd0d3 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/1525590 Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--board/bloog/battery.c234
-rw-r--r--board/bloog/board.h8
2 files changed, 240 insertions, 2 deletions
diff --git a/board/bloog/battery.c b/board/bloog/battery.c
index 16028e2c7a..994dce157d 100644
--- a/board/bloog/battery.c
+++ b/board/bloog/battery.c
@@ -32,8 +32,238 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* TODO(b/128371185): fill in after receiving datasheets */
+ /* DynaPack Coslight BDAK126150-W0P0703HT attery Information */
+ [BATTERY_DANAPACK_COS] = {
+ .fuel_gauge = {
+ .manuf_name = "333-2C-DA-A",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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 ATL DynaPack DAK126150-W0G0703HT Battery Information */
+ [BATTERY_DANAPACK_ATL] = {
+ .fuel_gauge = {
+ .manuf_name = "333-27-DA-A",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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 SDI DAK126150-W020703HT Battery Information */
+ [BATTERY_DANAPACK_SDI] = {
+ .fuel_gauge = {
+ .manuf_name = "333-24-DA-A",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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 P21GGH-03-N02 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 = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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,
+ },
+ },
+
+ /* Simplo Coslight 996QA149H Battery Information */
+ [BATTERY_SIMPLO_COS] = {
+ .fuel_gauge = {
+ .manuf_name = "333-1C-DA-A",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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,
+ },
+ },
+
+ /* Simplo ATL 996QA150H Battery Information */
+ [BATTERY_SIMPLO_ATL] = {
+ .fuel_gauge = {
+ .manuf_name = "333-17-DA-A",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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,
+ },
+ },
+
+ /* LGC MPPHPPMD021C Battery Information */
+ [BATTERY_LGC] = {
+ .fuel_gauge = {
+ .manuf_name = "333-42-33-A",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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,
+ },
+ },
+
+ /* Coslight B00C368598D0001 Battery Information */
+ [BATTERY_COS] = {
+ .fuel_gauge = {
+ .manuf_name = "333-AC-33-A",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x0,
+ .reg_mask = 0x6000,
+ .disconnect_val = 0x6000,
+ },
+ },
+ .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,
+ },
+ },
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_TYPE_COUNT;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DANAPACK_COS;
diff --git a/board/bloog/board.h b/board/bloog/board.h
index 56b6144898..48716744a5 100644
--- a/board/bloog/board.h
+++ b/board/bloog/board.h
@@ -84,6 +84,14 @@ enum sensor_id {
};
enum battery_type {
+ BATTERY_DANAPACK_COS,
+ BATTERY_DANAPACK_ATL,
+ BATTERY_DANAPACK_SDI,
+ BATTERY_SAMSUNG_SDI,
+ BATTERY_SIMPLO_COS,
+ BATTERY_SIMPLO_ATL,
+ BATTERY_LGC,
+ BATTERY_COS,
BATTERY_TYPE_COUNT,
};