xref: /openbmc/linux/drivers/usb/gadget/legacy/Kconfig (revision 7a35a5ca)
1cae8dc3bSGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
28443f2d2SAndrzej Pietrasiewicz#
38443f2d2SAndrzej Pietrasiewicz# USB Gadget support on a system involves
48443f2d2SAndrzej Pietrasiewicz#    (a) a peripheral controller, and
58443f2d2SAndrzej Pietrasiewicz#    (b) the gadget driver using it.
68443f2d2SAndrzej Pietrasiewicz#
78443f2d2SAndrzej Pietrasiewicz# NOTE:  Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
88443f2d2SAndrzej Pietrasiewicz#
98443f2d2SAndrzej Pietrasiewicz#  - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
108443f2d2SAndrzej Pietrasiewicz#  - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
118443f2d2SAndrzej Pietrasiewicz#  - Some systems have both kinds of controllers.
128443f2d2SAndrzej Pietrasiewicz#
138443f2d2SAndrzej Pietrasiewicz# With help from a special transceiver and a "Mini-AB" jack, systems with
148443f2d2SAndrzej Pietrasiewicz# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
158443f2d2SAndrzej Pietrasiewicz#
16df8df5e4SMasahiro Yamada# A Linux "Gadget Driver" talks to the USB Peripheral Controller
17df8df5e4SMasahiro Yamada# driver through the abstract "gadget" API.  Some other operating
18df8df5e4SMasahiro Yamada# systems call these "client" drivers, of which "class drivers"
19df8df5e4SMasahiro Yamada# are a subset (implementing a USB device class specification).
20df8df5e4SMasahiro Yamada# A gadget driver implements one or more USB functions using
21df8df5e4SMasahiro Yamada# the peripheral hardware.
22df8df5e4SMasahiro Yamada#
23df8df5e4SMasahiro Yamada# Gadget drivers are hardware-neutral, or "platform independent",
24df8df5e4SMasahiro Yamada# except that they sometimes must understand quirks or limitations
25df8df5e4SMasahiro Yamada# of the particular controllers they work with.  For example, when
26df8df5e4SMasahiro Yamada# a controller doesn't support alternate configurations or provide
27df8df5e4SMasahiro Yamada# enough of the right types of endpoints, the gadget driver might
28df8df5e4SMasahiro Yamada# not be able work with that controller, or might need to implement
29df8df5e4SMasahiro Yamada# a less common variant of a device class protocol.
30df8df5e4SMasahiro Yamada#
31df8df5e4SMasahiro Yamada# The available choices each represent a single precomposed USB
32df8df5e4SMasahiro Yamada# gadget configuration. In the device model, each option contains
33df8df5e4SMasahiro Yamada# both the device instantiation as a child for a USB gadget
34df8df5e4SMasahiro Yamada# controller, and the relevant drivers for each function declared
35df8df5e4SMasahiro Yamada# by the device.
368443f2d2SAndrzej Pietrasiewicz
37df8df5e4SMasahiro Yamadamenu "USB Gadget precomposed configurations"
3810e5e6c2SMasahiro Yamada
398443f2d2SAndrzej Pietrasiewiczconfig USB_ZERO
408443f2d2SAndrzej Pietrasiewicz	tristate "Gadget Zero (DEVELOPMENT)"
418443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
428443f2d2SAndrzej Pietrasiewicz	select USB_F_SS_LB
438443f2d2SAndrzej Pietrasiewicz	help
448443f2d2SAndrzej Pietrasiewicz	  Gadget Zero is a two-configuration device.  It either sinks and
458443f2d2SAndrzej Pietrasiewicz	  sources bulk data; or it loops back a configurable number of
468443f2d2SAndrzej Pietrasiewicz	  transfers.  It also implements control requests, for "chapter 9"
478443f2d2SAndrzej Pietrasiewicz	  conformance.  The driver needs only two bulk-capable endpoints, so
488443f2d2SAndrzej Pietrasiewicz	  it can work on top of most device-side usb controllers.  It's
498443f2d2SAndrzej Pietrasiewicz	  useful for testing, and is also a working example showing how
508443f2d2SAndrzej Pietrasiewicz	  USB "gadget drivers" can be written.
518443f2d2SAndrzej Pietrasiewicz
528443f2d2SAndrzej Pietrasiewicz	  Make this be the first driver you try using on top of any new
538443f2d2SAndrzej Pietrasiewicz	  USB peripheral controller driver.  Then you can use host-side
548443f2d2SAndrzej Pietrasiewicz	  test software, like the "usbtest" driver, to put your hardware
558443f2d2SAndrzej Pietrasiewicz	  and its driver through a basic set of functional tests.
568443f2d2SAndrzej Pietrasiewicz
578443f2d2SAndrzej Pietrasiewicz	  Gadget Zero also works with the host-side "usb-skeleton" driver,
588443f2d2SAndrzej Pietrasiewicz	  and with many kinds of host-side test software.  You may need
598443f2d2SAndrzej Pietrasiewicz	  to tweak product and vendor IDs before host software knows about
608443f2d2SAndrzej Pietrasiewicz	  this device, and arrange to select an appropriate configuration.
618443f2d2SAndrzej Pietrasiewicz
628443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
638443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_zero".
648443f2d2SAndrzej Pietrasiewicz
658443f2d2SAndrzej Pietrasiewiczconfig USB_ZERO_HNPTEST
666341e62bSChristoph Jaeger	bool "HNP Test Device"
678443f2d2SAndrzej Pietrasiewicz	depends on USB_ZERO && USB_OTG
688443f2d2SAndrzej Pietrasiewicz	help
698443f2d2SAndrzej Pietrasiewicz	  You can configure this device to enumerate using the device
708443f2d2SAndrzej Pietrasiewicz	  identifiers of the USB-OTG test device.  That means that when
718443f2d2SAndrzej Pietrasiewicz	  this gadget connects to another OTG device, with this one using
728443f2d2SAndrzej Pietrasiewicz	  the "B-Peripheral" role, that device will use HNP to let this
738443f2d2SAndrzej Pietrasiewicz	  one serve as the USB host instead (in the "B-Host" role).
748443f2d2SAndrzej Pietrasiewicz
758443f2d2SAndrzej Pietrasiewiczconfig USB_AUDIO
768443f2d2SAndrzej Pietrasiewicz	tristate "Audio Gadget"
778443f2d2SAndrzej Pietrasiewicz	depends on SND
788443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
798443f2d2SAndrzej Pietrasiewicz	select SND_PCM
800591bc23SRuslan Bilovol	select USB_F_UAC1 if (GADGET_UAC1 && !GADGET_UAC1_LEGACY)
810591bc23SRuslan Bilovol	select USB_F_UAC1_LEGACY if (GADGET_UAC1 && GADGET_UAC1_LEGACY)
820591bc23SRuslan Bilovol	select USB_F_UAC2 if !GADGET_UAC1
830591bc23SRuslan Bilovol	select USB_U_AUDIO if (USB_F_UAC2 || USB_F_UAC1)
848443f2d2SAndrzej Pietrasiewicz	help
858443f2d2SAndrzej Pietrasiewicz	  This Gadget Audio driver is compatible with USB Audio Class
868443f2d2SAndrzej Pietrasiewicz	  specification 2.0. It implements 1 AudioControl interface,
878443f2d2SAndrzej Pietrasiewicz	  1 AudioStreaming Interface each for USB-OUT and USB-IN.
888443f2d2SAndrzej Pietrasiewicz	  Number of channels, sample rate and sample size can be
898443f2d2SAndrzej Pietrasiewicz	  specified as module parameters.
908443f2d2SAndrzej Pietrasiewicz	  This driver doesn't expect any real Audio codec to be present
918443f2d2SAndrzej Pietrasiewicz	  on the device - the audio streams are simply sinked to and
928443f2d2SAndrzej Pietrasiewicz	  sourced from a virtual ALSA sound card created. The user-space
938443f2d2SAndrzej Pietrasiewicz	  application may choose to do whatever it wants with the data
948443f2d2SAndrzej Pietrasiewicz	  received from the USB Host and choose to provide whatever it
958443f2d2SAndrzej Pietrasiewicz	  wants as audio data to the USB Host.
968443f2d2SAndrzej Pietrasiewicz
978443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
988443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_audio".
998443f2d2SAndrzej Pietrasiewicz
1000591bc23SRuslan Bilovolconfig GADGET_UAC1
1010591bc23SRuslan Bilovol	bool "UAC 1.0"
1028443f2d2SAndrzej Pietrasiewicz	depends on USB_AUDIO
1038443f2d2SAndrzej Pietrasiewicz	help
1040591bc23SRuslan Bilovol	  If you instead want older USB Audio Class specification 1.0 support
1050591bc23SRuslan Bilovol	  with similar driver capabilities.
1060591bc23SRuslan Bilovol
1070591bc23SRuslan Bilovolconfig GADGET_UAC1_LEGACY
1080591bc23SRuslan Bilovol	bool "UAC 1.0 (Legacy)"
1090591bc23SRuslan Bilovol	depends on GADGET_UAC1
1100591bc23SRuslan Bilovol	help
1110591bc23SRuslan Bilovol	  If you instead want legacy UAC Spec-1.0 driver that also has audio
1128443f2d2SAndrzej Pietrasiewicz	  paths hardwired to the Audio codec chip on-board and doesn't work
1138443f2d2SAndrzej Pietrasiewicz	  without one.
1148443f2d2SAndrzej Pietrasiewicz
1158443f2d2SAndrzej Pietrasiewiczconfig USB_ETH
1168443f2d2SAndrzej Pietrasiewicz	tristate "Ethernet Gadget (with CDC Ethernet support)"
1178443f2d2SAndrzej Pietrasiewicz	depends on NET
1188443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
1198443f2d2SAndrzej Pietrasiewicz	select USB_U_ETHER
1208443f2d2SAndrzej Pietrasiewicz	select USB_F_ECM
1218443f2d2SAndrzej Pietrasiewicz	select USB_F_SUBSET
1228443f2d2SAndrzej Pietrasiewicz	select CRC32
1238443f2d2SAndrzej Pietrasiewicz	help
1248443f2d2SAndrzej Pietrasiewicz	  This driver implements Ethernet style communication, in one of
1258443f2d2SAndrzej Pietrasiewicz	  several ways:
1268443f2d2SAndrzej Pietrasiewicz
1278443f2d2SAndrzej Pietrasiewicz	   - The "Communication Device Class" (CDC) Ethernet Control Model.
1288443f2d2SAndrzej Pietrasiewicz	     That protocol is often avoided with pure Ethernet adapters, in
1298443f2d2SAndrzej Pietrasiewicz	     favor of simpler vendor-specific hardware, but is widely
1308443f2d2SAndrzej Pietrasiewicz	     supported by firmware for smart network devices.
1318443f2d2SAndrzej Pietrasiewicz
1328443f2d2SAndrzej Pietrasiewicz	   - On hardware can't implement that protocol, a simple CDC subset
1338443f2d2SAndrzej Pietrasiewicz	     is used, placing fewer demands on USB.
1348443f2d2SAndrzej Pietrasiewicz
1358443f2d2SAndrzej Pietrasiewicz	   - CDC Ethernet Emulation Model (EEM) is a newer standard that has
1368443f2d2SAndrzej Pietrasiewicz	     a simpler interface that can be used by more USB hardware.
1378443f2d2SAndrzej Pietrasiewicz
138fc4fa6e1SMasanari Iida	  RNDIS support is an additional option, more demanding than subset.
1398443f2d2SAndrzej Pietrasiewicz
1408443f2d2SAndrzej Pietrasiewicz	  Within the USB device, this gadget driver exposes a network device
1418443f2d2SAndrzej Pietrasiewicz	  "usbX", where X depends on what other networking devices you have.
1428443f2d2SAndrzej Pietrasiewicz	  Treat it like a two-node Ethernet link:  host, and gadget.
1438443f2d2SAndrzej Pietrasiewicz
1448443f2d2SAndrzej Pietrasiewicz	  The Linux-USB host-side "usbnet" driver interoperates with this
1458443f2d2SAndrzej Pietrasiewicz	  driver, so that deep I/O queues can be supported.  On 2.4 kernels,
1468443f2d2SAndrzej Pietrasiewicz	  use "CDCEther" instead, if you're using the CDC option. That CDC
1478443f2d2SAndrzej Pietrasiewicz	  mode should also interoperate with standard CDC Ethernet class
1488443f2d2SAndrzej Pietrasiewicz	  drivers on other host operating systems.
1498443f2d2SAndrzej Pietrasiewicz
1508443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
1518443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_ether".
1528443f2d2SAndrzej Pietrasiewicz
1538443f2d2SAndrzej Pietrasiewiczconfig USB_ETH_RNDIS
1548443f2d2SAndrzej Pietrasiewicz	bool "RNDIS support"
1558443f2d2SAndrzej Pietrasiewicz	depends on USB_ETH
1568443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
1578443f2d2SAndrzej Pietrasiewicz	select USB_F_RNDIS
1588443f2d2SAndrzej Pietrasiewicz	default y
1598443f2d2SAndrzej Pietrasiewicz	help
1608443f2d2SAndrzej Pietrasiewicz	   Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
1618443f2d2SAndrzej Pietrasiewicz	   and Microsoft provides redistributable binary RNDIS drivers for
1628443f2d2SAndrzej Pietrasiewicz	   older versions of Windows.
1638443f2d2SAndrzej Pietrasiewicz
1648443f2d2SAndrzej Pietrasiewicz	   If you say "y" here, the Ethernet gadget driver will try to provide
1658443f2d2SAndrzej Pietrasiewicz	   a second device configuration, supporting RNDIS to talk to such
1668443f2d2SAndrzej Pietrasiewicz	   Microsoft USB hosts.
1678443f2d2SAndrzej Pietrasiewicz
1688443f2d2SAndrzej Pietrasiewicz	   To make MS-Windows work with this, use Documentation/usb/linux.inf
1698443f2d2SAndrzej Pietrasiewicz	   as the "driver info file".  For versions of MS-Windows older than
1708443f2d2SAndrzej Pietrasiewicz	   XP, you'll need to download drivers from Microsoft's website; a URL
1718443f2d2SAndrzej Pietrasiewicz	   is given in comments found in that info file.
1728443f2d2SAndrzej Pietrasiewicz
1738443f2d2SAndrzej Pietrasiewiczconfig USB_ETH_EEM
1748443f2d2SAndrzej Pietrasiewicz	bool "Ethernet Emulation Model (EEM) support"
1758443f2d2SAndrzej Pietrasiewicz	depends on USB_ETH
1768443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
1778443f2d2SAndrzej Pietrasiewicz	select USB_F_EEM
1788443f2d2SAndrzej Pietrasiewicz	help
1798443f2d2SAndrzej Pietrasiewicz	  CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM
1808443f2d2SAndrzej Pietrasiewicz	  and therefore can be supported by more hardware.  Technically ECM and
1818443f2d2SAndrzej Pietrasiewicz	  EEM are designed for different applications.  The ECM model extends
1828443f2d2SAndrzej Pietrasiewicz	  the network interface to the target (e.g. a USB cable modem), and the
1838443f2d2SAndrzej Pietrasiewicz	  EEM model is for mobile devices to communicate with hosts using
1848443f2d2SAndrzej Pietrasiewicz	  ethernet over USB.  For Linux gadgets, however, the interface with
1858443f2d2SAndrzej Pietrasiewicz	  the host is the same (a usbX device), so the differences are minimal.
1868443f2d2SAndrzej Pietrasiewicz
1878443f2d2SAndrzej Pietrasiewicz	  If you say "y" here, the Ethernet gadget driver will use the EEM
1888443f2d2SAndrzej Pietrasiewicz	  protocol rather than ECM.  If unsure, say "n".
1898443f2d2SAndrzej Pietrasiewicz
1908443f2d2SAndrzej Pietrasiewiczconfig USB_G_NCM
1918443f2d2SAndrzej Pietrasiewicz	tristate "Network Control Model (NCM) support"
1928443f2d2SAndrzej Pietrasiewicz	depends on NET
1938443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
1948443f2d2SAndrzej Pietrasiewicz	select USB_U_ETHER
1958443f2d2SAndrzej Pietrasiewicz	select USB_F_NCM
1968443f2d2SAndrzej Pietrasiewicz	select CRC32
1978443f2d2SAndrzej Pietrasiewicz	help
1988443f2d2SAndrzej Pietrasiewicz	  This driver implements USB CDC NCM subclass standard. NCM is
1998443f2d2SAndrzej Pietrasiewicz	  an advanced protocol for Ethernet encapsulation, allows grouping
2008443f2d2SAndrzej Pietrasiewicz	  of several ethernet frames into one USB transfer and different
2018443f2d2SAndrzej Pietrasiewicz	  alignment possibilities.
2028443f2d2SAndrzej Pietrasiewicz
2038443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
2048443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_ncm".
2058443f2d2SAndrzej Pietrasiewicz
2068443f2d2SAndrzej Pietrasiewiczconfig USB_GADGETFS
2078443f2d2SAndrzej Pietrasiewicz	tristate "Gadget Filesystem"
2088443f2d2SAndrzej Pietrasiewicz	help
2098443f2d2SAndrzej Pietrasiewicz	  This driver provides a filesystem based API that lets user mode
2108443f2d2SAndrzej Pietrasiewicz	  programs implement a single-configuration USB device, including
2118443f2d2SAndrzej Pietrasiewicz	  endpoint I/O and control requests that don't relate to enumeration.
2128443f2d2SAndrzej Pietrasiewicz	  All endpoints, transfer speeds, and transfer types supported by
2138443f2d2SAndrzej Pietrasiewicz	  the hardware are available, through read() and write() calls.
2148443f2d2SAndrzej Pietrasiewicz
2158443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
2168443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "gadgetfs".
2178443f2d2SAndrzej Pietrasiewicz
2188443f2d2SAndrzej Pietrasiewiczconfig USB_FUNCTIONFS
2198443f2d2SAndrzej Pietrasiewicz	tristate "Function Filesystem"
2208443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
2218443f2d2SAndrzej Pietrasiewicz	select USB_F_FS
2228443f2d2SAndrzej Pietrasiewicz	select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS)
2238443f2d2SAndrzej Pietrasiewicz	help
2248443f2d2SAndrzej Pietrasiewicz	  The Function Filesystem (FunctionFS) lets one create USB
2258443f2d2SAndrzej Pietrasiewicz	  composite functions in user space in the same way GadgetFS
2268443f2d2SAndrzej Pietrasiewicz	  lets one create USB gadgets in user space.  This allows creation
2278443f2d2SAndrzej Pietrasiewicz	  of composite gadgets such that some of the functions are
2288443f2d2SAndrzej Pietrasiewicz	  implemented in kernel space (for instance Ethernet, serial or
2298443f2d2SAndrzej Pietrasiewicz	  mass storage) and other are implemented in user space.
2308443f2d2SAndrzej Pietrasiewicz
2318443f2d2SAndrzej Pietrasiewicz	  If you say "y" or "m" here you will be able what kind of
2328443f2d2SAndrzej Pietrasiewicz	  configurations the gadget will provide.
2338443f2d2SAndrzej Pietrasiewicz
2348443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build
2358443f2d2SAndrzej Pietrasiewicz	  a dynamically linked module called "g_ffs".
2368443f2d2SAndrzej Pietrasiewicz
2378443f2d2SAndrzej Pietrasiewiczconfig USB_FUNCTIONFS_ETH
2388443f2d2SAndrzej Pietrasiewicz	bool "Include configuration with CDC ECM (Ethernet)"
2398443f2d2SAndrzej Pietrasiewicz	depends on USB_FUNCTIONFS && NET
2408443f2d2SAndrzej Pietrasiewicz	select USB_U_ETHER
2418443f2d2SAndrzej Pietrasiewicz	select USB_F_ECM
2428443f2d2SAndrzej Pietrasiewicz	select USB_F_SUBSET
2438443f2d2SAndrzej Pietrasiewicz	help
2448443f2d2SAndrzej Pietrasiewicz	  Include a configuration with CDC ECM function (Ethernet) and the
2458443f2d2SAndrzej Pietrasiewicz	  Function Filesystem.
2468443f2d2SAndrzej Pietrasiewicz
2478443f2d2SAndrzej Pietrasiewiczconfig USB_FUNCTIONFS_RNDIS
2488443f2d2SAndrzej Pietrasiewicz	bool "Include configuration with RNDIS (Ethernet)"
2498443f2d2SAndrzej Pietrasiewicz	depends on USB_FUNCTIONFS && NET
2508443f2d2SAndrzej Pietrasiewicz	select USB_U_ETHER
2518443f2d2SAndrzej Pietrasiewicz	select USB_F_RNDIS
2528443f2d2SAndrzej Pietrasiewicz	help
2538443f2d2SAndrzej Pietrasiewicz	  Include a configuration with RNDIS function (Ethernet) and the Filesystem.
2548443f2d2SAndrzej Pietrasiewicz
2558443f2d2SAndrzej Pietrasiewiczconfig USB_FUNCTIONFS_GENERIC
2568443f2d2SAndrzej Pietrasiewicz	bool "Include 'pure' configuration"
2578443f2d2SAndrzej Pietrasiewicz	depends on USB_FUNCTIONFS
2588443f2d2SAndrzej Pietrasiewicz	help
2598443f2d2SAndrzej Pietrasiewicz	  Include a configuration with the Function Filesystem alone with
2608443f2d2SAndrzej Pietrasiewicz	  no Ethernet interface.
2618443f2d2SAndrzej Pietrasiewicz
2628443f2d2SAndrzej Pietrasiewiczconfig USB_MASS_STORAGE
2638443f2d2SAndrzej Pietrasiewicz	tristate "Mass Storage Gadget"
2648443f2d2SAndrzej Pietrasiewicz	depends on BLOCK
2658443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
2668443f2d2SAndrzej Pietrasiewicz	select USB_F_MASS_STORAGE
2678443f2d2SAndrzej Pietrasiewicz	help
2688443f2d2SAndrzej Pietrasiewicz	  The Mass Storage Gadget acts as a USB Mass Storage disk drive.
2698443f2d2SAndrzej Pietrasiewicz	  As its storage repository it can use a regular file or a block
2708443f2d2SAndrzej Pietrasiewicz	  device (in much the same way as the "loop" device driver),
2718443f2d2SAndrzej Pietrasiewicz	  specified as a module parameter or sysfs option.
2728443f2d2SAndrzej Pietrasiewicz
2738443f2d2SAndrzej Pietrasiewicz	  This driver is a replacement for now removed File-backed
2748443f2d2SAndrzej Pietrasiewicz	  Storage Gadget (g_file_storage).
2758443f2d2SAndrzej Pietrasiewicz
2768443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build
2778443f2d2SAndrzej Pietrasiewicz	  a dynamically linked module called "g_mass_storage".
2788443f2d2SAndrzej Pietrasiewicz
2798443f2d2SAndrzej Pietrasiewiczconfig USB_GADGET_TARGET
2808443f2d2SAndrzej Pietrasiewicz	tristate "USB Gadget Target Fabric Module"
2818443f2d2SAndrzej Pietrasiewicz	depends on TARGET_CORE
2828443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
28300240714SAndrzej Pietrasiewicz	select USB_F_TCM
2848443f2d2SAndrzej Pietrasiewicz	help
2858443f2d2SAndrzej Pietrasiewicz	  This fabric is an USB gadget. Two USB protocols are supported that is
2868443f2d2SAndrzej Pietrasiewicz	  BBB or BOT (Bulk Only Transport) and UAS (USB Attached SCSI). BOT is
2878443f2d2SAndrzej Pietrasiewicz	  advertised on alternative interface 0 (primary) and UAS is on
2888443f2d2SAndrzej Pietrasiewicz	  alternative interface 1. Both protocols can work on USB2.0 and USB3.0.
2898443f2d2SAndrzej Pietrasiewicz	  UAS utilizes the USB 3.0 feature called streams support.
2908443f2d2SAndrzej Pietrasiewicz
2918443f2d2SAndrzej Pietrasiewiczconfig USB_G_SERIAL
2928443f2d2SAndrzej Pietrasiewicz	tristate "Serial Gadget (with CDC ACM and CDC OBEX support)"
2938443f2d2SAndrzej Pietrasiewicz	depends on TTY
2948443f2d2SAndrzej Pietrasiewicz	select USB_U_SERIAL
2958443f2d2SAndrzej Pietrasiewicz	select USB_F_ACM
2968443f2d2SAndrzej Pietrasiewicz	select USB_F_SERIAL
2978443f2d2SAndrzej Pietrasiewicz	select USB_F_OBEX
2988443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
2998443f2d2SAndrzej Pietrasiewicz	help
3008443f2d2SAndrzej Pietrasiewicz	  The Serial Gadget talks to the Linux-USB generic serial driver.
3018443f2d2SAndrzej Pietrasiewicz	  This driver supports a CDC-ACM module option, which can be used
3028443f2d2SAndrzej Pietrasiewicz	  to interoperate with MS-Windows hosts or with the Linux-USB
3038443f2d2SAndrzej Pietrasiewicz	  "cdc-acm" driver.
3048443f2d2SAndrzej Pietrasiewicz
3058443f2d2SAndrzej Pietrasiewicz	  This driver also supports a CDC-OBEX option.  You will need a
3068443f2d2SAndrzej Pietrasiewicz	  user space OBEX server talking to /dev/ttyGS*, since the kernel
3078443f2d2SAndrzej Pietrasiewicz	  itself doesn't implement the OBEX protocol.
3088443f2d2SAndrzej Pietrasiewicz
3098443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
3108443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_serial".
3118443f2d2SAndrzej Pietrasiewicz
312ecefae6dSMauro Carvalho Chehab	  For more information, see Documentation/usb/gadget_serial.rst
3138443f2d2SAndrzej Pietrasiewicz	  which includes instructions and a "driver info file" needed to
3148443f2d2SAndrzej Pietrasiewicz	  make MS-Windows work with CDC ACM.
3158443f2d2SAndrzej Pietrasiewicz
3168443f2d2SAndrzej Pietrasiewiczconfig USB_MIDI_GADGET
3178443f2d2SAndrzej Pietrasiewicz	tristate "MIDI Gadget"
3188443f2d2SAndrzej Pietrasiewicz	depends on SND
3198443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
3208443f2d2SAndrzej Pietrasiewicz	select SND_RAWMIDI
32132522a51SAndrzej Pietrasiewicz	select USB_F_MIDI
3228443f2d2SAndrzej Pietrasiewicz	help
3238443f2d2SAndrzej Pietrasiewicz	  The MIDI Gadget acts as a USB Audio device, with one MIDI
3248443f2d2SAndrzej Pietrasiewicz	  input and one MIDI output. These MIDI jacks appear as
3258443f2d2SAndrzej Pietrasiewicz	  a sound "card" in the ALSA sound system. Other MIDI
3268443f2d2SAndrzej Pietrasiewicz	  connections can then be made on the gadget system, using
3278443f2d2SAndrzej Pietrasiewicz	  ALSA's aconnect utility etc.
3288443f2d2SAndrzej Pietrasiewicz
3298443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
3308443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_midi".
3318443f2d2SAndrzej Pietrasiewicz
3328443f2d2SAndrzej Pietrasiewiczconfig USB_G_PRINTER
3338443f2d2SAndrzej Pietrasiewicz	tristate "Printer Gadget"
3348443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
33569504f80SAndrzej Pietrasiewicz	select USB_F_PRINTER
3368443f2d2SAndrzej Pietrasiewicz	help
3378443f2d2SAndrzej Pietrasiewicz	  The Printer Gadget channels data between the USB host and a
3388443f2d2SAndrzej Pietrasiewicz	  userspace program driving the print engine. The user space
3398443f2d2SAndrzej Pietrasiewicz	  program reads and writes the device file /dev/g_printer to
3408443f2d2SAndrzej Pietrasiewicz	  receive or send printer data. It can use ioctl calls to
3418443f2d2SAndrzej Pietrasiewicz	  the device file to get or set printer status.
3428443f2d2SAndrzej Pietrasiewicz
3438443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
3448443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_printer".
3458443f2d2SAndrzej Pietrasiewicz
346ecefae6dSMauro Carvalho Chehab	  For more information, see Documentation/usb/gadget_printer.rst
3478443f2d2SAndrzej Pietrasiewicz	  which includes sample code for accessing the device file.
3488443f2d2SAndrzej Pietrasiewicz
3498443f2d2SAndrzej Pietrasiewiczif TTY
3508443f2d2SAndrzej Pietrasiewicz
3518443f2d2SAndrzej Pietrasiewiczconfig USB_CDC_COMPOSITE
3528443f2d2SAndrzej Pietrasiewicz	tristate "CDC Composite Device (Ethernet and ACM)"
3538443f2d2SAndrzej Pietrasiewicz	depends on NET
3548443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
3558443f2d2SAndrzej Pietrasiewicz	select USB_U_SERIAL
3568443f2d2SAndrzej Pietrasiewicz	select USB_U_ETHER
3578443f2d2SAndrzej Pietrasiewicz	select USB_F_ACM
3588443f2d2SAndrzej Pietrasiewicz	select USB_F_ECM
3598443f2d2SAndrzej Pietrasiewicz	help
3608443f2d2SAndrzej Pietrasiewicz	  This driver provides two functions in one configuration:
3618443f2d2SAndrzej Pietrasiewicz	  a CDC Ethernet (ECM) link, and a CDC ACM (serial port) link.
3628443f2d2SAndrzej Pietrasiewicz
3638443f2d2SAndrzej Pietrasiewicz	  This driver requires four bulk and two interrupt endpoints,
3648443f2d2SAndrzej Pietrasiewicz	  plus the ability to handle altsettings.  Not all peripheral
3658443f2d2SAndrzej Pietrasiewicz	  controllers are that capable.
3668443f2d2SAndrzej Pietrasiewicz
3678443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
3688443f2d2SAndrzej Pietrasiewicz	  dynamically linked module.
3698443f2d2SAndrzej Pietrasiewicz
3708443f2d2SAndrzej Pietrasiewiczconfig USB_G_NOKIA
3718443f2d2SAndrzej Pietrasiewicz	tristate "Nokia composite gadget"
3728443f2d2SAndrzej Pietrasiewicz	depends on PHONET
3732e8328fbSFelipe Balbi	depends on BLOCK
3748443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
3758443f2d2SAndrzej Pietrasiewicz	select USB_U_SERIAL
3768443f2d2SAndrzej Pietrasiewicz	select USB_U_ETHER
3778443f2d2SAndrzej Pietrasiewicz	select USB_F_ACM
3788443f2d2SAndrzej Pietrasiewicz	select USB_F_OBEX
3798443f2d2SAndrzej Pietrasiewicz	select USB_F_PHONET
3808443f2d2SAndrzej Pietrasiewicz	select USB_F_ECM
3815ea75095SPali Rohár	select USB_F_MASS_STORAGE
3828443f2d2SAndrzej Pietrasiewicz	help
3838443f2d2SAndrzej Pietrasiewicz	  The Nokia composite gadget provides support for acm, obex
3848443f2d2SAndrzej Pietrasiewicz	  and phonet in only one composite gadget driver.
3858443f2d2SAndrzej Pietrasiewicz
3868443f2d2SAndrzej Pietrasiewicz	  It's only really useful for N900 hardware. If you're building
3878443f2d2SAndrzej Pietrasiewicz	  a kernel for N900, say Y or M here. If unsure, say N.
3888443f2d2SAndrzej Pietrasiewicz
3898443f2d2SAndrzej Pietrasiewiczconfig USB_G_ACM_MS
3908443f2d2SAndrzej Pietrasiewicz	tristate "CDC Composite Device (ACM and mass storage)"
3918443f2d2SAndrzej Pietrasiewicz	depends on BLOCK
3928443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
3938443f2d2SAndrzej Pietrasiewicz	select USB_U_SERIAL
3948443f2d2SAndrzej Pietrasiewicz	select USB_F_ACM
3958443f2d2SAndrzej Pietrasiewicz	select USB_F_MASS_STORAGE
3968443f2d2SAndrzej Pietrasiewicz	help
3978443f2d2SAndrzej Pietrasiewicz	  This driver provides two functions in one configuration:
3988443f2d2SAndrzej Pietrasiewicz	  a mass storage, and a CDC ACM (serial port) link.
3998443f2d2SAndrzej Pietrasiewicz
4008443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
4018443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_acm_ms".
4028443f2d2SAndrzej Pietrasiewicz
4038443f2d2SAndrzej Pietrasiewiczconfig USB_G_MULTI
4048443f2d2SAndrzej Pietrasiewicz	tristate "Multifunction Composite Gadget"
4058443f2d2SAndrzej Pietrasiewicz	depends on BLOCK && NET
4068443f2d2SAndrzej Pietrasiewicz	select USB_G_MULTI_CDC if !USB_G_MULTI_RNDIS
4078443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
4088443f2d2SAndrzej Pietrasiewicz	select USB_U_SERIAL
4098443f2d2SAndrzej Pietrasiewicz	select USB_U_ETHER
4108443f2d2SAndrzej Pietrasiewicz	select USB_F_ACM
4118443f2d2SAndrzej Pietrasiewicz	select USB_F_MASS_STORAGE
4128443f2d2SAndrzej Pietrasiewicz	help
4138443f2d2SAndrzej Pietrasiewicz	  The Multifunction Composite Gadget provides Ethernet (RNDIS
4148443f2d2SAndrzej Pietrasiewicz	  and/or CDC Ethernet), mass storage and ACM serial link
4158443f2d2SAndrzej Pietrasiewicz	  interfaces.
4168443f2d2SAndrzej Pietrasiewicz
4178443f2d2SAndrzej Pietrasiewicz	  You will be asked to choose which of the two configurations is
4188443f2d2SAndrzej Pietrasiewicz	  to be available in the gadget.  At least one configuration must
4198443f2d2SAndrzej Pietrasiewicz	  be chosen to make the gadget usable.  Selecting more than one
4208443f2d2SAndrzej Pietrasiewicz	  configuration will prevent Windows from automatically detecting
4218443f2d2SAndrzej Pietrasiewicz	  the gadget as a composite gadget, so an INF file will be needed to
4228443f2d2SAndrzej Pietrasiewicz	  use the gadget.
4238443f2d2SAndrzej Pietrasiewicz
4248443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
4258443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_multi".
4268443f2d2SAndrzej Pietrasiewicz
4278443f2d2SAndrzej Pietrasiewiczconfig USB_G_MULTI_RNDIS
4288443f2d2SAndrzej Pietrasiewicz	bool "RNDIS + CDC Serial + Storage configuration"
4298443f2d2SAndrzej Pietrasiewicz	depends on USB_G_MULTI
4308443f2d2SAndrzej Pietrasiewicz	select USB_F_RNDIS
4318443f2d2SAndrzej Pietrasiewicz	default y
4328443f2d2SAndrzej Pietrasiewicz	help
4338443f2d2SAndrzej Pietrasiewicz	  This option enables a configuration with RNDIS, CDC Serial and
4348443f2d2SAndrzej Pietrasiewicz	  Mass Storage functions available in the Multifunction Composite
4358443f2d2SAndrzej Pietrasiewicz	  Gadget.  This is the configuration dedicated for Windows since RNDIS
4368443f2d2SAndrzej Pietrasiewicz	  is Microsoft's protocol.
4378443f2d2SAndrzej Pietrasiewicz
4388443f2d2SAndrzej Pietrasiewicz	  If unsure, say "y".
4398443f2d2SAndrzej Pietrasiewicz
4408443f2d2SAndrzej Pietrasiewiczconfig USB_G_MULTI_CDC
4418443f2d2SAndrzej Pietrasiewicz	bool "CDC Ethernet + CDC Serial + Storage configuration"
4428443f2d2SAndrzej Pietrasiewicz	depends on USB_G_MULTI
4438443f2d2SAndrzej Pietrasiewicz	select USB_F_ECM
4448443f2d2SAndrzej Pietrasiewicz	help
4458443f2d2SAndrzej Pietrasiewicz	  This option enables a configuration with CDC Ethernet (ECM), CDC
4468443f2d2SAndrzej Pietrasiewicz	  Serial and Mass Storage functions available in the Multifunction
4478443f2d2SAndrzej Pietrasiewicz	  Composite Gadget.
4488443f2d2SAndrzej Pietrasiewicz
4498443f2d2SAndrzej Pietrasiewicz	  If unsure, say "y".
4508443f2d2SAndrzej Pietrasiewicz
4518443f2d2SAndrzej Pietrasiewiczendif # TTY
4528443f2d2SAndrzej Pietrasiewicz
4538443f2d2SAndrzej Pietrasiewiczconfig USB_G_HID
4548443f2d2SAndrzej Pietrasiewicz	tristate "HID Gadget"
4558443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
4564bc8a33fSAndrzej Pietrasiewicz	select USB_F_HID
4578443f2d2SAndrzej Pietrasiewicz	help
4588443f2d2SAndrzej Pietrasiewicz	  The HID gadget driver provides generic emulation of USB
4598443f2d2SAndrzej Pietrasiewicz	  Human Interface Devices (HID).
4608443f2d2SAndrzej Pietrasiewicz
461ecefae6dSMauro Carvalho Chehab	  For more information, see Documentation/usb/gadget_hid.rst which
4628443f2d2SAndrzej Pietrasiewicz	  includes sample code for accessing the device files.
4638443f2d2SAndrzej Pietrasiewicz
4648443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
4658443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_hid".
4668443f2d2SAndrzej Pietrasiewicz
4678443f2d2SAndrzej Pietrasiewicz# Standalone / single function gadgets
4688443f2d2SAndrzej Pietrasiewiczconfig USB_G_DBGP
4698443f2d2SAndrzej Pietrasiewicz	tristate "EHCI Debug Device Gadget"
4708443f2d2SAndrzej Pietrasiewicz	depends on TTY
4718443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
4728443f2d2SAndrzej Pietrasiewicz	help
4738443f2d2SAndrzej Pietrasiewicz	  This gadget emulates an EHCI Debug device. This is useful when you want
4748443f2d2SAndrzej Pietrasiewicz	  to interact with an EHCI Debug Port.
4758443f2d2SAndrzej Pietrasiewicz
4768443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
4778443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_dbgp".
4788443f2d2SAndrzej Pietrasiewicz
4798443f2d2SAndrzej Pietrasiewiczif USB_G_DBGP
4808443f2d2SAndrzej Pietrasiewiczchoice
4818443f2d2SAndrzej Pietrasiewicz	prompt "EHCI Debug Device mode"
4828443f2d2SAndrzej Pietrasiewicz	default USB_G_DBGP_SERIAL
4838443f2d2SAndrzej Pietrasiewicz
4848443f2d2SAndrzej Pietrasiewiczconfig USB_G_DBGP_PRINTK
4858443f2d2SAndrzej Pietrasiewicz	depends on USB_G_DBGP
4868443f2d2SAndrzej Pietrasiewicz	bool "printk"
4878443f2d2SAndrzej Pietrasiewicz	help
4888443f2d2SAndrzej Pietrasiewicz	  Directly printk() received data. No interaction.
4898443f2d2SAndrzej Pietrasiewicz
4908443f2d2SAndrzej Pietrasiewiczconfig USB_G_DBGP_SERIAL
4918443f2d2SAndrzej Pietrasiewicz	depends on USB_G_DBGP
4928443f2d2SAndrzej Pietrasiewicz	select USB_U_SERIAL
4938443f2d2SAndrzej Pietrasiewicz	bool "serial"
4948443f2d2SAndrzej Pietrasiewicz	help
4958443f2d2SAndrzej Pietrasiewicz	  Userland can interact using /dev/ttyGSxxx.
4968443f2d2SAndrzej Pietrasiewiczendchoice
4978443f2d2SAndrzej Pietrasiewiczendif
4988443f2d2SAndrzej Pietrasiewicz
4998443f2d2SAndrzej Pietrasiewicz# put drivers that need isochronous transfer support (for audio
5008443f2d2SAndrzej Pietrasiewicz# or video class gadget drivers), or specific hardware, here.
5018443f2d2SAndrzej Pietrasiewiczconfig USB_G_WEBCAM
5028443f2d2SAndrzej Pietrasiewicz	tristate "USB Webcam Gadget"
50354eed78cSArnd Bergmann	depends on VIDEO_V4L2
5048443f2d2SAndrzej Pietrasiewicz	select USB_LIBCOMPOSITE
5058443f2d2SAndrzej Pietrasiewicz	select VIDEOBUF2_VMALLOC
506c913881eSAndrzej Pietrasiewicz	select USB_F_UVC
5078443f2d2SAndrzej Pietrasiewicz	help
5088443f2d2SAndrzej Pietrasiewicz	  The Webcam Gadget acts as a composite USB Audio and Video Class
5098443f2d2SAndrzej Pietrasiewicz	  device. It provides a userspace API to process UVC control requests
5108443f2d2SAndrzej Pietrasiewicz	  and stream video data to the host.
5118443f2d2SAndrzej Pietrasiewicz
5128443f2d2SAndrzej Pietrasiewicz	  Say "y" to link the driver statically, or "m" to build a
5138443f2d2SAndrzej Pietrasiewicz	  dynamically linked module called "g_webcam".
51410e5e6c2SMasahiro Yamada
515f2c2e717SAndrey Konovalovconfig USB_RAW_GADGET
516f2c2e717SAndrey Konovalov	tristate "USB Raw Gadget"
517f2c2e717SAndrey Konovalov	help
518*7a35a5caSAndrey Konovalov	  USB Raw Gadget is a gadget driver that gives userspace low-level
519*7a35a5caSAndrey Konovalov	  control over the gadget's communication process.
520*7a35a5caSAndrey Konovalov
521*7a35a5caSAndrey Konovalov	  Like any other gadget driver, Raw Gadget implements USB devices via
522*7a35a5caSAndrey Konovalov	  the USB gadget API. Unlike most gadget drivers, Raw Gadget does not
523*7a35a5caSAndrey Konovalov	  implement any concrete USB functions itself but requires userspace
524*7a35a5caSAndrey Konovalov	  to do that.
525*7a35a5caSAndrey Konovalov
526*7a35a5caSAndrey Konovalov	  See Documentation/usb/raw-gadget.rst for details.
527f2c2e717SAndrey Konovalov
528f2c2e717SAndrey Konovalov	  Say "y" to link the driver statically, or "m" to build a
529f2c2e717SAndrey Konovalov	  dynamically linked module called "raw_gadget".
530f2c2e717SAndrey Konovalov
531df8df5e4SMasahiro Yamadaendmenu
532