eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-pxa/littleton.c |
| 3 | * |
| 4 | * Support for the Marvell Littleton Development Platform. |
| 5 | * |
| 6 | * Author: Jason Chagas (largely modified code) |
| 7 | * Created: Nov 20, 2006 |
| 8 | * Copyright: (C) Copyright 2006 Marvell International Ltd. |
| 9 | * |
| 10 | * 2007-11-22 modified to align with latest kernel |
| 11 | * eric miao <eric.miao@marvell.com> |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License version 2 as |
| 15 | * publishhed by the Free Software Foundation. |
| 16 | */ |
| 17 | |
| 18 | #include <linux/init.h> |
| 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/delay.h> |
| 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/clk.h> |
Eric Miao | 80796f2 | 2008-11-25 11:03:03 +0800 | [diff] [blame] | 23 | #include <linux/gpio.h> |
Eric Miao | 24ff4cd | 2008-09-01 06:56:07 +0800 | [diff] [blame] | 24 | #include <linux/spi/spi.h> |
Sebastian Andrzej Siewior | 8348c25 | 2010-11-22 17:12:15 -0800 | [diff] [blame] | 25 | #include <linux/spi/pxa2xx_spi.h> |
Eric Miao | e1719da | 2008-06-24 16:49:41 +0800 | [diff] [blame] | 26 | #include <linux/smc91x.h> |
Eric Miao | 3b24f30 | 2008-12-10 17:04:38 +0800 | [diff] [blame] | 27 | #include <linux/i2c.h> |
| 28 | #include <linux/leds.h> |
| 29 | #include <linux/mfd/da903x.h> |
| 30 | #include <linux/i2c/max732x.h> |
Sebastian Andrzej Siewior | b459396 | 2011-02-23 12:38:16 +0100 | [diff] [blame] | 31 | #include <linux/i2c/pxa-i2c.h> |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 32 | |
| 33 | #include <asm/types.h> |
| 34 | #include <asm/setup.h> |
| 35 | #include <asm/memory.h> |
| 36 | #include <asm/mach-types.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 37 | #include <mach/hardware.h> |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 38 | #include <asm/irq.h> |
| 39 | |
| 40 | #include <asm/mach/arch.h> |
| 41 | #include <asm/mach/map.h> |
| 42 | #include <asm/mach/irq.h> |
| 43 | |
Eric Miao | 51c6298 | 2009-01-02 23:17:22 +0800 | [diff] [blame] | 44 | #include <mach/pxa300.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 45 | #include <mach/pxafb.h> |
Eric Miao | 361778d | 2009-06-05 16:42:29 +0800 | [diff] [blame] | 46 | #include <mach/mmc.h> |
Mark F. Brown | 4a2490e | 2010-09-03 18:28:06 -0400 | [diff] [blame] | 47 | #include <plat/pxa27x_keypad.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 48 | #include <mach/littleton.h> |
Haojian Zhuang | 82b95ec | 2009-09-10 13:55:23 +0800 | [diff] [blame] | 49 | #include <plat/pxa3xx_nand.h> |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 50 | |
| 51 | #include "generic.h" |
| 52 | |
Eric Miao | 361778d | 2009-06-05 16:42:29 +0800 | [diff] [blame] | 53 | #define GPIO_MMC1_CARD_DETECT mfp_to_gpio(MFP_PIN_GPIO15) |
| 54 | |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 55 | /* Littleton MFP configurations */ |
| 56 | static mfp_cfg_t littleton_mfp_cfg[] __initdata = { |
| 57 | /* LCD */ |
| 58 | GPIO54_LCD_LDD_0, |
| 59 | GPIO55_LCD_LDD_1, |
| 60 | GPIO56_LCD_LDD_2, |
| 61 | GPIO57_LCD_LDD_3, |
| 62 | GPIO58_LCD_LDD_4, |
| 63 | GPIO59_LCD_LDD_5, |
| 64 | GPIO60_LCD_LDD_6, |
| 65 | GPIO61_LCD_LDD_7, |
| 66 | GPIO62_LCD_LDD_8, |
| 67 | GPIO63_LCD_LDD_9, |
| 68 | GPIO64_LCD_LDD_10, |
| 69 | GPIO65_LCD_LDD_11, |
| 70 | GPIO66_LCD_LDD_12, |
| 71 | GPIO67_LCD_LDD_13, |
| 72 | GPIO68_LCD_LDD_14, |
| 73 | GPIO69_LCD_LDD_15, |
| 74 | GPIO70_LCD_LDD_16, |
| 75 | GPIO71_LCD_LDD_17, |
| 76 | GPIO72_LCD_FCLK, |
| 77 | GPIO73_LCD_LCLK, |
| 78 | GPIO74_LCD_PCLK, |
| 79 | GPIO75_LCD_BIAS, |
| 80 | |
| 81 | /* SSP2 */ |
| 82 | GPIO25_SSP2_SCLK, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 83 | GPIO27_SSP2_TXD, |
Eric Miao | 24ff4cd | 2008-09-01 06:56:07 +0800 | [diff] [blame] | 84 | GPIO17_GPIO, /* SFRM as chip-select */ |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 85 | |
| 86 | /* Debug Ethernet */ |
| 87 | GPIO90_GPIO, |
eric miao | 5fa4151 | 2008-01-23 15:07:22 +0800 | [diff] [blame] | 88 | |
| 89 | /* Keypad */ |
| 90 | GPIO107_KP_DKIN_0, |
| 91 | GPIO108_KP_DKIN_1, |
| 92 | GPIO115_KP_MKIN_0, |
| 93 | GPIO116_KP_MKIN_1, |
| 94 | GPIO117_KP_MKIN_2, |
| 95 | GPIO118_KP_MKIN_3, |
| 96 | GPIO119_KP_MKIN_4, |
| 97 | GPIO120_KP_MKIN_5, |
| 98 | GPIO121_KP_MKOUT_0, |
| 99 | GPIO122_KP_MKOUT_1, |
| 100 | GPIO123_KP_MKOUT_2, |
| 101 | GPIO124_KP_MKOUT_3, |
| 102 | GPIO125_KP_MKOUT_4, |
Eric Miao | 361778d | 2009-06-05 16:42:29 +0800 | [diff] [blame] | 103 | |
| 104 | /* MMC1 */ |
| 105 | GPIO3_MMC1_DAT0, |
| 106 | GPIO4_MMC1_DAT1, |
| 107 | GPIO5_MMC1_DAT2, |
| 108 | GPIO6_MMC1_DAT3, |
| 109 | GPIO7_MMC1_CLK, |
| 110 | GPIO8_MMC1_CMD, |
| 111 | GPIO15_GPIO, /* card detect */ |
Marek Vasut | 6d26ce6 | 2009-12-27 16:04:35 +0100 | [diff] [blame] | 112 | |
| 113 | /* UART3 */ |
| 114 | GPIO107_UART3_CTS, |
| 115 | GPIO108_UART3_RTS, |
| 116 | GPIO109_UART3_TXD, |
| 117 | GPIO110_UART3_RXD, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 118 | }; |
| 119 | |
| 120 | static struct resource smc91x_resources[] = { |
| 121 | [0] = { |
| 122 | .start = (LITTLETON_ETH_PHYS + 0x300), |
| 123 | .end = (LITTLETON_ETH_PHYS + 0xfffff), |
| 124 | .flags = IORESOURCE_MEM, |
| 125 | }, |
| 126 | [1] = { |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 127 | .start = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO90)), |
| 128 | .end = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO90)), |
Eric Miao | 8a6e887 | 2008-06-02 13:30:24 +0800 | [diff] [blame] | 129 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 130 | } |
| 131 | }; |
| 132 | |
Eric Miao | e1719da | 2008-06-24 16:49:41 +0800 | [diff] [blame] | 133 | static struct smc91x_platdata littleton_smc91x_info = { |
| 134 | .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | |
| 135 | SMC91X_NOWAIT | SMC91X_USE_DMA, |
| 136 | }; |
| 137 | |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 138 | static struct platform_device smc91x_device = { |
| 139 | .name = "smc91x", |
| 140 | .id = 0, |
| 141 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 142 | .resource = smc91x_resources, |
Eric Miao | e1719da | 2008-06-24 16:49:41 +0800 | [diff] [blame] | 143 | .dev = { |
| 144 | .platform_data = &littleton_smc91x_info, |
| 145 | }, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 146 | }; |
| 147 | |
Eric Miao | 36caeb4 | 2008-06-02 13:32:42 +0800 | [diff] [blame] | 148 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 149 | static struct pxafb_mode_info tpo_tdo24mtea1_modes[] = { |
| 150 | [0] = { |
| 151 | /* VGA */ |
| 152 | .pixclock = 38250, |
| 153 | .xres = 480, |
| 154 | .yres = 640, |
| 155 | .bpp = 16, |
| 156 | .hsync_len = 8, |
| 157 | .left_margin = 8, |
| 158 | .right_margin = 24, |
| 159 | .vsync_len = 2, |
| 160 | .upper_margin = 2, |
| 161 | .lower_margin = 4, |
| 162 | .sync = 0, |
| 163 | }, |
| 164 | [1] = { |
| 165 | /* QVGA */ |
| 166 | .pixclock = 153000, |
| 167 | .xres = 240, |
| 168 | .yres = 320, |
| 169 | .bpp = 16, |
| 170 | .hsync_len = 8, |
| 171 | .left_margin = 8, |
| 172 | .right_margin = 88, |
| 173 | .vsync_len = 2, |
| 174 | .upper_margin = 2, |
| 175 | .lower_margin = 2, |
| 176 | .sync = 0, |
| 177 | }, |
| 178 | }; |
| 179 | |
| 180 | static struct pxafb_mach_info littleton_lcd_info = { |
| 181 | .modes = tpo_tdo24mtea1_modes, |
| 182 | .num_modes = 2, |
eric miao | 0454bd0 | 2008-04-30 00:52:23 -0700 | [diff] [blame] | 183 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 184 | }; |
| 185 | |
| 186 | static void littleton_init_lcd(void) |
| 187 | { |
Russell King - ARM Linux | 4321e1a | 2011-02-15 15:37:30 +0800 | [diff] [blame] | 188 | pxa_set_fb_info(NULL, &littleton_lcd_info); |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 189 | } |
| 190 | #else |
| 191 | static inline void littleton_init_lcd(void) {}; |
Eric Miao | 36caeb4 | 2008-06-02 13:32:42 +0800 | [diff] [blame] | 192 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 193 | |
Eric Miao | 24ff4cd | 2008-09-01 06:56:07 +0800 | [diff] [blame] | 194 | #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE) |
| 195 | static struct pxa2xx_spi_master littleton_spi_info = { |
| 196 | .num_chipselect = 1, |
| 197 | }; |
| 198 | |
Eric Miao | 24ff4cd | 2008-09-01 06:56:07 +0800 | [diff] [blame] | 199 | static struct pxa2xx_spi_chip littleton_tdo24m_chip = { |
| 200 | .rx_threshold = 1, |
| 201 | .tx_threshold = 1, |
Mike Rapoport | 46580c0 | 2009-04-14 08:33:49 +0300 | [diff] [blame] | 202 | .gpio_cs = LITTLETON_GPIO_LCD_CS, |
Eric Miao | 24ff4cd | 2008-09-01 06:56:07 +0800 | [diff] [blame] | 203 | }; |
| 204 | |
| 205 | static struct spi_board_info littleton_spi_devices[] __initdata = { |
| 206 | { |
| 207 | .modalias = "tdo24m", |
| 208 | .max_speed_hz = 1000000, |
| 209 | .bus_num = 2, |
| 210 | .chip_select = 0, |
| 211 | .controller_data= &littleton_tdo24m_chip, |
| 212 | }, |
| 213 | }; |
| 214 | |
| 215 | static void __init littleton_init_spi(void) |
| 216 | { |
Eric Miao | 24ff4cd | 2008-09-01 06:56:07 +0800 | [diff] [blame] | 217 | pxa2xx_set_spi_info(2, &littleton_spi_info); |
| 218 | spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices)); |
| 219 | } |
| 220 | #else |
| 221 | static inline void littleton_init_spi(void) {} |
| 222 | #endif |
| 223 | |
Eric Miao | 36caeb4 | 2008-06-02 13:32:42 +0800 | [diff] [blame] | 224 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
eric miao | 5fa4151 | 2008-01-23 15:07:22 +0800 | [diff] [blame] | 225 | static unsigned int littleton_matrix_key_map[] = { |
| 226 | /* KEY(row, col, key_code) */ |
| 227 | KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), |
| 228 | KEY(0, 1, KEY_4), KEY(1, 1, KEY_5), KEY(2, 1, KEY_6), KEY(0, 2, KEY_7), |
| 229 | KEY(1, 2, KEY_8), KEY(2, 2, KEY_9), |
| 230 | |
| 231 | KEY(0, 3, KEY_KPASTERISK), /* * */ |
| 232 | KEY(2, 3, KEY_KPDOT), /* # */ |
| 233 | |
| 234 | KEY(5, 4, KEY_ENTER), |
| 235 | |
| 236 | KEY(5, 0, KEY_UP), |
| 237 | KEY(5, 1, KEY_DOWN), |
| 238 | KEY(5, 2, KEY_LEFT), |
| 239 | KEY(5, 3, KEY_RIGHT), |
| 240 | KEY(3, 2, KEY_HOME), |
| 241 | KEY(4, 1, KEY_END), |
| 242 | KEY(3, 3, KEY_BACK), |
| 243 | |
| 244 | KEY(4, 0, KEY_SEND), |
| 245 | KEY(4, 2, KEY_VOLUMEUP), |
| 246 | KEY(4, 3, KEY_VOLUMEDOWN), |
| 247 | |
| 248 | KEY(3, 0, KEY_F22), /* soft1 */ |
| 249 | KEY(3, 1, KEY_F23), /* soft2 */ |
| 250 | }; |
| 251 | |
| 252 | static struct pxa27x_keypad_platform_data littleton_keypad_info = { |
| 253 | .matrix_key_rows = 6, |
| 254 | .matrix_key_cols = 5, |
| 255 | .matrix_key_map = littleton_matrix_key_map, |
| 256 | .matrix_key_map_size = ARRAY_SIZE(littleton_matrix_key_map), |
| 257 | |
| 258 | .enable_rotary0 = 1, |
| 259 | .rotary0_up_key = KEY_UP, |
| 260 | .rotary0_down_key = KEY_DOWN, |
| 261 | |
| 262 | .debounce_interval = 30, |
| 263 | }; |
| 264 | static void __init littleton_init_keypad(void) |
| 265 | { |
| 266 | pxa_set_keypad_info(&littleton_keypad_info); |
| 267 | } |
| 268 | #else |
| 269 | static inline void littleton_init_keypad(void) {} |
| 270 | #endif |
| 271 | |
Eric Miao | 361778d | 2009-06-05 16:42:29 +0800 | [diff] [blame] | 272 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) |
Eric Miao | 361778d | 2009-06-05 16:42:29 +0800 | [diff] [blame] | 273 | static struct pxamci_platform_data littleton_mci_platform_data = { |
Eric Miao | f97cab2 | 2010-04-14 07:00:42 +0800 | [diff] [blame] | 274 | .detect_delay_ms = 200, |
Eric Miao | 70f6d3e8 | 2009-07-13 22:57:56 +0800 | [diff] [blame] | 275 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 276 | .gpio_card_detect = GPIO_MMC1_CARD_DETECT, |
| 277 | .gpio_card_ro = -1, |
| 278 | .gpio_power = -1, |
Eric Miao | 361778d | 2009-06-05 16:42:29 +0800 | [diff] [blame] | 279 | }; |
| 280 | |
| 281 | static void __init littleton_init_mmc(void) |
| 282 | { |
| 283 | pxa_set_mci_info(&littleton_mci_platform_data); |
| 284 | } |
| 285 | #else |
| 286 | static inline void littleton_init_mmc(void) {} |
| 287 | #endif |
| 288 | |
Eric Miao | 9c1db1a | 2008-06-02 15:42:14 +0800 | [diff] [blame] | 289 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) |
| 290 | static struct mtd_partition littleton_nand_partitions[] = { |
| 291 | [0] = { |
| 292 | .name = "Bootloader", |
| 293 | .offset = 0, |
| 294 | .size = 0x060000, |
| 295 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 296 | }, |
| 297 | [1] = { |
| 298 | .name = "Kernel", |
| 299 | .offset = 0x060000, |
| 300 | .size = 0x200000, |
| 301 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 302 | }, |
| 303 | [2] = { |
| 304 | .name = "Filesystem", |
| 305 | .offset = 0x0260000, |
| 306 | .size = 0x3000000, /* 48M - rootfs */ |
| 307 | }, |
| 308 | [3] = { |
| 309 | .name = "MassStorage", |
| 310 | .offset = 0x3260000, |
| 311 | .size = 0x3d40000, |
| 312 | }, |
| 313 | [4] = { |
| 314 | .name = "BBT", |
| 315 | .offset = 0x6FA0000, |
| 316 | .size = 0x80000, |
| 317 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 318 | }, |
| 319 | /* NOTE: we reserve some blocks at the end of the NAND flash for |
| 320 | * bad block management, and the max number of relocation blocks |
| 321 | * differs on different platforms. Please take care with it when |
| 322 | * defining the partition table. |
| 323 | */ |
| 324 | }; |
| 325 | |
| 326 | static struct pxa3xx_nand_platform_data littleton_nand_info = { |
| 327 | .enable_arbiter = 1, |
Lei Wen | f3c8cfc | 2011-07-14 20:44:33 -0700 | [diff] [blame] | 328 | .num_cs = 1, |
| 329 | .parts[0] = littleton_nand_partitions, |
| 330 | .nr_parts[0] = ARRAY_SIZE(littleton_nand_partitions), |
Eric Miao | 9c1db1a | 2008-06-02 15:42:14 +0800 | [diff] [blame] | 331 | }; |
| 332 | |
| 333 | static void __init littleton_init_nand(void) |
| 334 | { |
| 335 | pxa3xx_set_nand_info(&littleton_nand_info); |
| 336 | } |
| 337 | #else |
| 338 | static inline void littleton_init_nand(void) {} |
| 339 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ |
| 340 | |
Eric Miao | 3b24f30 | 2008-12-10 17:04:38 +0800 | [diff] [blame] | 341 | #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) |
| 342 | static struct led_info littleton_da9034_leds[] = { |
| 343 | [0] = { |
| 344 | .name = "littleton:keypad1", |
| 345 | .flags = DA9034_LED_RAMP, |
| 346 | }, |
| 347 | [1] = { |
| 348 | .name = "littleton:keypad2", |
| 349 | .flags = DA9034_LED_RAMP, |
| 350 | }, |
| 351 | [2] = { |
| 352 | .name = "littleton:vibra", |
| 353 | .flags = 0, |
| 354 | }, |
| 355 | }; |
| 356 | |
Eric Miao | fc76132 | 2009-04-13 11:06:49 +0800 | [diff] [blame] | 357 | static struct da9034_touch_pdata littleton_da9034_touch = { |
| 358 | .x_inverted = 1, |
| 359 | .interval_ms = 20, |
| 360 | }; |
| 361 | |
Eric Miao | 3b24f30 | 2008-12-10 17:04:38 +0800 | [diff] [blame] | 362 | static struct da903x_subdev_info littleton_da9034_subdevs[] = { |
| 363 | { |
| 364 | .name = "da903x-led", |
| 365 | .id = DA9034_ID_LED_1, |
| 366 | .platform_data = &littleton_da9034_leds[0], |
| 367 | }, { |
| 368 | .name = "da903x-led", |
| 369 | .id = DA9034_ID_LED_2, |
| 370 | .platform_data = &littleton_da9034_leds[1], |
| 371 | }, { |
| 372 | .name = "da903x-led", |
| 373 | .id = DA9034_ID_VIBRA, |
| 374 | .platform_data = &littleton_da9034_leds[2], |
| 375 | }, { |
| 376 | .name = "da903x-backlight", |
| 377 | .id = DA9034_ID_WLED, |
Eric Miao | fc76132 | 2009-04-13 11:06:49 +0800 | [diff] [blame] | 378 | }, { |
| 379 | .name = "da9034-touch", |
| 380 | .id = DA9034_ID_TOUCH, |
| 381 | .platform_data = &littleton_da9034_touch, |
Eric Miao | 3b24f30 | 2008-12-10 17:04:38 +0800 | [diff] [blame] | 382 | }, |
| 383 | }; |
| 384 | |
| 385 | static struct da903x_platform_data littleton_da9034_info = { |
| 386 | .num_subdevs = ARRAY_SIZE(littleton_da9034_subdevs), |
| 387 | .subdevs = littleton_da9034_subdevs, |
| 388 | }; |
| 389 | |
| 390 | static struct max732x_platform_data littleton_max7320_info = { |
| 391 | .gpio_base = EXT0_GPIO_BASE, |
| 392 | }; |
| 393 | |
| 394 | static struct i2c_board_info littleton_i2c_info[] = { |
| 395 | [0] = { |
| 396 | .type = "da9034", |
| 397 | .addr = 0x34, |
| 398 | .platform_data = &littleton_da9034_info, |
Haojian Zhuang | 4929f5a | 2011-10-10 16:03:51 +0800 | [diff] [blame] | 399 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO18)), |
Eric Miao | 3b24f30 | 2008-12-10 17:04:38 +0800 | [diff] [blame] | 400 | }, |
| 401 | [1] = { |
| 402 | .type = "max7320", |
| 403 | .addr = 0x50, |
| 404 | .platform_data = &littleton_max7320_info, |
| 405 | }, |
| 406 | }; |
| 407 | |
| 408 | static void __init littleton_init_i2c(void) |
| 409 | { |
| 410 | pxa_set_i2c_info(NULL); |
| 411 | i2c_register_board_info(0, ARRAY_AND_SIZE(littleton_i2c_info)); |
| 412 | } |
| 413 | #else |
| 414 | static inline void littleton_init_i2c(void) {} |
| 415 | #endif /* CONFIG_I2C_PXA || CONFIG_I2C_PXA_MODULE */ |
| 416 | |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 417 | static void __init littleton_init(void) |
| 418 | { |
| 419 | /* initialize MFP configurations */ |
| 420 | pxa3xx_mfp_config(ARRAY_AND_SIZE(littleton_mfp_cfg)); |
| 421 | |
Russell King | cc155c6 | 2009-11-09 13:34:08 +0800 | [diff] [blame] | 422 | pxa_set_ffuart_info(NULL); |
| 423 | pxa_set_btuart_info(NULL); |
| 424 | pxa_set_stuart_info(NULL); |
| 425 | |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 426 | /* |
| 427 | * Note: we depend bootloader set the correct |
| 428 | * value to MSC register for SMC91x. |
| 429 | */ |
| 430 | platform_device_register(&smc91x_device); |
| 431 | |
Eric Miao | 24ff4cd | 2008-09-01 06:56:07 +0800 | [diff] [blame] | 432 | littleton_init_spi(); |
Eric Miao | 3b24f30 | 2008-12-10 17:04:38 +0800 | [diff] [blame] | 433 | littleton_init_i2c(); |
Eric Miao | 361778d | 2009-06-05 16:42:29 +0800 | [diff] [blame] | 434 | littleton_init_mmc(); |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 435 | littleton_init_lcd(); |
eric miao | 5fa4151 | 2008-01-23 15:07:22 +0800 | [diff] [blame] | 436 | littleton_init_keypad(); |
Eric Miao | 9c1db1a | 2008-06-02 15:42:14 +0800 | [diff] [blame] | 437 | littleton_init_nand(); |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 438 | } |
| 439 | |
| 440 | MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") |
Nicolas Pitre | 7375aba | 2011-07-05 22:38:15 -0400 | [diff] [blame] | 441 | .atag_offset = 0x100, |
Marek Vasut | 851982c | 2010-10-11 02:20:19 +0200 | [diff] [blame] | 442 | .map_io = pxa3xx_map_io, |
Haojian Zhuang | 6ac6b81 | 2010-08-20 15:23:59 +0800 | [diff] [blame] | 443 | .nr_irqs = LITTLETON_NR_IRQS, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 444 | .init_irq = pxa3xx_init_irq, |
Eric Miao | 8a97ae2 | 2011-05-18 21:30:04 +0800 | [diff] [blame] | 445 | .handle_irq = pxa3xx_handle_irq, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 446 | .timer = &pxa_timer, |
| 447 | .init_machine = littleton_init, |
Russell King | 271a74f | 2011-11-04 14:15:53 +0000 | [diff] [blame] | 448 | .restart = pxa_restart, |
eric miao | e1d9b95 | 2007-12-13 10:41:43 +0800 | [diff] [blame] | 449 | MACHINE_END |