Kconfig 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. #
  2. # USB Gadget support on a system involves
  3. # (a) a peripheral controller, and
  4. # (b) the gadget driver using it.
  5. #
  6. # NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
  7. #
  8. # - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
  9. # - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
  10. # - Some systems have both kinds of controllers.
  11. #
  12. # With help from a special transceiver and a "Mini-AB" jack, systems with
  13. # both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
  14. #
  15. menuconfig USB_GADGET
  16. bool "USB Gadget Support"
  17. help
  18. USB is a master/slave protocol, organized with one master
  19. host (such as a PC) controlling up to 127 peripheral devices.
  20. The USB hardware is asymmetric, which makes it easier to set up:
  21. you can't connect a "to-the-host" connector to a peripheral.
  22. U-Boot can run in the host, or in the peripheral. In both cases
  23. you need a low level bus controller driver, and some software
  24. talking to it. Peripheral controllers are often discrete silicon,
  25. or are integrated with the CPU in a microcontroller. The more
  26. familiar host side controllers have names like "EHCI", "OHCI",
  27. or "UHCI", and are usually integrated into southbridges on PC
  28. motherboards.
  29. Enable this configuration option if you want to run U-Boot inside
  30. a USB peripheral device. Configure one hardware driver for your
  31. peripheral/device side bus controller, and a "gadget driver" for
  32. your peripheral protocol.
  33. if USB_GADGET
  34. config USB_GADGET_MANUFACTURER
  35. string "Vendor name of the USB device"
  36. default "Allwinner Technology" if ARCH_SUNXI
  37. default "U-Boot"
  38. help
  39. Vendor name of the USB device emulated, reported to the host device.
  40. This is usually either the manufacturer of the device or the SoC.
  41. config USB_GADGET_VENDOR_NUM
  42. hex "Vendor ID of the USB device"
  43. default 0x1f3a if ARCH_SUNXI
  44. default 0x0
  45. help
  46. Vendor ID of the USB device emulated, reported to the host device.
  47. This is usually the board or SoC vendor's, unless you've registered
  48. for one.
  49. config USB_GADGET_PRODUCT_NUM
  50. hex "Product ID of the USB device"
  51. default 0x1010 if ARCH_SUNXI
  52. default 0x0
  53. help
  54. Product ID of the USB device emulated, reported to the host device.
  55. config USB_GADGET_ATMEL_USBA
  56. bool "Atmel USBA"
  57. select USB_GADGET_DUALSPEED
  58. help
  59. USBA is the integrated high-speed USB Device controller on
  60. the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
  61. config USB_GADGET_BCM_UDC_OTG_PHY
  62. bool "Broadcom UDC OTG PHY"
  63. help
  64. Enable the Broadcom UDC OTG physical device interface.
  65. config USB_GADGET_DWC2_OTG
  66. bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
  67. select USB_GADGET_DUALSPEED
  68. help
  69. The Designware USB2.0 high-speed gadget controller
  70. integrated into many SoCs. Select this option if you want the
  71. driver to operate in Peripheral mode. This option requires
  72. USB_GADGET to be enabled.
  73. if USB_GADGET_DWC2_OTG
  74. config USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8
  75. bool "DesignWare USB2.0 HS OTG controller 8-bit PHY bus width"
  76. help
  77. Set the Designware USB2.0 high-speed OTG controller
  78. PHY interface width to 8 bits, rather than the default (16 bits).
  79. endif # USB_GADGET_DWC2_OTG
  80. config CI_UDC
  81. bool "ChipIdea device controller"
  82. select USB_GADGET_DUALSPEED
  83. help
  84. Say Y here to enable device controller functionality of the
  85. ChipIdea driver.
  86. config USB_GADGET_VBUS_DRAW
  87. int "Maximum VBUS Power usage (2-500 mA)"
  88. range 2 500
  89. default 2
  90. help
  91. Some devices need to draw power from USB when they are
  92. configured, perhaps to operate circuitry or to recharge
  93. batteries. This is in addition to any local power supply,
  94. such as an AC adapter or batteries.
  95. Enter the maximum power your device draws through USB, in
  96. milliAmperes. The permitted range of values is 2 - 500 mA;
  97. 0 mA would be legal, but can make some hosts misbehave.
  98. This value will be used except for system-specific gadget
  99. drivers that have more specific information.
  100. # Selected by UDC drivers that support high-speed operation.
  101. config USB_GADGET_DUALSPEED
  102. bool
  103. config USB_GADGET_DOWNLOAD
  104. bool "Enable USB download gadget"
  105. help
  106. Composite USB download gadget support (g_dnl) for download functions.
  107. This code works on top of composite gadget.
  108. if USB_GADGET_DOWNLOAD
  109. config USB_FUNCTION_MASS_STORAGE
  110. bool "Enable USB mass storage gadget"
  111. help
  112. Enable mass storage protocol support in U-Boot. It allows exporting
  113. the eMMC/SD card content to HOST PC so it can be mounted.
  114. config USB_FUNCTION_ROCKUSB
  115. bool "Enable USB rockusb gadget"
  116. help
  117. Rockusb protocol is widely used by Rockchip SoC based devices. It can
  118. read/write info, image to/from devices. This enables the USB part of
  119. the rockusb gadget.for more detail about Rockusb protocol, please see
  120. doc/README.rockusb
  121. config USB_FUNCTION_SDP
  122. bool "Enable USB SDP (Serial Download Protocol)"
  123. help
  124. Enable Serial Download Protocol (SDP) device support in U-Boot. This
  125. allows to download images into memory and execute (jump to) them
  126. using the same protocol as implemented by the i.MX family's boot ROM.
  127. config USB_FUNCTION_THOR
  128. bool "Enable USB THOR gadget"
  129. help
  130. Enable Tizen's THOR download protocol support in U-Boot. It
  131. allows downloading images into memory and flash them to target device.
  132. endif # USB_GADGET_DOWNLOAD
  133. config USB_ETHER
  134. bool "USB Ethernet Gadget"
  135. depends on NET
  136. default y if ARCH_SUNXI && USB_MUSB_GADGET
  137. help
  138. Creates an Ethernet network device through a USB peripheral
  139. controller. This will create a network interface on both the device
  140. (U-Boot) and the host (remote device) that can be used just like any
  141. other nework interface.
  142. It will bind on the peripheral USB controller, ignoring the USB hosts
  143. controllers in the system.
  144. if USB_ETHER
  145. choice
  146. prompt "USB Ethernet Gadget Model"
  147. default USB_ETH_RNDIS
  148. help
  149. There is several models (protocols) to implement Ethernet over USB
  150. devices. The main ones are Microsoft's RNDIS and USB's CDC-Ethernet
  151. (also called CDC-ECM). RNDIS is obviously compatible with Windows,
  152. while CDC-ECM is not. Most other operating systems support both, so
  153. if inter-operability is a concern, RNDIS is to be preferred.
  154. config USB_ETH_CDC
  155. bool "CDC-ECM Protocol"
  156. help
  157. CDC (Communications Device Class) is the standard for Ethernet over
  158. USB devices. While there's several alternatives, the most widely used
  159. protocol is ECM (Ethernet Control Model). However, compatibility with
  160. Windows is not that great.
  161. config USB_ETH_RNDIS
  162. bool "RNDIS Protocol"
  163. help
  164. The RNDIS (Remote Network Driver Interface Specification) is a
  165. Microsoft proprietary protocol to create an Ethernet device over USB.
  166. Windows obviously supports it, as well as all the major operating
  167. systems, so it's the best option for compatibility.
  168. endchoice
  169. config USBNET_DEVADDR
  170. string "USB Gadget Ethernet device mac address"
  171. default "de:ad:be:ef:00:01"
  172. help
  173. Ethernet MAC address of the device-side (ie. local board's) MAC
  174. address of the usb_ether interface
  175. config USBNET_HOST_ADDR
  176. string "USB Gadget Ethernet host mac address"
  177. default "de:ad:be:ef:00:00"
  178. help
  179. Ethernet MAC address of the host-side (ie. remote device's) MAC
  180. address of the usb_ether interface
  181. endif # USB_ETHER
  182. endif # USB_GADGET