summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2019-05-14 17:22:01 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-21 14:20:40 -0700
commita8f20b538784156db4c57793798894bdd0f472c8 (patch)
tree834f6fc509ec8fd1d7bd08d99c5688bd75f2a9b5 /include
parent1df7f1fb8b60d3a9314f354eae23db1674704a94 (diff)
downloadchrome-ec-a8f20b538784156db4c57793798894bdd0f472c8.tar.gz
bq25710: Allow IDCHG to be used as a prochot trigger
Kohaku units are currently using a 2S+1P battery back which is not able to provide sufficient power for peak CPU load when running on battery only. The bq25710 has various triggers for prochot and one of those is IDCHG (battery discharge current). This CL adds a new config option CONFIG_CHARGER_BQ25710_IDCHG_LIMIT_MA to enable this feature in the bq25710. For prochot to be active, the bq25710 must remain in performance mode. Chispet hooks are used to request the bq25710 in/out of performace mode when the IDCHG prochot feature is active. BUG=b:132285560 BRANCH=none TEST=Manual Connected wires to VBAT, PPVAR_SYS, PROCHOT_ODL signals and had a current probe connected to measure IBAT. Verfied that without this CL, VBAT shuts off when IBAT spikes. With this CL, then verified that prochot gets asserted whenever the current spikes to values specified by CONFIG_CHARGER_BQ25710_IDCHG_LIMIT_MA. In addition verified that with this CL, the system can successfully boot and remain powered on even as CPU load gets increased. Change-Id: If13d16f561b76289936d0d75a2b984d2b71b3c37 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1613797 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 5975df08a4..ca441d17cf 100644
--- a/include/config.h
+++ b/include/config.h
@@ -817,6 +817,16 @@
*/
#undef CONFIG_CHARGER_INPUT_CURRENT
+/*
+ * This config option is used to enable IDCHG trigger for prochot. This macro
+ * should be set to the desired current limit to draw from the battery before
+ * triggering prochot. Note that is has a 512 mA granularity. The function that
+ * sets the limit will mask of the lower 10 bits. For this check to be active
+ * the bq25710 must be in performance mode and this config option is also used
+ * to keep the bq25710 in performance mode when the AP is in S0.
+ */
+#undef CONFIG_CHARGER_BQ25710_IDCHG_LIMIT_MA
+
/* Define to use Power Delivery State Machine Framework */
#undef CONFIG_USB_SM_FRAMEWORK