1# USB-C stack configuration options
2
3# Copyright (c) 2022 The Chromium OS Authors
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig USBC_STACK
7	bool "USB-C Stack Support"
8	select SMF
9	select SMF_ANCESTOR_SUPPORT
10	select USBC_TCPC_DRIVER
11	select USBC_VBUS_DRIVER
12	help
13	  Enable the USB-C Stack. Note that each USB-C port gets its own thread.
14
15if USBC_STACK
16
17config USBC_THREAD_PRIORITY
18	int "USB-C thread priority"
19	default 0
20	help
21	  Set thread priority of the USB-C
22
23config USBC_STACK_SIZE
24	int "USB-C thread stack size"
25	default 1024
26	help
27	  Stack size of thread created for each instance.
28
29config USBC_STATE_MACHINE_CYCLE_TIME
30	int "USB-C state machine cycle time in milliseconds"
31	default 5
32	help
33	  The USB-C state machine is run in a loop and the cycle time is the
34	  delay before running the loop again.
35
36config BUILD_OUTPUT_VIF
37	bool "Generate VIF policies of USB-C in XML format"
38	depends on DT_HAS_USB_C_CONNECTOR_ENABLED
39	help
40	  Generate XML file containing VIF policies during project build.
41
42config GENVIF_INPUT_VIF_XML_PATH
43	string "Path to input VIF file"
44	depends on BUILD_OUTPUT_VIF
45	help
46	  Absolute path or relative path (w.r.to the application source
47	  directory) of the GenVIF input VIF XML file.
48
49choice USBC_CSM_TYPE
50	prompt "USB-C Connection State Machine"
51	default USBC_CSM_SINK_ONLY
52
53config USBC_CSM_SINK_ONLY
54	bool "Sink USB-C Connection State Machine"
55	help
56	  Allows the USB-C state machine to function as a Sink
57
58config USBC_CSM_SOURCE_ONLY
59	bool "Source USBC Connection State Machine"
60	help
61	  Allow the USB-C state machine to function as a Source
62
63endchoice
64
65module = USBC_STACK
66module-str = usbc stack
67source "subsys/logging/Kconfig.template.log_config"
68
69endif # USBC_STACK
70