xref: /openbmc/linux/drivers/usb/typec/Kconfig (revision 25d29b98)
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
55*25d29b98SChiYuan Huangconfig TYPEC_RT1719
56*25d29b98SChiYuan Huang	tristate "Richtek RT1719 Sink Only Type-C controller driver"
57*25d29b98SChiYuan Huang	depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
58*25d29b98SChiYuan Huang	depends on I2C
59*25d29b98SChiYuan Huang	select REGMAP_I2C
60*25d29b98SChiYuan Huang	help
61*25d29b98SChiYuan Huang	  Say Y or M here if your system has Richtek RT1719 sink only
62*25d29b98SChiYuan Huang	  Type-C port controller driver.
63*25d29b98SChiYuan Huang
64*25d29b98SChiYuan Huang	  If you choose to build this driver as a dynamically linked module, the
65*25d29b98SChiYuan Huang	  module will be called rt1719.ko
66*25d29b98SChiYuan Huang
671c48c759SBiju Dasconfig TYPEC_HD3SS3220
681c48c759SBiju Das	tristate "TI HD3SS3220 Type-C DRP Port controller driver"
691c48c759SBiju Das	depends on I2C
70da4b5d18SMao Wenan	depends on USB_ROLE_SWITCH
711c48c759SBiju Das	help
721c48c759SBiju Das	  Say Y or M here if your system has TI HD3SS3220 Type-C DRP Port
731c48c759SBiju Das	  controller driver.
741c48c759SBiju Das
751c48c759SBiju Das	  If you choose to build this driver as a dynamically linked module, the
761c48c759SBiju Das	  module will be called hd3ss3220.ko.
771c48c759SBiju Das
78da0cb631SAmelie Delaunayconfig TYPEC_STUSB160X
79da0cb631SAmelie Delaunay	tristate "STMicroelectronics STUSB160x Type-C controller driver"
80da0cb631SAmelie Delaunay	depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
818ef1e587SRandy Dunlap	depends on I2C
828ef1e587SRandy Dunlap	select REGMAP_I2C
83da0cb631SAmelie Delaunay	help
84da0cb631SAmelie Delaunay	  Say Y or M here if your system has STMicroelectronics STUSB160x
85da0cb631SAmelie Delaunay	  Type-C port controller.
86da0cb631SAmelie Delaunay
87da0cb631SAmelie Delaunay	  If you choose to build this driver as a dynamically linked module, the
88da0cb631SAmelie Delaunay	  module will be called stusb160x.ko.
89da0cb631SAmelie Delaunay
906c8cf369SWesley Chengconfig TYPEC_QCOM_PMIC
916c8cf369SWesley Cheng	tristate "Qualcomm PMIC USB Type-C driver"
926c8cf369SWesley Cheng	depends on ARCH_QCOM || COMPILE_TEST
9324880a87SRandy Dunlap	depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
946c8cf369SWesley Cheng	help
956c8cf369SWesley Cheng	  Driver for supporting role switch over the Qualcomm PMIC.  This will
966c8cf369SWesley Cheng	  handle the USB Type-C role and orientation detection reported by the
976c8cf369SWesley Cheng	  QCOM PMIC if the PMIC has the capability to handle USB Type-C
986c8cf369SWesley Cheng	  detection.
996c8cf369SWesley Cheng
1006c8cf369SWesley Cheng	  It will also enable the VBUS output to connected devices when a
1016c8cf369SWesley Cheng	  DFP connection is made.
1026c8cf369SWesley Cheng
103da95cc1dSHans de Goedesource "drivers/usb/typec/mux/Kconfig"
104da95cc1dSHans de Goede
1050e3bb7d6SHeikki Krogerussource "drivers/usb/typec/altmodes/Kconfig"
1060e3bb7d6SHeikki Krogerus
107a7c42106SHeikki Krogerusendif # TYPEC
108