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 393457bbafSSam Protsenkoconfig USB_GADGET_ATMEL_USBA 403457bbafSSam Protsenko bool "Atmel USBA" 413457bbafSSam Protsenko select USB_GADGET_DUALSPEED 423457bbafSSam Protsenko help 433457bbafSSam Protsenko USBA is the integrated high-speed USB Device controller on 443457bbafSSam Protsenko the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel. 453457bbafSSam Protsenko 46e016f0b2SSteve Raeconfig USB_GADGET_BCM_UDC_OTG_PHY 47e016f0b2SSteve Rae bool "Broadcom UDC OTG PHY" 48e016f0b2SSteve Rae help 49e016f0b2SSteve Rae Enable the Broadcom UDC OTG physical device interface. 50e016f0b2SSteve Rae 513457bbafSSam Protsenkoconfig USB_GADGET_DWC2_OTG 523457bbafSSam Protsenko bool "DesignWare USB2.0 HS OTG controller (gadget mode)" 533457bbafSSam Protsenko select USB_GADGET_DUALSPEED 543457bbafSSam Protsenko help 553457bbafSSam Protsenko The Designware USB2.0 high-speed gadget controller 563457bbafSSam Protsenko integrated into many SoCs. Select this option if you want the 573457bbafSSam Protsenko driver to operate in Peripheral mode. This option requires 583457bbafSSam Protsenko USB_GADGET to be enabled. 593457bbafSSam Protsenko 60f221db0eSSteve Raeif USB_GADGET_DWC2_OTG 61f221db0eSSteve Rae 62f221db0eSSteve Raeconfig USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 63f221db0eSSteve Rae bool "DesignWare USB2.0 HS OTG controller 8-bit PHY bus width" 64f221db0eSSteve Rae help 65f221db0eSSteve Rae Set the Designware USB2.0 high-speed OTG controller 66f221db0eSSteve Rae PHY interface width to 8 bits, rather than the default (16 bits). 67f221db0eSSteve Rae 68f221db0eSSteve Raeendif # USB_GADGET_DWC2_OTG 69f221db0eSSteve Rae 703457bbafSSam Protsenkoconfig CI_UDC 713457bbafSSam Protsenko bool "ChipIdea device controller" 723457bbafSSam Protsenko select USB_GADGET_DUALSPEED 733457bbafSSam Protsenko help 743457bbafSSam Protsenko Say Y here to enable device controller functionality of the 753457bbafSSam Protsenko ChipIdea driver. 763457bbafSSam Protsenko 77a59a77f8SSam Protsenkoconfig USB_GADGET_VBUS_DRAW 78a59a77f8SSam Protsenko int "Maximum VBUS Power usage (2-500 mA)" 79a59a77f8SSam Protsenko range 2 500 80a59a77f8SSam Protsenko default 2 81a59a77f8SSam Protsenko help 82a59a77f8SSam Protsenko Some devices need to draw power from USB when they are 83a59a77f8SSam Protsenko configured, perhaps to operate circuitry or to recharge 84a59a77f8SSam Protsenko batteries. This is in addition to any local power supply, 85a59a77f8SSam Protsenko such as an AC adapter or batteries. 86a59a77f8SSam Protsenko 87a59a77f8SSam Protsenko Enter the maximum power your device draws through USB, in 88a59a77f8SSam Protsenko milliAmperes. The permitted range of values is 2 - 500 mA; 89a59a77f8SSam Protsenko 0 mA would be legal, but can make some hosts misbehave. 90a59a77f8SSam Protsenko 91a59a77f8SSam Protsenko This value will be used except for system-specific gadget 92a59a77f8SSam Protsenko drivers that have more specific information. 93a59a77f8SSam Protsenko 943457bbafSSam Protsenko# Selected by UDC drivers that support high-speed operation. 953457bbafSSam Protsenkoconfig USB_GADGET_DUALSPEED 963457bbafSSam Protsenko bool 973457bbafSSam Protsenko 98aaa4a9e3SSam Protsenkoconfig USB_GADGET_DOWNLOAD 99aaa4a9e3SSam Protsenko bool "Enable USB download gadget" 100aaa4a9e3SSam Protsenko help 101aaa4a9e3SSam Protsenko Composite USB download gadget support (g_dnl) for download functions. 102aaa4a9e3SSam Protsenko This code works on top of composite gadget. 103aaa4a9e3SSam Protsenko 104e6c0bc06SSam Protsenkoif USB_GADGET_DOWNLOAD 105e6c0bc06SSam Protsenko 1065661f08aSStefan Agnerconfig USB_FUNCTION_SDP 1075661f08aSStefan Agner bool "Enable USB SDP (Serial Download Protocol)" 1085661f08aSStefan Agner help 1095661f08aSStefan Agner Enable Serial Download Protocol (SDP) device support in U-Boot. This 1105661f08aSStefan Agner allows to download images into memory and execute (jump to) them 1115661f08aSStefan Agner using the same protocol as implemented by the i.MX family's boot ROM. 1125661f08aSStefan Agner 113e6c0bc06SSam Protsenkoconfig G_DNL_MANUFACTURER 114e6c0bc06SSam Protsenko string "Vendor name of USB device" 115e6c0bc06SSam Protsenko 116e6c0bc06SSam Protsenkoconfig G_DNL_VENDOR_NUM 117e6c0bc06SSam Protsenko hex "Vendor ID of USB device" 118e6c0bc06SSam Protsenko 119e6c0bc06SSam Protsenkoconfig G_DNL_PRODUCT_NUM 120e6c0bc06SSam Protsenko hex "Product ID of USB device" 121e6c0bc06SSam Protsenko 1225506ff14SMaxime Ripardendif # USB_GADGET_DOWNLOAD 1235506ff14SMaxime Ripard 124d4a37553SMugunthan V Nconfig USBNET_DEVADDR 125d4a37553SMugunthan V N string "USB Gadget Ethernet device mac address" 126d4a37553SMugunthan V N default "de:ad:be:ef:00:01" 12774e7997cSMaxime Ripard help 12874e7997cSMaxime Ripard Ethernet MAC address of the device-side (ie. local board's) MAC 12974e7997cSMaxime Ripard address of the usb_ether interface 130d4a37553SMugunthan V N 131*c163668aSMaxime Ripardconfig USBNET_HOST_ADDR 132*c163668aSMaxime Ripard string "USB Gadget Ethernet host mac address" 133*c163668aSMaxime Ripard default "de:ad:be:ef:00:00" 134*c163668aSMaxime Ripard help 135*c163668aSMaxime Ripard Ethernet MAC address of the host-side (ie. remote device's) MAC 136*c163668aSMaxime Ripard address of the usb_ether interface 137*c163668aSMaxime Ripard 138a59a77f8SSam Protsenkoendif # USB_GADGET 139