Commit c981214a authored by Vladimir Barinov's avatar Vladimir Barinov Committed by Sascha Hauer

MX27ADS: Add I2C support

Add I2C support for MX27ADS board
Signed-off-by: default avatarVladimir Barinov <vbarinov@embeddedalley.com>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 8d4fd258
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/mtd/map.h> #include <linux/mtd/map.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/i2c.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
#include <mach/iomux.h> #include <mach/iomux.h>
#include <mach/board-mx27ads.h> #include <mach/board-mx27ads.h>
#include <mach/mxc_nand.h> #include <mach/mxc_nand.h>
#include <mach/i2c.h>
#include "devices.h" #include "devices.h"
...@@ -87,6 +89,9 @@ static unsigned int mx27ads_pins[] = { ...@@ -87,6 +89,9 @@ static unsigned int mx27ads_pins[] = {
PD15_AOUT_FEC_COL, PD15_AOUT_FEC_COL,
PD16_AIN_FEC_TX_ER, PD16_AIN_FEC_TX_ER,
PF23_AIN_FEC_TX_EN, PF23_AIN_FEC_TX_EN,
/* I2C2 */
PC5_PF_I2C2_SDA,
PC6_PF_I2C2_SCL,
}; };
static struct mxc_nand_platform_data mx27ads_nand_board_info = { static struct mxc_nand_platform_data mx27ads_nand_board_info = {
...@@ -116,6 +121,13 @@ static struct platform_device mx27ads_nor_mtd_device = { ...@@ -116,6 +121,13 @@ static struct platform_device mx27ads_nor_mtd_device = {
.resource = &mx27ads_flash_resource, .resource = &mx27ads_flash_resource,
}; };
static struct imxi2c_platform_data mx27ads_i2c_data = {
.bitrate = 100000,
};
static struct i2c_board_info mx27ads_i2c_devices[] = {
};
static struct platform_device *platform_devices[] __initdata = { static struct platform_device *platform_devices[] __initdata = {
&mx27ads_nor_mtd_device, &mx27ads_nor_mtd_device,
&mxc_fec_device, &mxc_fec_device,
...@@ -150,6 +162,11 @@ static void __init mx27ads_board_init(void) ...@@ -150,6 +162,11 @@ static void __init mx27ads_board_init(void)
mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); mxc_register_device(&mxc_uart_device5, &uart_pdata[5]);
mxc_register_device(&mxc_nand_device, &mx27ads_nand_board_info); mxc_register_device(&mxc_nand_device, &mx27ads_nand_board_info);
/* only the i2c master 1 is used on this CPU card */
i2c_register_board_info(1, mx27ads_i2c_devices,
ARRAY_SIZE(mx27ads_i2c_devices));
mxc_register_device(&mxc_i2c_device1, &mx27ads_i2c_data);
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment