From patchwork Tue Jul 9 19:46:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeroen Hofstee X-Patchwork-Id: 257862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9B66E2C0095 for ; Wed, 10 Jul 2013 05:47:10 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 503CC4A09E; Tue, 9 Jul 2013 21:47:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id thii-hG+3IF1; Tue, 9 Jul 2013 21:47:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D29C4A02F; Tue, 9 Jul 2013 21:47:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8969F4A02F for ; Tue, 9 Jul 2013 21:47:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ydcliRsTlgh2 for ; Tue, 9 Jul 2013 21:46:55 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.virtualhost.nl (mail.virtualhost.nl [89.200.201.133]) by theia.denx.de (Postfix) with ESMTP id 3018F4A025 for ; Tue, 9 Jul 2013 21:46:48 +0200 (CEST) Received: (qmail 45188 invoked by uid 1141); 9 Jul 2013 21:46:41 +0200 Received: from ip120-12-208-87.adsl2.static.versatel.nl (HELO [10.0.0.15]) (87.208.12.120) (smtp-auth username jeroen@myspectrum.nl, mechanism plain) by mail.virtualhost.nl (qpsmtpd/0.84) with (CAMELLIA256-SHA encrypted) ESMTPSA; Tue, 09 Jul 2013 21:46:41 +0200 Message-ID: <51DC68AC.5090904@myspectrum.nl> Date: Tue, 09 Jul 2013 21:46:52 +0200 From: Jeroen Hofstee User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Stefano Babic Cc: U-Boot Mailing List Subject: [U-Boot] twister: usb host support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hello Stefano, The twister always had a fragile usb support in u-boot in the past. Since some floating patches mentioned alternating success after usb hub resets, I had a look if these patches fixed the twister as well, they don't. Some fiddling around [1] makes the usb work however, by not attempting to reset the USB hub with gpio_25. I cannot find any document mentioning gpio_25 though. Any reason for this usage? It seems better to get rid of it completely.. Anything against that? --- Regards, Jeroen p.s. I found by sheer accidence that the usb is behaving completely normal (after the patch) on rev B1. It is broken on rev B without the patch and working buggy with it. On rev B1 + patch the USB to SATA converter is discovered as well, which I have never seen before. === [1] patch to disable the usb reset The change to port_mode[1] is not needed, but since it is unused, MODE_UNUSED seems appropriate. diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c index a28c704..31cf6c0 100644 --- a/board/technexion/twister/twister.c +++ b/board/technexion/twister/twister.c @@ -63,7 +63,7 @@ static const u32 gpmc_XR16L2751[] = { #ifdef CONFIG_USB_EHCI static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, - .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, + .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, }; @@ -92,9 +92,6 @@ int board_init(void) enable_gpmc_cs_config(gpmc_XR16L2751, &gpmc_cfg->cs[3], XR16L2751_UART2_BASE, GPMC_SIZE_16M); - gpio_request(CONFIG_OMAP_EHCI_PHY1_RESET_GPIO, "USB_PHY1_RESET"); - gpio_direction_output(CONFIG_OMAP_EHCI_PHY1_RESET_GPIO, 1); - === [2] current usb master (rev B1) === twister => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found twister => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... cannot reset port 1!? 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found twister => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found twister => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... cannot reset port 1!? 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found === [3] after the patch (rev B1) === twister => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 4 USB Device(s) found scanning usb for storage devices... Device NOT ready Request Sense returned 02 3A 00 1 Storage Device(s) found twister => usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | USB2.0 Hub | +-3 Mass Storage (480 Mb/s, 96mA) | USB Storage 000000000033 | +-4 Mass Storage (480 Mb/s, 498mA) Philips USB Flash Drive 070825AEA237D121 === [4] after the patch (rev B) === Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found bpp3=> usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found bpp3=> usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... cannot reset port 1!? 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found === [5] twister => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... port(0) reset error cannot reset port 1!? 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found twister => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... cannot reset port 1!? 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found return 0; } diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 2af504b..852bdd7 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -102,7 +102,6 @@ #define CONFIG_USB_EHCI_OMAP #define CONFIG_USB_ULPI #define CONFIG_USB_ULPI_VIEWPORT_OMAP -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 25 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 #define CONFIG_USB_STORAGE