0005-mx53-loco-add-i2c-support.patch 1.59 KB
Newer Older
Eric Bénard's avatar
Eric Bénard committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
From dfb46dc4a8e593dca0c0af1dc8ac7ce87fcabb5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
Date: Tue, 21 Feb 2012 01:08:07 +0100
Subject: [PATCH 5/7] mx53-loco: add i2c support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

and register mc34708 which is present on MCIMX53-START-R board

Signed-off-by: Eric Bnard <eric@eukrea.com>
---
Upstream-Status: Applied for 2012.04.0

 arch/arm/boards/freescale-mx53-loco/board.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index fa3a409..14c053a 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -36,6 +36,9 @@
 #include <mach/iim.h>
 #include <mach/imx5.h>
 
+#include <i2c/i2c.h>
+#include <mfd/mc34708.h>
+
 #include <asm/armlinux.h>
 #include <io.h>
 #include <asm/mmu.h>
@@ -88,6 +91,16 @@ static struct pad_desc loco_pads[] = {
 	MX53_PAD_EIM_DA11__GPIO3_11,
 	/* SD3_WP */
 	MX53_PAD_EIM_DA12__GPIO3_12,
+
+	/* I2C0 */
+	MX53_PAD_CSI0_DAT8__I2C1_SDA,
+	MX53_PAD_CSI0_DAT9__I2C1_SCL,
+};
+
+static struct i2c_board_info i2c_devices[] = {
+	{
+		I2C_BOARD_INFO("mc34708-i2c", 0x08),
+	},
 };
 
 static int loco_mem_init(void)
@@ -131,6 +144,8 @@ static int loco_devices_init(void)
 	imx53_add_fec(&fec_info);
 	imx53_add_mmc0(&loco_sd1_data);
 	imx53_add_mmc2(&loco_sd3_data);
+	i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
+	imx53_add_i2c0(NULL);
 
 	loco_fec_reset();
 
-- 
1.7.7.6