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_STACK_INIT_PRIORITY 18 int "USB-C stack init priority" 19 default 90 20 help 21 Initialization priority of the USB-C connector driver in POST_KERNEL. 22 This driver must be initialized after devices referenced by USB-C connectors 23 like VBUS and TCPC. 24 25config USBC_THREAD_PRIORITY 26 int "USB-C thread priority" 27 default 0 28 help 29 Set thread priority of the USB-C 30 31config USBC_STACK_SIZE 32 int "USB-C thread stack size" 33 default 1024 34 help 35 Stack size of thread created for each instance. 36 37config USBC_STATE_MACHINE_CYCLE_TIME 38 int "USB-C state machine cycle time in milliseconds" 39 default 5 40 help 41 The USB-C state machine is run in a loop and the cycle time is the 42 delay before running the loop again. 43 44config BUILD_OUTPUT_VIF 45 bool "Generate VIF policies of USB-C in XML format" 46 depends on DT_HAS_USB_C_CONNECTOR_ENABLED 47 help 48 Generate XML file containing VIF policies during project build. 49 50config GENVIF_INPUT_VIF_XML_PATH 51 string "Path to input VIF file" 52 depends on BUILD_OUTPUT_VIF 53 help 54 Absolute path or relative path (w.r.to the application source 55 directory) of the GenVIF input VIF XML file. 56 57choice USBC_CSM_TYPE 58 prompt "USB-C Connection State Machine" 59 default USBC_CSM_SINK_ONLY 60 61config USBC_CSM_SINK_ONLY 62 bool "Sink USB-C Connection State Machine" 63 help 64 Allows the USB-C state machine to function as a Sink 65 66config USBC_CSM_SOURCE_ONLY 67 bool "Source USBC Connection State Machine" 68 help 69 Allow the USB-C state machine to function as a Source 70 71endchoice 72 73module = USBC_STACK 74module-str = usbc stack 75source "subsys/logging/Kconfig.template.log_config" 76 77endif # USBC_STACK 78