xref: /openbmc/linux/drivers/usb/typec/Kconfig (revision 1c48c759)
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
531c48c759SBiju Dasconfig TYPEC_HD3SS3220
541c48c759SBiju Das	tristate "TI HD3SS3220 Type-C DRP Port controller driver"
551c48c759SBiju Das	depends on I2C
561c48c759SBiju Das	help
571c48c759SBiju Das	  Say Y or M here if your system has TI HD3SS3220 Type-C DRP Port
581c48c759SBiju Das	  controller driver.
591c48c759SBiju Das
601c48c759SBiju Das	  If you choose to build this driver as a dynamically linked module, the
611c48c759SBiju Das	  module will be called hd3ss3220.ko.
621c48c759SBiju Das
630a4c005bSHeikki Krogerusconfig TYPEC_TPS6598X
640a4c005bSHeikki Krogerus	tristate "TI TPS6598x USB Power Delivery controller driver"
650a4c005bSHeikki Krogerus	depends on I2C
6635af2445SYueHaibing	select REGMAP_I2C
670a4c005bSHeikki Krogerus	help
680a4c005bSHeikki Krogerus	  Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power
690a4c005bSHeikki Krogerus	  Delivery controller.
700a4c005bSHeikki Krogerus
710a4c005bSHeikki Krogerus	  If you choose to build this driver as a dynamically linked module, the
720a4c005bSHeikki Krogerus	  module will be called tps6598x.ko.
730a4c005bSHeikki Krogerus
74da95cc1dSHans de Goedesource "drivers/usb/typec/mux/Kconfig"
75da95cc1dSHans de Goede
760e3bb7d6SHeikki Krogerussource "drivers/usb/typec/altmodes/Kconfig"
770e3bb7d6SHeikki Krogerus
78a7c42106SHeikki Krogerusendif # TYPEC
79