1f9d0fd8aSSam Protsenko# 2f9d0fd8aSSam Protsenko# USB Gadget support on a system involves 3f9d0fd8aSSam Protsenko# (a) a peripheral controller, and 4f9d0fd8aSSam Protsenko# (b) the gadget driver using it. 5f9d0fd8aSSam Protsenko# 6f9d0fd8aSSam Protsenko# NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !! 7f9d0fd8aSSam Protsenko# 8f9d0fd8aSSam Protsenko# - Host systems (like PCs) need CONFIG_USB (with "A" jacks). 9f9d0fd8aSSam Protsenko# - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks). 10f9d0fd8aSSam Protsenko# - Some systems have both kinds of controllers. 11f9d0fd8aSSam Protsenko# 12f9d0fd8aSSam Protsenko# With help from a special transceiver and a "Mini-AB" jack, systems with 13f9d0fd8aSSam Protsenko# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG). 14f9d0fd8aSSam Protsenko# 15f9d0fd8aSSam Protsenko 16f9d0fd8aSSam Protsenkomenuconfig USB_GADGET 17f9d0fd8aSSam Protsenko bool "USB Gadget Support" 18f9d0fd8aSSam Protsenko help 19f9d0fd8aSSam Protsenko USB is a master/slave protocol, organized with one master 20f9d0fd8aSSam Protsenko host (such as a PC) controlling up to 127 peripheral devices. 21f9d0fd8aSSam Protsenko The USB hardware is asymmetric, which makes it easier to set up: 22f9d0fd8aSSam Protsenko you can't connect a "to-the-host" connector to a peripheral. 23f9d0fd8aSSam Protsenko 24f9d0fd8aSSam Protsenko U-Boot can run in the host, or in the peripheral. In both cases 25f9d0fd8aSSam Protsenko you need a low level bus controller driver, and some software 26f9d0fd8aSSam Protsenko talking to it. Peripheral controllers are often discrete silicon, 27f9d0fd8aSSam Protsenko or are integrated with the CPU in a microcontroller. The more 28f9d0fd8aSSam Protsenko familiar host side controllers have names like "EHCI", "OHCI", 29f9d0fd8aSSam Protsenko or "UHCI", and are usually integrated into southbridges on PC 30f9d0fd8aSSam Protsenko motherboards. 31f9d0fd8aSSam Protsenko 32f9d0fd8aSSam Protsenko Enable this configuration option if you want to run U-Boot inside 33f9d0fd8aSSam Protsenko a USB peripheral device. Configure one hardware driver for your 34f9d0fd8aSSam Protsenko peripheral/device side bus controller, and a "gadget driver" for 35f9d0fd8aSSam Protsenko your peripheral protocol. 36a59a77f8SSam Protsenko 37a59a77f8SSam Protsenkoif USB_GADGET 38a59a77f8SSam Protsenko 39*93265845Sneal_liuconfig ASPEED_UDC 40*93265845Sneal_liu bool "Aspeed USB Device support" 41*93265845Sneal_liu help 42*93265845Sneal_liu Support Aspeed USB device on port A. You can emulate USB device as 43*93265845Sneal_liu CDC-ACM (usbtty) for example. 44*93265845Sneal_liu 45a95aee6aSMaxime Ripardconfig USB_GADGET_MANUFACTURER 46a95aee6aSMaxime Ripard string "Vendor name of the USB device" 47e02687bdSMaxime Ripard default "Allwinner Technology" if ARCH_SUNXI 48a95aee6aSMaxime Ripard default "U-Boot" 49a95aee6aSMaxime Ripard help 50a95aee6aSMaxime Ripard Vendor name of the USB device emulated, reported to the host device. 51a95aee6aSMaxime Ripard This is usually either the manufacturer of the device or the SoC. 52a95aee6aSMaxime Ripard 53a95aee6aSMaxime Ripardconfig USB_GADGET_VENDOR_NUM 54a95aee6aSMaxime Ripard hex "Vendor ID of the USB device" 55e02687bdSMaxime Ripard default 0x1f3a if ARCH_SUNXI 56a95aee6aSMaxime Ripard default 0x0 57a95aee6aSMaxime Ripard help 58a95aee6aSMaxime Ripard Vendor ID of the USB device emulated, reported to the host device. 59a95aee6aSMaxime Ripard This is usually the board or SoC vendor's, unless you've registered 60a95aee6aSMaxime Ripard for one. 61a95aee6aSMaxime Ripard 62a95aee6aSMaxime Ripardconfig USB_GADGET_PRODUCT_NUM 63a95aee6aSMaxime Ripard hex "Product ID of the USB device" 64e02687bdSMaxime Ripard default 0x1010 if ARCH_SUNXI 65a95aee6aSMaxime Ripard default 0x0 66a95aee6aSMaxime Ripard help 67a95aee6aSMaxime Ripard Product ID of the USB device emulated, reported to the host device. 68a95aee6aSMaxime Ripard 693457bbafSSam Protsenkoconfig USB_GADGET_ATMEL_USBA 703457bbafSSam Protsenko bool "Atmel USBA" 713457bbafSSam Protsenko select USB_GADGET_DUALSPEED 723457bbafSSam Protsenko help 733457bbafSSam Protsenko USBA is the integrated high-speed USB Device controller on 743457bbafSSam Protsenko the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel. 753457bbafSSam Protsenko 76e016f0b2SSteve Raeconfig USB_GADGET_BCM_UDC_OTG_PHY 77e016f0b2SSteve Rae bool "Broadcom UDC OTG PHY" 78e016f0b2SSteve Rae help 79e016f0b2SSteve Rae Enable the Broadcom UDC OTG physical device interface. 80e016f0b2SSteve Rae 813457bbafSSam Protsenkoconfig USB_GADGET_DWC2_OTG 823457bbafSSam Protsenko bool "DesignWare USB2.0 HS OTG controller (gadget mode)" 833457bbafSSam Protsenko select USB_GADGET_DUALSPEED 843457bbafSSam Protsenko help 853457bbafSSam Protsenko The Designware USB2.0 high-speed gadget controller 863457bbafSSam Protsenko integrated into many SoCs. Select this option if you want the 873457bbafSSam Protsenko driver to operate in Peripheral mode. This option requires 883457bbafSSam Protsenko USB_GADGET to be enabled. 893457bbafSSam Protsenko 90f221db0eSSteve Raeif USB_GADGET_DWC2_OTG 91f221db0eSSteve Rae 92f221db0eSSteve Raeconfig USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 93f221db0eSSteve Rae bool "DesignWare USB2.0 HS OTG controller 8-bit PHY bus width" 94f221db0eSSteve Rae help 95f221db0eSSteve Rae Set the Designware USB2.0 high-speed OTG controller 96f221db0eSSteve Rae PHY interface width to 8 bits, rather than the default (16 bits). 97f221db0eSSteve Rae 98f221db0eSSteve Raeendif # USB_GADGET_DWC2_OTG 99f221db0eSSteve Rae 1003457bbafSSam Protsenkoconfig CI_UDC 1013457bbafSSam Protsenko bool "ChipIdea device controller" 1023457bbafSSam Protsenko select USB_GADGET_DUALSPEED 1033457bbafSSam Protsenko help 1043457bbafSSam Protsenko Say Y here to enable device controller functionality of the 1053457bbafSSam Protsenko ChipIdea driver. 1063457bbafSSam Protsenko 107a59a77f8SSam Protsenkoconfig USB_GADGET_VBUS_DRAW 108a59a77f8SSam Protsenko int "Maximum VBUS Power usage (2-500 mA)" 109a59a77f8SSam Protsenko range 2 500 110a59a77f8SSam Protsenko default 2 111a59a77f8SSam Protsenko help 112a59a77f8SSam Protsenko Some devices need to draw power from USB when they are 113a59a77f8SSam Protsenko configured, perhaps to operate circuitry or to recharge 114a59a77f8SSam Protsenko batteries. This is in addition to any local power supply, 115a59a77f8SSam Protsenko such as an AC adapter or batteries. 116a59a77f8SSam Protsenko 117a59a77f8SSam Protsenko Enter the maximum power your device draws through USB, in 118a59a77f8SSam Protsenko milliAmperes. The permitted range of values is 2 - 500 mA; 119a59a77f8SSam Protsenko 0 mA would be legal, but can make some hosts misbehave. 120a59a77f8SSam Protsenko 121a59a77f8SSam Protsenko This value will be used except for system-specific gadget 122a59a77f8SSam Protsenko drivers that have more specific information. 123a59a77f8SSam Protsenko 1243457bbafSSam Protsenko# Selected by UDC drivers that support high-speed operation. 1253457bbafSSam Protsenkoconfig USB_GADGET_DUALSPEED 1263457bbafSSam Protsenko bool 1273457bbafSSam Protsenko 128aaa4a9e3SSam Protsenkoconfig USB_GADGET_DOWNLOAD 129aaa4a9e3SSam Protsenko bool "Enable USB download gadget" 130aaa4a9e3SSam Protsenko help 131aaa4a9e3SSam Protsenko Composite USB download gadget support (g_dnl) for download functions. 132aaa4a9e3SSam Protsenko This code works on top of composite gadget. 133aaa4a9e3SSam Protsenko 134e6c0bc06SSam Protsenkoif USB_GADGET_DOWNLOAD 135e6c0bc06SSam Protsenko 1364f60e5d3SLukasz Majewskiconfig USB_FUNCTION_MASS_STORAGE 1374f60e5d3SLukasz Majewski bool "Enable USB mass storage gadget" 1384f60e5d3SLukasz Majewski help 1394f60e5d3SLukasz Majewski Enable mass storage protocol support in U-Boot. It allows exporting 1404f60e5d3SLukasz Majewski the eMMC/SD card content to HOST PC so it can be mounted. 1414f60e5d3SLukasz Majewski 142bf2b72beSEddie Caiconfig USB_FUNCTION_ROCKUSB 143bf2b72beSEddie Cai bool "Enable USB rockusb gadget" 144bf2b72beSEddie Cai help 145bf2b72beSEddie Cai Rockusb protocol is widely used by Rockchip SoC based devices. It can 146bf2b72beSEddie Cai read/write info, image to/from devices. This enables the USB part of 147bf2b72beSEddie Cai the rockusb gadget.for more detail about Rockusb protocol, please see 148bf2b72beSEddie Cai doc/README.rockusb 149bf2b72beSEddie Cai 150b7696595SLukasz Majewskiconfig USB_FUNCTION_SDP 151b7696595SLukasz Majewski bool "Enable USB SDP (Serial Download Protocol)" 152b7696595SLukasz Majewski help 153b7696595SLukasz Majewski Enable Serial Download Protocol (SDP) device support in U-Boot. This 154b7696595SLukasz Majewski allows to download images into memory and execute (jump to) them 155b7696595SLukasz Majewski using the same protocol as implemented by the i.MX family's boot ROM. 156b7696595SLukasz Majewski 157c6c1ca10SLukasz Majewskiconfig USB_FUNCTION_THOR 158c6c1ca10SLukasz Majewski bool "Enable USB THOR gadget" 159c6c1ca10SLukasz Majewski help 160c6c1ca10SLukasz Majewski Enable Tizen's THOR download protocol support in U-Boot. It 161c6c1ca10SLukasz Majewski allows downloading images into memory and flash them to target device. 162c6c1ca10SLukasz Majewski 1635506ff14SMaxime Ripardendif # USB_GADGET_DOWNLOAD 1645506ff14SMaxime Ripard 1653f33d3c8SMaxime Ripardconfig USB_ETHER 1663f33d3c8SMaxime Ripard bool "USB Ethernet Gadget" 167a18d1064SAlex Kiernan depends on NET 1683c989f3aSMaxime Ripard default y if ARCH_SUNXI && USB_MUSB_GADGET 1693f33d3c8SMaxime Ripard help 1703f33d3c8SMaxime Ripard Creates an Ethernet network device through a USB peripheral 1713f33d3c8SMaxime Ripard controller. This will create a network interface on both the device 1723f33d3c8SMaxime Ripard (U-Boot) and the host (remote device) that can be used just like any 1733f33d3c8SMaxime Ripard other nework interface. 1743f33d3c8SMaxime Ripard It will bind on the peripheral USB controller, ignoring the USB hosts 1753f33d3c8SMaxime Ripard controllers in the system. 1763f33d3c8SMaxime Ripard 1773f33d3c8SMaxime Ripardif USB_ETHER 1783f33d3c8SMaxime Ripard 179d2f0f4afSMaxime Ripardchoice 180d2f0f4afSMaxime Ripard prompt "USB Ethernet Gadget Model" 181d2f0f4afSMaxime Ripard default USB_ETH_RNDIS 182d2f0f4afSMaxime Ripard help 183d2f0f4afSMaxime Ripard There is several models (protocols) to implement Ethernet over USB 184d2f0f4afSMaxime Ripard devices. The main ones are Microsoft's RNDIS and USB's CDC-Ethernet 185d2f0f4afSMaxime Ripard (also called CDC-ECM). RNDIS is obviously compatible with Windows, 186d2f0f4afSMaxime Ripard while CDC-ECM is not. Most other operating systems support both, so 187d2f0f4afSMaxime Ripard if inter-operability is a concern, RNDIS is to be preferred. 188d2f0f4afSMaxime Ripard 189d2f0f4afSMaxime Ripardconfig USB_ETH_CDC 190d2f0f4afSMaxime Ripard bool "CDC-ECM Protocol" 191d2f0f4afSMaxime Ripard help 192d2f0f4afSMaxime Ripard CDC (Communications Device Class) is the standard for Ethernet over 193d2f0f4afSMaxime Ripard USB devices. While there's several alternatives, the most widely used 194d2f0f4afSMaxime Ripard protocol is ECM (Ethernet Control Model). However, compatibility with 195d2f0f4afSMaxime Ripard Windows is not that great. 196d2f0f4afSMaxime Ripard 197d2f0f4afSMaxime Ripardconfig USB_ETH_RNDIS 198d2f0f4afSMaxime Ripard bool "RNDIS Protocol" 199d2f0f4afSMaxime Ripard help 200d2f0f4afSMaxime Ripard The RNDIS (Remote Network Driver Interface Specification) is a 201d2f0f4afSMaxime Ripard Microsoft proprietary protocol to create an Ethernet device over USB. 202d2f0f4afSMaxime Ripard Windows obviously supports it, as well as all the major operating 203d2f0f4afSMaxime Ripard systems, so it's the best option for compatibility. 204d2f0f4afSMaxime Ripard 205d2f0f4afSMaxime Ripardendchoice 206d2f0f4afSMaxime Ripard 207d4a37553SMugunthan V Nconfig USBNET_DEVADDR 208d4a37553SMugunthan V N string "USB Gadget Ethernet device mac address" 209d4a37553SMugunthan V N default "de:ad:be:ef:00:01" 21074e7997cSMaxime Ripard help 21174e7997cSMaxime Ripard Ethernet MAC address of the device-side (ie. local board's) MAC 21274e7997cSMaxime Ripard address of the usb_ether interface 213d4a37553SMugunthan V N 214c163668aSMaxime Ripardconfig USBNET_HOST_ADDR 215c163668aSMaxime Ripard string "USB Gadget Ethernet host mac address" 216c163668aSMaxime Ripard default "de:ad:be:ef:00:00" 217c163668aSMaxime Ripard help 218c163668aSMaxime Ripard Ethernet MAC address of the host-side (ie. remote device's) MAC 219c163668aSMaxime Ripard address of the usb_ether interface 220c163668aSMaxime Ripard 2213f33d3c8SMaxime Ripardendif # USB_ETHER 2223f33d3c8SMaxime Ripard 223a59a77f8SSam Protsenkoendif # USB_GADGET 224