xref: /openbmc/u-boot/drivers/usb/gadget/Kconfig (revision a59a77f8)
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.
36*a59a77f8SSam Protsenko
37*a59a77f8SSam Protsenkoif USB_GADGET
38*a59a77f8SSam Protsenko
39*a59a77f8SSam Protsenkoconfig USB_GADGET_VBUS_DRAW
40*a59a77f8SSam Protsenko	int "Maximum VBUS Power usage (2-500 mA)"
41*a59a77f8SSam Protsenko	range 2 500
42*a59a77f8SSam Protsenko	default 2
43*a59a77f8SSam Protsenko	help
44*a59a77f8SSam Protsenko	   Some devices need to draw power from USB when they are
45*a59a77f8SSam Protsenko	   configured, perhaps to operate circuitry or to recharge
46*a59a77f8SSam Protsenko	   batteries.  This is in addition to any local power supply,
47*a59a77f8SSam Protsenko	   such as an AC adapter or batteries.
48*a59a77f8SSam Protsenko
49*a59a77f8SSam Protsenko	   Enter the maximum power your device draws through USB, in
50*a59a77f8SSam Protsenko	   milliAmperes.  The permitted range of values is 2 - 500 mA;
51*a59a77f8SSam Protsenko	   0 mA would be legal, but can make some hosts misbehave.
52*a59a77f8SSam Protsenko
53*a59a77f8SSam Protsenko	   This value will be used except for system-specific gadget
54*a59a77f8SSam Protsenko	   drivers that have more specific information.
55*a59a77f8SSam Protsenko
56*a59a77f8SSam Protsenkoendif # USB_GADGET
57