summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-01-07 14:47:50 +1100
committerCommit Bot <commit-bot@chromium.org>2022-01-07 22:03:26 +0000
commit537698c1204525598328794f3b7ab4e4b35f25a2 (patch)
tree7bb77ad121720ffa3d7bec10ed42de89f5616882
parentd024c61cebe963cb77f1cdb19d36e11d7fc3deab (diff)
downloadchrome-ec-537698c1204525598328794f3b7ab4e4b35f25a2.tar.gz
zephyr: Add trickle charging option for charger
Add a trickle charging option that is enabled by selected chargers. BUG=b:213410761 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I607739fda0ef6fdd09143f84b7e734389fe2c66c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3372124 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--zephyr/Kconfig.battery9
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery
index 0ae235b001..cfe9dfae6a 100644
--- a/zephyr/Kconfig.battery
+++ b/zephyr/Kconfig.battery
@@ -215,6 +215,7 @@ config PLATFORM_EC_CHARGER_RAA489000
depends on PLATFORM_EC_CHARGER_SENSE_RESISTOR > 0
depends on PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC > 0
select PLATFORM_EC_CHARGER_NARROW_VDC
+ select PLATFORM_EC_CHARGER_TRICKLE
help
Enables the driver for the Renesas RAA489000 battery charger
with integrated USB-C TCPC.
@@ -515,6 +516,14 @@ config PLATFORM_EC_CHARGER_NARROW_VDC
This should be enabled by charger drivers which need it. It cannot
be set otherwise, even in prj.conf
+config PLATFORM_EC_CHARGER_TRICKLE
+ bool
+ help
+ Select this if the charger allows trickle charging, which allows
+ the battery to charge with a minimum voltage.
+
+ This should be enabled by charger drivers which need it.
+
config PLATFORM_EC_CHARGER_OTG_SUPPORTED
bool
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 5e47bfbc5d..3abe4e615c 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -298,6 +298,11 @@
#define CONFIG_CHARGER_MAINTAIN_VBAT
#endif
+#undef CONFIG_CHARGER_TRICKLE
+#ifdef CONFIG_PLATFORM_EC_CHARGER_TRICKLE
+#define CONFIG_TRICKLE_CHARGING
+#endif
+
#undef CONFIG_CHARGER_NARROW_VDC
#ifdef CONFIG_PLATFORM_EC_CHARGER_NARROW_VDC
#define CONFIG_CHARGER_NARROW_VDC