/*
* 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>
* 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) {
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);