From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from tango.tkos.co.il ([62.219.50.35]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1OMFLu-0001m2-Nt for barebox@lists.infradead.org; Wed, 09 Jun 2010 07:05:31 +0000 From: Baruch Siach Date: Wed, 9 Jun 2010 10:05:05 +0300 Message-Id: In-Reply-To: References: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 6/8] mx25 3ds: add support for i2c master and PMIC To: barebox@lists.infradead.org Cc: Baruch Siach Signed-off-by: Baruch Siach --- board/freescale-mx25-3-stack/3stack.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/board/freescale-mx25-3-stack/3stack.c b/board/freescale-mx25-3-stack/3stack.c index 6659185..316a2bc 100644 --- a/board/freescale-mx25-3-stack/3stack.c +++ b/board/freescale-mx25-3-stack/3stack.c @@ -36,6 +36,8 @@ #include #include #include +#include +#include extern unsigned long _stext; @@ -183,8 +185,18 @@ static struct device_d usbh2_dev = { }; #endif +static struct i2c_board_info i2c_devices[] = { + { + I2C_BOARD_INFO("mc34704", 0x54), + }, +}; #define IOMUXC_BASE_ADDR 0x43FAC000 +static struct device_d i2c_dev = { + .name = "i2c-imx", + .map_base = IMX_I2C1_BASE, +}; + static int imx25_devices_init(void) { ulong val; @@ -256,6 +268,9 @@ static int imx25_devices_init(void) register_device(&sdram0_dev); register_device(&sram0_dev); + i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); + register_device(&i2c_dev); + armlinux_set_bootparams((void *)0x80000100); armlinux_set_architecture(MACH_TYPE_MX25_3DS); @@ -303,6 +318,9 @@ static struct pad_desc imx25_pads[] = { MX25_PAD_VSYNC__USBH2_DATA5, MX25_PAD_LSCLK__USBH2_DATA6, MX25_PAD_OE_ACD__USBH2_DATA7, + /* i2c */ + MX25_PAD_I2C1_CLK__SCL, + MX25_PAD_I2C1_DAT__SDA, }; static int imx25_console_init(void) -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox