From patchwork Wed Mar 13 01:09:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 2260751 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 26B46DF23A for ; Wed, 13 Mar 2013 01:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755540Ab3CMB4K (ORCPT ); Tue, 12 Mar 2013 21:56:10 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42710 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755509Ab3CMB4J (ORCPT ); Tue, 12 Mar 2013 21:56:09 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 740CDA4C0E; Wed, 13 Mar 2013 02:56:07 +0100 (CET) From: Alexander Graf To: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org, dmueller@suse.de, Vivek Gautam , Jingoo Han , Alan Stern , Kukjin Kim , Felipe Balbi , Greg Kroah-Hartman Subject: [PATCH] USB: ehci-s5p: Fix phy reset Date: Wed, 13 Mar 2013 02:09:48 +0100 Message-Id: <1363136988-3704-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.12.4 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 CC: Vivek Gautam CC: Jingoo Han CC: Alan Stern CC: Kukjin Kim CC: Felipe Balbi CC: Greg Kroah-Hartman Acked-by: Alan Stern --- 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);