summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/pcm051
diff options
context:
space:
mode:
authorTeresa Gámez <t.gamez@phytec.de>2013-06-20 14:50:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-06-21 08:05:55 +0200
commit6ae4cc1931e407a75c832719112588e43f97b0f9 (patch)
treef51c1f2a3c8247aae76c4809670cb33d01f4145b /arch/arm/boards/pcm051
parent5e7c87a269aadc05f10887504301a204411645ec (diff)
downloadbarebox-6ae4cc1931e407a75c832719112588e43f97b0f9.tar.gz
barebox-6ae4cc1931e407a75c832719112588e43f97b0f9.tar.xz
ARM: OMAP: pcm051: Add i2c0 and at24 eeprom support
Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/pcm051')
-rw-r--r--arch/arm/boards/pcm051/board.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
index 0ad8cb4ec2..eea5ebb575 100644
--- a/arch/arm/boards/pcm051/board.c
+++ b/arch/arm/boards/pcm051/board.c
@@ -32,6 +32,8 @@
#include <mach/cpsw.h>
#include <spi/spi.h>
#include <spi/flash.h>
+#include <i2c/i2c.h>
+#include <i2c/at24.h>
#include "mux.h"
@@ -89,6 +91,12 @@ static struct cpsw_platform_data cpsw_data = {
.num_slaves = ARRAY_SIZE(cpsw_slaves),
};
+static struct i2c_board_info i2c0_devices[] = {
+ {
+ I2C_BOARD_INFO("24c32", 0x52),
+ },
+};
+
static void pcm051_spi_init(void)
{
int ret;
@@ -111,6 +119,15 @@ static void pcm051_eth_init(void)
am33xx_add_cpsw(&cpsw_data);
}
+static void pcm051_i2c_init(void)
+{
+ am33xx_enable_i2c0_pin_mux();
+
+ i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
+
+ am33xx_add_i2c0(NULL);
+}
+
static int pcm051_devices_init(void)
{
pcm051_enable_mmc0_pin_mux();
@@ -119,6 +136,7 @@ static int pcm051_devices_init(void)
pcm051_spi_init();
pcm051_eth_init();
+ pcm051_i2c_init();
devfs_add_partition("nor0", 0x00000, SZ_128K,
DEVFS_PARTITION_FIXED, "xload");