diff options
author | Simon Glass <sjg@chromium.org> | 2021-06-04 16:04:33 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-15 18:38:10 +0000 |
commit | 93260ad5e431525be3dca0232f825afd93ea3fa9 (patch) | |
tree | eeb1b90f3c1a4aa9b6394dcdf3a4bf9e0b878b6e /zephyr | |
parent | f12b493bcad389e5c0cadcf6e84bf75524b95ba5 (diff) | |
download | chrome-ec-93260ad5e431525be3dca0232f825afd93ea3fa9.tar.gz |
zephyr: Add support for ISL9238 Rev C
This chip version cannot be detected at runtime. Add support for the
Kconfig option to signal that this revision is on the board, needed
for Asurada.
BUG=b:189855648
BRANCH=none
TEST=with other CLs, build asurada for Zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I3a86b94e4b4936dc6f6f071d6facd364555865a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941885
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/Kconfig.battery | 15 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 5 |
3 files changed, 22 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index a5a1a0097b..c851add6ef 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -170,6 +170,8 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CHARGER_ISL9237 "${PLATFORM_EC}/driver/charger/isl923x.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CHARGER_ISL9238 "${PLATFORM_EC}/driver/charger/isl923x.c") +zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CHARGER_ISL9238C + "${PLATFORM_EC}/driver/charger/isl923x.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CHARGER_ISL9241 "${PLATFORM_EC}/driver/charger/isl9241.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CHARGER_BQ25710 diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery index 5d1239b254..086e2041f3 100644 --- a/zephyr/Kconfig.battery +++ b/zephyr/Kconfig.battery @@ -137,6 +137,21 @@ config PLATFORM_EC_CHARGER_ISL9238 range of 3.2-23.4V and output of 2.4-18.3V. It provides an I2C interface for configuration. +config PLATFORM_EC_CHARGER_ISL9238C + bool "Use the ISL9238 Rev C charger" + depends on PLATFORM_EC_I2C + select PLATFORM_EC_CHARGER_NARROW_VDC + select PLATFORM_EC_CHARGER_OTG_SUPPORTED + help + Enable a driver for the ISL9238 Rev C VCD Battery Charger. This + is a digitally-configurable, buck-boost battery charger that + supporting Narrow Voltage Direct Charging (NVDC). It supports an input + voltage range of 3.2-23.4V and output of 2.4-18.3V. It provides an I2C + interface for configuration. + + This option is separate from PLATFORM_EC_CHARGER_ISL9238 since there + is no way in software to distinguish between rev. A/B and rev. C. + config PLATFORM_EC_CHARGER_ISL9241 bool "Use the ISL9241 charger" depends on PLATFORM_EC_I2C diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 0f58ef68f7..b76c04e01e 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -233,6 +233,11 @@ #define CONFIG_CHARGER_ISL9238 #endif +#undef CONFIG_CHARGER_ISL9238C +#ifdef CONFIG_PLATFORM_EC_CHARGER_ISL9238C +#define CONFIG_CHARGER_ISL9238C +#endif + #undef CONFIG_CHARGER_MAINTAIN_VBAT #ifdef CONFIG_PLATFORM_EC_CHARGER_MAINTAIN_VBAT #define CONFIG_CHARGER_MAINTAIN_VBAT |