aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-08-09 09:48:17 -0400
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-08 07:13:51 -0500
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 cac83a694880..9aeefc403f35 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -13,11 +13,13 @@
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/i2c.h>
16#include <linux/gpio.h> 17#include <linux/gpio.h>
17#include <linux/amba/bus.h> 18#include <linux/amba/bus.h>
18#include <linux/amba/pl022.h> 19#include <linux/amba/pl022.h>
19#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
20#include <linux/mfd/ab8500.h> 21#include <linux/mfd/ab8500.h>
22#include <linux/mfd/tc35892.h>
21#include <linux/input/matrix_keypad.h> 23#include <linux/input/matrix_keypad.h>
22 24
23#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -69,6 +71,8 @@ static pin_cfg_t mop500_pins[] = {
69 GPIO166_KP_O2, 71 GPIO166_KP_O2,
70 GPIO167_KP_O1, 72 GPIO167_KP_O1,
71 GPIO168_KP_O0, 73 GPIO168_KP_O0,
74
75 GPIO217_GPIO, /* GPIO_EXP_INT */
72}; 76};
73 77
74static void ab4500_spi_cs_control(u32 command) 78static void ab4500_spi_cs_control(u32 command)
@@ -132,6 +136,33 @@ static struct pl022_ssp_controller ssp0_platform_data = {
132 .num_chipselect = 5, 136 .num_chipselect = 5,
133}; 137};
134 138
139/*
140 * TC35892
141 */
142
143static void mop500_tc35892_init(struct tc35892 *tc35892, unsigned int base)
144{
145 mop500_sdi_tc35892_init();
146}
147
148static struct tc35892_gpio_platform_data mop500_tc35892_gpio_data = {
149 .gpio_base = MOP500_EGPIO(0),
150 .setup = mop500_tc35892_init,
151};
152
153static struct tc35892_platform_data mop500_tc35892_data = {
154 .gpio = &mop500_tc35892_gpio_data,
155 .irq_base = MOP500_EGPIO_IRQ_BASE,
156};
157
158static struct i2c_board_info mop500_i2c0_devices[] = {
159 {
160 I2C_BOARD_INFO("tc35892", 0x42),
161 .irq = NOMADIK_GPIO_TO_IRQ(217),
162 .platform_data = &mop500_tc35892_data,
163 },
164};
165
135#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \ 166#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
136static struct nmk_i2c_controller u8500_i2c##id##_data = { \ 167static struct nmk_i2c_controller u8500_i2c##id##_data = { \
137 /* \ 168 /* \
@@ -314,6 +345,9 @@ static void __init u8500_init_machine(void)
314 ARRAY_SIZE(ab8500_spi_devices)); 345 ARRAY_SIZE(ab8500_spi_devices));
315 else /* If HW is v.1.1 or later use I2C to access AB8500 */ 346 else /* If HW is v.1.1 or later use I2C to access AB8500 */
316 platform_device_register(&ab8500_device); 347 platform_device_register(&ab8500_device);
348
349 i2c_register_board_info(0, mop500_i2c0_devices,
350 ARRAY_SIZE(mop500_i2c0_devices));
317} 351}
318 352
319MACHINE_START(U8500, "ST-Ericsson MOP500 platform") 353MACHINE_START(U8500, "ST-Ericsson MOP500 platform")