summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjames_chao <james_chao@asus.com>2018-08-14 15:09:12 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-08-14 08:25:02 +0000
commitf9dc2e4852c67893a1893bb8eb49d113f171580c (patch)
tree0b945cc8c46cfe59394ef6897ae3c9de1abfa01e
parent905e6aa20c69c4a25566a76e0c61e4e1d0a648f2 (diff)
downloadchrome-ec-f9dc2e4852c67893a1893bb8eb49d113f171580c.tar.gz
Coral: add battery support for babymako
BUG=none BRANCH=coral TEST=check the battery is working normally Change-Id: I5025542c2b0ef6fabfa37fc7c57e5b31d0b332b2 Signed-off-by: james_chao <james_chao@asus.com> Reviewed-on: https://chromium-review.googlesource.com/1174136 Reviewed-by: Marco Chen <marcochen@chromium.org>
-rw-r--r--board/coral/battery.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/board/coral/battery.c b/board/coral/battery.c
index 736477188f..d3b8882633 100644
--- a/board/coral/battery.c
+++ b/board/coral/battery.c
@@ -50,6 +50,7 @@ enum battery_type {
BATTERY_SMP523_PROTO_2S1P,
BATTERY_SMP423_PROTO_2S1P,
BATTERY_SMP223_2S1P_COS,
+ BATTERY_SMP403_2S1P,
BATTERY_TYPE_COUNT,
};
@@ -778,6 +779,35 @@ static const struct board_batt_params info[] = {
.discharging_max_c = 60,
},
},
+
+ [BATTERY_SMP403_2S1P] = {
+ .fuel_gauge = {
+ .manuf_name = "AS1FOAD3KD",
+ .device_name = "C213-60",
+ .ship_mode = {
+ .reg_addr = 0x0,
+ .reg_data = { 0x10, 0x10 },
+ },
+ .fet = {
+ .mfgacc_support = 0,
+ .reg_addr = 0x43,
+ .reg_mask = 0x0001,
+ .disconnect_val = 0x0000,
+ }
+ },
+ .batt_info = {
+ .voltage_max = TARGET_WITH_MARGIN(8800, 5),
+ .voltage_normal = 7700, /* mV */
+ .voltage_min = 6000, /* 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 = 60,
+ },
+ },
};
BUILD_ASSERT(ARRAY_SIZE(info) == BATTERY_TYPE_COUNT);