diff options
author | Sam Hurst <shurst@google.com> | 2022-02-07 18:52:51 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-17 19:55:19 +0000 |
commit | 9defbf51a7f53972ba812f91f55d3101e3d75fcd (patch) | |
tree | 38fb3a6974461b20109dbe5437489afa879958de | |
parent | 926a15d2fec5f07169965d5dda3ba5180b68325f (diff) | |
download | chrome-ec-9defbf51a7f53972ba812f91f55d3101e3d75fcd.tar.gz |
zephyr: Create Kconfig.pd_usbc_device_type
Split PD USBC Device Type Kconfig options from Kconfig.usbc
and place in a separate file named Kconfig.pd_usbc_device_type.
BUG=b:194432779
TEST=Verified Kconfig options with menuconfig
BRANCH=main
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: Ife74d796ee6a8b838495f2eee645a49609ee59aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3445497
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/Kconfig.pd_usbc_device_type | 39 | ||||
-rw-r--r-- | zephyr/Kconfig.usbc | 31 |
2 files changed, 40 insertions, 30 deletions
diff --git a/zephyr/Kconfig.pd_usbc_device_type b/zephyr/Kconfig.pd_usbc_device_type new file mode 100644 index 0000000000..1daa9fcb92 --- /dev/null +++ b/zephyr/Kconfig.pd_usbc_device_type @@ -0,0 +1,39 @@ +# Copyright 2022 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if PLATFORM_EC_USBC +if PLATFORM_EC_USB_POWER_DELIVERY + +choice "USB-C device type" + prompt "Select the USB-C device type" + default PLATFORM_EC_USB_DRP_ACC_TRYSRC + +config PLATFORM_EC_USB_VPD + bool "VCONN-Powered Device" + help + This enables support for supplying power to devices that accept power + over the USB VCONN line. + + See here for details: + + https://www.usb.org/sites/default/files/D1T2-3a%20-%20CTVPDs%20and%20Making%20Your%20Own%20USB-C%20Thingamajig.pdf + +config PLATFORM_EC_USB_CTVPD + bool "Charge-Through VCONN-Powered Device" + help + This enables support for supplying power to devices, with a circuit + that deals with this without needing the involvement of the main + device. + +config PLATFORM_EC_USB_DRP_ACC_TRYSRC + bool "Dual-Role Port, Audio Accessory, and Try.SRC Device" + help + This is the most flexible option, allowing the port to operate in + a dual-role capacity, so that power can be accepted or supplied on + a port. + +endchoice # USB-C device type + +endif # PLATFORM_EC_USB_POWER_DELIVERY +endif # PLATFORM_EC_USBC diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 02b859fb1a..250aaa0dc8 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -21,6 +21,7 @@ rsource "Kconfig.pd_frs" rsource "Kconfig.pd_discharge" rsource "Kconfig.pd_vbus_detection" rsource "Kconfig.pd_console_cmd" +rsource "Kconfig.pd_usbc_device_type" if PLATFORM_EC_USBC @@ -371,36 +372,6 @@ config PLATFORM_EC_USB_PD_LOGGING The log events are stored in a circular buffer, each one being a struct event_log_entry. -choice "USB-C device type" - prompt "Select the USB-C device type" - default PLATFORM_EC_USB_DRP_ACC_TRYSRC - -config PLATFORM_EC_USB_VPD - bool "VCONN-Powered Device" - help - This enables support for supplying power to devices that accept power - over the USB VCONN line. - - See here for details: - - https://www.usb.org/sites/default/files/D1T2-3a%20-%20CTVPDs%20and%20Making%20Your%20Own%20USB-C%20Thingamajig.pdf - -config PLATFORM_EC_USB_CTVPD - bool "Charge-Through VCONN-Powered Device" - help - This enables support for supplying power to devices, with a circuit - that deals with this without needing the involvement of the main - device. - -config PLATFORM_EC_USB_DRP_ACC_TRYSRC - bool "Dual-Role Port, Audio Accessory, and Try.SRC Device" - help - This is the most flexible option, allowing the port to operate in - a dual-role capacity, so that power can be accepted or supplied on - a port. - -endchoice # USB-C device type - config PLATFORM_EC_USB_PD_TRY_SRC bool "Enable Try.SRC mode" depends on PLATFORM_EC_USB_DRP_ACC_TRYSRC |