diff options
-rw-r--r-- | zephyr/Kconfig.pd_discharge | 42 | ||||
-rw-r--r-- | zephyr/Kconfig.usbc | 34 |
2 files changed, 43 insertions, 33 deletions
diff --git a/zephyr/Kconfig.pd_discharge b/zephyr/Kconfig.pd_discharge new file mode 100644 index 0000000000..f6b48404e3 --- /dev/null +++ b/zephyr/Kconfig.pd_discharge @@ -0,0 +1,42 @@ +# 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 + +config PLATFORM_EC_USB_PD_DISCHARGE + bool "Board can discharge VBUS" + default y + help + Enable this if the board can enable VBUS discharge (eg. through a + GPIO-controlled discharge circuit, or through port controller + registers) to discharge VBUS rapidly on disconnect + +choice "Discharge method" + prompt "Select the discharge method" + depends on PLATFORM_EC_USB_PD_DISCHARGE + +config PLATFORM_EC_USB_PD_DISCHARGE_GPIO + bool "GPIO control" + help + Enable this if the discharge circuit is controlled by a GPIO + + TODO: How to specify the GPIO? + +config PLATFORM_EC_USB_PD_DISCHARGE_TCPC + bool "Discharge circuit is provided by the TCPC" + help + Enable this if the discharge circuit is provided by Power-Delivery + resistors on the USB Type-C Port Controller (TCPC). + +config PLATFORM_EC_USB_PD_DISCHARGE_PPC + bool "Discharge circuit is provided by the PPC" + help + Enable this if the discharge circuit is using Power Delivery + resistors on the Power Path Controller. + +endchoice # Discharge method + +endif # PLATFORM_EC_USB_POWER_DELIVERY +endif # PLATFORM_EC_USBC diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 1553ee528c..b3b101cd8d 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -18,6 +18,7 @@ rsource "Kconfig.retimer" rsource "Kconfig.pd_int_shared" rsource "Kconfig.pd_meas_vbus" rsource "Kconfig.pd_frs" +rsource "Kconfig.pd_discharge" if PLATFORM_EC_USBC @@ -226,39 +227,6 @@ config PLATFORM_EC_USB_PD_DUAL_ROLE_AUTO_TOGGLE disabled, the USB power delivery task is responsible for manually toggling the power role. -config PLATFORM_EC_USB_PD_DISCHARGE - bool "Board can discharge VBUS" - default y - help - Enable this if the board can enable VBUS discharge (eg. through a - GPIO-controlled discharge circuit, or through port controller - registers) to discharge VBUS rapidly on disconnect - -choice "Discharge method" - prompt "Select the discharge method" - depends on PLATFORM_EC_USB_PD_DISCHARGE - -config PLATFORM_EC_USB_PD_DISCHARGE_GPIO - bool "GPIO control" - help - Enable this if the discharge circuit is controlled by a GPIO - - TODO: How to specify the GPIO? - -config PLATFORM_EC_USB_PD_DISCHARGE_TCPC - bool "Discharge circuit is provided by the TCPC" - help - Enable this if the discharge circuit is provided by Power-Delivery - resistors on the USB Type-C Port Controller (TCPC). - -config PLATFORM_EC_USB_PD_DISCHARGE_PPC - bool "Discharge circuit is provided by the PPC" - help - Enable this if the discharge circuit is using Power Delivery - resistors on the Power Path Controller. - -endchoice # Discharge method - config PLATFORM_EC_USB_PD_REV30 bool "USB PD Rev3.0 functionality" default y |