diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-14 14:09:05 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-16 03:18:21 +0000 |
commit | c119910eee4efaaaa395a76cbf0ef653d16bd760 (patch) | |
tree | 1b89c3fd983e42201b5639b56d5e4ca415d42232 /zephyr/Kconfig.usbc | |
parent | 9cdaa650c42fb57ea7012614f9ac936ed3de73f7 (diff) | |
download | chrome-ec-c119910eee4efaaaa395a76cbf0ef653d16bd760.tar.gz |
zephyr: Allow enabling USB-A charging
Add options to enable (slow) charging through any USB-A ports present
on the device. This can be useful if the USB-C ports are in use, or
when a USB-C cable is not available.
BUG=b:175434113
BRANCH=none
TEST=make BOARD=volteer -j30
With a zephyr-chrome CL, build volteer on zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Idc17c98c305201c63dddb6c6c0abef0f640c5f59
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631094
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.usbc')
-rw-r--r-- | zephyr/Kconfig.usbc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 3c3e6d206c..fae6b0f92b 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -2,6 +2,27 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# TODO(sjg): Not USB-C: perhaps we should have a 'power' thing at the top level? +config PLATFORM_EC_USB_A_PORT_COUNT + int "Number of USB-A ports" + default 0 + help + This sets the number of USB-A ports on the device. These ports do + not support USB Power Delivery features but can be used to power + external devices (according to the USB 3 spec, not the Battery Charger + standard) and to charge devices slowly if power is enabled to them. + +config PLATFORM_EC_USB_PORT_POWER_DUMB + bool "Simple control of power to USB-A ports" + depends on PLATFORM_EC_USB_A_PORT_COUNT > 0 + default y + help + Enable this to provide simple control of the power to USB ports + using GPIOs. To use this your board code must provide a + usb_port_enable[] array with the GPIOs to use for each port. This + implements the EC_CMD_USB_CHARGE_SET_MODE host command and provides + a 'usbchargemode' console command. + menuconfig PLATFORM_EC_USBC bool "USB Type-C" default y if PLATFORM_EC_BATTERY |