From patchwork Wed Feb 25 12:55:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 443376 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 0B6D01400DD for ; Thu, 26 Feb 2015 00:10:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 915E74A02F; Wed, 25 Feb 2015 14:09:58 +0100 (CET) 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 x9tTUpVvErH7; Wed, 25 Feb 2015 14:09:58 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2A2F64A01F; Wed, 25 Feb 2015 14:09:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE4F94A01F for ; Wed, 25 Feb 2015 14:09:54 +0100 (CET) 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 0dIN38c5iFku for ; Wed, 25 Feb 2015 14:09:54 +0100 (CET) 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 na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0113.outbound.protection.outlook.com [65.55.169.113]) by theia.denx.de (Postfix) with ESMTPS id 385F94A01C for ; Wed, 25 Feb 2015 14:09:52 +0100 (CET) Received: from BY2PR03CA012.namprd03.prod.outlook.com (10.255.93.29) by BLUPR03MB247.namprd03.prod.outlook.com (10.255.213.21) with Microsoft SMTP Server (TLS) id 15.1.93.12; Wed, 25 Feb 2015 12:55:30 +0000 Received: from BN1BFFO11FD031.protection.gbl (10.255.93.4) by BY2PR03CA012.outlook.office365.com (10.255.93.29) with Microsoft SMTP Server (TLS) id 15.1.93.16 via Frontend Transport; Wed, 25 Feb 2015 12:55:29 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD031.mail.protection.outlook.com (10.58.144.94) with Microsoft SMTP Server (TLS) id 15.1.99.6 via Frontend Transport; Wed, 25 Feb 2015 12:55:29 +0000 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.244.18]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t1PCtQlo016309; Wed, 25 Feb 2015 05:55:27 -0700 From: Fabio Estevam To: Date: Wed, 25 Feb 2015 09:55:08 -0300 Message-ID: <1424868909-21144-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=fabio.estevam@freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(189002)(199003)(77096005)(50466002)(97736003)(105606002)(106466001)(81156004)(229853001)(48376002)(92566002)(68736005)(85426001)(2351001)(86362001)(19580395003)(19580405001)(69596002)(46102003)(50986999)(33646002)(6806004)(36756003)(50226001)(104016003)(110136001)(62966003)(87936001)(64706001)(77156002)(47776003)(139555002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB247; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB247; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005004); SRVR:BLUPR03MB247; X-Forefront-PRVS: 049897979A X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB247; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2015 12:55:29.2649 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB247 Cc: Fabio Estevam , u-boot@lists.denx.de, otavio@ossystems.com.br Subject: [U-Boot] [PATCH 1/2] warp: Add User Mass Storage support 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" With UMS support we are able to flash the eMMC from U-boot, which is very convenient. Add UMS support to make the eMMC flashing process easier. Signed-off-by: Fabio Estevam Acked-by: Otavio Salvador --- board/warp/warp.c | 6 ++++++ include/configs/warp.h | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/board/warp/warp.c b/board/warp/warp.c index 3b275c2..21ac5e7 100644 --- a/board/warp/warp.c +++ b/board/warp/warp.c @@ -21,6 +21,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -82,6 +83,11 @@ int board_mmc_init(bd_t *bis) return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); } +int board_usb_phy_mode(int port) +{ + return USB_INIT_DEVICE; +} + int board_early_init_f(void) { setup_iomux_uart(); diff --git a/include/configs/warp.h b/include/configs/warp.h index 82036e4..cfc2323 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -120,6 +120,32 @@ #define CONFIG_CMD_CACHE #endif +/* USB Configs */ +#define CONFIG_CMD_USB +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MX6 +#define CONFIG_USB_STORAGE +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Only OTG2 port enabled */ +#endif + +#define CONFIG_CI_UDC +#define CONFIG_USBD_HS +#define CONFIG_USB_GADGET_DUALSPEED + +#define CONFIG_USB_GADGET +#define CONFIG_CMD_USB_MASS_STORAGE +#define CONFIG_USB_GADGET_MASS_STORAGE +#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_USB_GADGET_VBUS_DRAW 2 + +#define CONFIG_G_DNL_VENDOR_NUM 0x0525 +#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 +#define CONFIG_G_DNL_MANUFACTURER "FSL" + #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "image=zImage\0" \