gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM
[oweals/u-boot.git] / drivers / usb / gadget / Kconfig
index 510efd67b9a4b37ccce5b9dbc88f239b198727cf..58ca82d4de6f71341f76a7478dd56fff55f5f6fc 100644 (file)
@@ -36,6 +36,37 @@ menuconfig USB_GADGET
 
 if USB_GADGET
 
 
 if USB_GADGET
 
+config USB_GADGET_MANUFACTURER
+       string "Vendor name of the USB device"
+       default "Allwinner Technology" if ARCH_SUNXI
+       default "Rockchip" if ARCH_ROCKCHIP
+       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"
+       default 0x1f3a if ARCH_SUNXI
+       default 0x2207 if ARCH_ROCKCHIP
+       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"
+       default 0x1010 if ARCH_SUNXI
+       default 0x310a if ROCKCHIP_RK3036
+       default 0x310c if ROCKCHIP_RK3128
+       default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
+       default 0x330a if ROCKCHIP_RK3328
+       default 0x330c if ROCKCHIP_RK3399
+       default 0x0
+       help
+         Product ID of the USB device emulated, reported to the host device.
+
 config USB_GADGET_ATMEL_USBA
        bool "Atmel USBA"
        select USB_GADGET_DUALSPEED
 config USB_GADGET_ATMEL_USBA
        bool "Atmel USBA"
        select USB_GADGET_DUALSPEED
@@ -103,6 +134,20 @@ config USB_GADGET_DOWNLOAD
 
 if USB_GADGET_DOWNLOAD
 
 
 if USB_GADGET_DOWNLOAD
 
+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.
+
+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
+
 config USB_FUNCTION_SDP
        bool "Enable USB SDP (Serial Download Protocol)"
        help
 config USB_FUNCTION_SDP
        bool "Enable USB SDP (Serial Download Protocol)"
        help
@@ -110,16 +155,55 @@ config USB_FUNCTION_SDP
          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.
 
          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.
 
-config G_DNL_MANUFACTURER
-       string "Vendor name of USB device"
+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.
+
+endif # USB_GADGET_DOWNLOAD
 
 
-config G_DNL_VENDOR_NUM
-       hex "Vendor ID of USB device"
+config USB_ETHER
+       bool "USB Ethernet Gadget"
+       depends on NET
+       default y if ARCH_SUNXI && USB_MUSB_GADGET
+       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
+
+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 G_DNL_PRODUCT_NUM
-       hex "Product ID of USB device"
+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.
 
 
-endif # USB_GADGET_DOWNLOAD
+endchoice
 
 config USBNET_DEVADDR
        string "USB Gadget Ethernet device mac address"
 
 config USBNET_DEVADDR
        string "USB Gadget Ethernet device mac address"
@@ -135,4 +219,6 @@ config USBNET_HOST_ADDR
          Ethernet MAC address of the host-side (ie. remote device's) MAC
          address of the usb_ether interface
 
          Ethernet MAC address of the host-side (ie. remote device's) MAC
          address of the usb_ether interface
 
+endif # USB_ETHER
+
 endif # USB_GADGET
 endif # USB_GADGET