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 55fe6d8a9cSXin Jiconfig TYPEC_ANX7411 56fe6d8a9cSXin Ji tristate "Analogix ANX7411 Type-C DRP Port controller driver" 57fe6d8a9cSXin Ji depends on I2C 58fe6d8a9cSXin Ji depends on USB_ROLE_SWITCH 59*09431acdSRen Zhijie depends on POWER_SUPPLY 60fe6d8a9cSXin Ji help 61fe6d8a9cSXin Ji Say Y or M here if your system has Analogix ANX7411 Type-C DRP Port 62fe6d8a9cSXin Ji controller driver. 63fe6d8a9cSXin Ji 64fe6d8a9cSXin Ji If you choose to build this driver as a dynamically linked module, the 65fe6d8a9cSXin Ji module will be called anx7411.ko. 66fe6d8a9cSXin Ji 6725d29b98SChiYuan Huangconfig TYPEC_RT1719 6825d29b98SChiYuan Huang tristate "Richtek RT1719 Sink Only Type-C controller driver" 6925d29b98SChiYuan Huang depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 7025d29b98SChiYuan Huang depends on I2C 719e3d68f8SRen Zhijie depends on POWER_SUPPLY 7225d29b98SChiYuan Huang select REGMAP_I2C 7325d29b98SChiYuan Huang help 7425d29b98SChiYuan Huang Say Y or M here if your system has Richtek RT1719 sink only 7525d29b98SChiYuan Huang Type-C port controller driver. 7625d29b98SChiYuan Huang 7725d29b98SChiYuan Huang If you choose to build this driver as a dynamically linked module, the 7825d29b98SChiYuan Huang module will be called rt1719.ko 7925d29b98SChiYuan Huang 801c48c759SBiju Dasconfig TYPEC_HD3SS3220 811c48c759SBiju Das tristate "TI HD3SS3220 Type-C DRP Port controller driver" 821c48c759SBiju Das depends on I2C 83da4b5d18SMao Wenan depends on USB_ROLE_SWITCH 841c48c759SBiju Das help 851c48c759SBiju Das Say Y or M here if your system has TI HD3SS3220 Type-C DRP Port 861c48c759SBiju Das controller driver. 871c48c759SBiju Das 881c48c759SBiju Das If you choose to build this driver as a dynamically linked module, the 891c48c759SBiju Das module will be called hd3ss3220.ko. 901c48c759SBiju Das 91da0cb631SAmelie Delaunayconfig TYPEC_STUSB160X 92da0cb631SAmelie Delaunay tristate "STMicroelectronics STUSB160x Type-C controller driver" 93da0cb631SAmelie Delaunay depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 948ef1e587SRandy Dunlap depends on I2C 958ef1e587SRandy Dunlap select REGMAP_I2C 96da0cb631SAmelie Delaunay help 97da0cb631SAmelie Delaunay Say Y or M here if your system has STMicroelectronics STUSB160x 98da0cb631SAmelie Delaunay Type-C port controller. 99da0cb631SAmelie Delaunay 100da0cb631SAmelie Delaunay If you choose to build this driver as a dynamically linked module, the 101da0cb631SAmelie Delaunay module will be called stusb160x.ko. 102da0cb631SAmelie Delaunay 103d016cbe4SSamuel Hollandconfig TYPEC_WUSB3801 104d016cbe4SSamuel Holland tristate "Willsemi WUSB3801 Type-C port controller driver" 105d016cbe4SSamuel Holland depends on I2C 106d016cbe4SSamuel Holland select REGMAP_I2C 107d016cbe4SSamuel Holland help 108d016cbe4SSamuel Holland Say Y or M here if your system has a WUSB3801 Type-C port controller. 109d016cbe4SSamuel Holland 110d016cbe4SSamuel Holland If you choose to build this driver as a dynamically linked module, the 111d016cbe4SSamuel Holland module will be called wusb3801.ko. 112d016cbe4SSamuel Holland 113da95cc1dSHans de Goedesource "drivers/usb/typec/mux/Kconfig" 114da95cc1dSHans de Goede 1150e3bb7d6SHeikki Krogerussource "drivers/usb/typec/altmodes/Kconfig" 1160e3bb7d6SHeikki Krogerus 117a7c42106SHeikki Krogerusendif # TYPEC 118