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