summaryrefslogtreecommitdiff
path: root/board/reef
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-01-25 10:39:09 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-25 22:12:30 -0800
commit7a4eac1bed523e0f37597efcf1b887d996a037f0 (patch)
tree4ec10d33497182116aa9f60fdccab559591451e5 /board/reef
parent325c93fa94dc8ffbd15386d66c45dc0aaca262bb (diff)
downloadchrome-ec-7a4eac1bed523e0f37597efcf1b887d996a037f0.tar.gz
Reef: Reduce max battery charge voltage for 0.5% margin
(From CL 431233) Limit battery charge voltage to prevent battery over-charge, due to regulation inaccuracy. Since RO FW may charge > 8656 mV, ensure the battery is not full before charging. BUG=chrome-os-partner:61906 BRANCH=none TEST=Manual on Electro, sysjump with battery @ 99%, verify battery discharges, then re-charges to 100%, before discharging once again. Change-Id: I28212c83057a442fd75e39f8ad51927a7a1f2817 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/432857 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'board/reef')
-rw-r--r--board/reef/battery.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/board/reef/battery.c b/board/reef/battery.c
index 602834257a..a76bd92d1d 100644
--- a/board/reef/battery.c
+++ b/board/reef/battery.c
@@ -11,6 +11,7 @@
#include "charge_ramp.h"
#include "charge_state.h"
#include "charger_profile_override.h"
+#include "common.h"
#include "console.h"
#include "ec_commands.h"
#include "extpower.h"
@@ -118,7 +119,7 @@ static const struct fast_charge_params fast_chg_params_smp_cos4870 = {
};
const struct battery_info batt_info_smp_cos4870 = {
- .voltage_max = 8700, /* mV */
+ .voltage_max = TARGET_WITH_MARGIN(8700, 5),
.voltage_normal = 7600,
/*
* Actual value 6000mV, added 100mV for charger accuracy so that
@@ -162,7 +163,7 @@ static const struct fast_charge_params fast_chg_params_sonycorp = {
};
const struct battery_info batt_info_sonycorp = {
- .voltage_max = 8700, /* mV */
+ .voltage_max = TARGET_WITH_MARGIN(8700, 5),
.voltage_normal = 7600,
/*
@@ -216,7 +217,7 @@ static const struct fast_charge_params fast_chg_params_panasonic = {
};
const struct battery_info batt_info_panasoic = {
- .voltage_max = 8800, /* mV */
+ .voltage_max = TARGET_WITH_MARGIN(8800, 5),
.voltage_normal = 7700,
/*
@@ -324,7 +325,7 @@ static const struct fast_charge_params fast_chg_params_cpt_c22n1626 = {
};
const struct battery_info batt_info_c22n1626 = {
- .voltage_max = 8800, /* mV */
+ .voltage_max = TARGET_WITH_MARGIN(8800, 5),
.voltage_normal = 7700,
/*