From fcf7edff8cf2f7202799551f60ab2040b147c4ec Mon Sep 17 00:00:00 2001 From: Shamile Khan Date: Mon, 12 Jun 2017 09:39:06 -0700 Subject: poppy: Enable ship mode on rev1. rev1 (Soraka) was using proto settings. Instead use the settings described in fuel gauge specification. BRANCH=none BUG=b:62552007 TEST=On soraka, check that the system goes to ship mode and no error messages appear, using "ectool batterycutoff" from OS or "cutoff" from EC console. Change-Id: I04e6b08265d20395d13e28e93cb14c1d49b376df Signed-off-by: Shamile Khan Reviewed-on: https://chromium-review.googlesource.com/531736 Reviewed-by: Vijay Hiremath Reviewed-by: Nicolas Boichat --- board/poppy/battery.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'board') diff --git a/board/poppy/battery.c b/board/poppy/battery.c index b35438384a..6b6f1f5603 100644 --- a/board/poppy/battery.c +++ b/board/poppy/battery.c @@ -13,11 +13,11 @@ #include "extpower.h" #include "util.h" +#ifdef BOARD_SORAKA /* Shutdown mode parameter to write to manufacturer access register */ -#define SB_SHIP_MODE_REG 0x3a -#define SB_SHUTDOWN_DATA 0xC574 +#define SB_SHIP_MODE_REG SB_MANUFACTURER_ACCESS +#define SB_SHUTDOWN_DATA 0x0010 -#ifdef BOARD_SORAKA static const struct battery_info info = { .voltage_max = 8800, .voltage_normal = 7700, @@ -33,6 +33,10 @@ static const struct battery_info info = { .discharging_max_c = 60, }; #elif defined(BOARD_POPPY) +/* Shutdown mode parameter to write to manufacturer access register */ +#define SB_SHIP_MODE_REG 0x3a +#define SB_SHUTDOWN_DATA 0xC574 + static const struct battery_info info = { .voltage_max = 13200, .voltage_normal = 11550, -- cgit v1.2.1