From patchwork Tue May 1 01:56:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 155996 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C9B3DB6FA5 for ; Tue, 1 May 2012 12:01:56 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SP2NP-0001KF-EC; Tue, 01 May 2012 01:59:39 +0000 Received: from mail-out.m-online.net ([2001:a60:0:70:0:1:25:1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SP2KU-0008GU-SJ for linux-arm-kernel@lists.infradead.org; Tue, 01 May 2012 01:56:41 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3VhQhg2073z4LDff; Tue, 1 May 2012 03:56:35 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 3VhQhg1D4Yz4KK6b; Tue, 1 May 2012 03:56:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from smtp-auth.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id Wrrt+rOof8+H; Tue, 1 May 2012 03:56:34 +0200 (CEST) Received: from mashiro.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA; Tue, 1 May 2012 03:56:32 +0200 (CEST) From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 11/11] MXS: Enable USB on M28EVK Date: Tue, 1 May 2012 03:56:03 +0200 Message-Id: <1335837363-12376-12-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1335837363-12376-1-git-send-email-marex@denx.de> References: <1335837363-12376-1-git-send-email-marex@denx.de> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Marek Vasut , Li Frank-B20596 , Shi Make-B15407 , Subodh Nijsure , Detlev Zundel , Chen Peter-B29397 , Sascha Hauer , Linux USB , Liu JunJie-B08287 , Shawn Guo , Fabio Estevam , Stefano Babic , Wolfgang Denk X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Enable the second USB port on M28EVK board. Signed-off-by: Marek Vasut Cc: Chen Peter-B29397 Cc: Detlev Zundel Cc: Fabio Estevam Cc: Li Frank-B20596 Cc: Linux USB Cc: Liu JunJie-B08287 Cc: Sascha Hauer Cc: Shawn Guo Cc: Shi Make-B15407 Cc: Stefano Babic Cc: Subodh Nijsure Cc: Wolfgang Denk --- arch/arm/mach-mxs/Kconfig | 2 ++ arch/arm/mach-mxs/mach-m28evk.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index c57f996..05f6e84 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -81,6 +81,8 @@ config MODULE_M28 select MXS_HAVE_PLATFORM_MXS_I2C select MXS_HAVE_PLATFORM_MXS_MMC select MXS_HAVE_PLATFORM_MXSFB + select MXS_HAVE_PLATFORM_USB + select USB_ARCH_HAS_EHCI select MXS_OCOTP config MODULE_APX4 diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c index 06d7996..912c8d4 100644 --- a/arch/arm/mach-mxs/mach-m28evk.c +++ b/arch/arm/mach-mxs/mach-m28evk.c @@ -39,6 +39,8 @@ #define MX28EVK_BL_ENABLE MXS_GPIO_NR(3, 18) #define M28EVK_LCD_ENABLE MXS_GPIO_NR(3, 28) +#define M28EVK_USB_ENABLE MXS_GPIO_NR(3, 13) +#define M28EVK_USBOTG_ENABLE MXS_GPIO_NR(3, 12) #define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12) #define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28) @@ -210,6 +212,16 @@ static const iomux_cfg_t m28evk_pads[] __initconst = { /* Backlight */ MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL, + + /* USB */ + MX28_PAD_SSP2_SS2__USB0_OVERCURRENT, + MX28_PAD_SSP2_SS1__USB1_OVERCURRENT, + MX28_PAD_PWM2__USB0_ID | + MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP, + MX28_PAD_AUART3_TX__GPIO_3_13 | + MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP, + MX28_PAD_AUART3_RX__GPIO_3_12 | + MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP, }; /* led */ @@ -292,6 +304,13 @@ static const struct mxsfb_platform_data m28evk_mxsfb_pdata __initconst = { .ld_intf_width = STMLCDIF_18BIT, }; +static struct imx_usb_platform_data m28_usb_data = { + .gpio_vbus = M28EVK_USBOTG_ENABLE, + .gpio_vbus_inverted = 1, + .gadget_mode = 0, + .host_mode = 1, +}; + static struct at24_platform_data m28evk_eeprom = { .byte_len = 16384, .page_size = 32, @@ -344,6 +363,8 @@ static void __init m28evk_init(void) mx28_add_mxs_i2c(0); i2c_register_board_info(0, m28_stk5v3_i2c_boardinfo, ARRAY_SIZE(m28_stk5v3_i2c_boardinfo)); + + mx28_add_mxs_usbh(0, &m28_usb_data); } static void __init m28evk_timer_init(void)