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 5525d29b98SChiYuan Huangconfig TYPEC_RT1719 5625d29b98SChiYuan Huang tristate "Richtek RT1719 Sink Only Type-C controller driver" 5725d29b98SChiYuan Huang depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 5825d29b98SChiYuan Huang depends on I2C 59*9e3d68f8SRen Zhijie depends on POWER_SUPPLY 6025d29b98SChiYuan Huang select REGMAP_I2C 6125d29b98SChiYuan Huang help 6225d29b98SChiYuan Huang Say Y or M here if your system has Richtek RT1719 sink only 6325d29b98SChiYuan Huang Type-C port controller driver. 6425d29b98SChiYuan Huang 6525d29b98SChiYuan Huang If you choose to build this driver as a dynamically linked module, the 6625d29b98SChiYuan Huang module will be called rt1719.ko 6725d29b98SChiYuan Huang 681c48c759SBiju Dasconfig TYPEC_HD3SS3220 691c48c759SBiju Das tristate "TI HD3SS3220 Type-C DRP Port controller driver" 701c48c759SBiju Das depends on I2C 71da4b5d18SMao Wenan depends on USB_ROLE_SWITCH 721c48c759SBiju Das help 731c48c759SBiju Das Say Y or M here if your system has TI HD3SS3220 Type-C DRP Port 741c48c759SBiju Das controller driver. 751c48c759SBiju Das 761c48c759SBiju Das If you choose to build this driver as a dynamically linked module, the 771c48c759SBiju Das module will be called hd3ss3220.ko. 781c48c759SBiju Das 79da0cb631SAmelie Delaunayconfig TYPEC_STUSB160X 80da0cb631SAmelie Delaunay tristate "STMicroelectronics STUSB160x Type-C controller driver" 81da0cb631SAmelie Delaunay depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 828ef1e587SRandy Dunlap depends on I2C 838ef1e587SRandy Dunlap select REGMAP_I2C 84da0cb631SAmelie Delaunay help 85da0cb631SAmelie Delaunay Say Y or M here if your system has STMicroelectronics STUSB160x 86da0cb631SAmelie Delaunay Type-C port controller. 87da0cb631SAmelie Delaunay 88da0cb631SAmelie Delaunay If you choose to build this driver as a dynamically linked module, the 89da0cb631SAmelie Delaunay module will be called stusb160x.ko. 90da0cb631SAmelie Delaunay 916c8cf369SWesley Chengconfig TYPEC_QCOM_PMIC 926c8cf369SWesley Cheng tristate "Qualcomm PMIC USB Type-C driver" 936c8cf369SWesley Cheng depends on ARCH_QCOM || COMPILE_TEST 9424880a87SRandy Dunlap depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 956c8cf369SWesley Cheng help 966c8cf369SWesley Cheng Driver for supporting role switch over the Qualcomm PMIC. This will 976c8cf369SWesley Cheng handle the USB Type-C role and orientation detection reported by the 986c8cf369SWesley Cheng QCOM PMIC if the PMIC has the capability to handle USB Type-C 996c8cf369SWesley Cheng detection. 1006c8cf369SWesley Cheng 1016c8cf369SWesley Cheng It will also enable the VBUS output to connected devices when a 1026c8cf369SWesley Cheng DFP connection is made. 1036c8cf369SWesley Cheng 104d016cbe4SSamuel Hollandconfig TYPEC_WUSB3801 105d016cbe4SSamuel Holland tristate "Willsemi WUSB3801 Type-C port controller driver" 106d016cbe4SSamuel Holland depends on I2C 107d016cbe4SSamuel Holland select REGMAP_I2C 108d016cbe4SSamuel Holland help 109d016cbe4SSamuel Holland Say Y or M here if your system has a WUSB3801 Type-C port controller. 110d016cbe4SSamuel Holland 111d016cbe4SSamuel Holland If you choose to build this driver as a dynamically linked module, the 112d016cbe4SSamuel Holland module will be called wusb3801.ko. 113d016cbe4SSamuel Holland 114da95cc1dSHans de Goedesource "drivers/usb/typec/mux/Kconfig" 115da95cc1dSHans de Goede 1160e3bb7d6SHeikki Krogerussource "drivers/usb/typec/altmodes/Kconfig" 1170e3bb7d6SHeikki Krogerus 118a7c42106SHeikki Krogerusendif # TYPEC 119