summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2019-05-08 16:47:57 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-17 18:37:02 -0700
commitcd530f929bf88b711f34d7b6b4807ebdbe467210 (patch)
treefcaeadd3b7db7c3bfc37e870ac3a0ca5720463c3
parent304a5bb34304f09f091778a72271bbf844f2089d (diff)
downloadchrome-ec-cd530f929bf88b711f34d7b6b4807ebdbe467210.tar.gz
kohaku: Add support for Dyna battery
This CL adds support for the battery that's currently being used with Kohaku systems. Without this support the AP won't be powered on automatically when only on battery power. BUG=b:132272081 BRANCH=none TEST=Verifed that 'battery found' message is in EC console log and that AP boots automatically when AC power is not connected. Change-Id: I2f9e0f09cf3d2caad33ed62e2b8f42a609b34fc3 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1603470 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--board/kohaku/battery.c46
-rw-r--r--board/kohaku/board.h3
2 files changed, 10 insertions, 39 deletions
diff --git a/board/kohaku/battery.c b/board/kohaku/battery.c
index b81fa795b9..1014d7825d 100644
--- a/board/kohaku/battery.c
+++ b/board/kohaku/battery.c
@@ -32,10 +32,10 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* SMP LIS Dell FMXMT Battery Information */
- [BATTERY_SMP_LIS] = {
+ /* Dyna Battery Information */
+ [BATTERY_DYNA] = {
.fuel_gauge = {
- .manuf_name = "SMP-LIS3.78",
+ .manuf_name = "Dyna",
.ship_mode = {
.reg_addr = 0x0,
.reg_data = { 0x10, 0x10 },
@@ -47,47 +47,19 @@ const struct board_batt_params board_battery_info[] = {
}
},
.batt_info = {
- .voltage_max = 8800,
- .voltage_normal = 7660, /* mV */
+ .voltage_max = 8700,
+ .voltage_normal = 7600, /* mV */
.voltage_min = 6000, /* mV */
- .precharge_current = 256, /* mA */
+ .precharge_current = 150, /* mA */
.start_charging_min_c = 0,
- .start_charging_max_c = 60,
+ .start_charging_max_c = 45,
.charging_min_c = 0,
.charging_max_c = 60,
- .discharging_min_c = 0,
- .discharging_max_c = 60,
- },
- },
-
- /* SMP SDI Dell FMXMT Battery Information */
- [BATTERY_SMP_SDI] = {
- .fuel_gauge = {
- .manuf_name = "SMP-SDI-3727",
- .ship_mode = {
- .reg_addr = 0x0,
- .reg_data = { 0x10, 0x10 },
- },
- .fet = {
- .reg_addr = 0x0,
- .reg_mask = 0x2000,
- .disconnect_val = 0x2000,
- }
- },
- .batt_info = {
- .voltage_max = 8800,
- .voltage_normal = 7660, /* mV */
- .voltage_min = 6000, /* mV */
- .precharge_current = 256, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 60,
- .charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = 0,
+ .discharging_min_c = -20,
.discharging_max_c = 60,
},
},
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SMP_SDI;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DYNA;
diff --git a/board/kohaku/board.h b/board/kohaku/board.h
index 558293f7a3..81bca3c57c 100644
--- a/board/kohaku/board.h
+++ b/board/kohaku/board.h
@@ -147,8 +147,7 @@ enum temp_sensor_id {
/* List of possible batteries */
enum battery_type {
- BATTERY_SMP_LIS,
- BATTERY_SMP_SDI,
+ BATTERY_DYNA,
BATTERY_TYPE_COUNT,
};