From patchwork Sun Feb 17 19:45:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 221098 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 D5A662C007A for ; Mon, 18 Feb 2013 06:42:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2BFC14A1A8; Sun, 17 Feb 2013 20:42:01 +0100 (CET) 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 2QF3UwzkChZr; Sun, 17 Feb 2013 20:42:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5EECF4A137; Sun, 17 Feb 2013 20:41:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1A794A106 for ; Sun, 17 Feb 2013 20:41:29 +0100 (CET) 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 FDnFDjvya7st for ; Sun, 17 Feb 2013 20:41:28 +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 mail-yh0-f46.google.com (mail-yh0-f46.google.com [209.85.213.46]) by theia.denx.de (Postfix) with ESMTPS id 6159A4A109 for ; Sun, 17 Feb 2013 20:41:07 +0100 (CET) Received: by mail-yh0-f46.google.com with SMTP id q15so868471yhf.19 for ; Sun, 17 Feb 2013 11:41:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=PyCqUCne+KV477w2/BTbj/sy5u47HdYOpD6pXuDD3/U=; b=CR5RM8LRQ0pkhz6nuXCQ3yE9iibKN9gbP5e5DPjIXXx252CitmaNF2FxW/+arUaN6m Othq28xrDyUoubDZdJLEVB7x+WUrGX4202HmCngxfwac7lKQmmfUUyuMxClhAiWHC/2F IC3eH9FHHwei5E3vIH63F9ese0Y956KbztF9X1PqBgcCUlZS4ZrgH7MlSwhSKBL0+uEA sohRbo7B5uQvh4il1gjRJLphkY10A4tmaQd+WK0ADtKVru7BMTlSdH5KETvTvjyeEfRk rR2LtsuXtDYxI0OI/fGumnb8RXCMaX10ppFCHez+OkFo0aSfxi0qyyOUQofxZMO/rvGN nNmw== X-Received: by 10.236.49.98 with SMTP id w62mr16227322yhb.42.1361130066816; Sun, 17 Feb 2013 11:41:06 -0800 (PST) Received: from nano.lab.ossystems.com.br ([187.23.144.59]) by mx.google.com with ESMTPS id n4sm26667009ank.1.2013.02.17.11.41.04 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 11:41:06 -0800 (PST) From: Otavio Salvador To: U-Boot Mailing List Date: Sun, 17 Feb 2013 16:45:23 -0300 Message-Id: <1361130325-5202-10-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1361130325-5202-1-git-send-email-otavio@ossystems.com.br> References: <1361130325-5202-1-git-send-email-otavio@ossystems.com.br> Cc: Fabio Estevam , Marek Vasut , Otavio Salvador Subject: [U-Boot] [PATCH v3 09/10] mx23_olinuxino: Enable USB 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This enabled USB support for the mx23_olinuxino board. Signed-off-by: Otavio Salvador --- Changes in v3: None Changes in v2: - Add changes for allow use of the USB hub board/olimex/mx23_olinuxino/mx23_olinuxino.c | 6 ++++++ board/olimex/mx23_olinuxino/spl_boot.c | 4 ++++ include/configs/mx23_olinuxino.h | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..9ed7718 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -23,6 +23,7 @@ */ #include +#include #include #include #include @@ -45,6 +46,11 @@ int board_early_init_f(void) /* SSP0 clock at 96MHz */ mxs_set_sspclk(MXC_SSPCLK0, 96000, 0); +#ifdef CONFIG_CMD_USB + /* Enable LAN9512 */ + gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1); +#endif + return 0; } diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..a96c293 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP, MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP, + + /* Ethernet */ + MX23_PAD_GPMI_ALE__GPIO_0_17 | + (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL), }; void board_init_ll(void) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index d019944..e081c49 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -60,6 +60,7 @@ #define CONFIG_CMD_GPIO #define CONFIG_CMD_LED #define CONFIG_CMD_MMC +#define CONFIG_CMD_USB /* * Memory configurations @@ -140,6 +141,15 @@ */ #define CONFIG_APBH_DMA +/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT 0 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + /* * Boot Linux */