|
@@ -112,7 +112,7 @@ static __init void da830_evm_usb_init(void)
|
|
|
int ret;
|
|
|
|
|
|
/*
|
|
|
- * Set up USB clock/mode in the CFGCHIP2 register.
|
|
|
+ * Set up USB clock in the CFGCHIP2 register.
|
|
|
* FYI: CFGCHIP2 is 0x0000ef00 initially.
|
|
|
*/
|
|
|
cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
|
|
@@ -129,22 +129,15 @@ static __init void da830_evm_usb_init(void)
|
|
|
cfgchip2 &= ~CFGCHIP2_USB1PHYCLKMUX;
|
|
|
cfgchip2 |= CFGCHIP2_USB2PHYCLKMUX;
|
|
|
|
|
|
- /*
|
|
|
- * We have to override VBUS/ID signals when MUSB is configured into the
|
|
|
- * host-only mode -- ID pin will float if no cable is connected, so the
|
|
|
- * controller won't be able to drive VBUS thinking that it's a B-device.
|
|
|
- * Otherwise, we want to use the OTG mode and enable VBUS comparators.
|
|
|
- */
|
|
|
- cfgchip2 &= ~CFGCHIP2_OTGMODE_MASK;
|
|
|
-#ifdef CONFIG_USB_MUSB_HOST
|
|
|
- cfgchip2 |= CFGCHIP2_FORCE_HOST;
|
|
|
-#else
|
|
|
- cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;
|
|
|
-#endif
|
|
|
-
|
|
|
__raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
|
|
|
|
|
|
/* USB_REFCLKIN is not used. */
|
|
|
+
|
|
|
+ ret = da8xx_register_usb_phy();
|
|
|
+ if (ret)
|
|
|
+ pr_warn("%s: USB PHY registration failed: %d\n",
|
|
|
+ __func__, ret);
|
|
|
+
|
|
|
ret = davinci_cfg_reg(DA830_USB0_DRVVBUS);
|
|
|
if (ret)
|
|
|
pr_warn("%s: USB 2.0 PinMux setup failed: %d\n", __func__, ret);
|