USB: MUSB: Set transceiver interface type This patch programs the OTG_INTRFSEL register based on transcevier type passed from board file. Signed-off-by: Maulik Mankad <x0082077@xxxxxx> Cc: Felipe Balbi <felipe.balbi@xxxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Cc: Tony Lindgren <tony@xxxxxxxxxxx> Index: linux-2.6/drivers/usb/musb/musb_core.c =================================================================== --- linux-2.6.orig/drivers/usb/musb/musb_core.c +++ linux-2.6/drivers/usb/musb/musb_core.c @@ -1924,6 +1924,7 @@ bad_config: musb->board_set_power = plat->set_power; musb->set_clock = plat->set_clock; musb->min_power = plat->min_power; + musb->interface_type = plat->interface_type; /* Clock usage is chip-specific ... functional clock (DaVinci, * OMAP2430), or PHY ref (some TUSB6010 boards). All this core Index: linux-2.6/drivers/usb/musb/musb_core.h =================================================================== --- linux-2.6.orig/drivers/usb/musb/musb_core.h +++ linux-2.6/drivers/usb/musb/musb_core.h @@ -392,6 +392,7 @@ struct musb { u8 nr_endpoints; u8 board_mode; /* enum musb_mode */ + u8 interface_type; /* ULPI OR UTMI */ int (*board_set_power)(int state); int (*set_clock)(struct clk *clk, int is_active); Index: linux-2.6/drivers/usb/musb/omap2430.c =================================================================== --- linux-2.6.orig/drivers/usb/musb/omap2430.c +++ linux-2.6/drivers/usb/musb/omap2430.c @@ -236,7 +236,15 @@ int __init musb_platform_init(struct mus omap_writel(l, OTG_SYSCONFIG); l = omap_readl(OTG_INTERFSEL); - l |= ULPI_12PIN; + + if (musb->interface_type == MUSB_INTERFACE_UTMI) { + /* OMAP4 uses Internal PHY GS70 which uses UTMI interface */ + l &= ~ULPI_12PIN; /* Disable ULPI */ + l |= UTMI_8BIT; /* Enable UTMI */ + } else { + l |= ULPI_12PIN; + } + omap_writel(l, OTG_INTERFSEL); pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, " -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html