summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2019-12-17 19:34:07 +0800
committerCommit Bot <commit-bot@chromium.org>2019-12-18 05:18:16 +0000
commitcfa3edf3feec8d1cf5f7a8d3c22073bc38cff1f1 (patch)
tree48b27159af768206cdf87c48de92fabedd4a87d7
parent3bb40b037df5744763713198e510d61aeaa1ee95 (diff)
downloadchrome-ec-cfa3edf3feec8d1cf5f7a8d3c22073bc38cff1f1.tar.gz
jinlon: add battery configuration
Add Dynapack CosMX battery configuration. BUG=b:146413878 BRANCH=hatch TEST=make buildall -j Change-Id: I8614ddc34b37b243386101cc8695a0b0a5b15056 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1971511 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
-rw-r--r--board/jinlon/battery.c45
-rw-r--r--board/jinlon/board.h3
2 files changed, 9 insertions, 39 deletions
diff --git a/board/jinlon/battery.c b/board/jinlon/battery.c
index ee5db0f30c..24b331639e 100644
--- a/board/jinlon/battery.c
+++ b/board/jinlon/battery.c
@@ -10,7 +10,7 @@
#include "util.h"
/*
- * Battery info for all Dratini/Dragonair battery types. Note that the fields
+ * Battery info for all Jinlon 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,10 +32,10 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* Simplo Coslight 996QA182H Battery Information */
- [BATTERY_SIMPLO_COS] = {
+ /* DynaPack CosMX Battery Information */
+ [BATTERY_DANAPACK_COS] = {
.fuel_gauge = {
- .manuf_name = "333-1C-13-A",
+ .manuf_name = "333-2C-14-A",
.ship_mode = {
.reg_addr = 0x0,
.reg_data = { 0x0010, 0x0010 },
@@ -48,38 +48,9 @@ const struct board_batt_params board_battery_info[] = {
},
},
.batt_info = {
- .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,
- },
- },
-
- /* LGC MPPHPPBC031C Battery Information */
- [BATTERY_LGC] = {
- .fuel_gauge = {
- .manuf_name = "333-42-0D-A",
- .ship_mode = {
- .reg_addr = 0x0,
- .reg_data = { 0x0010, 0x0010 },
- },
- .fet = {
- .mfgacc_support = 1,
- .reg_addr = 0x0,
- .reg_mask = 0x0006,
- .disconnect_val = 0x0,
- },
- },
- .batt_info = {
- .voltage_max = 13200, /* mV */
- .voltage_normal = 11550, /* mV */
- .voltage_min = 9000, /* mV */
+ .voltage_max = 8800, /* mV */
+ .voltage_normal = 7700,
+ .voltage_min = 6000,
.precharge_current = 256, /* mA */
.start_charging_min_c = 0,
.start_charging_max_c = 45,
@@ -92,4 +63,4 @@ const struct board_batt_params board_battery_info[] = {
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SIMPLO_COS;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DANAPACK_COS;
diff --git a/board/jinlon/board.h b/board/jinlon/board.h
index 1191af05c3..79f367c132 100644
--- a/board/jinlon/board.h
+++ b/board/jinlon/board.h
@@ -165,8 +165,7 @@ enum temp_sensor_id {
/* List of possible batteries */
enum battery_type {
- BATTERY_SIMPLO_COS,
- BATTERY_LGC,
+ BATTERY_DANAPACK_COS,
BATTERY_TYPE_COUNT,
};