From patchwork Mon May 7 15:42:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 157346 X-Patchwork-Delegate: hs@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 25E3AB6FA8 for ; Tue, 8 May 2012 01:43:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B513280DB; Mon, 7 May 2012 17:43:00 +0200 (CEST) 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 N48wflz9k1cR; Mon, 7 May 2012 17:42:59 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 32E01280D3; Mon, 7 May 2012 17:42:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D2672280D3 for ; Mon, 7 May 2012 17:42:54 +0200 (CEST) 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 B8Ie6fKgFWIJ for ; Mon, 7 May 2012 17:42:51 +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 ch1outboundpool.messaging.microsoft.com (ch1ehsobe006.messaging.microsoft.com [216.32.181.186]) by theia.denx.de (Postfix) with ESMTPS id 584AA280D2 for ; Mon, 7 May 2012 17:42:49 +0200 (CEST) Received: from mail127-ch1-R.bigfish.com (10.43.68.245) by CH1EHSOBE006.bigfish.com (10.43.70.56) with Microsoft SMTP Server id 14.1.225.23; Mon, 7 May 2012 15:42:35 +0000 Received: from mail127-ch1 (localhost [127.0.0.1]) by mail127-ch1-R.bigfish.com (Postfix) with ESMTP id C5377260227; Mon, 7 May 2012 15:42:34 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bh) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail127-ch1 (localhost.localdomain [127.0.0.1]) by mail127-ch1 (MessageSwitch) id 1336405351876873_28906; Mon, 7 May 2012 15:42:31 +0000 (UTC) Received: from CH1EHSMHS011.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.250]) by mail127-ch1.bigfish.com (Postfix) with ESMTP id C794F4C0068; Mon, 7 May 2012 15:42:31 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS011.bigfish.com (10.43.70.11) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 7 May 2012 15:42:31 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.1.355.3; Mon, 7 May 2012 10:42:43 -0500 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.240.143]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q47FgaFk032745; Mon, 7 May 2012 08:42:42 -0700 From: Fabio Estevam To: Date: Mon, 7 May 2012 12:42:34 -0300 Message-ID: <1336405354-15410-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: marex@denx.de, Fabio Estevam Subject: [U-Boot] [PATCH] mx28evk: Add I2C 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add I2C support. Tested by placing a 24LC16 EEPROM into the U50 slot which comes empty from factory. Signed-off-by: Fabio Estevam Acked-by: Marek Vasut --- board/freescale/mx28evk/iomux.c | 3 +++ include/configs/mx28evk.h | 8 ++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c index 396761b..4201097 100644 --- a/board/freescale/mx28evk/iomux.c +++ b/board/freescale/mx28evk/iomux.c @@ -138,6 +138,9 @@ const iomux_cfg_t iomux_setup[] = { MX28_PAD_SSP2_MISO__SSP2_D0 | MUX_CONFIG_SSP2, MX28_PAD_SSP2_SS0__SSP2_D3 | (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP), + /* I2C */ + MX28_PAD_I2C0_SCL__I2C0_SCL, + MX28_PAD_I2C0_SDA__I2C0_SDA, }; void board_init_ll(void) diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index b165285..26e24e2 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -67,6 +67,7 @@ #define CONFIG_CMD_SF #define CONFIG_CMD_SPI #define CONFIG_CMD_USB +#define CONFIG_CMD_I2C /* * Memory configurations @@ -179,6 +180,13 @@ #define CONFIG_USB_STORAGE #endif +/* I2C */ +#ifdef CONFIG_CMD_I2C +#define CONFIG_I2C_MXS +#define CONFIG_HARD_I2C +#define CONFIG_SYS_I2C_SPEED 400000 +#endif + /* * SPI */