summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/host.c
diff options
context:
space:
mode:
authorPiyush Mehta <piyush.mehta@xilinx.com>2022-08-22 11:10:51 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-31 09:07:52 +0200
commit66d1c8021e1d9c97101d58fa09c33c002d96747a (patch)
treeb581ba435464344857cd2ff852d58c676edd5bc2 /drivers/usb/chipidea/host.c
parent6b91a8e3412a13a8cb1ec610c702db96301c0da0 (diff)
usb: chipidea: Add support for VBUS control with PHY
Some platforms make use of VBUS control over PHY which means controller driver has to access PHY registers to turn on/off VBUS line.This patch adds support for such platforms in chipidea. Flag 'CI_HDRC_PHY_VBUS_CONTROL' added to support VBus control feature. Acked-by: Peter Chen <peter.chen@kernel.org> Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com> Signed-off-by: Piyush Mehta <piyush.mehta@amd.com> Link: https://lore.kernel.org/r/20220822054051.2941282-1-piyush.mehta@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r--drivers/usb/chipidea/host.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index bdc3885c0d49..bc3634a54c6b 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -63,6 +63,13 @@ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)
priv->enabled = enable;
}
+ if (ci->platdata->flags & CI_HDRC_PHY_VBUS_CONTROL) {
+ if (enable)
+ usb_phy_vbus_on(ci->usb_phy);
+ else
+ usb_phy_vbus_off(ci->usb_phy);
+ }
+
if (enable && (ci->platdata->phy_mode == USBPHY_INTERFACE_MODE_HSIC)) {
/*
* Marvell 28nm HSIC PHY requires forcing the port to HS mode.