From 537698c1204525598328794f3b7ab4e4b35f25a2 Mon Sep 17 00:00:00 2001 From: Andrew McRae Date: Fri, 7 Jan 2022 14:47:50 +1100 Subject: 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 Change-Id: I607739fda0ef6fdd09143f84b7e734389fe2c66c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3372124 Reviewed-by: Jack Rosenthal Commit-Queue: Jack Rosenthal --- zephyr/Kconfig.battery | 9 +++++++++ zephyr/shim/include/config_chip.h | 5 +++++ 2 files changed, 14 insertions(+) (limited to 'zephyr') 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 -- cgit v1.2.1