summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-06-04 15:54:24 -0600
committerCommit Bot <commit-bot@chromium.org>2021-06-11 21:27:35 +0000
commit66e460a5738f4a39d3f007f2f72a229699eaf19f (patch)
tree2143d9d106a1aa95d910efa712629bbbb5220c98
parente50f96dcd4bae8e7b4c762cac21dca4dca3ee776 (diff)
downloadchrome-ec-66e460a5738f4a39d3f007f2f72a229699eaf19f.tar.gz
zephyr: Add support for MAINTAIN_VBAT
Add a Kconfig for this feature so that it can be used on Zephyr. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I699fe81b3f4ad8c03b90a0c8371a927df5bc3e78 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941819 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--zephyr/Kconfig.battery7
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery
index a7ed96a7a0..5d1239b254 100644
--- a/zephyr/Kconfig.battery
+++ b/zephyr/Kconfig.battery
@@ -237,6 +237,13 @@ config PLATFORM_EC_CHARGER_BQ25720_VSYS_TH2_DV
3.2v and 5.9v for 2S or higher batteries. The valid range is
3.2v - 3.9v for 1S and 3.2 - 9.5v for 2S or higher batteries.
+config PLATFORM_EC_CHARGER_MAINTAIN_VBAT
+ bool "Maintain VBAT voltage regardless of AC state"
+ help
+ Leave the charger VBAT configured to battery-requested voltage under
+ all conditions, even when AC is not present. This may be necessary to
+ work around quirks of certain charger chips, such as the BD9995X.
+
config PLATFORM_EC_CHARGER_NARROW_VDC
bool
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index ae886b799c..88c44ac61f 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -231,6 +231,11 @@
#define CONFIG_CHARGER_ISL9238
#endif
+#undef CONFIG_CHARGER_MAINTAIN_VBAT
+#ifdef CONFIG_PLATFORM_EC_CHARGER_MAINTAIN_VBAT
+#define CONFIG_CHARGER_MAINTAIN_VBAT
+#endif
+
#undef CONFIG_CHARGER_NARROW_VDC
#ifdef CONFIG_PLATFORM_EC_CHARGER_NARROW_VDC
#define CONFIG_CHARGER_NARROW_VDC