summaryrefslogtreecommitdiff
path: root/board/guybrush
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-04-29 16:53:34 -0600
committerCommit Bot <commit-bot@chromium.org>2021-05-03 14:59:12 +0000
commit7d31b2f86b7d7f825284ddaf4d360330e7d01afd (patch)
treee2d85ad63b16cfd7312b6e02721eeed5c1324992 /board/guybrush
parent2fa6cafe79c6ff83a53d4e4b14ce42e9fd0a7c91 (diff)
downloadchrome-ec-7d31b2f86b7d7f825284ddaf4d360330e7d01afd.tar.gz
Guybrush: Add POW-TECH battery
Add a new battery for proto 0 support BRANCH=None BUG=b:186577625 TEST=on gubyrush, charge battery. Verify cutoff works and battery can come out of disconnect after cutoff Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieda447e7dc404f9138ac70b4d240fba739934d52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2861056 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'board/guybrush')
-rw-r--r--board/guybrush/battery.c32
-rw-r--r--board/guybrush/board.h1
2 files changed, 31 insertions, 2 deletions
diff --git a/board/guybrush/battery.c b/board/guybrush/battery.c
index a7fa6ee449..31944d8772 100644
--- a/board/guybrush/battery.c
+++ b/board/guybrush/battery.c
@@ -45,10 +45,10 @@ const struct board_batt_params board_battery_info[] = {
}
},
.batt_info = {
- .voltage_max = 8700,
+ .voltage_max = 8700, /* mV */
.voltage_normal = 7600,
.voltage_min = 5500,
- .precharge_current = 256,
+ .precharge_current = 256, /* mA */
.start_charging_min_c = 0,
.start_charging_max_c = 50,
.charging_min_c = 0,
@@ -57,6 +57,34 @@ const struct board_batt_params board_battery_info[] = {
.discharging_max_c = 75,
},
},
+ /* POW-TECH Battery Information */
+ [BATTERY_POWER_TECH] = {
+ .fuel_gauge = {
+ .manuf_name = "POW-TECH",
+ .ship_mode = {
+ .reg_addr = 0x0,
+ .reg_data = { 0x10, 0x10 },
+ },
+ .fet = {
+ .reg_addr = 0x00,
+ .reg_mask = 0x2000,
+ .disconnect_val = 0x2000,
+ }
+ },
+ .batt_info = {
+ .voltage_max = 8800, /* mV */
+ .voltage_normal = 7700,
+ .voltage_min = 6000,
+ .precharge_current = 88, /* 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,
+ },
+
+ },
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
diff --git a/board/guybrush/board.h b/board/guybrush/board.h
index bcfbc719bd..4e21598a76 100644
--- a/board/guybrush/board.h
+++ b/board/guybrush/board.h
@@ -52,6 +52,7 @@ void motion_interrupt(enum gpio_signal signal);
/* Battery Types */
enum battery_type {
BATTERY_AP18F4M,
+ BATTERY_POWER_TECH,
BATTERY_TYPE_COUNT,
};