summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2022-02-07 18:39:24 -0800
committerCommit Bot <commit-bot@chromium.org>2022-02-17 07:24:35 +0000
commitffbb7331a0ad02d70860ea439ce886c671a9d16a (patch)
treed39f48a47190e60355867117b2501a098e959dd3
parent0d543b1d2ddec9d8622099586b31a2a1d7ac3b43 (diff)
downloadchrome-ec-ffbb7331a0ad02d70860ea439ce886c671a9d16a.tar.gz
zephyr: Create Kconfig.pd_console_cmd
Split PD Console CMD Kconfig options from Kconfig.usbc and place in a separate file named Kconfig.pd_console_cmd. BUG=b:194432779 TEST=Verified Kconfig options with menuconfig BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: If9bea6a2bc623a6d00e26be30962d518ae93e990 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3445496 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.pd_console_cmd59
-rw-r--r--zephyr/Kconfig.usbc51
2 files changed, 60 insertions, 50 deletions
diff --git a/zephyr/Kconfig.pd_console_cmd b/zephyr/Kconfig.pd_console_cmd
new file mode 100644
index 0000000000..bc654f3274
--- /dev/null
+++ b/zephyr/Kconfig.pd_console_cmd
@@ -0,0 +1,59 @@
+# 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
+
+menuconfig PLATFORM_EC_USB_PD_CONSOLE_CMD
+ bool "Enable USB PD console commands"
+ default y if PLATFORM_EC_USB_PD_ALT_MODE_DFP
+ help
+ Enables various USB-C PD related console commands.
+
+if PLATFORM_EC_USB_PD_CONSOLE_CMD
+
+config PLATFORM_EC_CONSOLE_CMD_USB_PD_PE
+ bool "Console command: pe"
+ default y
+ help
+ This command dumps information about the USB PD alternate mode options
+ discovered from the partner device. It can be useful for debugging.
+
+ Example: pe 1 dump
+ IDENT SOP:
+
+ [ID Header] 2c000bda :: AMA, VID:0bda
+ [Cert Stat] 00000000
+ [2] 00000209 [3] 11000f09
+ IDENT SOP':
+ [ID Header] 1c000489 :: PCable, VID:0489
+ [Cert Stat] 000001c6
+ [2] f6810000 [3] 11082051
+ SVID[0]: ff01 MODES: [1] 000c0045
+ MODE[1]: svid:ff01 caps:000c0045
+
+config PLATFORM_EC_CONSOLE_CMD_USB_PD_CABLE
+ bool "Console command: pdcable"
+ default y
+ help
+ This commands shows the USB cable charactistics as detected from the
+ device. It can be useful for debugging problems with cables and the
+ device's response to them.
+
+ Example: pdcable 1
+ Cable Type: Passive
+ Cable Rev: 1.0
+ Connector Type: 2
+ Cable Current: 5A
+ USB Superspeed Signaling support: 1
+ Rounded support: No
+ Optical cable: No
+ Retimer support: No
+ Link training: Bi-directional
+ Thunderbolt cable type: Passive
+
+endif # PLATFORM_EC_USB_PD_CONSOLE_CMD
+
+endif # PLATFORM_EC_USB_POWER_DELIVERY
+endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 5bd9c8a3ef..02b859fb1a 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -20,6 +20,7 @@ rsource "Kconfig.pd_meas_vbus"
rsource "Kconfig.pd_frs"
rsource "Kconfig.pd_discharge"
rsource "Kconfig.pd_vbus_detection"
+rsource "Kconfig.pd_console_cmd"
if PLATFORM_EC_USBC
@@ -370,56 +371,6 @@ config PLATFORM_EC_USB_PD_LOGGING
The log events are stored in a circular buffer, each one being a
struct event_log_entry.
-menuconfig PLATFORM_EC_USB_PD_CONSOLE_CMD
- bool "Enable USB PD console commands"
- default y if PLATFORM_EC_USB_PD_ALT_MODE_DFP
- help
- Enables various USB-C PD related console commands.
-
-if PLATFORM_EC_USB_PD_CONSOLE_CMD
-
-config PLATFORM_EC_CONSOLE_CMD_USB_PD_PE
- bool "Console command: pe"
- default y
- help
- This command dumps information about the USB PD alternate mode options
- discovered from the partner device. It can be useful for debugging.
-
- Example: pe 1 dump
- IDENT SOP:
-
- [ID Header] 2c000bda :: AMA, VID:0bda
- [Cert Stat] 00000000
- [2] 00000209 [3] 11000f09
- IDENT SOP':
- [ID Header] 1c000489 :: PCable, VID:0489
- [Cert Stat] 000001c6
- [2] f6810000 [3] 11082051
- SVID[0]: ff01 MODES: [1] 000c0045
- MODE[1]: svid:ff01 caps:000c0045
-
-config PLATFORM_EC_CONSOLE_CMD_USB_PD_CABLE
- bool "Console command: pdcable"
- default y
- help
- This commands shows the USB cable charactistics as detected from the
- device. It can be useful for debugging problems with cables and the
- device's response to them.
-
- Example: pdcable 1
- Cable Type: Passive
- Cable Rev: 1.0
- Connector Type: 2
- Cable Current: 5A
- USB Superspeed Signaling support: 1
- Rounded support: No
- Optical cable: No
- Retimer support: No
- Link training: Bi-directional
- Thunderbolt cable type: Passive
-
-endif # PLATFORM_EC_USB_PD_CONSOLE_CMD
-
choice "USB-C device type"
prompt "Select the USB-C device type"
default PLATFORM_EC_USB_DRP_ACC_TRYSRC