#define tegra21x_hsic_trk_on(uphy) tegra21x_hsic_trk(uphy, true)
#define tegra21x_hsic_trk_off(uphy) tegra21x_hsic_trk(uphy, false)
-static int tegra21x_utmi_phy_init(struct phy *phy)
+int tegra21x_utmi_vbus_enable(struct phy *phy)
{
struct tegra_padctl_uphy *uphy = phy_get_drvdata(phy);
int port = utmi_phy_to_port(phy);
if (port < 0)
return port;
- TRACE(uphy->dev, "phy init UTMI port %d\n", port);
+ TRACE(uphy->dev, "enable vbus-%d\n", port);
mutex_lock(&uphy->lock);
return 0;
}
+EXPORT_SYMBOL_GPL(tegra21x_utmi_vbus_enable);
+
+static int tegra21x_utmi_phy_init(struct phy *phy)
+{
+ struct tegra_padctl_uphy *uphy = phy_get_drvdata(phy);
+ int port = utmi_phy_to_port(phy);
+
+ if (port < 0)
+ return port;
+
+ TRACE(uphy->dev, "phy init UTMI port %d\n", port);
+
+ return 0;
+}
static int tegra21x_utmi_phy_exit(struct phy *phy)
{
void (*set_protection_level)(struct phy *utmi_phy,
int level, enum tegra_vbus_dir dir);
int (*utmi_vbus_power_on)(struct phy *phy);
+ int (*utmi_vbus_enable)(struct phy *phy);
int (*utmi_vbus_power_off)(struct phy *phy);
int (*overcurrent_detected)(struct phy *phy);
void (*handle_overcurrent)(struct phy *phy);
tegra18x_phy_xusb_utmi_pad_set_protection_level,
.utmi_vbus_power_on = tegra18x_phy_xusb_utmi_vbus_power_on,
.utmi_vbus_power_off = tegra18x_phy_xusb_utmi_vbus_power_off,
+ .utmi_vbus_enable = tegra18x_utmi_vbus_enable,
.overcurrent_detected = tegra18x_phy_xusb_overcurrent_detected,
.handle_overcurrent = tegra18x_phy_xusb_handle_overcurrent,
.set_id_override = tegra18x_phy_xusb_set_id_override,
tegra21x_phy_xusb_utmi_pad_set_protection_level,
.utmi_vbus_power_on = tegra21x_phy_xusb_utmi_vbus_power_on,
.utmi_vbus_power_off = tegra21x_phy_xusb_utmi_vbus_power_off,
+ .utmi_vbus_enable = tegra21x_utmi_vbus_enable,
.overcurrent_detected = tegra21x_phy_xusb_overcurrent_detected,
.handle_overcurrent = tegra21x_phy_xusb_handle_overcurrent,
.set_id_override = tegra21x_phy_xusb_set_id_override,
tegra21x_phy_xusb_utmi_pad_set_protection_level,
.utmi_vbus_power_on = tegra21x_phy_xusb_utmi_vbus_power_on,
.utmi_vbus_power_off = tegra21x_phy_xusb_utmi_vbus_power_off,
+ .utmi_vbus_enable = tegra21x_utmi_vbus_enable,
.overcurrent_detected = tegra21x_phy_xusb_overcurrent_detected,
.handle_overcurrent = tegra21x_phy_xusb_handle_overcurrent,
.set_id_override = tegra21x_phy_xusb_set_id_override,
goto put_usb2_hcd;
device_wakeup_enable(tegra->hcd->self.controller);
+ if (tegra->soc_config->utmi_vbus_enable) {
+ for (i = 0; i < tegra->soc_config->num_phys[UTMI_PHY]; i++) {
+ if (tegra->phys[UTMI_PHY][i]) {
+ ret = tegra->soc_config->utmi_vbus_enable(
+ tegra->phys[UTMI_PHY][i]);
+ if (ret)
+ dev_err(dev, "enable port vbus-%d failed %d\n",
+ i, ret);
+ }
+ }
+ }
+
xhci = hcd_to_xhci(tegra->hcd);
xhci->shared_hcd = usb_create_shared_hcd(&tegra_xhci_hc_driver,
dev, dev_name(dev),
u32 tegra21x_phy_xusb_noncompliant_div_detect(struct phy *phy);
int tegra21x_phy_xusb_utmi_vbus_power_on(struct phy *phy);
int tegra21x_phy_xusb_utmi_vbus_power_off(struct phy *phy);
+int tegra21x_utmi_vbus_enable(struct phy *phy);
int tegra21x_phy_xusb_overcurrent_detected(struct phy *phy);
void tegra21x_phy_xusb_handle_overcurrent(struct phy *phy);
int tegra21x_phy_xusb_set_id_override(struct phy *phy);
return 0;
}
+static inline int tegra21x_utmi_vbus_enable(struct phy *phy)
+{
+ return 0;
+}
+
static inline int tegra21x_phy_xusb_overcurrent_detected(struct phy *phy)
{
return 0;
bool tegra18x_phy_xusb_utmi_pad_secondary_charger_detect(struct phy *phy);
int tegra18x_phy_xusb_utmi_vbus_power_on(struct phy *phy);
int tegra18x_phy_xusb_utmi_vbus_power_off(struct phy *phy);
+int tegra18x_utmi_vbus_enable(struct phy *phy);
int tegra18x_phy_xusb_overcurrent_detected(struct phy *phy);
void tegra18x_phy_xusb_handle_overcurrent(struct phy *phy);
int tegra18x_phy_xusb_set_id_override(struct phy *phy);
return 0;
}
+static inline int tegra18x_utmi_vbus_enable(struct phy *phy)
+{
+ return 0;
+}
+
static inline int tegra18x_phy_xusb_overcurrent_detected(struct phy *phy)
{
return 0;