From patchwork Sun Aug 30 12:36:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Kiryanov X-Patchwork-Id: 512216 X-Patchwork-Delegate: sbabic@denx.de 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 55D9E1401F6 for ; Sun, 30 Aug 2015 22:43:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=compulab.co.il header.i=@compulab.co.il header.b=YKdII3hb; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 27B1E4B70C; Sun, 30 Aug 2015 14:43:14 +0200 (CEST) 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 ivCFjUowLvpH; Sun, 30 Aug 2015 14:43:14 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 05C4B4B69C; Sun, 30 Aug 2015 14:43:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D13654B68A for ; Sun, 30 Aug 2015 14:42:58 +0200 (CEST) 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 Ulralk58gAlY for ; Sun, 30 Aug 2015 14:42:58 +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 compulab.co.il (softlayer.compulab.co.il [50.23.254.55]) by theia.denx.de (Postfix) with ESMTPS id 0E5984B699 for ; Sun, 30 Aug 2015 14:42:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=compulab.co.il; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=u/+CUyB+uSQWKaMQ95YYohis0c4+OkPchRHCv+6Z2G4=; b=YKdII3hbRidFIIRE0xGqFZtQxhH6PyBgehdbYv3ftiYIgbBw/lGQUzMUUdqRlE+bbantrn5SRdaeEgiGrMtR65skmcfyxStCOeD87HFAkX/p/n6cdzJLtxaHoJpDv5dc5q3sY5+6acYLxj6Jvvrg02aoOuG9kQPfnNlCfYVYyyY=; Received: from [62.90.235.247] (port=10858 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.85) (envelope-from ) id 1ZW1wj-0005Kc-0w; Sun, 30 Aug 2015 15:42:53 +0300 Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 30ECA4815EA; Sun, 30 Aug 2015 15:42:52 +0300 (IDT) Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id XIglii1pbSi5; Sun, 30 Aug 2015 15:42:51 +0300 (IDT) Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 568B34815E3; Sun, 30 Aug 2015 15:42:51 +0300 (IDT) X-Virus-Scanned: amavisd-new at zimbra-mta.compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mEPNf4OnC0iz; Sun, 30 Aug 2015 15:42:51 +0300 (IDT) Received: from skynet.compulab.local (nikita-pc.compulab.local [192.168.11.211]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 33BF64815E0; Sun, 30 Aug 2015 15:42:51 +0300 (IDT) From: Nikita Kiryanov To: u-boot@lists.denx.de Date: Sun, 30 Aug 2015 15:36:47 +0300 Message-Id: <1440938209-1731-2-git-send-email-nikita@compulab.co.il> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440938209-1731-1-git-send-email-nikita@compulab.co.il> References: <1440938209-1731-1-git-send-email-nikita@compulab.co.il> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_relayhosts_text_entry: nikita@compulab.co.il|compulab.co.il Subject: [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" On some CM-FX6 modules U-Boot attempts to configure the usb0 controller in device mode, which renders it unavailable: USB0: Port not available. and also causes usb stop to report an error EHCI failed to shut down host controller. This happens mostly on MX6 Dual based modules, and is caused by the USBPHY_CTRL register reporting USBPHY_CTRL_OTG_ID to be 1, even when it is pulled down. Since we do not support device mode in cm-fx6 u-boot, force all controllers to be configured as hosts. Cc: Stefano Babic Cc: Igor Grinberg Signed-off-by: Nikita Kiryanov Acked-by: Igor Grinberg --- board/compulab/cm_fx6/cm_fx6.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index def821c..668d221 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -349,6 +350,11 @@ static int cm_fx6_setup_usb_otg(void) return gpio_direction_output(SB_FX6_USB_OTG_PWR, 0); } +int board_usb_phy_mode(int port) +{ + return USB_INIT_HOST; +} + int board_ehci_hcd_init(int port) { int ret;