]> git.sur5r.net Git - u-boot/commitdiff
sunxi: MUSB gadget config provisions, with fastboot and USB mass storage support
authorPaul Kocialkowski <contact@paulk.fr>
Tue, 4 Aug 2015 15:04:11 +0000 (17:04 +0200)
committerMarek Vasut <marex@denx.de>
Wed, 5 Aug 2015 15:20:34 +0000 (17:20 +0200)
This adds some config options to the sunxi-common config to enable the USB
download gadget and the fastboot and USB mass storage functions.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
include/configs/sunxi-common.h

index 7ed208cb53dc224b16afbede4fa4a8cca78eede5..edcacd5c1487db110178f0edd2e14c93f6ac277a 100644 (file)
@@ -329,6 +329,36 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_USB_MUSB_PIO_ONLY
 #endif
 
+#ifdef CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_GADGET
+#define CONFIG_USB_GADGET_DUALSPEED
+#define CONFIG_USB_GADGET_VBUS_DRAW    0
+
+#define CONFIG_USB_GADGET_DOWNLOAD
+#define CONFIG_USB_FUNCTION_FASTBOOT
+#define CONFIG_USB_FUNCTION_MASS_STORAGE
+#endif
+
+#ifdef CONFIG_USB_GADGET_DOWNLOAD
+#define CONFIG_G_DNL_VENDOR_NUM                0x1f3a
+#define CONFIG_G_DNL_PRODUCT_NUM       0x1010
+#define CONFIG_G_DNL_MANUFACTURER      "Allwinner Technology"
+#endif
+
+#ifdef CONFIG_USB_FUNCTION_FASTBOOT
+#define CONFIG_CMD_FASTBOOT
+#define CONFIG_FASTBOOT_BUF_ADDR       CONFIG_SYS_LOAD_ADDR
+#define CONFIG_FASTBOOT_BUF_SIZE       0x2000000
+
+#define CONFIG_FASTBOOT_FLASH
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV  0
+#define CONFIG_EFI_PARTITION
+#endif
+
+#ifdef CONFIG_USB_FUNCTION_MASS_STORAGE
+#define CONFIG_CMD_USB_MASS_STORAGE
+#endif
+
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_CONSOLE_MUX
 #define CONFIG_PREBOOT