aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/include/mach/littleton.h11
-rw-r--r--arch/arm/mach-pxa/littleton.c73
2 files changed, 81 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/include/mach/littleton.h b/arch/arm/mach-pxa/include/mach/littleton.h
index 5c4e320c1437..6c9b21c51322 100644
--- a/arch/arm/mach-pxa/include/mach/littleton.h
+++ b/arch/arm/mach-pxa/include/mach/littleton.h
@@ -1,8 +1,13 @@
1#ifndef __ASM_ARCH_ZYLONITE_H 1#ifndef __ASM_ARCH_LITTLETON_H
2#define __ASM_ARCH_ZYLONITE_H 2#define __ASM_ARCH_LITTLETON_H
3
4#include <mach/gpio.h>
3 5
4#define LITTLETON_ETH_PHYS 0x30000000 6#define LITTLETON_ETH_PHYS 0x30000000
5 7
6#define LITTLETON_GPIO_LCD_CS (17) 8#define LITTLETON_GPIO_LCD_CS (17)
7 9
8#endif /* __ASM_ARCH_ZYLONITE_H */ 10#define EXT0_GPIO_BASE (NR_BUILTIN_GPIO)
11#define EXT0_GPIO(x) (EXT0_GPIO_BASE + (x))
12
13#endif /* __ASM_ARCH_LITTLETON_H */
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 5609f52e36b1..31da7f3c06f6 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -23,6 +23,10 @@
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/smc91x.h> 25#include <linux/smc91x.h>
26#include <linux/i2c.h>
27#include <linux/leds.h>
28#include <linux/mfd/da903x.h>
29#include <linux/i2c/max732x.h>
26 30
27#include <asm/types.h> 31#include <asm/types.h>
28#include <asm/setup.h> 32#include <asm/setup.h>
@@ -40,6 +44,7 @@
40#include <mach/pxafb.h> 44#include <mach/pxafb.h>
41#include <mach/ssp.h> 45#include <mach/ssp.h>
42#include <mach/pxa2xx_spi.h> 46#include <mach/pxa2xx_spi.h>
47#include <mach/i2c.h>
43#include <mach/pxa27x_keypad.h> 48#include <mach/pxa27x_keypad.h>
44#include <mach/pxa3xx_nand.h> 49#include <mach/pxa3xx_nand.h>
45#include <mach/littleton.h> 50#include <mach/littleton.h>
@@ -314,6 +319,73 @@ static void __init littleton_init_nand(void)
314static inline void littleton_init_nand(void) {} 319static inline void littleton_init_nand(void) {}
315#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ 320#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
316 321
322#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
323static struct led_info littleton_da9034_leds[] = {
324 [0] = {
325 .name = "littleton:keypad1",
326 .flags = DA9034_LED_RAMP,
327 },
328 [1] = {
329 .name = "littleton:keypad2",
330 .flags = DA9034_LED_RAMP,
331 },
332 [2] = {
333 .name = "littleton:vibra",
334 .flags = 0,
335 },
336};
337
338static struct da903x_subdev_info littleton_da9034_subdevs[] = {
339 {
340 .name = "da903x-led",
341 .id = DA9034_ID_LED_1,
342 .platform_data = &littleton_da9034_leds[0],
343 }, {
344 .name = "da903x-led",
345 .id = DA9034_ID_LED_2,
346 .platform_data = &littleton_da9034_leds[1],
347 }, {
348 .name = "da903x-led",
349 .id = DA9034_ID_VIBRA,
350 .platform_data = &littleton_da9034_leds[2],
351 }, {
352 .name = "da903x-backlight",
353 .id = DA9034_ID_WLED,
354 },
355};
356
357static struct da903x_platform_data littleton_da9034_info = {
358 .num_subdevs = ARRAY_SIZE(littleton_da9034_subdevs),
359 .subdevs = littleton_da9034_subdevs,
360};
361
362static struct max732x_platform_data littleton_max7320_info = {
363 .gpio_base = EXT0_GPIO_BASE,
364};
365
366static struct i2c_board_info littleton_i2c_info[] = {
367 [0] = {
368 .type = "da9034",
369 .addr = 0x34,
370 .platform_data = &littleton_da9034_info,
371 .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO18)),
372 },
373 [1] = {
374 .type = "max7320",
375 .addr = 0x50,
376 .platform_data = &littleton_max7320_info,
377 },
378};
379
380static void __init littleton_init_i2c(void)
381{
382 pxa_set_i2c_info(NULL);
383 i2c_register_board_info(0, ARRAY_AND_SIZE(littleton_i2c_info));
384}
385#else
386static inline void littleton_init_i2c(void) {}
387#endif /* CONFIG_I2C_PXA || CONFIG_I2C_PXA_MODULE */
388
317static void __init littleton_init(void) 389static void __init littleton_init(void)
318{ 390{
319 /* initialize MFP configurations */ 391 /* initialize MFP configurations */
@@ -326,6 +398,7 @@ static void __init littleton_init(void)
326 platform_device_register(&smc91x_device); 398 platform_device_register(&smc91x_device);
327 399
328 littleton_init_spi(); 400 littleton_init_spi();
401 littleton_init_i2c();
329 littleton_init_lcd(); 402 littleton_init_lcd();
330 littleton_init_keypad(); 403 littleton_init_keypad();
331 littleton_init_nand(); 404 littleton_init_nand();