summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2022-02-07 18:06:28 -0800
committerCommit Bot <commit-bot@chromium.org>2022-02-16 20:34:14 +0000
commit592137c7aea065456306ba1540b46c345c31836c (patch)
tree934ce2c106131a095592a9ffc6235ee485c89443
parent0baff34852a056b1a18b2c347eda361927b85d8e (diff)
downloadchrome-ec-592137c7aea065456306ba1540b46c345c31836c.tar.gz
zephyr: Create Kconfig.pd_discharge
Split PD VBUS Discharge Kconfig options from Kconfig.usbc and place in a separate file named Kconfig.pd_discharge. BUG=b:194432779 TEST=Verified Kconfig options with menuconfig BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I52536f70d6a0d833a0d0980f361adf0cabd6c1f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3445459 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.pd_discharge42
-rw-r--r--zephyr/Kconfig.usbc34
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