summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2019-09-10 10:58:54 +0800
committerCommit Bot <commit-bot@chromium.org>2019-09-14 00:38:53 +0000
commit50109efd01cbc99589e79dd1da98178c727e698f (patch)
tree76e372a4ad3dd2dcd358bd720d9432e21814431a
parent594a9f874e6744ee47d2a9d4631bfc5e740d3850 (diff)
downloadchrome-ec-50109efd01cbc99589e79dd1da98178c727e698f.tar.gz
dratini: add batteries configuration
Add batteries configuration as following: 1. LGC MPPHPPBC031C 2. Simplo 996QA182H BUG=b:140635151 BRANCH=none TEST=make buildall -j Change-Id: I69eb4b256127a3e7a53fed914406626b34460910 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1792420 Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org>
-rw-r--r--board/dratini/battery.c74
-rw-r--r--board/dratini/board.h4
2 files changed, 40 insertions, 38 deletions
diff --git a/board/dratini/battery.c b/board/dratini/battery.c
index b81fa795b9..e4350c1e08 100644
--- a/board/dratini/battery.c
+++ b/board/dratini/battery.c
@@ -10,7 +10,7 @@
#include "util.h"
/*
- * Battery info for all Hatch battery types. Note that the fields
+ * Battery info for all Dratini/Dragonair 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.
*
@@ -32,62 +32,64 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* SMP LIS Dell FMXMT Battery Information */
- [BATTERY_SMP_LIS] = {
+ /* Simplo Coslight 996QA182H Battery Information */
+ [BATTERY_SIMPLO_COS] = {
.fuel_gauge = {
- .manuf_name = "SMP-LIS3.78",
+ .manuf_name = "333-1C-13-A",
.ship_mode = {
.reg_addr = 0x0,
- .reg_data = { 0x10, 0x10 },
+ .reg_data = { 0x0010, 0x0010 },
},
.fet = {
+ .mfgacc_support = 1,
.reg_addr = 0x0,
- .reg_mask = 0x2000,
- .disconnect_val = 0x2000,
- }
+ .reg_mask = 0x0006,
+ .disconnect_val = 0x0,
+ },
},
.batt_info = {
- .voltage_max = 8800,
- .voltage_normal = 7660, /* mV */
- .voltage_min = 6000, /* mV */
- .precharge_current = 256, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 60,
- .charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = 0,
- .discharging_max_c = 60,
+ .voltage_max = 13200, /* mV */
+ .voltage_normal = 11550, /* mV */
+ .voltage_min = 9000, /* 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,
},
},
- /* SMP SDI Dell FMXMT Battery Information */
- [BATTERY_SMP_SDI] = {
+ /* LGC MPPHPPBC031C Battery Information */
+ [BATTERY_LGC] = {
.fuel_gauge = {
- .manuf_name = "SMP-SDI-3727",
+ .manuf_name = "333-42-0D-A",
.ship_mode = {
.reg_addr = 0x0,
- .reg_data = { 0x10, 0x10 },
+ .reg_data = { 0x0010, 0x0010 },
},
.fet = {
+ .mfgacc_support = 1,
.reg_addr = 0x0,
- .reg_mask = 0x2000,
- .disconnect_val = 0x2000,
- }
+ .reg_mask = 0x0006,
+ .disconnect_val = 0x0006,
+ },
},
.batt_info = {
- .voltage_max = 8800,
- .voltage_normal = 7660, /* mV */
- .voltage_min = 6000, /* mV */
- .precharge_current = 256, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 60,
- .charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = 0,
- .discharging_max_c = 60,
+ .voltage_max = 13200, /* mV */
+ .voltage_normal = 11550, /* mV */
+ .voltage_min = 9000, /* 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_SMP_SDI;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SIMPLO_COS;
diff --git a/board/dratini/board.h b/board/dratini/board.h
index fb6946066a..824284471a 100644
--- a/board/dratini/board.h
+++ b/board/dratini/board.h
@@ -155,8 +155,8 @@ enum temp_sensor_id {
/* List of possible batteries */
enum battery_type {
- BATTERY_SMP_LIS,
- BATTERY_SMP_SDI,
+ BATTERY_SIMPLO_COS,
+ BATTERY_LGC,
BATTERY_TYPE_COUNT,
};