From: Ajay Kumar Gupta <ajay.gupta@xxxxxx> Enabled the phy control logic for am335x also based on usbss revision register. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx> Signed-off-by: Damodar Santhapuri <x0132156@xxxxxx> --- Earlier version of this patch based on function pointer was submitted at http://marc.info/?l=linux-usb&m=133583281512646&w=2 and was not accepted as Felipe wanted this to be done through system conrol module driver. arch/arm/plat-omap/include/plat/usb.h | 1 + drivers/usb/musb/musb_dsps.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index c2aa4ae..6459b10 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h @@ -121,6 +121,7 @@ extern void am35x_set_mode(u8 musb_mode); /* TI81XX specific definitions */ #define MUSB_USBSS_REV_816X 0x9 #define MUSB_USBSS_REV_814X 0xb +#define MUSB_USBSS_REV_33XX 0xd /* TI816X PHY controls bits */ #define TI816X_USBPHY0_NORMAL_MODE (1 << 0) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index f7271c3..171352c 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -140,16 +140,21 @@ static void musb_dsps_phy_control(struct dsps_glue *glue, u8 on) if (glue->usbss_rev == MUSB_USBSS_REV_816X) { usbphycfg |= TI816X_USBPHY0_NORMAL_MODE; usbphycfg &= ~TI816X_USBPHY_REFCLK_OSC; - } else if (glue->usbss_rev == MUSB_USBSS_REV_814X) { - usbphycfg &= ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN - | USBPHY_DPINPUT | USBPHY_DMINPUT); - usbphycfg |= (USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN - | USBPHY_DPOPBUFCTL | USBPHY_DMOPBUFCTL); + } else if (glue->usbss_rev == MUSB_USBSS_REV_814X || + glue->usbss_rev == MUSB_USBSS_REV_33XX) { + usbphycfg &= ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN); + usbphycfg |= USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN; + if (glue->usbss_rev == MUSB_USBSS_REV_814X) { + usbphycfg &= ~(USBPHY_DPINPUT | USBPHY_DMINPUT); + usbphycfg |= USBPHY_DPOPBUFCTL + | USBPHY_DMOPBUFCTL; + } } } else { if (glue->usbss_rev == MUSB_USBSS_REV_816X) usbphycfg &= ~TI816X_USBPHY0_NORMAL_MODE; - else if (glue->usbss_rev == MUSB_USBSS_REV_814X) + else if (glue->usbss_rev == MUSB_USBSS_REV_814X || + glue->usbss_rev == MUSB_USBSS_REV_33XX) usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN; } __raw_writel(usbphycfg, glue->usb_ctrl); -- 1.7.0.4 -- 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