diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2011-08-03 19:44:54 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:48:04 -0800 |
commit | c8f78446db41f1f0b136ad603e962913bbcb072f (patch) | |
tree | 2eca6b15d8762ff0b595358cfb3cacc0074cfdf4 /arch/arm/mach-tegra/usb_phy.c | |
parent | bd3ac96ba64f0899d18d898ad2439a6668c697e0 (diff) |
arm: tegra: usb_phy: vddio_hsic power rail control
Switching off vddio_hsic power rail when hsic interface is
not getting used.
BUG 856606
Original-Change-Id: I804303a933a63e6af0faa035da889ebc65769137
Reviewed-on: http://git-master/r/44773
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Rececab71649aaeaa644cf949033485dc0b977b69
Diffstat (limited to 'arch/arm/mach-tegra/usb_phy.c')
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index a7fe6e21f5d4..31dfea11c8fe 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -1425,6 +1425,12 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy, bool is_dpd) void __iomem *base = phy->regs; struct tegra_uhsic_config *uhsic_config = phy->config; + if (uhsic_config->enable_gpio != -1) { + gpio_set_value_cansleep(uhsic_config->enable_gpio, 1); + /* keep hsic reset asserted for 1 ms */ + udelay(1000); + } + val = readl(base + UHSIC_PADS_CFG1); val &= ~(UHSIC_PD_BG | UHSIC_PD_TX | UHSIC_PD_TRK | UHSIC_PD_RX | UHSIC_PD_ZI | UHSIC_RPD_DATA | UHSIC_RPD_STROBE); @@ -1504,6 +1510,7 @@ static int uhsic_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd) { unsigned long val; void __iomem *base = phy->regs; + struct tegra_uhsic_config *uhsic_config = phy->config; val = readl(base + UHSIC_PADS_CFG1); val &= ~UHSIC_RPU_STROBE; @@ -1519,6 +1526,12 @@ static int uhsic_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd) val &= ~UHSIC_PHY_ENABLE; writel(val, base + USB_SUSP_CTRL); + if (uhsic_config->enable_gpio != -1) { + gpio_set_value_cansleep(uhsic_config->enable_gpio, 0); + /* keep hsic reset de-asserted for 1 ms */ + udelay(1000); + } + return 0; } |