Commit e02687bda96cc8ed942e14b558796d3043d24b23

Authored by Maxime Ripard
1 parent 10ac57fda3

sunxi: provide default USB gadget setup

All the Allwinner boards use the same manufacturer, VID and PID for the
gadgets. Make them the defaults to remove some boilerplate from our
defconfigs.

Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Showing 10 changed files with 3 additions and 27 deletions Side-by-side Diff

configs/A13-OLinuXino_defconfig
... ... @@ -32,8 +32,5 @@
32 32 CONFIG_USB_MUSB_GADGET=y
33 33 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
34 34 CONFIG_USB_GADGET=y
35   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
36   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
37   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
38 35 CONFIG_USB_GADGET_DOWNLOAD=y
configs/A20-OLinuXino-Lime2-eMMC_defconfig
... ... @@ -34,8 +34,5 @@
34 34 CONFIG_USB_MUSB_GADGET=y
35 35 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
36 36 CONFIG_USB_GADGET=y
37   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
38   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
39   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
40 37 CONFIG_USB_GADGET_DOWNLOAD=y
configs/A20-OLinuXino-Lime2_defconfig
... ... @@ -33,8 +33,5 @@
33 33 CONFIG_USB_MUSB_GADGET=y
34 34 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
35 35 CONFIG_USB_GADGET=y
36   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
37   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
38   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
39 36 CONFIG_USB_GADGET_DOWNLOAD=y
configs/CHIP_defconfig
... ... @@ -23,9 +23,6 @@
23 23 CONFIG_USB_MUSB_GADGET=y
24 24 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
25 25 CONFIG_USB_GADGET=y
26   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
27   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
28   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
29 26 CONFIG_USB_GADGET_DOWNLOAD=y
30 27 CONFIG_OF_LIBFDT_OVERLAY=y
configs/CHIP_pro_defconfig
... ... @@ -28,9 +28,6 @@
28 28 CONFIG_USB_MUSB_GADGET=y
29 29 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
30 30 CONFIG_USB_GADGET=y
31   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
32   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
33   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
34 31 CONFIG_USB_GADGET_DOWNLOAD=y
35 32 CONFIG_OF_LIBFDT_OVERLAY=y
configs/Cubietruck_defconfig
... ... @@ -33,8 +33,5 @@
33 33 CONFIG_USB_MUSB_GADGET=y
34 34 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
35 35 CONFIG_USB_GADGET=y
36   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
37   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
38   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
39 36 CONFIG_USB_GADGET_DOWNLOAD=y
configs/Nintendo_NES_Classic_Edition_defconfig
... ... @@ -23,8 +23,5 @@
23 23 CONFIG_USB_MUSB_GADGET=y
24 24 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
25 25 CONFIG_USB_GADGET=y
26   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
27   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
28   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
29 26 CONFIG_USB_GADGET_DOWNLOAD=y
configs/Sinlinx_SinA33_defconfig
... ... @@ -28,8 +28,5 @@
28 28 CONFIG_USB_MUSB_GADGET=y
29 29 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
30 30 CONFIG_USB_GADGET=y
31   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
32   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
33   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
34 31 CONFIG_USB_GADGET_DOWNLOAD=y
configs/parrot_r16_defconfig
... ... @@ -24,8 +24,5 @@
24 24 CONFIG_USB_MUSB_GADGET=y
25 25 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
26 26 CONFIG_USB_GADGET=y
27   -CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
28   -CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
29   -CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
30 27 CONFIG_USB_GADGET_DOWNLOAD=y
drivers/usb/gadget/Kconfig
... ... @@ -38,6 +38,7 @@
38 38  
39 39 config USB_GADGET_MANUFACTURER
40 40 string "Vendor name of the USB device"
  41 + default "Allwinner Technology" if ARCH_SUNXI
41 42 default "U-Boot"
42 43 help
43 44 Vendor name of the USB device emulated, reported to the host device.
... ... @@ -45,6 +46,7 @@
45 46  
46 47 config USB_GADGET_VENDOR_NUM
47 48 hex "Vendor ID of the USB device"
  49 + default 0x1f3a if ARCH_SUNXI
48 50 default 0x0
49 51 help
50 52 Vendor ID of the USB device emulated, reported to the host device.
... ... @@ -53,6 +55,7 @@
53 55  
54 56 config USB_GADGET_PRODUCT_NUM
55 57 hex "Product ID of the USB device"
  58 + default 0x1010 if ARCH_SUNXI
56 59 default 0x0
57 60 help
58 61 Product ID of the USB device emulated, reported to the host device.