OMAP3: omap3_logic: Enable Android Fastboot
PATCH 1/1 OMAP3: omap3_logic: Enable Android Fastboot
Android Fastboot requires USB. The TWL4030 PMIC on omap3_logic handles USB traffic. This patch sets up the USB gadget and Android Fastboot to match what is done in the omap3_beagle project.
Signed-off-by Adam Ford <[email protected]>
--- board/logicpd/omap3som/omap3logic.c | 37 +++++++++++++++++++++++++++++++++++++ include/configs/omap3_logic.h | 21 +++++++++++++++++++++ 2 files changed, 58 insertions(+)
board/logicpd/omap3som/omap3logic.c +37 -0
@@ -27,6 +27,11 @@#include <asm/gpio.h> #include <asm/mach-types.h> #include <linux/mtd/nand.h> +#include <asm/omap_musb.h> +#include <asm/errno.h> +#include <linux/usb/ch9.h> +#include <linux/usb/gadget.h> +#include <linux/usb/musb.h> #include "omap3logic.h" DECLARE_GLOBAL_DATA_PTR ;
@@ -105,6 +110,34 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) }#endif +#ifdef CONFIG_USB_MUSB_OMAP2PLUS +static struct musb_hdrc_config musb_config = { + .multipoint =1 , + .dyn_fifo =1 , + .num_eps =16 , + .ram_bits =12 , +}; + +static struct omap_musb_board_data musb_board_data = { + .interface_type =MUSB_INTERFACE_ULPI , +}; + +static struct musb_hdrc_platform_data musb_plat = { +#if defined(CONFIG_USB_MUSB_HOST ) + .mode = MUSB_HOST, +#elif defined(CONFIG_USB_MUSB_GADGET ) + .mode = MUSB_PERIPHERAL, +#else +#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET" +#endif + .config = &musb_config, + .power = 100, + .platform_ops = &omap2430_ops, + .board_data = &musb_board_data, +}; +#endif + +/* * Routine: misc_init_r * Description: Configure board specific parts
@@ -126,6 +159,10 @@ int misc_init_r(void)omap_die_id_display ();putc ('\n' ); +#ifdef CONFIG_USB_MUSB_OMAP2PLUS +musb_register (&musb_plat, &musb_board_data, (void *)MUSB_BASE ); +#endif +return 0 ; }
include/configs/omap3_logic.h +21 -0
@@ -74,8 +74,29 @@#define EXPANSION_EEPROM_I2C_BUS 2/* I2C Bus for AT24C64 */ #define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID +/* USB */ +#define CONFIG_USB_MUSB_GADGET +#define CONFIG_USB_MUSB_OMAP2PLUS +#define CONFIG_USB_MUSB_PIO_ONLY +#define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETHER_RNDIS +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_VBUS_DRAW 0 +#define CONFIG_USB_GADGET_DOWNLOAD +#define CONFIG_G_DNL_VENDOR_NUM 0x0451 +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022 +#define CONFIG_G_DNL_MANUFACTURER "TI" +#define CONFIG_USB_FUNCTION_FASTBOOT +#define CONFIG_CMD_FASTBOOT +#define CONFIG_ANDROID_BOOT_IMAGE +#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000 +#define CONFIG_SYS_CACHELINE_SIZE 64 +/* TWL4030 */ #define CONFIG_TWL4030_PWM +#define CONFIG_TWL4030_USB /* Board NAND Info. */ #ifdef CONFIG_NAND
Signature · 1 line
1.9.1
PATCH 1/1 OMAP3: omap3_logic: Enable Android Fastboot
Quoted 5 lines · Adam Ford
Android Fastboot requires USB. The TWL4030 PMIC on
omap3_logichandles USB traffic. This patch sets up the USB gadget and Android Fastboot to match what is done in theomap3_beagleproject.Signed-off-by Adam Ford <[email protected]>
Reviewed-by Tom Rini <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160204/9167ff87/attachment.sig>
Quoted 6 lines · Adam Ford
Android Fastboot requires USB. The TWL4030 PMIC on
omap3_logichandles USB traffic. This patch sets up the USB gadget and Android Fastboot to match what is done in theomap3_beagleproject.Signed-off-by Adam Ford <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160208/b8e0401a/attachment.sig>