summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-09-14 16:02:37 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-09-17 21:34:51 -0700
commitc7629caecec639e3cd6a6f01afbe8d131f23d762 (patch)
tree5a9e3b91a509c7dbce88af89e2a0f7dda143de4d
parent5c8a24e6a09cda7efee03034174ed59a2bcac637 (diff)
downloadchrome-ec-c7629caecec639e3cd6a6f01afbe8d131f23d762.tar.gz
isl923x: initially disable autonomous charging
We do not use autonomous charging since it is automatically disabled when ever we set the current limits manually (which we always do). Allowing autonomous charging for the short period during initialization can cause current over protection events on devices with 2S batteries. BRANCH=none BUG=b:114318779 TEST=meep can boot without battery from daughter board USB-C port without boot looping Change-Id: Id50517d7e34bb5be171fe8b781b3ccf835db1f88 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1227411 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Justin TerAvest <teravest@chromium.org>
-rw-r--r--driver/charger/isl923x.c6
-rw-r--r--driver/charger/isl923x.h8
2 files changed, 14 insertions, 0 deletions
diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c
index 6a4a248c25..89fd3ad1c2 100644
--- a/driver/charger/isl923x.c
+++ b/driver/charger/isl923x.c
@@ -365,6 +365,12 @@ static void isl923x_init(void)
goto init_fail;
reg |= ISL9238_C3_NO_RELOAD_ACLIM_ON_ACIN |
ISL9238_C3_NO_REREAD_PROG_PIN;
+ /*
+ * Disable autonomous charging initially since 1) it causes boot loop
+ * issues with 2S batteries, and 2) it will automatically get disabled
+ * as soon as we manually set the current limit anyway.
+ */
+ reg |= ISL9238_C3_DISABLE_AUTO_CHARING;
if (raw_write16(ISL9238_REG_CONTROL3, reg))
goto init_fail;
diff --git a/driver/charger/isl923x.h b/driver/charger/isl923x.h
index 65c778e7bf..118f22b77d 100644
--- a/driver/charger/isl923x.h
+++ b/driver/charger/isl923x.h
@@ -213,6 +213,14 @@
*/
#define ISL9238_C3_AMON_BMON_DIRECTION (1 << 3)
+/*
+ * Control3: Disables Autonomous Charing
+ *
+ * Note: This is disabled automatically when ever we set the current limit
+ * manually (which we always do).
+ */
+#define ISL9238_C3_DISABLE_AUTO_CHARING (1 << 7)
+
/* Control3: PSYS gain in uA/W (ISL9238 only) */
#define ISL9238_C3_PSYS_GAIN (1 << 9)