1cae8dc3bSGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2fab92884SHeikki Krogerus 3a7c42106SHeikki Krogerusmenuconfig TYPEC 4a7c42106SHeikki Krogerus tristate "USB Type-C Support" 5a7c42106SHeikki Krogerus help 6a7c42106SHeikki Krogerus USB Type-C Specification defines a cable and connector for USB where 7a7c42106SHeikki Krogerus only one type of plug is supported on both ends, i.e. there will not 8a7c42106SHeikki Krogerus be Type-A plug on one end of the cable and Type-B plug on the other. 9a7c42106SHeikki Krogerus Determination of the host-to-device relationship happens through a 10a7c42106SHeikki Krogerus specific Configuration Channel (CC) which goes through the USB Type-C 11a7c42106SHeikki Krogerus cable. The Configuration Channel may also be used to detect optional 12a7c42106SHeikki Krogerus Accessory Modes - Analog Audio and Debug - and if USB Power Delivery 13a7c42106SHeikki Krogerus is supported, the Alternate Modes, where the connector is used for 14a7c42106SHeikki Krogerus something else then USB communication. 15fab92884SHeikki Krogerus 16a7c42106SHeikki Krogerus USB Power Delivery Specification defines a protocol that can be used 17a7c42106SHeikki Krogerus to negotiate the voltage and current levels with the connected 18a7c42106SHeikki Krogerus partners. USB Power Delivery allows higher voltages then the normal 19a7c42106SHeikki Krogerus 5V, up to 20V, and current up to 5A over the cable. The USB Power 20a7c42106SHeikki Krogerus Delivery protocol is also used to negotiate the optional Alternate 21a7c42106SHeikki Krogerus Modes when they are supported. USB Power Delivery does not depend on 22a7c42106SHeikki Krogerus USB Type-C connector, however it is mostly used together with USB 23a7c42106SHeikki Krogerus Type-C connectors. 24a7c42106SHeikki Krogerus 25a7c42106SHeikki Krogerus USB Type-C and USB Power Delivery Specifications define a set of state 26a7c42106SHeikki Krogerus machines that need to be implemented in either software or firmware. 27a7c42106SHeikki Krogerus Simple USB Type-C PHYs, for example USB Type-C Port Controller 28a7c42106SHeikki Krogerus Interface Specification compliant "Port Controllers" need the state 29a7c42106SHeikki Krogerus machines to be handled in the OS, but stand-alone USB Type-C and Power 30a7c42106SHeikki Krogerus Delivery controllers handle the state machines inside their firmware. 31a7c42106SHeikki Krogerus The USB Type-C and Power Delivery controllers usually function 32a7c42106SHeikki Krogerus autonomously, and do not necessarily require drivers. 33a7c42106SHeikki Krogerus 34a7c42106SHeikki Krogerus Enable this configurations option if you have USB Type-C connectors on 35a7c42106SHeikki Krogerus your system and 1) you know your USB Type-C hardware requires OS 36a7c42106SHeikki Krogerus control (a driver) to function, or 2) if you need to be able to read 37a7c42106SHeikki Krogerus the status of the USB Type-C ports in your system, or 3) if you need 38a7c42106SHeikki Krogerus to be able to swap the power role (decide are you supplying or 39a7c42106SHeikki Krogerus consuming power over the cable) or data role (host or device) when 40a7c42106SHeikki Krogerus both roles are supported. 41a7c42106SHeikki Krogerus 42a7c42106SHeikki Krogerus For more information, see the kernel documentation for USB Type-C 43a7c42106SHeikki Krogerus Connector Class API (Documentation/driver-api/usb/typec.rst) 44a7c42106SHeikki Krogerus <https://www.kernel.org/doc/html/latest/driver-api/usb/typec.html> 45a7c42106SHeikki Krogerus and ABI (Documentation/ABI/testing/sysfs-class-typec). 46a7c42106SHeikki Krogerus 47a7c42106SHeikki Krogerusif TYPEC 48fab92884SHeikki Krogerus 49ae8a2ca8SHeikki Krogerussource "drivers/usb/typec/tcpm/Kconfig" 503c4fb9f1SHeikki Krogerus 51c1b0bc2dSHeikki Krogerussource "drivers/usb/typec/ucsi/Kconfig" 52c1b0bc2dSHeikki Krogerus 532786d861SHeikki Krogerussource "drivers/usb/typec/tipd/Kconfig" 542786d861SHeikki Krogerus 551c48c759SBiju Dasconfig TYPEC_HD3SS3220 561c48c759SBiju Das tristate "TI HD3SS3220 Type-C DRP Port controller driver" 571c48c759SBiju Das depends on I2C 58da4b5d18SMao Wenan depends on USB_ROLE_SWITCH 591c48c759SBiju Das help 601c48c759SBiju Das Say Y or M here if your system has TI HD3SS3220 Type-C DRP Port 611c48c759SBiju Das controller driver. 621c48c759SBiju Das 631c48c759SBiju Das If you choose to build this driver as a dynamically linked module, the 641c48c759SBiju Das module will be called hd3ss3220.ko. 651c48c759SBiju Das 66da0cb631SAmelie Delaunayconfig TYPEC_STUSB160X 67da0cb631SAmelie Delaunay tristate "STMicroelectronics STUSB160x Type-C controller driver" 68da0cb631SAmelie Delaunay depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 69*8ef1e587SRandy Dunlap depends on I2C 70*8ef1e587SRandy Dunlap select REGMAP_I2C 71da0cb631SAmelie Delaunay help 72da0cb631SAmelie Delaunay Say Y or M here if your system has STMicroelectronics STUSB160x 73da0cb631SAmelie Delaunay Type-C port controller. 74da0cb631SAmelie Delaunay 75da0cb631SAmelie Delaunay If you choose to build this driver as a dynamically linked module, the 76da0cb631SAmelie Delaunay module will be called stusb160x.ko. 77da0cb631SAmelie Delaunay 786c8cf369SWesley Chengconfig TYPEC_QCOM_PMIC 796c8cf369SWesley Cheng tristate "Qualcomm PMIC USB Type-C driver" 806c8cf369SWesley Cheng depends on ARCH_QCOM || COMPILE_TEST 8124880a87SRandy Dunlap depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 826c8cf369SWesley Cheng help 836c8cf369SWesley Cheng Driver for supporting role switch over the Qualcomm PMIC. This will 846c8cf369SWesley Cheng handle the USB Type-C role and orientation detection reported by the 856c8cf369SWesley Cheng QCOM PMIC if the PMIC has the capability to handle USB Type-C 866c8cf369SWesley Cheng detection. 876c8cf369SWesley Cheng 886c8cf369SWesley Cheng It will also enable the VBUS output to connected devices when a 896c8cf369SWesley Cheng DFP connection is made. 906c8cf369SWesley Cheng 91da95cc1dSHans de Goedesource "drivers/usb/typec/mux/Kconfig" 92da95cc1dSHans de Goede 930e3bb7d6SHeikki Krogerussource "drivers/usb/typec/altmodes/Kconfig" 940e3bb7d6SHeikki Krogerus 95a7c42106SHeikki Krogerusendif # TYPEC 96