summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/board-da830-evm.c
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2016-10-27 03:18:15 +0300
committerSekhar Nori <nsekhar@ti.com>2016-10-31 14:50:27 +0300
commit9b504750923cb71473cf55e0a3a594a39e57e268 (patch)
treecc1046f7fa3fe7872016ccce53237334ba62ac2f /arch/arm/mach-davinci/board-da830-evm.c
parentec7cc27ed157a7323d08c31d73cada1dfe101642 (diff)
downloadlinux-9b504750923cb71473cf55e0a3a594a39e57e268.tar.xz
ARM: davinci: da8xx: Add USB PHY platform device
There is now a proper phy driver for the DA8xx SoC USB PHY. This adds the platform device declarations needed to use it. Signed-off-by: David Lechner <david@lechnology.com> [nsekhar@ti.com: keep usb-davinci.h included in board-da830-evm.c minor subject line adjustment] Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-da830-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 6001b32305ec..53172add5248 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -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);