From patchwork Wed Jun 22 19:33:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Silva X-Patchwork-Id: 101540 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 682D9B6F7F for ; Thu, 23 Jun 2011 05:26:07 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZT3o-0005yX-30; Wed, 22 Jun 2011 19:26:00 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZT3n-0006cr-Nv; Wed, 22 Jun 2011 19:25:59 +0000 Received: from ch1ehsobe006.messaging.microsoft.com ([216.32.181.186] helo=CH1EHSOBE013.bigfish.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZT3k-0006cF-VY for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2011 19:25:57 +0000 Received: from mail103-ch1-R.bigfish.com (216.32.181.171) by CH1EHSOBE013.bigfish.com (10.43.70.63) with Microsoft SMTP Server id 14.1.225.22; Wed, 22 Jun 2011 19:25:55 +0000 Received: from mail103-ch1 (localhost.localdomain [127.0.0.1]) by mail103-ch1-R.bigfish.com (Postfix) with ESMTP id 38CA1D383E9; Wed, 22 Jun 2011 19:25:55 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail103-ch1 (localhost.localdomain [127.0.0.1]) by mail103-ch1 (MessageSwitch) id 130877075534855_29759; Wed, 22 Jun 2011 19:25:55 +0000 (UTC) Received: from CH1EHSMHS017.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.254]) by mail103-ch1.bigfish.com (Postfix) with ESMTP id EF61514E8051; Wed, 22 Jun 2011 19:25:54 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS017.bigfish.com (10.43.70.17) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 22 Jun 2011 19:25:49 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.289.8; Wed, 22 Jun 2011 14:25:48 -0500 Received: from freescale.am.freescale.net ([10.29.240.185]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p5MJPiRM023160; Wed, 22 Jun 2011 14:25:46 -0500 (CDT) From: Andre Silva To: Subject: [PATCH 2/2] ARM:mach-mx5/mx53_ard: Add I2C2 and I2C3 support Date: Wed, 22 Jun 2011 16:33:05 -0300 Message-ID: <1308771185-4491-2-git-send-email-andre.silva@freescale.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1308771185-4491-1-git-send-email-andre.silva@freescale.com> References: <1308771185-4491-1-git-send-email-andre.silva@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110622_152557_202856_E5FAA05D X-CRM114-Status: GOOD ( 16.85 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.181.186 listed in list.dnswl.org] Cc: Andre Silva , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Signed-off-by: Andre Silva --- Add support for I2C2 and I2C3 on i.MX53 ARD Board. Also removes a space in a comment. arch/arm/mach-mx5/Kconfig | 1 + arch/arm/mach-mx5/board-mx53_ard.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 5b16f39..6a47d4c 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig @@ -213,6 +213,7 @@ config MACH_MX53_ARD bool "Support MX53 ARD platforms" select SOC_IMX53 select IMX_HAVE_PLATFORM_IMX2_WDT + select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX help diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index 7dd54b9..eff2a57 100644 --- a/arch/arm/mach-mx5/board-mx53_ard.c +++ b/arch/arm/mach-mx5/board-mx53_ard.c @@ -84,6 +84,12 @@ static iomux_v3_cfg_t mx53_ard_pads[] = { MX53_PAD_PATA_DATA11__ESDHC1_DAT7, MX53_PAD_GPIO_1__GPIO1_1, MX53_PAD_GPIO_9__GPIO1_9, + /* I2C2 */ + MX53_PAD_EIM_EB2__I2C2_SCL, + MX53_PAD_KEY_ROW3__I2C2_SDA, + /* I2C3 */ + MX53_PAD_GPIO_3__I2C3_SCL, + MX53_PAD_GPIO_16__I2C3_SDA, }; static struct resource ard_smsc911x_resources[] = { @@ -120,6 +126,14 @@ static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = { .wp_gpio = ARD_SD1_WP, }; +static struct imxi2c_platform_data mx53_ard_i2c2_data = { + .bitrate = 50000, +}; + +static struct imxi2c_platform_data mx53_ard_i2c3_data = { + .bitrate = 400000, +}; + static void __init mx53_ard_io_init(void) { mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads, @@ -127,9 +141,12 @@ static void __init mx53_ard_io_init(void) gpio_request(ARD_ETHERNET_INT_B, "eth-int-b"); gpio_direction_input(ARD_ETHERNET_INT_B); + + gpio_request(ARD_I2CPORTEXP_B, "i2cptexp-rst"); + gpio_direction_output(ARD_I2CPORTEXP_B, 1); } - /* Config CS1 settings for ethernet controller */ +/* Config CS1 settings for ethernet controller */ static int weim_cs_config(void) { u32 reg; @@ -179,6 +196,8 @@ static void __init mx53_ard_board_init(void) imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); imx53_add_imx2_wdt(0, NULL); + imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); + imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); } static void __init mx53_ard_timer_init(void)