mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] USB: ehci-s5p: Fix phy reset
@ 2013-03-13  1:09 Alexander Graf
  2013-03-13 14:29 ` Alan Stern
  2013-03-13 17:28 ` Doug Anderson
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Graf @ 2013-03-13  1:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-usb, linux-samsung-soc, dmueller, Vivek Gautam, Jingoo Han,
	Alan Stern, Kukjin Kim, Felipe Balbi, Greg Kroah-Hartman

On my Exynos 5 based Arndale system, I need to pull the reset line down
and then let it go up again to actually perform a reset. Without that
reset, I can't find any USB hubs on my bus, rendering the USB controller
useless.

So this patch implements the above logic, making EHCI and OHCI work on
Arndale systems for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
CC: Vivek Gautam <gautam.vivek@samsung.com>
CC: Jingoo Han <jg1.han@samsung.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Kukjin Kim <kgene.kim@samsung.com>
CC: Felipe Balbi <balbi@ti.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---

As this affects 3.9, this patch should definitely be considered for inclusion
there.
---
 drivers/usb/host/ehci-s5p.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index 20ebf6a..c6d67e4 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -103,9 +103,15 @@ static void s5p_setup_vbus_gpio(struct platform_device *pdev)
 	if (!gpio_is_valid(gpio))
 		return;
 
-	err = gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "ehci_vbus_gpio");
-	if (err)
+	/* reset pulls the line down, then up again */
+	err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, "ehci_vbus_gpio");
+	if (err) {
 		dev_err(&pdev->dev, "can't request ehci vbus gpio %d", gpio);
+		return;
+	}
+	mdelay(1);
+	__gpio_set_value(gpio, 1);
+	gpio_free(gpio);
 }
 
 static u64 ehci_s5p_dma_mask = DMA_BIT_MASK(32);
-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-14  0:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13  1:09 [PATCH] USB: ehci-s5p: Fix phy reset Alexander Graf
2013-03-13 14:29 ` Alan Stern
2013-03-13 17:28 ` Doug Anderson
2013-03-13 17:45   ` Alexander Graf
2013-03-13 17:59     ` Doug Anderson
2013-03-14  0:30       ` Alexander Graf

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®