Kconfig 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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 "Rockchip" if ARCH_ROCKCHIP
  38. default "U-Boot"
  39. help
  40. Vendor name of the USB device emulated, reported to the host device.
  41. This is usually either the manufacturer of the device or the SoC.
  42. config USB_GADGET_VENDOR_NUM
  43. hex "Vendor ID of the USB device"
  44. default 0x1f3a if ARCH_SUNXI
  45. default 0x2207 if ARCH_ROCKCHIP
  46. default 0x0
  47. help
  48. Vendor ID of the USB device emulated, reported to the host device.
  49. This is usually the board or SoC vendor's, unless you've registered
  50. for one.
  51. config USB_GADGET_PRODUCT_NUM
  52. hex "Product ID of the USB device"
  53. default 0x1010 if ARCH_SUNXI
  54. default 0x310a if ROCKCHIP_RK3036
  55. default 0x310c if ROCKCHIP_RK3128
  56. default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
  57. default 0x330a if ROCKCHIP_RK3328
  58. default 0x330c if ROCKCHIP_RK3399
  59. default 0x0
  60. help
  61. Product ID of the USB device emulated, reported to the host device.
  62. config USB_GADGET_ATMEL_USBA
  63. bool "Atmel USBA"
  64. select USB_GADGET_DUALSPEED
  65. help
  66. USBA is the integrated high-speed USB Device controller on
  67. the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
  68. config USB_GADGET_BCM_UDC_OTG_PHY
  69. bool "Broadcom UDC OTG PHY"
  70. help
  71. Enable the Broadcom UDC OTG physical device interface.
  72. config USB_GADGET_DWC2_OTG
  73. bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
  74. select USB_GADGET_DUALSPEED
  75. help
  76. The Designware USB2.0 high-speed gadget controller
  77. integrated into many SoCs. Select this option if you want the
  78. driver to operate in Peripheral mode. This option requires
  79. USB_GADGET to be enabled.
  80. if USB_GADGET_DWC2_OTG
  81. config USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8
  82. bool "DesignWare USB2.0 HS OTG controller 8-bit PHY bus width"
  83. help
  84. Set the Designware USB2.0 high-speed OTG controller
  85. PHY interface width to 8 bits, rather than the default (16 bits).
  86. endif # USB_GADGET_DWC2_OTG
  87. config CI_UDC
  88. bool "ChipIdea device controller"
  89. select USB_GADGET_DUALSPEED
  90. help
  91. Say Y here to enable device controller functionality of the
  92. ChipIdea driver.
  93. config USB_GADGET_MAX3420
  94. bool "MAX3420 USB Over SPI"
  95. depends on DM_SPI
  96. help
  97. MAX3420, from MAXIM, implements USB-over-SPI Full-Speed device controller.
  98. config USB_GADGET_VBUS_DRAW
  99. int "Maximum VBUS Power usage (2-500 mA)"
  100. range 2 500
  101. default 2
  102. help
  103. Some devices need to draw power from USB when they are
  104. configured, perhaps to operate circuitry or to recharge
  105. batteries. This is in addition to any local power supply,
  106. such as an AC adapter or batteries.
  107. Enter the maximum power your device draws through USB, in
  108. milliAmperes. The permitted range of values is 2 - 500 mA;
  109. 0 mA would be legal, but can make some hosts misbehave.
  110. This value will be used except for system-specific gadget
  111. drivers that have more specific information.
  112. config SDP_LOADADDR
  113. hex "Default load address at SDP_WRITE and SDP_JUMP"
  114. default 0
  115. # Selected by UDC drivers that support high-speed operation.
  116. config USB_GADGET_DUALSPEED
  117. bool
  118. config USB_GADGET_DOWNLOAD
  119. bool "Enable USB download gadget"
  120. help
  121. Composite USB download gadget support (g_dnl) for download functions.
  122. This code works on top of composite gadget.
  123. if USB_GADGET_DOWNLOAD
  124. config USB_FUNCTION_MASS_STORAGE
  125. bool "Enable USB mass storage gadget"
  126. help
  127. Enable mass storage protocol support in U-Boot. It allows exporting
  128. the eMMC/SD card content to HOST PC so it can be mounted.
  129. config USB_FUNCTION_ROCKUSB
  130. bool "Enable USB rockusb gadget"
  131. help
  132. Rockusb protocol is widely used by Rockchip SoC based devices. It can
  133. read/write info, image to/from devices. This enables the USB part of
  134. the rockusb gadget.for more detail about Rockusb protocol, please see
  135. doc/README.rockusb
  136. config USB_FUNCTION_SDP
  137. bool "Enable USB SDP (Serial Download Protocol)"
  138. help
  139. Enable Serial Download Protocol (SDP) device support in U-Boot. This
  140. allows to download images into memory and execute (jump to) them
  141. using the same protocol as implemented by the i.MX family's boot ROM.
  142. config USB_FUNCTION_THOR
  143. bool "Enable USB THOR gadget"
  144. help
  145. Enable Tizen's THOR download protocol support in U-Boot. It
  146. allows downloading images into memory and flash them to target device.
  147. endif # USB_GADGET_DOWNLOAD
  148. config USB_ETHER
  149. bool "USB Ethernet Gadget"
  150. depends on NET
  151. default y if ARCH_SUNXI && USB_MUSB_GADGET
  152. help
  153. Creates an Ethernet network device through a USB peripheral
  154. controller. This will create a network interface on both the device
  155. (U-Boot) and the host (remote device) that can be used just like any
  156. other nework interface.
  157. It will bind on the peripheral USB controller, ignoring the USB hosts
  158. controllers in the system.
  159. if USB_ETHER
  160. choice
  161. prompt "USB Ethernet Gadget Model"
  162. default USB_ETH_RNDIS
  163. help
  164. There is several models (protocols) to implement Ethernet over USB
  165. devices. The main ones are Microsoft's RNDIS and USB's CDC-Ethernet
  166. (also called CDC-ECM). RNDIS is obviously compatible with Windows,
  167. while CDC-ECM is not. Most other operating systems support both, so
  168. if inter-operability is a concern, RNDIS is to be preferred.
  169. config USB_ETH_CDC
  170. bool "CDC-ECM Protocol"
  171. help
  172. CDC (Communications Device Class) is the standard for Ethernet over
  173. USB devices. While there's several alternatives, the most widely used
  174. protocol is ECM (Ethernet Control Model). However, compatibility with
  175. Windows is not that great.
  176. config USB_ETH_RNDIS
  177. bool "RNDIS Protocol"
  178. help
  179. The RNDIS (Remote Network Driver Interface Specification) is a
  180. Microsoft proprietary protocol to create an Ethernet device over USB.
  181. Windows obviously supports it, as well as all the major operating
  182. systems, so it's the best option for compatibility.
  183. endchoice
  184. config USBNET_DEVADDR
  185. string "USB Gadget Ethernet device mac address"
  186. default "de:ad:be:ef:00:01"
  187. help
  188. Ethernet MAC address of the device-side (ie. local board's) MAC
  189. address of the usb_ether interface
  190. config USBNET_HOST_ADDR
  191. string "USB Gadget Ethernet host mac address"
  192. default "de:ad:be:ef:00:00"
  193. help
  194. Ethernet MAC address of the host-side (ie. remote device's) MAC
  195. address of the usb_ether interface
  196. endif # USB_ETHER
  197. endif # USB_GADGET