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>
/* 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"),
};
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"),
};
/* 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 */
/* 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"),
};
/* 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[] = {
/* 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 */
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),
};
/*
* 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
/* 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[] = {
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);