summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2016-07-13 14:22:20 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-18 21:47:50 -0700
commitb7a604728abe7e332a616b0cad761dec6e501877 (patch)
treef5d233f9b14ef9b36f246e4362ba6ddfd3688d40 /common
parent3b241c212ecc17dd9151694609045b1aac903953 (diff)
downloadchrome-ec-b7a604728abe7e332a616b0cad761dec6e501877.tar.gz
bd99955: Make changes for new OTP change.
There's a new OTP change for the BD99955 and therefore the following changes needed to be made. - Change VFASTCHG_SET1 to 8.704V before CHG_EN is set to 1. - Change VSYS_REG to 6.144V when starting Fast Charging. - Change VSYS_REG back to 8.906V when Fast Charge is finished. - Wait for 50ms to set CHG_EN to off (0) after Fast Charging has ended. BUG=chrome-os-partner:55220 BUG=chrome-os-partner:55238 BRANCH=None TEST=Flash kevin, plug discharged battery in. Plug AC in. `bd99955 r 0x11 1' and verify that VSYSREG is set to 0x1800 (6144mV). TEST=`bd99955 r 0x1a 1' and verify that VFASTCHARGE is set to 0x2200 (8704mV). TEST=Remove battery. `bd99955 r 0x11 1' and verify that VSYSREG is set to 0x2300 (8960 mV). TEST=Plug in battery and let charge to full. Verify that VSYSREG is set to 0x2300 (8960 mV). Change-Id: I5e5ca2cdcd4ead383416901c904df1e6fe5a9e28 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/360421 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/charge_state_v2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index 60875d0ff6..95b46a63ed 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -415,7 +415,11 @@ static int charge_request(int voltage, int current)
* Set the charge inhibit bit when possible as it appears to save
* power in some cases (e.g. Nyan with BQ24735).
*/
+#ifdef CONFIG_CHARGER_BD99955
+ if (current > 0)
+#else
if (voltage > 0 || current > 0)
+#endif
r3 = charger_set_mode(0);
else
r3 = charger_set_mode(CHARGE_FLAG_INHIBIT_CHARGE);