11da177e4SLinus Torvalds# 21da177e4SLinus Torvalds# USB Gadget support on a system involves 31da177e4SLinus Torvalds# (a) a peripheral controller, and 41da177e4SLinus Torvalds# (b) the gadget driver using it. 51da177e4SLinus Torvalds# 61da177e4SLinus Torvalds# NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !! 71da177e4SLinus Torvalds# 81da177e4SLinus Torvalds# - Host systems (like PCs) need CONFIG_USB (with "A" jacks). 91da177e4SLinus Torvalds# - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks). 10cab00891SMatt LaPlante# - Some systems have both kinds of controllers. 111da177e4SLinus Torvalds# 121da177e4SLinus Torvalds# With help from a special transceiver and a "Mini-AB" jack, systems with 131da177e4SLinus Torvalds# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG). 141da177e4SLinus Torvalds# 151da177e4SLinus Torvalds 16b75be4abSDenis Chengmenuconfig USB_GADGET 17b75be4abSDenis Cheng tristate "USB Gadget Support" 18badf6d47SArnd Bergmann select USB_COMMON 1986dc243cSAlan Stern select NLS 201da177e4SLinus Torvalds help 211da177e4SLinus Torvalds USB is a master/slave protocol, organized with one master 221da177e4SLinus Torvalds host (such as a PC) controlling up to 127 peripheral devices. 231da177e4SLinus Torvalds The USB hardware is asymmetric, which makes it easier to set up: 241da177e4SLinus Torvalds you can't connect a "to-the-host" connector to a peripheral. 251da177e4SLinus Torvalds 261da177e4SLinus Torvalds Linux can run in the host, or in the peripheral. In both cases 271da177e4SLinus Torvalds you need a low level bus controller driver, and some software 281da177e4SLinus Torvalds talking to it. Peripheral controllers are often discrete silicon, 291da177e4SLinus Torvalds or are integrated with the CPU in a microcontroller. The more 30e113f29cSJules Villard familiar host side controllers have names like "EHCI", "OHCI", 311da177e4SLinus Torvalds or "UHCI", and are usually integrated into southbridges on PC 321da177e4SLinus Torvalds motherboards. 331da177e4SLinus Torvalds 341da177e4SLinus Torvalds Enable this configuration option if you want to run Linux inside 351da177e4SLinus Torvalds a USB peripheral device. Configure one hardware driver for your 361da177e4SLinus Torvalds peripheral/device side bus controller, and a "gadget driver" for 371da177e4SLinus Torvalds your peripheral protocol. (If you use modular gadget drivers, 381da177e4SLinus Torvalds you may configure more than one.) 391da177e4SLinus Torvalds 401da177e4SLinus Torvalds If in doubt, say "N" and don't enable these drivers; most people 411da177e4SLinus Torvalds don't have this kind of hardware (except maybe inside Linux PDAs). 421da177e4SLinus Torvalds 431da177e4SLinus Torvalds For more information, see <http://www.linux-usb.org/gadget> and 441da177e4SLinus Torvalds the kernel DocBook documentation for this API. 451da177e4SLinus Torvalds 46b75be4abSDenis Chengif USB_GADGET 47b75be4abSDenis Cheng 4870790f63SDavid Brownellconfig USB_GADGET_DEBUG 496341e62bSChristoph Jaeger bool "Debugging messages (DEVELOPMENT)" 5036e893d2SDavid Brownell depends on DEBUG_KERNEL 5170790f63SDavid Brownell help 5270790f63SDavid Brownell Many controller and gadget drivers will print some debugging 5370790f63SDavid Brownell messages if you use this option to ask for those messages. 5470790f63SDavid Brownell 5570790f63SDavid Brownell Avoid enabling these messages, even if you're actively 5670790f63SDavid Brownell debugging such a driver. Many drivers will emit so many 5770790f63SDavid Brownell messages that the driver timings are affected, which will 5870790f63SDavid Brownell either create new failure modes or remove the one you're 5970790f63SDavid Brownell trying to track down. Never enable these messages for a 6070790f63SDavid Brownell production build. 6170790f63SDavid Brownell 62cd108691SAndreas Larssonconfig USB_GADGET_VERBOSE 63cd108691SAndreas Larsson bool "Verbose debugging Messages (DEVELOPMENT)" 64cd108691SAndreas Larsson depends on USB_GADGET_DEBUG 65cd108691SAndreas Larsson help 66cd108691SAndreas Larsson Many controller and gadget drivers will print verbose debugging 67cd108691SAndreas Larsson messages if you use this option to ask for those messages. 68cd108691SAndreas Larsson 69cd108691SAndreas Larsson Avoid enabling these messages, even if you're actively 70cd108691SAndreas Larsson debugging such a driver. Many drivers will emit so many 71cd108691SAndreas Larsson messages that the driver timings are affected, which will 72cd108691SAndreas Larsson either create new failure modes or remove the one you're 73cd108691SAndreas Larsson trying to track down. Never enable these messages for a 74cd108691SAndreas Larsson production build. 75cd108691SAndreas Larsson 761da177e4SLinus Torvaldsconfig USB_GADGET_DEBUG_FILES 776341e62bSChristoph Jaeger bool "Debugging information files (DEVELOPMENT)" 7836e893d2SDavid Brownell depends on PROC_FS 791da177e4SLinus Torvalds help 801da177e4SLinus Torvalds Some of the drivers in the "gadget" framework can expose 811da177e4SLinus Torvalds debugging information in files such as /proc/driver/udc 821da177e4SLinus Torvalds (for a peripheral controller). The information in these 831da177e4SLinus Torvalds files may help when you're troubleshooting or bringing up a 841da177e4SLinus Torvalds driver on a new board. Enable these files by choosing "Y" 851da177e4SLinus Torvalds here. If in doubt, or to conserve kernel memory, say "N". 861da177e4SLinus Torvalds 87914a3f3bSHaavard Skinnemoenconfig USB_GADGET_DEBUG_FS 886341e62bSChristoph Jaeger bool "Debugging information files in debugfs (DEVELOPMENT)" 8936e893d2SDavid Brownell depends on DEBUG_FS 90914a3f3bSHaavard Skinnemoen help 91914a3f3bSHaavard Skinnemoen Some of the drivers in the "gadget" framework can expose 92914a3f3bSHaavard Skinnemoen debugging information in files under /sys/kernel/debug/. 93914a3f3bSHaavard Skinnemoen The information in these files may help when you're 94914a3f3bSHaavard Skinnemoen troubleshooting or bringing up a driver on a new board. 95914a3f3bSHaavard Skinnemoen Enable these files by choosing "Y" here. If in doubt, or 96914a3f3bSHaavard Skinnemoen to conserve kernel memory, say "N". 97914a3f3bSHaavard Skinnemoen 9836e893d2SDavid Brownellconfig USB_GADGET_VBUS_DRAW 9936e893d2SDavid Brownell int "Maximum VBUS Power usage (2-500 mA)" 10036e893d2SDavid Brownell range 2 500 10136e893d2SDavid Brownell default 2 10236e893d2SDavid Brownell help 10336e893d2SDavid Brownell Some devices need to draw power from USB when they are 10436e893d2SDavid Brownell configured, perhaps to operate circuitry or to recharge 10536e893d2SDavid Brownell batteries. This is in addition to any local power supply, 10636e893d2SDavid Brownell such as an AC adapter or batteries. 10736e893d2SDavid Brownell 10836e893d2SDavid Brownell Enter the maximum power your device draws through USB, in 10936e893d2SDavid Brownell milliAmperes. The permitted range of values is 2 - 500 mA; 11036e893d2SDavid Brownell 0 mA would be legal, but can make some hosts misbehave. 11136e893d2SDavid Brownell 11236e893d2SDavid Brownell This value will be used except for system-specific gadget 11336e893d2SDavid Brownell drivers that have more specific information. 11436e893d2SDavid Brownell 1156532c7fdSPer Forlinconfig USB_GADGET_STORAGE_NUM_BUFFERS 1166532c7fdSPer Forlin int "Number of storage pipeline buffers" 117d8877fc7SFelipe Balbi range 2 256 1186532c7fdSPer Forlin default 2 1196532c7fdSPer Forlin help 1206532c7fdSPer Forlin Usually 2 buffers are enough to establish a good buffering 1216532c7fdSPer Forlin pipeline. The number may be increased in order to compensate 1226532c7fdSPer Forlin for a bursty VFS behaviour. For instance there may be CPU wake up 1236532c7fdSPer Forlin latencies that makes the VFS to appear bursty in a system with 1246532c7fdSPer Forlin an CPU on-demand governor. Especially if DMA is doing IO to 1256532c7fdSPer Forlin offload the CPU. In this case the CPU will go into power 1266532c7fdSPer Forlin save often and spin up occasionally to move data within VFS. 1276532c7fdSPer Forlin If selecting USB_GADGET_DEBUG_FILES this value may be set by 1286532c7fdSPer Forlin a module parameter as well. 1296532c7fdSPer Forlin If unsure, say 2. 1306532c7fdSPer Forlin 131a5beaaf3SBaolin Wangconfig U_SERIAL_CONSOLE 132a5beaaf3SBaolin Wang bool "Serial gadget console support" 133a5beaaf3SBaolin Wang depends on USB_G_SERIAL 134a5beaaf3SBaolin Wang help 135a5beaaf3SBaolin Wang It supports the serial gadget can be used as a console. 136a5beaaf3SBaolin Wang 13790fccb52SAndrzej Pietrasiewiczsource "drivers/usb/gadget/udc/Kconfig" 1381da177e4SLinus Torvalds 1391da177e4SLinus Torvalds# 1401da177e4SLinus Torvalds# USB Gadget Drivers 1411da177e4SLinus Torvalds# 142a84d9e53SSebastian Andrzej Siewior 143a84d9e53SSebastian Andrzej Siewior# composite based drivers 144a84d9e53SSebastian Andrzej Siewiorconfig USB_LIBCOMPOSITE 145a84d9e53SSebastian Andrzej Siewior tristate 14688af8bbeSSebastian Andrzej Siewior select CONFIGFS_FS 147a84d9e53SSebastian Andrzej Siewior depends on USB_GADGET 148a84d9e53SSebastian Andrzej Siewior 149ff47f594SSebastian Andrzej Siewiorconfig USB_F_ACM 150ff47f594SSebastian Andrzej Siewior tristate 151ff47f594SSebastian Andrzej Siewior 152cf9a08aeSSebastian Andrzej Siewiorconfig USB_F_SS_LB 153cf9a08aeSSebastian Andrzej Siewior tristate 154cf9a08aeSSebastian Andrzej Siewior 1553249ca22SSebastian Andrzej Siewiorconfig USB_U_SERIAL 1563249ca22SSebastian Andrzej Siewior tristate 1573249ca22SSebastian Andrzej Siewior 158f1a1823fSAndrzej Pietrasiewiczconfig USB_U_ETHER 159f1a1823fSAndrzej Pietrasiewicz tristate 160f1a1823fSAndrzej Pietrasiewicz 16160540ea2SAndrzej Pietrasiewiczconfig USB_F_SERIAL 16260540ea2SAndrzej Pietrasiewicz tristate 16360540ea2SAndrzej Pietrasiewicz 1641d8fc251SAndrzej Pietrasiewiczconfig USB_F_OBEX 1651d8fc251SAndrzej Pietrasiewicz tristate 1661d8fc251SAndrzej Pietrasiewicz 16740d133d7SAndrzej Pietrasiewiczconfig USB_F_NCM 16840d133d7SAndrzej Pietrasiewicz tristate 16940d133d7SAndrzej Pietrasiewicz 170fee562a6SAndrzej Pietrasiewiczconfig USB_F_ECM 171fee562a6SAndrzej Pietrasiewicz tristate 172fee562a6SAndrzej Pietrasiewicz 173fcbdf12eSAndrzej Pietrasiewiczconfig USB_F_PHONET 174fcbdf12eSAndrzej Pietrasiewicz tristate 175fcbdf12eSAndrzej Pietrasiewicz 176b29002a1SAndrzej Pietrasiewiczconfig USB_F_EEM 177b29002a1SAndrzej Pietrasiewicz tristate 178b29002a1SAndrzej Pietrasiewicz 1798cedba7cSAndrzej Pietrasiewiczconfig USB_F_SUBSET 1808cedba7cSAndrzej Pietrasiewicz tristate 1818cedba7cSAndrzej Pietrasiewicz 182f466c635SAndrzej Pietrasiewiczconfig USB_F_RNDIS 183f466c635SAndrzej Pietrasiewicz tristate 184f466c635SAndrzej Pietrasiewicz 185e5eaa0dcSAndrzej Pietrasiewiczconfig USB_F_MASS_STORAGE 186e5eaa0dcSAndrzej Pietrasiewicz tristate 187e5eaa0dcSAndrzej Pietrasiewicz 1885920cda6SAndrzej Pietrasiewiczconfig USB_F_FS 1895920cda6SAndrzej Pietrasiewicz tristate 1905920cda6SAndrzej Pietrasiewicz 191f3a3406bSAndrzej Pietrasiewiczconfig USB_F_UAC1 192f3a3406bSAndrzej Pietrasiewicz tristate 193f3a3406bSAndrzej Pietrasiewicz 194f8f93d24SAndrzej Pietrasiewiczconfig USB_F_UAC2 195f8f93d24SAndrzej Pietrasiewicz tristate 196f8f93d24SAndrzej Pietrasiewicz 1976d11ed76SAndrzej Pietrasiewiczconfig USB_F_UVC 1986d11ed76SAndrzej Pietrasiewicz tristate 1996d11ed76SAndrzej Pietrasiewicz 200b85e9de9SAndrzej Pietrasiewiczconfig USB_F_MIDI 201b85e9de9SAndrzej Pietrasiewicz tristate 202b85e9de9SAndrzej Pietrasiewicz 203cb382536SAndrzej Pietrasiewiczconfig USB_F_HID 204cb382536SAndrzej Pietrasiewicz tristate 205cb382536SAndrzej Pietrasiewicz 206b26394bdSAndrzej Pietrasiewiczconfig USB_F_PRINTER 207b26394bdSAndrzej Pietrasiewicz tristate 208b26394bdSAndrzej Pietrasiewicz 209dc8c46a5SAndrzej Pietrasiewiczconfig USB_F_TCM 210dc8c46a5SAndrzej Pietrasiewicz tristate 211dc8c46a5SAndrzej Pietrasiewicz 2121da177e4SLinus Torvaldschoice 2131da177e4SLinus Torvalds tristate "USB Gadget Drivers" 2141da177e4SLinus Torvalds default USB_ETH 2151da177e4SLinus Torvalds help 2161da177e4SLinus Torvalds A Linux "Gadget Driver" talks to the USB Peripheral Controller 2171da177e4SLinus Torvalds driver through the abstract "gadget" API. Some other operating 2181da177e4SLinus Torvalds systems call these "client" drivers, of which "class drivers" 2191da177e4SLinus Torvalds are a subset (implementing a USB device class specification). 2201da177e4SLinus Torvalds A gadget driver implements one or more USB functions using 2211da177e4SLinus Torvalds the peripheral hardware. 2221da177e4SLinus Torvalds 2231da177e4SLinus Torvalds Gadget drivers are hardware-neutral, or "platform independent", 2241da177e4SLinus Torvalds except that they sometimes must understand quirks or limitations 2251da177e4SLinus Torvalds of the particular controllers they work with. For example, when 2261da177e4SLinus Torvalds a controller doesn't support alternate configurations or provide 2271da177e4SLinus Torvalds enough of the right types of endpoints, the gadget driver might 2281da177e4SLinus Torvalds not be able work with that controller, or might need to implement 2291da177e4SLinus Torvalds a less common variant of a device class protocol. 2301da177e4SLinus Torvalds 2311da177e4SLinus Torvalds# this first set of drivers all depend on bulk-capable hardware. 2321da177e4SLinus Torvalds 233d1c02452SAndrzej Pietrasiewiczconfig USB_CONFIGFS 234d1c02452SAndrzej Pietrasiewicz tristate "USB functions configurable through configfs" 235d1c02452SAndrzej Pietrasiewicz select USB_LIBCOMPOSITE 236d1c02452SAndrzej Pietrasiewicz help 237d1c02452SAndrzej Pietrasiewicz A Linux USB "gadget" can be set up through configfs. 238d1c02452SAndrzej Pietrasiewicz If this is the case, the USB functions (which from the host's 239d1c02452SAndrzej Pietrasiewicz perspective are seen as interfaces) and configurations are 240d1c02452SAndrzej Pietrasiewicz specified simply by creating appropriate directories in configfs. 241d1c02452SAndrzej Pietrasiewicz Associating functions with configurations is done by creating 242d1c02452SAndrzej Pietrasiewicz appropriate symbolic links. 2439c1d6962SPhilippe De Swert For more information see Documentation/usb/gadget_configfs.txt. 244d1c02452SAndrzej Pietrasiewicz 245d1c02452SAndrzej Pietrasiewiczconfig USB_CONFIGFS_SERIAL 2466341e62bSChristoph Jaeger bool "Generic serial bulk in/out" 247d1c02452SAndrzej Pietrasiewicz depends on USB_CONFIGFS 248d1c02452SAndrzej Pietrasiewicz depends on TTY 249d1c02452SAndrzej Pietrasiewicz select USB_U_SERIAL 250d1c02452SAndrzej Pietrasiewicz select USB_F_SERIAL 251d1c02452SAndrzej Pietrasiewicz help 252d1c02452SAndrzej Pietrasiewicz The function talks to the Linux-USB generic serial driver. 253d1c02452SAndrzej Pietrasiewicz 254d1c02452SAndrzej Pietrasiewiczconfig USB_CONFIGFS_ACM 2556341e62bSChristoph Jaeger bool "Abstract Control Model (CDC ACM)" 256d1c02452SAndrzej Pietrasiewicz depends on USB_CONFIGFS 257d1c02452SAndrzej Pietrasiewicz depends on TTY 258d1c02452SAndrzej Pietrasiewicz select USB_U_SERIAL 259d1c02452SAndrzej Pietrasiewicz select USB_F_ACM 260d1c02452SAndrzej Pietrasiewicz help 261d1c02452SAndrzej Pietrasiewicz ACM serial link. This function can be used to interoperate with 262d1c02452SAndrzej Pietrasiewicz MS-Windows hosts or with the Linux-USB "cdc-acm" driver. 263d1c02452SAndrzej Pietrasiewicz 264d1c02452SAndrzej Pietrasiewiczconfig USB_CONFIGFS_OBEX 2656341e62bSChristoph Jaeger bool "Object Exchange Model (CDC OBEX)" 266d1c02452SAndrzej Pietrasiewicz depends on USB_CONFIGFS 267d1c02452SAndrzej Pietrasiewicz depends on TTY 268d1c02452SAndrzej Pietrasiewicz select USB_U_SERIAL 269d1c02452SAndrzej Pietrasiewicz select USB_F_OBEX 270d1c02452SAndrzej Pietrasiewicz help 271d1c02452SAndrzej Pietrasiewicz You will need a user space OBEX server talking to /dev/ttyGS*, 272d1c02452SAndrzej Pietrasiewicz since the kernel itself doesn't implement the OBEX protocol. 273d1c02452SAndrzej Pietrasiewicz 274d1c02452SAndrzej Pietrasiewiczconfig USB_CONFIGFS_NCM 2756341e62bSChristoph Jaeger bool "Network Control Model (CDC NCM)" 276d1c02452SAndrzej Pietrasiewicz depends on USB_CONFIGFS 277d1c02452SAndrzej Pietrasiewicz depends on NET 278d1c02452SAndrzej Pietrasiewicz select USB_U_ETHER 279d1c02452SAndrzej Pietrasiewicz select USB_F_NCM 280d1c02452SAndrzej Pietrasiewicz help 281d1c02452SAndrzej Pietrasiewicz NCM is an advanced protocol for Ethernet encapsulation, allows 282d1c02452SAndrzej Pietrasiewicz grouping of several ethernet frames into one USB transfer and 283d1c02452SAndrzej Pietrasiewicz different alignment possibilities. 284d1c02452SAndrzej Pietrasiewicz 285d1c02452SAndrzej Pietrasiewiczconfig USB_CONFIGFS_ECM 2866341e62bSChristoph Jaeger bool "Ethernet Control Model (CDC ECM)" 287d1c02452SAndrzej Pietrasiewicz depends on USB_CONFIGFS 288d1c02452SAndrzej Pietrasiewicz depends on NET 289d1c02452SAndrzej Pietrasiewicz select USB_U_ETHER 290d1c02452SAndrzej Pietrasiewicz select USB_F_ECM 291d1c02452SAndrzej Pietrasiewicz help 292d1c02452SAndrzej Pietrasiewicz The "Communication Device Class" (CDC) Ethernet Control Model. 293d1c02452SAndrzej Pietrasiewicz That protocol is often avoided with pure Ethernet adapters, in 294d1c02452SAndrzej Pietrasiewicz favor of simpler vendor-specific hardware, but is widely 295d1c02452SAndrzej Pietrasiewicz supported by firmware for smart network devices. 296d1c02452SAndrzej Pietrasiewicz 29702832e56SAndrzej Pietrasiewiczconfig USB_CONFIGFS_ECM_SUBSET 2986341e62bSChristoph Jaeger bool "Ethernet Control Model (CDC ECM) subset" 29902832e56SAndrzej Pietrasiewicz depends on USB_CONFIGFS 30002832e56SAndrzej Pietrasiewicz depends on NET 30102832e56SAndrzej Pietrasiewicz select USB_U_ETHER 30202832e56SAndrzej Pietrasiewicz select USB_F_SUBSET 30302832e56SAndrzej Pietrasiewicz help 30402832e56SAndrzej Pietrasiewicz On hardware that can't implement the full protocol, 30502832e56SAndrzej Pietrasiewicz a simple CDC subset is used, placing fewer demands on USB. 30602832e56SAndrzej Pietrasiewicz 307b3df2faaSAndrzej Pietrasiewiczconfig USB_CONFIGFS_RNDIS 308b3df2faaSAndrzej Pietrasiewicz bool "RNDIS" 309b3df2faaSAndrzej Pietrasiewicz depends on USB_CONFIGFS 310b3df2faaSAndrzej Pietrasiewicz depends on NET 311b3df2faaSAndrzej Pietrasiewicz select USB_U_ETHER 312b3df2faaSAndrzej Pietrasiewicz select USB_F_RNDIS 313b3df2faaSAndrzej Pietrasiewicz help 314b3df2faaSAndrzej Pietrasiewicz Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol, 315b3df2faaSAndrzej Pietrasiewicz and Microsoft provides redistributable binary RNDIS drivers for 316b3df2faaSAndrzej Pietrasiewicz older versions of Windows. 317b3df2faaSAndrzej Pietrasiewicz 318b3df2faaSAndrzej Pietrasiewicz To make MS-Windows work with this, use Documentation/usb/linux.inf 319b3df2faaSAndrzej Pietrasiewicz as the "driver info file". For versions of MS-Windows older than 320b3df2faaSAndrzej Pietrasiewicz XP, you'll need to download drivers from Microsoft's website; a URL 321b3df2faaSAndrzej Pietrasiewicz is given in comments found in that info file. 322b3df2faaSAndrzej Pietrasiewicz 32317b80976SAndrzej Pietrasiewiczconfig USB_CONFIGFS_EEM 32417b80976SAndrzej Pietrasiewicz bool "Ethernet Emulation Model (EEM)" 32517b80976SAndrzej Pietrasiewicz depends on USB_CONFIGFS 32617b80976SAndrzej Pietrasiewicz depends on NET 32717b80976SAndrzej Pietrasiewicz select USB_U_ETHER 32817b80976SAndrzej Pietrasiewicz select USB_F_EEM 32917b80976SAndrzej Pietrasiewicz help 33017b80976SAndrzej Pietrasiewicz CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM 33117b80976SAndrzej Pietrasiewicz and therefore can be supported by more hardware. Technically ECM and 33217b80976SAndrzej Pietrasiewicz EEM are designed for different applications. The ECM model extends 33317b80976SAndrzej Pietrasiewicz the network interface to the target (e.g. a USB cable modem), and the 33417b80976SAndrzej Pietrasiewicz EEM model is for mobile devices to communicate with hosts using 33517b80976SAndrzej Pietrasiewicz ethernet over USB. For Linux gadgets, however, the interface with 33617b80976SAndrzej Pietrasiewicz the host is the same (a usbX device), so the differences are minimal. 33717b80976SAndrzej Pietrasiewicz 33883408745SAndrzej Pietrasiewiczconfig USB_CONFIGFS_PHONET 3396341e62bSChristoph Jaeger bool "Phonet protocol" 34083408745SAndrzej Pietrasiewicz depends on USB_CONFIGFS 34183408745SAndrzej Pietrasiewicz depends on NET 34283408745SAndrzej Pietrasiewicz depends on PHONET 34383408745SAndrzej Pietrasiewicz select USB_U_ETHER 34483408745SAndrzej Pietrasiewicz select USB_F_PHONET 34583408745SAndrzej Pietrasiewicz help 34683408745SAndrzej Pietrasiewicz The Phonet protocol implementation for USB device. 34783408745SAndrzej Pietrasiewicz 348ef0aa4b9SAndrzej Pietrasiewiczconfig USB_CONFIGFS_MASS_STORAGE 3496341e62bSChristoph Jaeger bool "Mass storage" 350ef0aa4b9SAndrzej Pietrasiewicz depends on USB_CONFIGFS 351bc912b0dSAndrzej Pietrasiewicz depends on BLOCK 352ef0aa4b9SAndrzej Pietrasiewicz select USB_F_MASS_STORAGE 353ef0aa4b9SAndrzej Pietrasiewicz help 354ef0aa4b9SAndrzej Pietrasiewicz The Mass Storage Gadget acts as a USB Mass Storage disk drive. 355ef0aa4b9SAndrzej Pietrasiewicz As its storage repository it can use a regular file or a block 356ef0aa4b9SAndrzej Pietrasiewicz device (in much the same way as the "loop" device driver), 357ef0aa4b9SAndrzej Pietrasiewicz specified as a module parameter or sysfs option. 358ef0aa4b9SAndrzej Pietrasiewicz 35925d80151SAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_LB_SS 3606341e62bSChristoph Jaeger bool "Loopback and sourcesink function (for testing)" 361c0501f47SAndrzej Pietrasiewicz depends on USB_CONFIGFS 362c0501f47SAndrzej Pietrasiewicz select USB_F_SS_LB 363c0501f47SAndrzej Pietrasiewicz help 36425d80151SAndrzej Pietrasiewicz Loopback function loops back a configurable number of transfers. 36525d80151SAndrzej Pietrasiewicz Sourcesink function either sinks and sources bulk data. 366c0501f47SAndrzej Pietrasiewicz It also implements control requests, for "chapter 9" conformance. 367c0501f47SAndrzej Pietrasiewicz Make this be the first driver you try using on top of any new 368c0501f47SAndrzej Pietrasiewicz USB peripheral controller driver. Then you can use host-side 369c0501f47SAndrzej Pietrasiewicz test software, like the "usbtest" driver, to put your hardware 370c0501f47SAndrzej Pietrasiewicz and its driver through a basic set of functional tests. 371c0501f47SAndrzej Pietrasiewicz 372b658499fSAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_FS 3736341e62bSChristoph Jaeger bool "Function filesystem (FunctionFS)" 374b658499fSAndrzej Pietrasiewicz depends on USB_CONFIGFS 375b658499fSAndrzej Pietrasiewicz select USB_F_FS 376b658499fSAndrzej Pietrasiewicz help 377b658499fSAndrzej Pietrasiewicz The Function Filesystem (FunctionFS) lets one create USB 378b658499fSAndrzej Pietrasiewicz composite functions in user space in the same way GadgetFS 379b658499fSAndrzej Pietrasiewicz lets one create USB gadgets in user space. This allows creation 380b658499fSAndrzej Pietrasiewicz of composite gadgets such that some of the functions are 381b658499fSAndrzej Pietrasiewicz implemented in kernel space (for instance Ethernet, serial or 382b658499fSAndrzej Pietrasiewicz mass storage) and other are implemented in user space. 383b658499fSAndrzej Pietrasiewicz 384cb0a59f5SAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_UAC1 3856341e62bSChristoph Jaeger bool "Audio Class 1.0" 386cb0a59f5SAndrzej Pietrasiewicz depends on USB_CONFIGFS 387cb0a59f5SAndrzej Pietrasiewicz depends on SND 388cb0a59f5SAndrzej Pietrasiewicz select USB_LIBCOMPOSITE 389cb0a59f5SAndrzej Pietrasiewicz select SND_PCM 390cb0a59f5SAndrzej Pietrasiewicz select USB_F_UAC1 391cb0a59f5SAndrzej Pietrasiewicz help 392cb0a59f5SAndrzej Pietrasiewicz This Audio function implements 1 AudioControl interface, 393cb0a59f5SAndrzej Pietrasiewicz 1 AudioStreaming Interface each for USB-OUT and USB-IN. 394cb0a59f5SAndrzej Pietrasiewicz This driver requires a real Audio codec to be present 395cb0a59f5SAndrzej Pietrasiewicz on the device. 396cb0a59f5SAndrzej Pietrasiewicz 397cb0a59f5SAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_UAC2 3986341e62bSChristoph Jaeger bool "Audio Class 2.0" 399cb0a59f5SAndrzej Pietrasiewicz depends on USB_CONFIGFS 400cb0a59f5SAndrzej Pietrasiewicz depends on SND 401cb0a59f5SAndrzej Pietrasiewicz select USB_LIBCOMPOSITE 402cb0a59f5SAndrzej Pietrasiewicz select SND_PCM 403cb0a59f5SAndrzej Pietrasiewicz select USB_F_UAC2 404cb0a59f5SAndrzej Pietrasiewicz help 405cb0a59f5SAndrzej Pietrasiewicz This Audio function is compatible with USB Audio Class 406cb0a59f5SAndrzej Pietrasiewicz specification 2.0. It implements 1 AudioControl interface, 407cb0a59f5SAndrzej Pietrasiewicz 1 AudioStreaming Interface each for USB-OUT and USB-IN. 408cb0a59f5SAndrzej Pietrasiewicz This driver doesn't expect any real Audio codec to be present 409cb0a59f5SAndrzej Pietrasiewicz on the device - the audio streams are simply sinked to and 410cb0a59f5SAndrzej Pietrasiewicz sourced from a virtual ALSA sound card created. The user-space 411cb0a59f5SAndrzej Pietrasiewicz application may choose to do whatever it wants with the data 412cb0a59f5SAndrzej Pietrasiewicz received from the USB Host and choose to provide whatever it 413cb0a59f5SAndrzej Pietrasiewicz wants as audio data to the USB Host. 414cb0a59f5SAndrzej Pietrasiewicz 4156f1de344SAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_MIDI 4166341e62bSChristoph Jaeger bool "MIDI function" 4176f1de344SAndrzej Pietrasiewicz depends on USB_CONFIGFS 4186f1de344SAndrzej Pietrasiewicz depends on SND 4196f1de344SAndrzej Pietrasiewicz select USB_LIBCOMPOSITE 4206f1de344SAndrzej Pietrasiewicz select SND_RAWMIDI 4216f1de344SAndrzej Pietrasiewicz select USB_F_MIDI 4226f1de344SAndrzej Pietrasiewicz help 4236f1de344SAndrzej Pietrasiewicz The MIDI Function acts as a USB Audio device, with one MIDI 4246f1de344SAndrzej Pietrasiewicz input and one MIDI output. These MIDI jacks appear as 4256f1de344SAndrzej Pietrasiewicz a sound "card" in the ALSA sound system. Other MIDI 4266f1de344SAndrzej Pietrasiewicz connections can then be made on the gadget system, using 4276f1de344SAndrzej Pietrasiewicz ALSA's aconnect utility etc. 4286f1de344SAndrzej Pietrasiewicz 42921a9476aSAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_HID 4306341e62bSChristoph Jaeger bool "HID function" 43121a9476aSAndrzej Pietrasiewicz depends on USB_CONFIGFS 43221a9476aSAndrzej Pietrasiewicz select USB_F_HID 43321a9476aSAndrzej Pietrasiewicz help 43421a9476aSAndrzej Pietrasiewicz The HID function driver provides generic emulation of USB 43521a9476aSAndrzej Pietrasiewicz Human Interface Devices (HID). 43621a9476aSAndrzej Pietrasiewicz 43721a9476aSAndrzej Pietrasiewicz For more information, see Documentation/usb/gadget_hid.txt. 43821a9476aSAndrzej Pietrasiewicz 43946919a23SAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_UVC 4408333d3cdSChristoph Jaeger bool "USB Webcam function" 44146919a23SAndrzej Pietrasiewicz depends on USB_CONFIGFS 44246919a23SAndrzej Pietrasiewicz depends on VIDEO_DEV 44346919a23SAndrzej Pietrasiewicz select VIDEOBUF2_VMALLOC 44446919a23SAndrzej Pietrasiewicz select USB_F_UVC 44546919a23SAndrzej Pietrasiewicz help 44646919a23SAndrzej Pietrasiewicz The Webcam function acts as a composite USB Audio and Video Class 44746919a23SAndrzej Pietrasiewicz device. It provides a userspace API to process UVC control requests 44846919a23SAndrzej Pietrasiewicz and stream video data to the host. 44946919a23SAndrzej Pietrasiewicz 450ee1cd515SAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_PRINTER 451ee1cd515SAndrzej Pietrasiewicz bool "Printer function" 452ee1cd515SAndrzej Pietrasiewicz select USB_F_PRINTER 453f4b4976bSAndrzej Pietrasiewicz depends on USB_CONFIGFS 454ee1cd515SAndrzej Pietrasiewicz help 455ee1cd515SAndrzej Pietrasiewicz The Printer function channels data between the USB host and a 456ee1cd515SAndrzej Pietrasiewicz userspace program driving the print engine. The user space 457ee1cd515SAndrzej Pietrasiewicz program reads and writes the device file /dev/g_printer<X> to 458ee1cd515SAndrzej Pietrasiewicz receive or send printer data. It can use ioctl calls to 459ee1cd515SAndrzej Pietrasiewicz the device file to get or set printer status. 460ee1cd515SAndrzej Pietrasiewicz 461ee1cd515SAndrzej Pietrasiewicz For more information, see Documentation/usb/gadget_printer.txt 462ee1cd515SAndrzej Pietrasiewicz which includes sample code for accessing the device file. 463ee1cd515SAndrzej Pietrasiewicz 4644bb8548dSAndrzej Pietrasiewiczconfig USB_CONFIGFS_F_TCM 4654bb8548dSAndrzej Pietrasiewicz bool "USB Gadget Target Fabric" 4664bb8548dSAndrzej Pietrasiewicz depends on TARGET_CORE 4674bb8548dSAndrzej Pietrasiewicz depends on USB_CONFIGFS 4684bb8548dSAndrzej Pietrasiewicz select USB_LIBCOMPOSITE 4694bb8548dSAndrzej Pietrasiewicz select USB_F_TCM 4704bb8548dSAndrzej Pietrasiewicz help 4714bb8548dSAndrzej Pietrasiewicz This fabric is a USB gadget component. Two USB protocols are 4724bb8548dSAndrzej Pietrasiewicz supported that is BBB or BOT (Bulk Only Transport) and UAS 4734bb8548dSAndrzej Pietrasiewicz (USB Attached SCSI). BOT is advertised on alternative 4744bb8548dSAndrzej Pietrasiewicz interface 0 (primary) and UAS is on alternative interface 1. 4754bb8548dSAndrzej Pietrasiewicz Both protocols can work on USB2.0 and USB3.0. 4764bb8548dSAndrzej Pietrasiewicz UAS utilizes the USB 3.0 feature called streams support. 4774bb8548dSAndrzej Pietrasiewicz 4788443f2d2SAndrzej Pietrasiewiczsource "drivers/usb/gadget/legacy/Kconfig" 4791da177e4SLinus Torvalds 4801da177e4SLinus Torvaldsendchoice 4811da177e4SLinus Torvalds 482b75be4abSDenis Chengendif # USB_GADGET 483