summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-05-08 10:19:02 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-06-11 22:26:19 -0700
commit084fb77a796e2a33e68435be52f18ce63c48d62d (patch)
tree6ce5576735024bf93906c267510dbd2c65db5b76
parentdc13fa31444e6c476f7f0072d7b5890f93ceca0a (diff)
downloadchrome-ec-084fb77a796e2a33e68435be52f18ce63c48d62d.tar.gz
phaser: add battery information
Add battery information for: - SMP 5B10Q13163 - LGC 5B10Q13162 BRANCH=none BUG=b:78770233 TEST=builds (I don't have a phaser or batteries yet) Change-Id: I61ff3f874ff37ef60be084ccebddd2a72f4e82a3 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1096125 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org>
-rw-r--r--board/phaser/battery.c60
-rw-r--r--board/phaser/board.h2
2 files changed, 59 insertions, 3 deletions
diff --git a/board/phaser/battery.c b/board/phaser/battery.c
index d4d054fffb..79f1a857c8 100644
--- a/board/phaser/battery.c
+++ b/board/phaser/battery.c
@@ -48,10 +48,10 @@ const struct board_batt_params board_battery_info[] = {
}
},
.batt_info = {
- .voltage_max = 13200,
+ .voltage_max = 13200, /* mV */
.voltage_normal = 11550, /* mV */
- .voltage_min = 9000, /* mV */
- .precharge_current = 256, /* mA */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 256, /* mA */
.start_charging_min_c = 0,
.start_charging_max_c = 50,
.charging_min_c = 0,
@@ -60,6 +60,60 @@ const struct board_batt_params board_battery_info[] = {
.discharging_max_c = 60,
},
},
+ /* SMP 5B10Q13163 */
+ [BATTERY_SMP] = {
+ .fuel_gauge = {
+ .manuf_name = "SMP",
+ .ship_mode = {
+ .reg_addr = 0x34,
+ .reg_data = { 0x0000, 0x1000 },
+ },
+ .fet = {
+ .reg_addr = 0x34,
+ .reg_mask = 0x0100,
+ .disconnect_val = 0x0100,
+ }
+ },
+ .batt_info = {
+ .voltage_max = 13050, /* mV */
+ .voltage_normal = 11250, /* mV */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 186, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 50,
+ .charging_min_c = 0,
+ .charging_max_c = 60,
+ .discharging_min_c = -20,
+ .discharging_max_c = 60,
+ },
+ },
+ /* LGC 5B10Q13162 */
+ [BATTERY_LGC] = {
+ .fuel_gauge = {
+ .manuf_name = "LGC",
+ .ship_mode = {
+ .reg_addr = 0x34,
+ .reg_data = { 0x0000, 0x1000 },
+ },
+ .fet = {
+ .reg_addr = 0x34,
+ .reg_mask = 0x0100,
+ .disconnect_val = 0x0100,
+ }
+ },
+ .batt_info = {
+ .voltage_max = 13050, /* mV */
+ .voltage_normal = 11400, /* mV */
+ .voltage_min = 9000, /* mV */
+ .precharge_current = 181, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 50,
+ .charging_min_c = 0,
+ .charging_max_c = 60,
+ .discharging_min_c = -20,
+ .discharging_max_c = 73,
+ },
+ },
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
diff --git a/board/phaser/board.h b/board/phaser/board.h
index 493b353a09..89a58511dc 100644
--- a/board/phaser/board.h
+++ b/board/phaser/board.h
@@ -35,6 +35,8 @@ enum pwm_channel {
/* List of possible batteries */
enum battery_type {
BATTERY_PANASONIC,
+ BATTERY_SMP,
+ BATTERY_LGC,
BATTERY_TYPE_COUNT,
};