aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-am3517evm.c
diff options
context:
space:
mode:
authorAjay Kumar Gupta <ajay.gupta@ti.com>2010-10-19 03:08:11 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:22:16 -0400
commit3a0d30bcdfa73bd865f29899eb4bf29b58c4f54a (patch)
tree0f566b569e34af9fab7e22e2feec853b9a5cbfb5 /arch/arm/mach-omap2/board-am3517evm.c
parent436a389096e1feda2c382cad83b6a8d6de8615a0 (diff)
USB: AM35x: Add musb support
AM35x has musb interface (version 1.8) and uses CPPI41 DMA engine. It has USB phy built inside the IP itself. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-omap2/board-am3517evm.c')
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 4d0f58592864..9ac9de6bb970 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -375,6 +375,31 @@ static void __init am3517_evm_init_irq(void)
375 omap_gpio_init(); 375 omap_gpio_init();
376} 376}
377 377
378static struct omap_musb_board_data musb_board_data = {
379 .interface_type = MUSB_INTERFACE_ULPI,
380 .mode = MUSB_OTG,
381 .power = 500,
382};
383
384static __init void am3517_evm_musb_init(void)
385{
386 u32 devconf2;
387
388 /*
389 * Set up USB clock/mode in the DEVCONF2 register.
390 */
391 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
392
393 /* USB2.0 PHY reference clock is 13 MHz */
394 devconf2 &= ~(CONF2_REFFREQ | CONF2_OTGMODE | CONF2_PHY_GPIOMODE);
395 devconf2 |= CONF2_REFFREQ_13MHZ | CONF2_SESENDEN | CONF2_VBDTCTEN
396 | CONF2_DATPOL;
397
398 omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2);
399
400 usb_musb_init(&musb_board_data);
401}
402
378static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 403static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
379 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, 404 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
380#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ 405#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
@@ -393,6 +418,8 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
393 418
394#ifdef CONFIG_OMAP_MUX 419#ifdef CONFIG_OMAP_MUX
395static struct omap_board_mux board_mux[] __initdata = { 420static struct omap_board_mux board_mux[] __initdata = {
421 /* USB OTG DRVVBUS offset = 0x212 */
422 OMAP3_MUX(SAD2D_MCAD23, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
396 { .reg_offset = OMAP_MUX_TERMINATOR }, 423 { .reg_offset = OMAP_MUX_TERMINATOR },
397}; 424};
398#else 425#else
@@ -459,6 +486,9 @@ static void __init am3517_evm_init(void)
459 ARRAY_SIZE(am3517evm_i2c1_boardinfo)); 486 ARRAY_SIZE(am3517evm_i2c1_boardinfo));
460 /*Ethernet*/ 487 /*Ethernet*/
461 am3517_evm_ethernet_init(&am3517_evm_emac_pdata); 488 am3517_evm_ethernet_init(&am3517_evm_emac_pdata);
489
490 /* MUSB */
491 am3517_evm_musb_init();
462} 492}
463 493
464MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") 494MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")