diff options
author | Philip Chen <philipchen@google.com> | 2017-11-07 22:51:19 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-15 16:07:29 -0800 |
commit | 82de24aa3b4618e394fe7ce47bbcf69e24d40ba7 (patch) | |
tree | ffe1c0d5d42d94695f2029f20d5ff36687e5fb60 /board/nautilus | |
parent | 071142fe688c05ef1ffd54057409995f12504c1d (diff) | |
download | chrome-ec-82de24aa3b4618e394fe7ce47bbcf69e24d40ba7.tar.gz |
nautilus: Update battery profile
Update battery.c according to the battery datasheet
(The link is in the bug).
BUG=b:69016914
BRANCH=none
TEST=boot Nautilus with battery, and confirm EC doesn't complain about
critical battery state anymore.
Change-Id: I024f61e4a4119b7a3d5c0f3b1de56c591af2ae5d
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/757892
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/nautilus')
-rw-r--r-- | board/nautilus/battery.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/board/nautilus/battery.c b/board/nautilus/battery.c index b2e3a7b2f4..aa7a57f6aa 100644 --- a/board/nautilus/battery.c +++ b/board/nautilus/battery.c @@ -16,22 +16,26 @@ static enum battery_present batt_pres_prev = BP_NOT_SURE; -/* Shutdown mode parameter to write to manufacturer access register */ +/* + * TODO(philipchen): Check if these parameters are valid for Nautilus battery. + * + * Shutdown mode parameter to write to manufacturer access register + */ #define SB_SHIP_MODE_REG SB_MANUFACTURER_ACCESS #define SB_SHUTDOWN_DATA 0x0010 static const struct battery_info info = { - .voltage_max = 13200, - .voltage_normal = 11550, - .voltage_min = 9100, + .voltage_max = 8800, + .voltage_normal = 7700, + .voltage_min = 6000, /* Pre-charge values. */ - .precharge_current = 256, /* mA */ + .precharge_current = 152, /* mA */ - .start_charging_min_c = 0, - .start_charging_max_c = 50, - .charging_min_c = 0, - .charging_max_c = 60, - .discharging_min_c = 0, + .start_charging_min_c = -5, + .start_charging_max_c = 55, + .charging_min_c = -5, + .charging_max_c = 55, + .discharging_min_c = -20, .discharging_max_c = 60, }; @@ -132,6 +136,7 @@ static int battery_check_disconnect(void) if (rv) return BATTERY_DISCONNECT_ERROR; + /* TODO(philipchen): Verify if Nautilus battery supports this check. */ if ((data[3] & (BATTERY_DISCHARGING_DISABLED | BATTERY_CHARGING_DISABLED)) == (BATTERY_DISCHARGING_DISABLED | BATTERY_CHARGING_DISABLED)) |