mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <dinguyen@opensource.altera.com>
To: <johnyoun@synopsys.com>
Cc: <dinh.linux@gmail.com>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Dinh Nguyen <dinguyen@opensource.altera.com>,
	Gregory Herrero <gregory.herrero@intel.com>,
	Mian Yousaf Kaukab <yousaf.kaukab@intel.com>,
	Felipe Balbi <balbi@ti.com>
Subject: [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition
Date: Tue, 26 May 2015 21:26:05 -0500	[thread overview]
Message-ID: <1432693565-31475-1-git-send-email-dinguyen@opensource.altera.com> (raw)

From: Dinh Nguyen <dinguyen@opensource.altera.com>

For platforms that use a ULPI phy, we should enable the external VbusValid
signal instead.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Gregory Herrero <gregory.herrero@intel.com>
Cc: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Cc: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/dwc2/core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index e5b546f..08ffdc6 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -807,6 +807,11 @@ int dwc2_core_init(struct dwc2_hsotg *hsotg, bool select_phy, int irq)
 	if (hsotg->core_params->ts_dline > 0)
 		usbcfg |= GUSBCFG_TERMSELDLPULSE;
 
+	/* Set external VBUS indicator as needed. */
+	if (hsotg->core_params->phy_type == DWC2_PHY_TYPE_PARAM_ULPI)
+		usbcfg |= (GUSBCFG_ULPI_INT_VBUS_IND |
+			   GUSBCFG_INDICATORPASSTHROUGH);
+
 	writel(usbcfg, hsotg->regs + GUSBCFG);
 
 	/* Reset the Controller */
-- 
2.2.1


             reply	other threads:[~2015-05-27  2:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27  2:26 dinguyen [this message]
2015-06-10  2:12 ` John Youn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432693565-31475-1-git-send-email-dinguyen@opensource.altera.com \
    --to=dinguyen@opensource.altera.com \
    --cc=balbi@ti.com \
    --cc=dinh.linux@gmail.com \
    --cc=gregory.herrero@intel.com \
    --cc=johnyoun@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=yousaf.kaukab@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®