diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-10-23 17:43:44 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-10-23 17:43:44 +0200 |
commit | 3385e637a4d041e518a926c11c1df571732951a2 (patch) | |
tree | 9331428a6406ec78638352df1248898a2de48917 | |
parent | 0b206b99b8b7c27e70fb91bc13e2255cb0cfeb28 (diff) |
colibri_t30: fix usb host device detection with colibri otg driver
Turns out the Tegra 3 USB PHY driver had some hard coded dependency on
the Tegra OTG driver but we usually just use our own OTG driver purely
relying on a cable detect GPIO to determine USB device vs. host role.
-rw-r--r-- | arch/arm/mach-tegra/tegra3_usb_phy.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra3_usb_phy.c b/arch/arm/mach-tegra/tegra3_usb_phy.c index f1a1e0874946..1825027aa811 100644 --- a/arch/arm/mach-tegra/tegra3_usb_phy.c +++ b/arch/arm/mach-tegra/tegra3_usb_phy.c @@ -33,6 +33,10 @@ #include "gpio-names.h" #include "fuse.h" +#ifdef CONFIG_USB_COLIBRI_OTG +#include "board-colibri_t30.h" +#endif + #define USB_USBCMD 0x130 #define USB_USBCMD_RS (1 << 0) #define USB_CMD_RESET (1<<1) @@ -1489,8 +1493,12 @@ static int utmi_phy_power_off(struct tegra_usb_phy *phy) /* if it is OTG port then make sure to enable hot-plug feature only if host adaptor is connected, i.e id is low */ if (phy->pdata->port_otg) { +#ifdef CONFIG_USB_COLIBRI_OTG + enable_hotplug = gpio_get_value(USBC_DET) ? false : true; +#else val = readl(base + USB_PHY_VBUS_WAKEUP_ID); enable_hotplug = (val & USB_ID_STATUS) ? false : true; +#endif } if (enable_hotplug) { /* Enable wakeup event of device plug-in/plug-out */ |