summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-08-09 19:18:17 +0530
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-08 13:13:51 +0100
commitb8410a150fbc4e61a28032637dc0ae7e8609131d (patch)
tree3e3a3dde5feada0c540ebe4fac6d2d595f6f42f5 /arch/arm/mach-ux500/board-mop500.c
parente8a7e48bb248a1196484d3f8afa53bded2b24e71 (diff)
ux500: mop500: add TC35892 and MicroSD slot support
Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index cac83a69488..9aeefc403f3 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -13,11 +13,13 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
+#include <linux/i2c.h>
#include <linux/gpio.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl022.h>
#include <linux/spi/spi.h>
#include <linux/mfd/ab8500.h>
+#include <linux/mfd/tc35892.h>
#include <linux/input/matrix_keypad.h>
#include <asm/mach-types.h>
@@ -69,6 +71,8 @@ static pin_cfg_t mop500_pins[] = {
GPIO166_KP_O2,
GPIO167_KP_O1,
GPIO168_KP_O0,
+
+ GPIO217_GPIO, /* GPIO_EXP_INT */
};
static void ab4500_spi_cs_control(u32 command)
@@ -132,6 +136,33 @@ static struct pl022_ssp_controller ssp0_platform_data = {
.num_chipselect = 5,
};
+/*
+ * TC35892
+ */
+
+static void mop500_tc35892_init(struct tc35892 *tc35892, unsigned int base)
+{
+ mop500_sdi_tc35892_init();
+}
+
+static struct tc35892_gpio_platform_data mop500_tc35892_gpio_data = {
+ .gpio_base = MOP500_EGPIO(0),
+ .setup = mop500_tc35892_init,
+};
+
+static struct tc35892_platform_data mop500_tc35892_data = {
+ .gpio = &mop500_tc35892_gpio_data,
+ .irq_base = MOP500_EGPIO_IRQ_BASE,
+};
+
+static struct i2c_board_info mop500_i2c0_devices[] = {
+ {
+ I2C_BOARD_INFO("tc35892", 0x42),
+ .irq = NOMADIK_GPIO_TO_IRQ(217),
+ .platform_data = &mop500_tc35892_data,
+ },
+};
+
#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
static struct nmk_i2c_controller u8500_i2c##id##_data = { \
/* \
@@ -314,6 +345,9 @@ static void __init u8500_init_machine(void)
ARRAY_SIZE(ab8500_spi_devices));
else /* If HW is v.1.1 or later use I2C to access AB8500 */
platform_device_register(&ab8500_device);
+
+ i2c_register_board_info(0, mop500_i2c0_devices,
+ ARRAY_SIZE(mop500_i2c0_devices));
}
MACHINE_START(U8500, "ST-Ericsson MOP500 platform")