summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2022-05-18 22:36:50 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-19 16:23:29 +0000
commit227e7abd0608d288043a48e89e7686e0ebf0b539 (patch)
tree924b052e5be8942a149f364659892748d22d6d82
parentf4290a1853ecc769a15fbb21daa003d2ee02b42b (diff)
downloadchrome-ec-227e7abd0608d288043a48e89e7686e0ebf0b539.tar.gz
ghost: add SWD battery config
This adds support for a new battery. BRANCH=none BUG=b:233120385 TEST=make passes Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: Idc5c289fc6c17315cf51c501655b20733c516346 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3654950 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--board/ghost/battery.c35
-rw-r--r--board/ghost/board.h1
2 files changed, 33 insertions, 3 deletions
diff --git a/board/ghost/battery.c b/board/ghost/battery.c
index 73c8260938..4737cf2004 100644
--- a/board/ghost/battery.c
+++ b/board/ghost/battery.c
@@ -35,9 +35,6 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /*
- * TODO(b/233120385): update for ghost, this is the brya battery
- */
/* POW-TECH GQA05 Battery Information */
[BATTERY_POWER_TECH] = {
/* BQ40Z50 Fuel Gauge */
@@ -68,6 +65,38 @@ const struct board_batt_params board_battery_info[] = {
.discharging_max_c = 60,
},
},
+ /*
+ * TODO(b/233120385): verify these
+ */
+ [BATTERY_SWD_ATL] = {
+ /* BQ40Z50-R3 Fuel Gauge */
+ .fuel_gauge = {
+ .manuf_name = "SWD",
+ .device_name = "1163985013",
+ .ship_mode = {
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x00,
+ .reg_mask = 0x2000, /* XDSG */
+ .disconnect_val = 0x2000,
+ }
+ },
+ .batt_info = {
+ .voltage_max = TARGET_WITH_MARGIN(8960, 5),
+ .voltage_normal = 7780, /* mV */
+ .voltage_min = 6000, /* mV */
+ .precharge_current = 570, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 60,
+ .charging_min_c = 0,
+ .charging_max_c = 60,
+ .discharging_min_c = -20,
+ .discharging_max_c = 60,
+ },
+ },
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
diff --git a/board/ghost/board.h b/board/ghost/board.h
index c86de65983..e313567544 100644
--- a/board/ghost/board.h
+++ b/board/ghost/board.h
@@ -204,6 +204,7 @@ enum ioex_port {
enum battery_type {
BATTERY_POWER_TECH,
+ BATTERY_SWD_ATL,
BATTERY_TYPE_COUNT
};