diff options
author | Adam Ford <aford173@gmail.com> | 2016-01-31 22:34:39 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-02-08 18:10:43 +0300 |
commit | 588e41d2c7cd689295822e8fb00428aa8d91a580 (patch) | |
tree | 2f9322c0d853da2fb10935980411282ddd0d92b7 /board/logicpd | |
parent | 92d05e50d957fc8d1e07770991cac0a6cf20e59e (diff) | |
download | u-boot-588e41d2c7cd689295822e8fb00428aa8d91a580.tar.xz |
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 <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/logicpd')
-rw-r--r-- | board/logicpd/omap3som/omap3logic.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index 27ea4bbe4f..b5c44f915b 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -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; } |