aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-10-26 06:55:57 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-11-14 04:29:11 -0500
commit50f349e9fcd069bfc76f238c0c6069aedbdbc385 (patch)
tree29a468e73edbf9824ec1047b0e21dc1a520c6a0c /arch/arm/mach-mx3
parent3ea2e1a4b74e39f3cc665cf84a25eedb3ae70647 (diff)
ARM: MX3: add support for mc13783 on lilly-db
The chip is actually located on the module, not on the base board. But other base boards might add more SPI devices, so the spi_board_info struct must be separated from the module code. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r--arch/arm/mach-mx3/mx31lilly-db.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c
index 3b3a78f49c23..60f2d15ff4dd 100644
--- a/arch/arm/mach-mx3/mx31lilly-db.c
+++ b/arch/arm/mach-mx3/mx31lilly-db.c
@@ -29,6 +29,8 @@
29#include <linux/init.h> 29#include <linux/init.h>
30#include <linux/gpio.h> 30#include <linux/gpio.h>
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/spi/spi.h>
33#include <linux/mfd/mc13783.h>
32 34
33#include <asm/mach-types.h> 35#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -202,6 +204,22 @@ static void __init mx31lilly_init_fb(void)
202 gpio_direction_output(LCD_VCC_EN_GPIO, 1); 204 gpio_direction_output(LCD_VCC_EN_GPIO, 1);
203} 205}
204 206
207/* SPI */
208
209static struct mc13783_platform_data mc13783_pdata __initdata = {
210 .flags = MC13783_USE_RTC | MC13783_USE_TOUCHSCREEN,
211};
212
213static struct spi_board_info lilly_spi_devs[] __initdata = {
214 {
215 .modalias = "mc13783",
216 .max_speed_hz = 1000000,
217 .bus_num = 1,
218 .chip_select = 0,
219 .platform_data = &mc13783_pdata,
220 },
221};
222
205void __init mx31lilly_db_init(void) 223void __init mx31lilly_db_init(void)
206{ 224{
207 mxc_iomux_setup_multiple_pins(lilly_db_board_pins, 225 mxc_iomux_setup_multiple_pins(lilly_db_board_pins,
@@ -212,5 +230,6 @@ void __init mx31lilly_db_init(void)
212 mxc_register_device(&mxc_uart_device2, &uart_pdata); 230 mxc_register_device(&mxc_uart_device2, &uart_pdata);
213 mxc_register_device(&mxcsdhc_device0, &mmc_pdata); 231 mxc_register_device(&mxcsdhc_device0, &mmc_pdata);
214 mx31lilly_init_fb(); 232 mx31lilly_init_fb();
233 spi_register_board_info(lilly_spi_devs, ARRAY_SIZE(lilly_spi_devs));
215} 234}
216 235