From 3385e637a4d041e518a926c11c1df571732951a2 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 23 Oct 2015 17:43:44 +0200 Subject: 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. --- arch/arm/mach-tegra/tegra3_usb_phy.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm/mach-tegra') 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 */ -- cgit v1.2.3