]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM: tegra: add usb_vbus entry for OTG driver
authorRakesh Bodla <rbodla@nvidia.com>
Wed, 12 Jun 2013 06:25:22 +0000 (11:55 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:28:21 +0000 (13:28 -0700)
If USB port has OTG support, allow the OTG driver
to control the vbus. Adding the usb_vbus entry
for OTG driver.

Bug 934024

Change-Id: I86253d145a6ff966e7a4e50deee695efe8545b88
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/239340
(cherry picked from commit 1e550fe0c2df52668af16b5b1fcff0a83d1f2466)
Reviewed-on: http://git-master/r/247150
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
arch/arm/mach-tegra/board-ardbeg-power.c
arch/arm/mach-tegra/board-dalmore-power.c
arch/arm/mach-tegra/board-laguna-power.c
arch/arm/mach-tegra/board-macallan-power.c
arch/arm/mach-tegra/board-pismo-power.c
arch/arm/mach-tegra/board-pluto-power.c
arch/arm/mach-tegra/board-roth-power.c
drivers/usb/phy/phy-tegra-usb.c

index 1a059d1b08f955ef11da3fa9aa056c433852dc5d..37ea578e64c00eb74ce951a1f5476049e60ef457 100644 (file)
@@ -1086,6 +1086,7 @@ static struct regulator_consumer_supply fixed_reg_en_battery_e1733_supply[] = {
 /* EN_USB1_VBUS From TEGRA GPIO PN4 */
 static struct regulator_consumer_supply fixed_reg_en_usb1_vbus_supply[] = {
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.1"),
        REGULATOR_SUPPLY("usb_vbus", "tegra-xhci"),
 };
@@ -1180,6 +1181,7 @@ static struct regulator_consumer_supply fixed_reg_en_vdd_cdc_3v3a_supply[] = {
 
 static struct regulator_consumer_supply fixed_reg_en_vdd_usb0_5v0_supply[] = {
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.2"),
        REGULATOR_SUPPLY("usb_vbus", "tegra-xhci"),
 };
index d6b736b587e5e8c870e147a29ea75f3c505a05ee..13f1af4b4608c0959282d659a55c889e07e2ca3f 100644 (file)
@@ -812,6 +812,7 @@ static struct regulator_consumer_supply fixed_reg_lcd_bl_en_supply[] = {
 /* EN_USB1_VBUS From TEGRA GPIO PN4 PR3(T30) */
 static struct regulator_consumer_supply fixed_reg_usb1_vbus_supply[] = {
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
 };
 
 /* EN_3V3_FUSE From TEGRA GPIO PX4 */
index 2440d07d94b339eb336278adff7b1ebca75b9673..7464907eba136fa180f403af360f02997f8262c1 100644 (file)
@@ -423,6 +423,7 @@ static struct regulator_consumer_supply fixed_reg_aon_1v2_supply[] = {
 /* EN_USB1_VBUS From TEGRA GPIO PN4 */
 static struct regulator_consumer_supply fixed_reg_usb1_vbus_supply[] = {
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
 
 };
 
index cb276e5d3ba74260665a1f00e0c9811b28ce9774..707df723c3712818c3a9903895d8a5c8fb76f239 100644 (file)
@@ -65,6 +65,7 @@
 /* BQ2419X VBUS regulator */
 static struct regulator_consumer_supply bq2419x_vbus_supply[] = {
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
 };
 
 static struct regulator_consumer_supply bq2419x_batt_supply[] = {
index 0f4c5342252aeb7e278007a67c85f0b2290f19e7..f2c738730627400cabb6d0819540648550f5685f 100644 (file)
@@ -692,6 +692,7 @@ static struct regulator_consumer_supply fixed_reg_vdd_hdmi_5v0_supply[] = {
 /* Not gated */
 static struct regulator_consumer_supply fixed_reg_usb1_vbus_supply[] = {
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
 };
 
 /* Not Gated */
index 194486da8e961979cd4f926af4904797a64b88fd..9e74bf109037fd1f2d883373abc17879fdd1b82c 100644 (file)
@@ -131,9 +131,9 @@ static struct regulator_consumer_supply palmas_smps9_supply[] = {
 static struct regulator_consumer_supply palmas_smps10_supply[] = {
        REGULATOR_SUPPLY("unused_smps10", NULL),
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
        REGULATOR_SUPPLY("avddio_usb", "tegra-xhci"),
        REGULATOR_SUPPLY("usb_vbus", "tegra-xhci"),
-
        REGULATOR_SUPPLY("vdd_lcd", NULL),
 };
 
index 769949253577b12c8fecc738af04706522dd431c..3c7f6fd53275e227b7a057ee77d0dcc08e17c8f0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/board-roth-power.c
  *
- * Copyright (c) 2012 NVIDIA Corporation. All rights reserved.
+ * Copyright (c) 2012-2013 NVIDIA Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -96,6 +96,7 @@ static struct i2c_board_info __initdata tps51632_boardinfo[] = {
 /* BQ2419X VBUS regulator */
 static struct regulator_consumer_supply bq2419x_vbus_supply[] = {
        REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
 };
 
 static struct regulator_consumer_supply bq2419x_batt_supply[] = {
index 381b16fb6c559162783d22a56b7e7b0915f7621a..6df8d209e2747065b81d4f21d0e8896b33a0c597 100644 (file)
@@ -103,6 +103,10 @@ struct tegra_usb_phy *get_tegra_phy(struct usb_phy *x)
 
 static void usb_host_vbus_enable(struct tegra_usb_phy *phy, bool enable)
 {
+       /* OTG driver will take care for OTG port */
+       if (phy->pdata->port_otg)
+               return;
+
        if (phy->vbus_reg) {
                if (enable)
                        regulator_enable(phy->vbus_reg);