diff options
author | Ryan Zhang <Ryan.Zhang@quantatw.com> | 2015-12-16 14:17:41 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-18 04:45:40 -0800 |
commit | 8623942335252b7ec92d587391403ff9f425a007 (patch) | |
tree | d2030e64556c859745461967a8ab1a1711cfc63a /board | |
parent | 4bad633cb9ece35138415541a0decafda613a95f (diff) | |
download | chrome-ec-8623942335252b7ec92d587391403ff9f425a007.tar.gz |
Lars: Update battery settings
Update battery settings from battery spec.
BUG=chrome-os-partner:48571
BRANCH=lars
TEST=`make -j BOARD=lars`, OS and EC shutdown normally without AC,
Charging normally.
Change-Id: I4b8fad8ab993f2ea5190898088bd1bd8c2bd7abb
Signed-off-by: Ryan Zhang <Ryan.Zhang@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/318611
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/lars/battery.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/board/lars/battery.c b/board/lars/battery.c index 0fa688e44d..99b45b615f 100644 --- a/board/lars/battery.c +++ b/board/lars/battery.c @@ -10,17 +10,18 @@ #include "util.h" /* Shutdown mode parameter to write to manufacturer access register */ -#define SB_SHUTDOWN_DATA 0x0010 +#define SB_SHIP_MODE_REG 0x3a +#define SB_SHUTDOWN_DATA 0xC574 static const struct battery_info info = { - .voltage_max = 8700,/* mV */ - .voltage_normal = 7600, - .voltage_min = 6000, - .precharge_current = 150,/* mA */ + .voltage_max = 13050,/* mV */ + .voltage_normal = 11400, + .voltage_min = 9100, + .precharge_current = 256,/* mA */ .start_charging_min_c = 0, - .start_charging_max_c = 45, + .start_charging_max_c = 50, .charging_min_c = 0, - .charging_max_c = 45, + .charging_max_c = 60, .discharging_min_c = -20, .discharging_max_c = 60, }; @@ -35,10 +36,10 @@ int board_cut_off_battery(void) int rv; /* Ship mode command must be sent twice to take effect */ - rv = sb_write(SB_MANUFACTURER_ACCESS, SB_SHUTDOWN_DATA); + rv = sb_write(SB_SHIP_MODE_REG, SB_SHUTDOWN_DATA); if (rv != EC_SUCCESS) return rv; - return sb_write(SB_MANUFACTURER_ACCESS, SB_SHUTDOWN_DATA); + return sb_write(SB_SHIP_MODE_REG, SB_SHUTDOWN_DATA); } |