summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.battery
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-06-04 15:50:57 -0600
committerCommit Bot <commit-bot@chromium.org>2021-06-11 21:27:30 +0000
commite50f96dcd4bae8e7b4c762cac21dca4dca3ee776 (patch)
tree3073287d63ac2087df42e561e6c23072b36a5d41 /zephyr/Kconfig.battery
parentc79e6b037289d59d05dc9fc9586a20a5f7e1c200 (diff)
downloadchrome-ec-e50f96dcd4bae8e7b4c762cac21dca4dca3ee776.tar.gz
zephyr: Add support for OTG power
Add Kconfigs for this feature so it can be enabled on Zephyr. The driver determines the availability of this feature but it must be specifically enabled by the board. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iaeae49039b8a76c2dd42804127644920480697a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941818 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.battery')
-rw-r--r--zephyr/Kconfig.battery24
1 files changed, 22 insertions, 2 deletions
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery
index 1b3f6a3dfd..a7ed96a7a0 100644
--- a/zephyr/Kconfig.battery
+++ b/zephyr/Kconfig.battery
@@ -116,11 +116,12 @@ config PLATFORM_EC_CHARGER_ISL9237
bool "Use the ISL9237 charger"
depends on PLATFORM_EC_I2C
select PLATFORM_EC_CHARGER_NARROW_VDC
+ select PLATFORM_EC_CHARGER_OTG_SUPPORTED
help
Enables a driver for the ISL9237 VCD Battery Charger. This is a
digitally-configurable, buck-boost battery charger that supporting
Narrow Voltage Direct Charging (NVDC). It supports an input voltage
- ange of 3.2-23.4V and output of 2.4-13.8V. It provides an I2C
+ range of 3.2-23.4V and output of 2.4-13.8V. It provides an I2C
interface for configuration an provides a USB On-The-Go (OTG)
function for 2- and 3-cell battery applications.
@@ -128,11 +129,12 @@ config PLATFORM_EC_CHARGER_ISL9238
bool "Use the ISL9238 charger"
depends on PLATFORM_EC_I2C
select PLATFORM_EC_CHARGER_NARROW_VDC
+ select PLATFORM_EC_CHARGER_OTG_SUPPORTED
help
Enables a driver for the ISL9238 VCD Battery Charger. This is a
digitally-configurable, buck-boost battery charger that supporting
Narrow Voltage Direct Charging (NVDC). It supports an input voltage
- ange of 3.2-23.4V and output of 2.4-18.3V. It provides an I2C
+ range of 3.2-23.4V and output of 2.4-18.3V. It provides an I2C
interface for configuration.
config PLATFORM_EC_CHARGER_ISL9241
@@ -249,6 +251,24 @@ 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_OTG_SUPPORTED
+ bool
+ help
+ Indicates that the charger supports an OTG (On-The-Go) function,
+ which allows supplying output power from the battery to a connected
+ device.
+
+ This should be enabled by charger drivers which support it. It cannot
+ be set otherwise, even in prj.conf
+
+config PLATFORM_EC_CHARGER_OTG
+ bool "Allow supplying output power from the battery"
+ depends on PLATFORM_EC_CHARGER_OTG_SUPPORTED
+ help
+ Enable charger's OTG functions, i.e. make it possible to supply
+ output power from the battery. This option is available if the
+ selected charger supports it.
+
config PLATFORM_EC_CHARGER_PROFILE_OVERRIDE
bool "Override the charger profile"
help