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 39473221daSMaxime Ripardconfig USB_GADGET_MANUFACTURER 40473221daSMaxime Ripard string "Vendor name of the USB device" 412646d32fSMaxime Ripard default "Allwinner Technology" if ARCH_SUNXI 42473221daSMaxime Ripard default "U-Boot" 43473221daSMaxime Ripard help 44473221daSMaxime Ripard Vendor name of the USB device emulated, reported to the host device. 45473221daSMaxime Ripard This is usually either the manufacturer of the device or the SoC. 46473221daSMaxime Ripard 47473221daSMaxime Ripardconfig USB_GADGET_VENDOR_NUM 48473221daSMaxime Ripard hex "Vendor ID of the USB device" 492646d32fSMaxime Ripard default 0x1f3a if ARCH_SUNXI 50473221daSMaxime Ripard default 0x0 51473221daSMaxime Ripard help 52473221daSMaxime Ripard Vendor ID of the USB device emulated, reported to the host device. 53473221daSMaxime Ripard This is usually the board or SoC vendor's, unless you've registered 54473221daSMaxime Ripard for one. 55473221daSMaxime Ripard 56473221daSMaxime Ripardconfig USB_GADGET_PRODUCT_NUM 57473221daSMaxime Ripard hex "Product ID of the USB device" 582646d32fSMaxime Ripard default 0x1010 if ARCH_SUNXI 59473221daSMaxime Ripard default 0x0 60473221daSMaxime Ripard help 61473221daSMaxime Ripard Product ID of the USB device emulated, reported to the host device. 62473221daSMaxime Ripard 633457bbafSSam Protsenkoconfig USB_GADGET_ATMEL_USBA 643457bbafSSam Protsenko bool "Atmel USBA" 653457bbafSSam Protsenko select USB_GADGET_DUALSPEED 663457bbafSSam Protsenko help 673457bbafSSam Protsenko USBA is the integrated high-speed USB Device controller on 683457bbafSSam Protsenko the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel. 693457bbafSSam Protsenko 70e016f0b2SSteve Raeconfig USB_GADGET_BCM_UDC_OTG_PHY 71e016f0b2SSteve Rae bool "Broadcom UDC OTG PHY" 72e016f0b2SSteve Rae help 73e016f0b2SSteve Rae Enable the Broadcom UDC OTG physical device interface. 74e016f0b2SSteve Rae 753457bbafSSam Protsenkoconfig USB_GADGET_DWC2_OTG 763457bbafSSam Protsenko bool "DesignWare USB2.0 HS OTG controller (gadget mode)" 773457bbafSSam Protsenko select USB_GADGET_DUALSPEED 783457bbafSSam Protsenko help 793457bbafSSam Protsenko The Designware USB2.0 high-speed gadget controller 803457bbafSSam Protsenko integrated into many SoCs. Select this option if you want the 813457bbafSSam Protsenko driver to operate in Peripheral mode. This option requires 823457bbafSSam Protsenko USB_GADGET to be enabled. 833457bbafSSam Protsenko 84f221db0eSSteve Raeif USB_GADGET_DWC2_OTG 85f221db0eSSteve Rae 86f221db0eSSteve Raeconfig USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 87f221db0eSSteve Rae bool "DesignWare USB2.0 HS OTG controller 8-bit PHY bus width" 88f221db0eSSteve Rae help 89f221db0eSSteve Rae Set the Designware USB2.0 high-speed OTG controller 90f221db0eSSteve Rae PHY interface width to 8 bits, rather than the default (16 bits). 91f221db0eSSteve Rae 92f221db0eSSteve Raeendif # USB_GADGET_DWC2_OTG 93f221db0eSSteve Rae 943457bbafSSam Protsenkoconfig CI_UDC 953457bbafSSam Protsenko bool "ChipIdea device controller" 963457bbafSSam Protsenko select USB_GADGET_DUALSPEED 973457bbafSSam Protsenko help 983457bbafSSam Protsenko Say Y here to enable device controller functionality of the 993457bbafSSam Protsenko ChipIdea driver. 1003457bbafSSam Protsenko 101a59a77f8SSam Protsenkoconfig USB_GADGET_VBUS_DRAW 102a59a77f8SSam Protsenko int "Maximum VBUS Power usage (2-500 mA)" 103a59a77f8SSam Protsenko range 2 500 104a59a77f8SSam Protsenko default 2 105a59a77f8SSam Protsenko help 106a59a77f8SSam Protsenko Some devices need to draw power from USB when they are 107a59a77f8SSam Protsenko configured, perhaps to operate circuitry or to recharge 108a59a77f8SSam Protsenko batteries. This is in addition to any local power supply, 109a59a77f8SSam Protsenko such as an AC adapter or batteries. 110a59a77f8SSam Protsenko 111a59a77f8SSam Protsenko Enter the maximum power your device draws through USB, in 112a59a77f8SSam Protsenko milliAmperes. The permitted range of values is 2 - 500 mA; 113a59a77f8SSam Protsenko 0 mA would be legal, but can make some hosts misbehave. 114a59a77f8SSam Protsenko 115a59a77f8SSam Protsenko This value will be used except for system-specific gadget 116a59a77f8SSam Protsenko drivers that have more specific information. 117a59a77f8SSam Protsenko 1183457bbafSSam Protsenko# Selected by UDC drivers that support high-speed operation. 1193457bbafSSam Protsenkoconfig USB_GADGET_DUALSPEED 1203457bbafSSam Protsenko bool 1213457bbafSSam Protsenko 122aaa4a9e3SSam Protsenkoconfig USB_GADGET_DOWNLOAD 123aaa4a9e3SSam Protsenko bool "Enable USB download gadget" 124aaa4a9e3SSam Protsenko help 125aaa4a9e3SSam Protsenko Composite USB download gadget support (g_dnl) for download functions. 126aaa4a9e3SSam Protsenko This code works on top of composite gadget. 127aaa4a9e3SSam Protsenko 128e6c0bc06SSam Protsenkoif USB_GADGET_DOWNLOAD 129e6c0bc06SSam Protsenko 1305661f08aSStefan Agnerconfig USB_FUNCTION_SDP 1315661f08aSStefan Agner bool "Enable USB SDP (Serial Download Protocol)" 1325661f08aSStefan Agner help 1335661f08aSStefan Agner Enable Serial Download Protocol (SDP) device support in U-Boot. This 1345661f08aSStefan Agner allows to download images into memory and execute (jump to) them 1355661f08aSStefan Agner using the same protocol as implemented by the i.MX family's boot ROM. 1365661f08aSStefan Agner 1378f2649d8SMaxime Ripardendif # USB_GADGET_DOWNLOAD 1388f2649d8SMaxime Ripard 13974fae1c7SMaxime Ripardconfig USB_ETHER 14074fae1c7SMaxime Ripard bool "USB Ethernet Gadget" 141*9781b677SAlex Kiernan depends on NET 14274fae1c7SMaxime Ripard help 14374fae1c7SMaxime Ripard Creates an Ethernet network device through a USB peripheral 14474fae1c7SMaxime Ripard controller. This will create a network interface on both the device 14574fae1c7SMaxime Ripard (U-Boot) and the host (remote device) that can be used just like any 14674fae1c7SMaxime Ripard other nework interface. 14774fae1c7SMaxime Ripard It will bind on the peripheral USB controller, ignoring the USB hosts 14874fae1c7SMaxime Ripard controllers in the system. 14974fae1c7SMaxime Ripard 15074fae1c7SMaxime Ripardif USB_ETHER 15174fae1c7SMaxime Ripard 15268e15c2bSMaxime Ripardchoice 15368e15c2bSMaxime Ripard prompt "USB Ethernet Gadget Model" 15468e15c2bSMaxime Ripard default USB_ETH_RNDIS 15568e15c2bSMaxime Ripard help 15668e15c2bSMaxime Ripard There is several models (protocols) to implement Ethernet over USB 15768e15c2bSMaxime Ripard devices. The main ones are Microsoft's RNDIS and USB's CDC-Ethernet 15868e15c2bSMaxime Ripard (also called CDC-ECM). RNDIS is obviously compatible with Windows, 15968e15c2bSMaxime Ripard while CDC-ECM is not. Most other operating systems support both, so 16068e15c2bSMaxime Ripard if inter-operability is a concern, RNDIS is to be preferred. 16168e15c2bSMaxime Ripard 16268e15c2bSMaxime Ripardconfig USB_ETH_CDC 16368e15c2bSMaxime Ripard bool "CDC-ECM Protocol" 16468e15c2bSMaxime Ripard help 16568e15c2bSMaxime Ripard CDC (Communications Device Class) is the standard for Ethernet over 16668e15c2bSMaxime Ripard USB devices. While there's several alternatives, the most widely used 16768e15c2bSMaxime Ripard protocol is ECM (Ethernet Control Model). However, compatibility with 16868e15c2bSMaxime Ripard Windows is not that great. 16968e15c2bSMaxime Ripard 17068e15c2bSMaxime Ripardconfig USB_ETH_RNDIS 17168e15c2bSMaxime Ripard bool "RNDIS Protocol" 17268e15c2bSMaxime Ripard help 17368e15c2bSMaxime Ripard The RNDIS (Remote Network Driver Interface Specification) is a 17468e15c2bSMaxime Ripard Microsoft proprietary protocol to create an Ethernet device over USB. 17568e15c2bSMaxime Ripard Windows obviously supports it, as well as all the major operating 17668e15c2bSMaxime Ripard systems, so it's the best option for compatibility. 17768e15c2bSMaxime Ripard 17868e15c2bSMaxime Ripardendchoice 17968e15c2bSMaxime Ripard 180d4a37553SMugunthan V Nconfig USBNET_DEVADDR 181d4a37553SMugunthan V N string "USB Gadget Ethernet device mac address" 182d4a37553SMugunthan V N default "de:ad:be:ef:00:01" 1830c3f0a1eSMaxime Ripard help 1840c3f0a1eSMaxime Ripard Ethernet MAC address of the device-side (ie. local board's) MAC 1850c3f0a1eSMaxime Ripard address of the usb_ether interface 186d4a37553SMugunthan V N 18717c5fbc9SMaxime Ripardconfig USBNET_HOST_ADDR 18817c5fbc9SMaxime Ripard string "USB Gadget Ethernet host mac address" 18917c5fbc9SMaxime Ripard default "de:ad:be:ef:00:00" 19017c5fbc9SMaxime Ripard help 19117c5fbc9SMaxime Ripard Ethernet MAC address of the host-side (ie. remote device's) MAC 19217c5fbc9SMaxime Ripard address of the usb_ether interface 19317c5fbc9SMaxime Ripard 19474fae1c7SMaxime Ripardendif # USB_ETHER 19574fae1c7SMaxime Ripard 196a59a77f8SSam Protsenkoendif # USB_GADGET 197