diff mbox

[U-Boot,12/12] sunxi: MUSB gadget config provisions, with fastboot and USB mass storage support

Message ID 1437554735-11728-12-git-send-email-contact@paulk.fr
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Paul Kocialkowski July 22, 2015, 8:45 a.m. UTC
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 | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Hans de Goede July 22, 2015, 9:34 a.m. UTC | #1
Hi,

On 22-07-15 10:45, Paul Kocialkowski wrote:
> 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>

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>   include/configs/sunxi-common.h | 30 ++++++++++++++++++++++++++++++
>   1 file changed, 30 insertions(+)
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 3d57129..b2eb306 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -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
> +
>   #if defined CONFIG_USB_EHCI_HCD || defined CONFIG_USB_MUSB_HOST
>   #define CONFIG_CMD_USB
>   #endif
>
diff mbox

Patch

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 3d57129..b2eb306 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -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
+
 #if defined CONFIG_USB_EHCI_HCD || defined CONFIG_USB_MUSB_HOST
 #define CONFIG_CMD_USB
 #endif