2016-03-25 14:39:47 +00:00
|
|
|
#
|
|
|
|
# USB Gadget support on a system involves
|
|
|
|
# (a) a peripheral controller, and
|
|
|
|
# (b) the gadget driver using it.
|
|
|
|
#
|
|
|
|
# NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
|
|
|
|
#
|
|
|
|
# - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
|
|
|
|
# - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
|
|
|
|
# - Some systems have both kinds of controllers.
|
|
|
|
#
|
|
|
|
# With help from a special transceiver and a "Mini-AB" jack, systems with
|
|
|
|
# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
|
|
|
|
#
|
|
|
|
|
|
|
|
menuconfig USB_GADGET
|
|
|
|
bool "USB Gadget Support"
|
2021-07-09 14:11:56 +00:00
|
|
|
depends on DM
|
|
|
|
select DM_USB
|
2016-03-25 14:39:47 +00:00
|
|
|
help
|
|
|
|
USB is a master/slave protocol, organized with one master
|
|
|
|
host (such as a PC) controlling up to 127 peripheral devices.
|
|
|
|
The USB hardware is asymmetric, which makes it easier to set up:
|
|
|
|
you can't connect a "to-the-host" connector to a peripheral.
|
|
|
|
|
|
|
|
U-Boot can run in the host, or in the peripheral. In both cases
|
|
|
|
you need a low level bus controller driver, and some software
|
|
|
|
talking to it. Peripheral controllers are often discrete silicon,
|
|
|
|
or are integrated with the CPU in a microcontroller. The more
|
|
|
|
familiar host side controllers have names like "EHCI", "OHCI",
|
|
|
|
or "UHCI", and are usually integrated into southbridges on PC
|
|
|
|
motherboards.
|
|
|
|
|
|
|
|
Enable this configuration option if you want to run U-Boot inside
|
|
|
|
a USB peripheral device. Configure one hardware driver for your
|
|
|
|
peripheral/device side bus controller, and a "gadget driver" for
|
|
|
|
your peripheral protocol.
|
2016-04-13 11:20:24 +00:00
|
|
|
|
|
|
|
if USB_GADGET
|
|
|
|
|
2017-09-07 06:58:08 +00:00
|
|
|
config USB_GADGET_MANUFACTURER
|
|
|
|
string "Vendor name of the USB device"
|
2017-09-12 17:41:15 +00:00
|
|
|
default "Allwinner Technology" if ARCH_SUNXI
|
2019-11-19 08:26:14 +00:00
|
|
|
default "Rockchip" if ARCH_ROCKCHIP
|
2017-09-07 06:58:08 +00:00
|
|
|
default "U-Boot"
|
|
|
|
help
|
|
|
|
Vendor name of the USB device emulated, reported to the host device.
|
|
|
|
This is usually either the manufacturer of the device or the SoC.
|
|
|
|
|
|
|
|
config USB_GADGET_VENDOR_NUM
|
|
|
|
hex "Vendor ID of the USB device"
|
2017-09-12 17:41:15 +00:00
|
|
|
default 0x1f3a if ARCH_SUNXI
|
2019-11-19 08:26:15 +00:00
|
|
|
default 0x2207 if ARCH_ROCKCHIP
|
2017-09-07 06:58:08 +00:00
|
|
|
default 0x0
|
|
|
|
help
|
|
|
|
Vendor ID of the USB device emulated, reported to the host device.
|
|
|
|
This is usually the board or SoC vendor's, unless you've registered
|
|
|
|
for one.
|
|
|
|
|
|
|
|
config USB_GADGET_PRODUCT_NUM
|
|
|
|
hex "Product ID of the USB device"
|
2017-09-12 17:41:15 +00:00
|
|
|
default 0x1010 if ARCH_SUNXI
|
2019-11-19 08:26:16 +00:00
|
|
|
default 0x310a if ROCKCHIP_RK3036
|
2022-04-29 21:40:05 +00:00
|
|
|
default 0x300a if ROCKCHIP_RK3066
|
2019-11-19 08:26:17 +00:00
|
|
|
default 0x310c if ROCKCHIP_RK3128
|
2019-11-19 08:26:16 +00:00
|
|
|
default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
|
|
|
|
default 0x330a if ROCKCHIP_RK3328
|
2019-11-19 08:26:21 +00:00
|
|
|
default 0x330c if ROCKCHIP_RK3399
|
2017-09-07 06:58:08 +00:00
|
|
|
default 0x0
|
|
|
|
help
|
|
|
|
Product ID of the USB device emulated, reported to the host device.
|
|
|
|
|
2016-04-13 11:20:25 +00:00
|
|
|
config USB_GADGET_ATMEL_USBA
|
|
|
|
bool "Atmel USBA"
|
|
|
|
select USB_GADGET_DUALSPEED
|
|
|
|
help
|
|
|
|
USBA is the integrated high-speed USB Device controller on
|
|
|
|
the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
|
|
|
|
|
2016-08-16 00:26:26 +00:00
|
|
|
config USB_GADGET_BCM_UDC_OTG_PHY
|
|
|
|
bool "Broadcom UDC OTG PHY"
|
|
|
|
help
|
|
|
|
Enable the Broadcom UDC OTG physical device interface.
|
|
|
|
|
2016-04-13 11:20:25 +00:00
|
|
|
config USB_GADGET_DWC2_OTG
|
|
|
|
bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
|
|
|
|
select USB_GADGET_DUALSPEED
|
|
|
|
help
|
|
|
|
The Designware USB2.0 high-speed gadget controller
|
|
|
|
integrated into many SoCs. Select this option if you want the
|
|
|
|
driver to operate in Peripheral mode. This option requires
|
|
|
|
USB_GADGET to be enabled.
|
|
|
|
|
2016-06-07 22:35:21 +00:00
|
|
|
if USB_GADGET_DWC2_OTG
|
|
|
|
|
2022-06-15 16:03:52 +00:00
|
|
|
config USB_GADGET_DWC2_OTG_PHY
|
|
|
|
bool "DesignWare USB2.0 HS OTG PHY"
|
|
|
|
help
|
|
|
|
Enable the DesignWare USB2.0 HS OTG physical device interface.
|
|
|
|
|
2016-06-07 22:35:21 +00:00
|
|
|
config USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8
|
|
|
|
bool "DesignWare USB2.0 HS OTG controller 8-bit PHY bus width"
|
|
|
|
help
|
|
|
|
Set the Designware USB2.0 high-speed OTG controller
|
|
|
|
PHY interface width to 8 bits, rather than the default (16 bits).
|
|
|
|
|
|
|
|
endif # USB_GADGET_DWC2_OTG
|
|
|
|
|
2021-01-25 13:43:48 +00:00
|
|
|
config USB_GADGET_OS_DESCRIPTORS
|
|
|
|
bool "USB OS Feature Descriptors support"
|
|
|
|
help
|
|
|
|
This is a porting patch from linux kernel: 37a3a533429e
|
|
|
|
("usb: gadget: OS Feature Descriptors support"), the original commit
|
|
|
|
log see below:
|
|
|
|
There is a custom (non-USB IF) extension to the USB standard:
|
|
|
|
http://msdn.microsoft.com/library/windows/hardware/gg463182
|
|
|
|
|
2016-04-13 11:20:25 +00:00
|
|
|
config CI_UDC
|
|
|
|
bool "ChipIdea device controller"
|
|
|
|
select USB_GADGET_DUALSPEED
|
|
|
|
help
|
|
|
|
Say Y here to enable device controller functionality of the
|
|
|
|
ChipIdea driver.
|
|
|
|
|
2020-07-30 01:51:27 +00:00
|
|
|
config USB_GADGET_MAX3420
|
|
|
|
bool "MAX3420 USB Over SPI"
|
|
|
|
depends on DM_SPI
|
|
|
|
help
|
|
|
|
MAX3420, from MAXIM, implements USB-over-SPI Full-Speed device controller.
|
|
|
|
|
2016-04-13 11:20:24 +00:00
|
|
|
config USB_GADGET_VBUS_DRAW
|
|
|
|
int "Maximum VBUS Power usage (2-500 mA)"
|
|
|
|
range 2 500
|
|
|
|
default 2
|
|
|
|
help
|
|
|
|
Some devices need to draw power from USB when they are
|
|
|
|
configured, perhaps to operate circuitry or to recharge
|
|
|
|
batteries. This is in addition to any local power supply,
|
|
|
|
such as an AC adapter or batteries.
|
|
|
|
|
|
|
|
Enter the maximum power your device draws through USB, in
|
|
|
|
milliAmperes. The permitted range of values is 2 - 500 mA;
|
|
|
|
0 mA would be legal, but can make some hosts misbehave.
|
|
|
|
|
|
|
|
This value will be used except for system-specific gadget
|
|
|
|
drivers that have more specific information.
|
|
|
|
|
2020-04-29 02:35:11 +00:00
|
|
|
config SDP_LOADADDR
|
|
|
|
hex "Default load address at SDP_WRITE and SDP_JUMP"
|
|
|
|
default 0
|
|
|
|
|
2016-04-13 11:20:25 +00:00
|
|
|
# Selected by UDC drivers that support high-speed operation.
|
|
|
|
config USB_GADGET_DUALSPEED
|
|
|
|
bool
|
|
|
|
|
2016-04-13 11:20:26 +00:00
|
|
|
config USB_GADGET_DOWNLOAD
|
|
|
|
bool "Enable USB download gadget"
|
|
|
|
help
|
|
|
|
Composite USB download gadget support (g_dnl) for download functions.
|
|
|
|
This code works on top of composite gadget.
|
|
|
|
|
2016-04-13 11:20:30 +00:00
|
|
|
if USB_GADGET_DOWNLOAD
|
|
|
|
|
2018-01-29 18:25:54 +00:00
|
|
|
config USB_FUNCTION_MASS_STORAGE
|
|
|
|
bool "Enable USB mass storage gadget"
|
|
|
|
help
|
|
|
|
Enable mass storage protocol support in U-Boot. It allows exporting
|
|
|
|
the eMMC/SD card content to HOST PC so it can be mounted.
|
|
|
|
|
2017-12-15 00:17:10 +00:00
|
|
|
config USB_FUNCTION_ROCKUSB
|
|
|
|
bool "Enable USB rockusb gadget"
|
|
|
|
help
|
|
|
|
Rockusb protocol is widely used by Rockchip SoC based devices. It can
|
|
|
|
read/write info, image to/from devices. This enables the USB part of
|
|
|
|
the rockusb gadget.for more detail about Rockusb protocol, please see
|
|
|
|
doc/README.rockusb
|
|
|
|
|
2018-01-29 18:21:39 +00:00
|
|
|
config USB_FUNCTION_SDP
|
|
|
|
bool "Enable USB SDP (Serial Download Protocol)"
|
|
|
|
help
|
|
|
|
Enable Serial Download Protocol (SDP) device support in U-Boot. This
|
|
|
|
allows to download images into memory and execute (jump to) them
|
|
|
|
using the same protocol as implemented by the i.MX family's boot ROM.
|
|
|
|
|
2018-01-29 18:30:18 +00:00
|
|
|
config USB_FUNCTION_THOR
|
|
|
|
bool "Enable USB THOR gadget"
|
|
|
|
help
|
|
|
|
Enable Tizen's THOR download protocol support in U-Boot. It
|
|
|
|
allows downloading images into memory and flash them to target device.
|
|
|
|
|
2021-11-25 17:16:15 +00:00
|
|
|
config USB_FUNCTION_ACM
|
|
|
|
bool "Enable CDC ACM gadget"
|
|
|
|
select SYS_STDIO_DEREGISTER
|
|
|
|
select CIRCBUF
|
|
|
|
help
|
|
|
|
ACM serial link. This function can be used to create a stdio device to
|
|
|
|
interoperate with MS-Windows hosts or with the Linux-USB "cdc-acm"
|
|
|
|
driver.
|
|
|
|
|
2017-09-06 20:54:52 +00:00
|
|
|
endif # USB_GADGET_DOWNLOAD
|
|
|
|
|
2017-09-06 21:23:21 +00:00
|
|
|
config USB_ETHER
|
|
|
|
bool "USB Ethernet Gadget"
|
2018-04-01 09:22:36 +00:00
|
|
|
depends on NET
|
2017-09-22 07:51:37 +00:00
|
|
|
default y if ARCH_SUNXI && USB_MUSB_GADGET
|
2017-09-06 21:23:21 +00:00
|
|
|
help
|
|
|
|
Creates an Ethernet network device through a USB peripheral
|
|
|
|
controller. This will create a network interface on both the device
|
|
|
|
(U-Boot) and the host (remote device) that can be used just like any
|
|
|
|
other nework interface.
|
|
|
|
It will bind on the peripheral USB controller, ignoring the USB hosts
|
|
|
|
controllers in the system.
|
|
|
|
|
|
|
|
if USB_ETHER
|
|
|
|
|
2017-09-07 06:46:14 +00:00
|
|
|
choice
|
|
|
|
prompt "USB Ethernet Gadget Model"
|
|
|
|
default USB_ETH_RNDIS
|
|
|
|
help
|
|
|
|
There is several models (protocols) to implement Ethernet over USB
|
|
|
|
devices. The main ones are Microsoft's RNDIS and USB's CDC-Ethernet
|
|
|
|
(also called CDC-ECM). RNDIS is obviously compatible with Windows,
|
|
|
|
while CDC-ECM is not. Most other operating systems support both, so
|
|
|
|
if inter-operability is a concern, RNDIS is to be preferred.
|
|
|
|
|
|
|
|
config USB_ETH_CDC
|
|
|
|
bool "CDC-ECM Protocol"
|
|
|
|
help
|
|
|
|
CDC (Communications Device Class) is the standard for Ethernet over
|
|
|
|
USB devices. While there's several alternatives, the most widely used
|
|
|
|
protocol is ECM (Ethernet Control Model). However, compatibility with
|
|
|
|
Windows is not that great.
|
|
|
|
|
|
|
|
config USB_ETH_RNDIS
|
|
|
|
bool "RNDIS Protocol"
|
|
|
|
help
|
|
|
|
The RNDIS (Remote Network Driver Interface Specification) is a
|
|
|
|
Microsoft proprietary protocol to create an Ethernet device over USB.
|
|
|
|
Windows obviously supports it, as well as all the major operating
|
|
|
|
systems, so it's the best option for compatibility.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2022-10-08 14:50:56 +00:00
|
|
|
config USBNET_DEV_ADDR
|
2016-11-18 05:39:15 +00:00
|
|
|
string "USB Gadget Ethernet device mac address"
|
|
|
|
default "de:ad:be:ef:00:01"
|
2017-09-12 16:32:45 +00:00
|
|
|
help
|
|
|
|
Ethernet MAC address of the device-side (ie. local board's) MAC
|
|
|
|
address of the usb_ether interface
|
2016-11-18 05:39:15 +00:00
|
|
|
|
2017-09-06 20:53:43 +00:00
|
|
|
config USBNET_HOST_ADDR
|
|
|
|
string "USB Gadget Ethernet host mac address"
|
|
|
|
default "de:ad:be:ef:00:00"
|
|
|
|
help
|
|
|
|
Ethernet MAC address of the host-side (ie. remote device's) MAC
|
|
|
|
address of the usb_ether interface
|
|
|
|
|
2017-09-06 21:23:21 +00:00
|
|
|
endif # USB_ETHER
|
|
|
|
|
2016-04-13 11:20:24 +00:00
|
|
|
endif # USB_GADGET
|