]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM: tegra: phy: Power off USB AO pads
authorRakesh Bodla <rbodla@nvidia.com>
Tue, 12 Mar 2013 12:04:06 +0000 (17:34 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:04:25 +0000 (13:04 -0700)
Disable USB AO pads if gpio/pmu based id
detection is supported.

Bug 1227226

Change-Id: Idede651f9396a20f21009329c53a58e84b65d818
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/208405
(cherry picked from commit a6b28aa8a3d3e7c1d4fb4b502d3c8cc5329a0748)
Reviewed-on: http://git-master/r/211084
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
drivers/usb/phy/phy-tegra-usb.c
drivers/usb/phy/tegra11x_usb_phy.c

index da1ba0804d78df7f120904c744336588e121175c..34399ae944e785d4120696530cedbd3d0cded8e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Google, Inc.
- * Copyright (c) 2010-2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2010-2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * Author:
  *     Erik Gilling <konkers@google.com>
@@ -364,7 +364,7 @@ int tegra_usb_phy_power_off(struct tegra_usb_phy *phy)
                 * support through OTG is supported on the board.
                 */
                if (phy->pdata->u_data.dev.vbus_pmu_irq &&
-                       phy->pdata->builtin_host_disabled) {
+                       phy->pdata->id_det_type == TEGRA_USB_VIRTUAL_ID) {
                        tegra_clk_disable_unprepare(phy->ctrlr_clk);
                        phy->ctrl_clk_on = false;
                        if (phy->vdd_reg && phy->vdd_reg_on) {
index b24e9ae7b5190a939fe561fcc782c651f285ec5a..a09be3ba9cc16a4878dbaa2cddfd51fdff58524b 100644 (file)
@@ -764,13 +764,13 @@ static int utmi_phy_open(struct tegra_usb_phy *phy)
                return -EINVAL;
        }
 
-       /* Power-up the VBUS detector for UTMIP PHY */
+       /* Power-up the VBUS, ID detector for UTMIP PHY */
        val = readl(pmc_base + PMC_USB_AO);
        val &= ~(PMC_USB_AO_VBUS_WAKEUP_PD_P0);
-       if (phy->pdata->builtin_host_disabled)
-               val |= PMC_USB_AO_ID_PD_P0;
-       else
+       if (phy->pdata->id_det_type == TEGRA_USB_ID)
                val &= ~PMC_USB_AO_ID_PD_P0;
+       else
+               val |= PMC_USB_AO_ID_PD_P0;
        writel(val, (pmc_base + PMC_USB_AO));
 
        pmc->pmc_ops->powerup_pmc_wake_detect(pmc);