summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Chao <scott_chao@wistron.corp-partner.google.com>2021-07-17 16:36:01 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-27 01:07:40 +0000
commit5c94447df5ed986c05d4662a2b7304c536d9c8ec (patch)
tree0960b54149524f4cf8814b4c5a186174026b0068
parent049e7d7a161dedb51f1917b5f0cc2179e1d92bc5 (diff)
downloadchrome-ec-5c94447df5ed986c05d4662a2b7304c536d9c8ec.tar.gz
gimble: add battery support
BUG=b:194649741 BRANCH=none TEST=make -j BOARD=gimble TEST=check "cutoff" in EC console Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I27bd319d5613ec83ac1e05dccccc1b9c19c7545d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034794 Reviewed-by: caveh jalali <caveh@chromium.org>
-rw-r--r--board/gimble/battery.c78
-rw-r--r--board/gimble/board.h4
2 files changed, 39 insertions, 43 deletions
diff --git a/board/gimble/battery.c b/board/gimble/battery.c
index a18ab029b6..235503a6f1 100644
--- a/board/gimble/battery.c
+++ b/board/gimble/battery.c
@@ -32,67 +32,63 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* POW-TECH GQA05 Battery Information */
- [BATTERY_POWER_TECH] = {
- /* BQ40Z50 Fuel Gauge */
+ /* SMP 996QA193H Battery Information */
+ [BATTERY_SIMPLO_HIGHPOWER] = {
.fuel_gauge = {
- .manuf_name = "POW-TECH",
- .device_name = "BATGQA05L22",
+ .manuf_name = "333-1D-11-A",
.ship_mode = {
- .reg_addr = 0x00,
+ .reg_addr = 0x0,
.reg_data = { 0x0010, 0x0010 },
},
.fet = {
.mfgacc_support = 1,
- .reg_addr = 0x00,
- .reg_mask = 0x2000, /* XDSG */
- .disconnect_val = 0x2000,
- }
+ .reg_addr = 0x0,
+ .reg_mask = 0x0006,
+ .disconnect_val = 0x0,
+ },
},
.batt_info = {
- .voltage_max = TARGET_WITH_MARGIN(13050, 5),
- .voltage_normal = 11400, /* mV */
- .voltage_min = 9000, /* mV */
- .precharge_current = 280, /* 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,
+ .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 = -20,
+ .discharging_max_c = 60,
},
},
- /* LGC L17L3PB0 Battery Information */
- /*
- * Battery info provided by ODM on b/143477210, comment #11
- */
- [BATTERY_LGC011] = {
+ /* Cosmx CA407792G Battery Information */
+ [BATTERY_COSMX] = {
.fuel_gauge = {
- .manuf_name = "LGC",
+ .manuf_name = "333-AC-11-A",
.ship_mode = {
- .reg_addr = 0x00,
+ .reg_addr = 0x0,
.reg_data = { 0x0010, 0x0010 },
},
.fet = {
+ .mfgacc_support = 1,
.reg_addr = 0x0,
- .reg_mask = 0x6000,
- .disconnect_val = 0x6000,
- }
+ .reg_mask = 0x0006,
+ .disconnect_val = 0x0,
+ },
},
.batt_info = {
- .voltage_max = TARGET_WITH_MARGIN(13200, 5),
- .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 = 60,
- .discharging_min_c = 0,
- .discharging_max_c = 75,
+ .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_POWER_TECH;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SIMPLO_HIGHPOWER;
diff --git a/board/gimble/board.h b/board/gimble/board.h
index 3e75b0bf13..0440b08b43 100644
--- a/board/gimble/board.h
+++ b/board/gimble/board.h
@@ -203,8 +203,8 @@ enum ioex_port {
};
enum battery_type {
- BATTERY_POWER_TECH,
- BATTERY_LGC011,
+ BATTERY_SIMPLO_HIGHPOWER,
+ BATTERY_COSMX,
BATTERY_TYPE_COUNT
};