blob: 8726dc7c73a68f1fc4890462509cfdaa5f5f9c75 [file] [log] [blame]
Mike Rapoportcf75d8d2008-08-26 14:03:44 +01001/*
2 * linux/arch/arm/mach-pxa/cm-x300.c
3 *
4 * Support for the CompuLab CM-X300 modules
5 *
6 * Copyright (C) 2008 CompuLab Ltd.
7 *
8 * Mike Rapoport <mike@compulab.co.il>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/module.h>
16#include <linux/kernel.h>
17#include <linux/interrupt.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20
21#include <linux/gpio.h>
22#include <linux/dm9000.h>
23#include <linux/leds.h>
Mike Rapoport1858ced2009-06-04 10:44:52 +030024#include <linux/rtc-v3020.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010025
26#include <linux/i2c.h>
27#include <linux/i2c/pca953x.h>
28
Igor Grinberg83e560e2009-10-14 09:20:19 +020029#include <linux/spi/spi.h>
30#include <linux/spi/spi_gpio.h>
31#include <linux/spi/tdo24m.h>
32
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010033#include <asm/mach-types.h>
34#include <asm/mach/arch.h>
Mike Rapoportb5a5c472009-06-04 10:44:54 +030035#include <asm/setup.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010036
Eric Miao51c62982009-01-02 23:17:22 +080037#include <mach/pxa300.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010038#include <mach/pxafb.h>
39#include <mach/mmc.h>
40#include <mach/ohci.h>
Eric Miaof0a83702009-04-13 15:03:11 +080041#include <plat/i2c.h>
Haojian Zhuang82b95ec2009-09-10 13:55:23 +080042#include <plat/pxa3xx_nand.h>
Igor Grinberg74e74de2009-10-14 09:20:20 +020043#include <mach/audio.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010044
45#include <asm/mach/map.h>
46
47#include "generic.h"
48
49#define CM_X300_ETH_PHYS 0x08000010
50
Mike Rapoport0bff2fc2009-10-15 10:11:09 +020051#define GPIO82_MMC_IRQ (82)
52#define GPIO85_MMC_WP (85)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010053
Mike Rapoport0bff2fc2009-10-15 10:11:09 +020054#define CM_X300_MMC_IRQ IRQ_GPIO(GPIO82_MMC_IRQ)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010055
Mike Rapoport1858ced2009-06-04 10:44:52 +030056#define GPIO95_RTC_CS (95)
57#define GPIO96_RTC_WR (96)
58#define GPIO97_RTC_RD (97)
59#define GPIO98_RTC_IO (98)
60
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010061static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = {
62 /* LCD */
63 GPIO54_LCD_LDD_0,
64 GPIO55_LCD_LDD_1,
65 GPIO56_LCD_LDD_2,
66 GPIO57_LCD_LDD_3,
67 GPIO58_LCD_LDD_4,
68 GPIO59_LCD_LDD_5,
69 GPIO60_LCD_LDD_6,
70 GPIO61_LCD_LDD_7,
71 GPIO62_LCD_LDD_8,
72 GPIO63_LCD_LDD_9,
73 GPIO64_LCD_LDD_10,
74 GPIO65_LCD_LDD_11,
75 GPIO66_LCD_LDD_12,
76 GPIO67_LCD_LDD_13,
77 GPIO68_LCD_LDD_14,
78 GPIO69_LCD_LDD_15,
79 GPIO72_LCD_FCLK,
80 GPIO73_LCD_LCLK,
81 GPIO74_LCD_PCLK,
82 GPIO75_LCD_BIAS,
83
84 /* BTUART */
85 GPIO111_UART2_RTS,
86 GPIO112_UART2_RXD | MFP_LPM_EDGE_FALL,
87 GPIO113_UART2_TXD,
88 GPIO114_UART2_CTS | MFP_LPM_EDGE_BOTH,
89
90 /* STUART */
91 GPIO109_UART3_TXD,
92 GPIO110_UART3_RXD | MFP_LPM_EDGE_FALL,
93
94 /* AC97 */
95 GPIO23_AC97_nACRESET,
96 GPIO24_AC97_SYSCLK,
97 GPIO29_AC97_BITCLK,
98 GPIO25_AC97_SDATA_IN_0,
99 GPIO27_AC97_SDATA_OUT,
100 GPIO28_AC97_SYNC,
101
102 /* Keypad */
103 GPIO115_KP_MKIN_0 | MFP_LPM_EDGE_BOTH,
104 GPIO116_KP_MKIN_1 | MFP_LPM_EDGE_BOTH,
105 GPIO117_KP_MKIN_2 | MFP_LPM_EDGE_BOTH,
106 GPIO118_KP_MKIN_3 | MFP_LPM_EDGE_BOTH,
107 GPIO119_KP_MKIN_4 | MFP_LPM_EDGE_BOTH,
108 GPIO120_KP_MKIN_5 | MFP_LPM_EDGE_BOTH,
109 GPIO2_2_KP_MKIN_6 | MFP_LPM_EDGE_BOTH,
110 GPIO3_2_KP_MKIN_7 | MFP_LPM_EDGE_BOTH,
111 GPIO121_KP_MKOUT_0,
112 GPIO122_KP_MKOUT_1,
113 GPIO123_KP_MKOUT_2,
114 GPIO124_KP_MKOUT_3,
115 GPIO125_KP_MKOUT_4,
116 GPIO4_2_KP_MKOUT_5,
117
118 /* MMC1 */
119 GPIO3_MMC1_DAT0,
120 GPIO4_MMC1_DAT1 | MFP_LPM_EDGE_BOTH,
121 GPIO5_MMC1_DAT2,
122 GPIO6_MMC1_DAT3,
123 GPIO7_MMC1_CLK,
124 GPIO8_MMC1_CMD, /* CMD0 for slot 0 */
125
126 /* MMC2 */
127 GPIO9_MMC2_DAT0,
128 GPIO10_MMC2_DAT1 | MFP_LPM_EDGE_BOTH,
129 GPIO11_MMC2_DAT2,
130 GPIO12_MMC2_DAT3,
131 GPIO13_MMC2_CLK,
132 GPIO14_MMC2_CMD,
133
134 /* FFUART */
135 GPIO30_UART1_RXD | MFP_LPM_EDGE_FALL,
136 GPIO31_UART1_TXD,
137 GPIO32_UART1_CTS,
138 GPIO37_UART1_RTS,
139 GPIO33_UART1_DCD,
140 GPIO34_UART1_DSR | MFP_LPM_EDGE_FALL,
141 GPIO35_UART1_RI,
142 GPIO36_UART1_DTR,
143
144 /* GPIOs */
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100145 GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */
146 GPIO85_GPIO, /* MMC WP */
147 GPIO99_GPIO, /* Ethernet IRQ */
Eric Miao6f584cf2008-11-28 16:00:24 +0800148
Mike Rapoport1858ced2009-06-04 10:44:52 +0300149 /* RTC GPIOs */
150 GPIO95_GPIO, /* RTC CS */
151 GPIO96_GPIO, /* RTC WR */
152 GPIO97_GPIO, /* RTC RD */
153 GPIO98_GPIO, /* RTC IO */
154
Eric Miao6f584cf2008-11-28 16:00:24 +0800155 /* Standard I2C */
156 GPIO21_I2C_SCL,
157 GPIO22_I2C_SDA,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100158};
159
Igor Grinberg55052ea2009-10-14 09:20:18 +0200160static mfp_cfg_t cm_x300_rev_lt130_mfp_cfg[] __initdata = {
161 /* GPIOs */
162 GPIO79_GPIO, /* LED */
163 GPIO77_GPIO, /* WiFi reset */
164 GPIO78_GPIO, /* BT reset */
165};
166
167static mfp_cfg_t cm_x300_rev_ge130_mfp_cfg[] __initdata = {
168 /* GPIOs */
169 GPIO76_GPIO, /* LED */
170 GPIO71_GPIO, /* WiFi reset */
171 GPIO70_GPIO, /* BT reset */
172};
173
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100174#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
175static struct resource dm9000_resources[] = {
176 [0] = {
177 .start = CM_X300_ETH_PHYS,
178 .end = CM_X300_ETH_PHYS + 0x3,
179 .flags = IORESOURCE_MEM,
180 },
181 [1] = {
182 .start = CM_X300_ETH_PHYS + 0x4,
183 .end = CM_X300_ETH_PHYS + 0x4 + 500,
184 .flags = IORESOURCE_MEM,
185 },
186 [2] = {
187 .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO99)),
188 .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO99)),
189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
190 }
191};
192
193static struct dm9000_plat_data cm_x300_dm9000_platdata = {
Mike Rapoportbff22c92009-02-23 18:01:12 +0200194 .flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100195};
196
197static struct platform_device dm9000_device = {
198 .name = "dm9000",
199 .id = 0,
200 .num_resources = ARRAY_SIZE(dm9000_resources),
201 .resource = dm9000_resources,
202 .dev = {
203 .platform_data = &cm_x300_dm9000_platdata,
204 }
205
206};
207
208static void __init cm_x300_init_dm9000(void)
209{
210 platform_device_register(&dm9000_device);
211}
212#else
213static inline void cm_x300_init_dm9000(void) {}
214#endif
215
Igor Grinberg83e560e2009-10-14 09:20:19 +0200216/* LCD */
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100217#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
218static struct pxafb_mode_info cm_x300_lcd_modes[] = {
219 [0] = {
Igor Grinberg83e560e2009-10-14 09:20:19 +0200220 .pixclock = 38250,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100221 .bpp = 16,
222 .xres = 480,
223 .yres = 640,
224 .hsync_len = 8,
225 .vsync_len = 2,
226 .left_margin = 8,
Igor Grinberg83e560e2009-10-14 09:20:19 +0200227 .upper_margin = 2,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100228 .right_margin = 24,
229 .lower_margin = 4,
230 .cmap_greyscale = 0,
231 },
232 [1] = {
233 .pixclock = 153800,
234 .bpp = 16,
235 .xres = 240,
236 .yres = 320,
237 .hsync_len = 8,
238 .vsync_len = 2,
239 .left_margin = 8,
240 .upper_margin = 2,
241 .right_margin = 88,
242 .lower_margin = 2,
243 .cmap_greyscale = 0,
244 },
245};
246
247static struct pxafb_mach_info cm_x300_lcd = {
248 .modes = cm_x300_lcd_modes,
Igor Grinberg83e560e2009-10-14 09:20:19 +0200249 .num_modes = ARRAY_SIZE(cm_x300_lcd_modes),
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100250 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
251};
252
253static void __init cm_x300_init_lcd(void)
254{
255 set_pxa_fb_info(&cm_x300_lcd);
256}
257#else
258static inline void cm_x300_init_lcd(void) {}
259#endif
260
Igor Grinberg83e560e2009-10-14 09:20:19 +0200261#if defined(CONFIG_SPI_GPIO) || defined(CONFIG_SPI_GPIO_MODULE)
262#define GPIO_LCD_BASE (144)
263#define GPIO_LCD_DIN (GPIO_LCD_BASE + 8) /* aux_gpio3_0 */
264#define GPIO_LCD_DOUT (GPIO_LCD_BASE + 9) /* aux_gpio3_1 */
265#define GPIO_LCD_SCL (GPIO_LCD_BASE + 10) /* aux_gpio3_2 */
266#define GPIO_LCD_CS (GPIO_LCD_BASE + 11) /* aux_gpio3_3 */
267#define LCD_SPI_BUS_NUM (1)
268
269static struct spi_gpio_platform_data cm_x300_spi_gpio_pdata = {
270 .sck = GPIO_LCD_SCL,
271 .mosi = GPIO_LCD_DIN,
272 .miso = GPIO_LCD_DOUT,
273 .num_chipselect = 1,
274};
275
276static struct platform_device cm_x300_spi_gpio = {
277 .name = "spi_gpio",
278 .id = LCD_SPI_BUS_NUM,
279 .dev = {
280 .platform_data = &cm_x300_spi_gpio_pdata,
281 },
282};
283
284static struct tdo24m_platform_data cm_x300_tdo24m_pdata = {
285 .model = TDO35S,
286};
287
288static struct spi_board_info cm_x300_spi_devices[] __initdata = {
289 {
290 .modalias = "tdo24m",
291 .max_speed_hz = 1000000,
292 .bus_num = LCD_SPI_BUS_NUM,
293 .chip_select = 0,
294 .controller_data = (void *) GPIO_LCD_CS,
295 .platform_data = &cm_x300_tdo24m_pdata,
296 },
297};
298
299static void __init cm_x300_init_spi(void)
300{
301 spi_register_board_info(cm_x300_spi_devices,
302 ARRAY_SIZE(cm_x300_spi_devices));
303 platform_device_register(&cm_x300_spi_gpio);
304}
305#else
306static inline void cm_x300_init_spi(void) {}
307#endif
308
Igor Grinberg74e74de2009-10-14 09:20:20 +0200309#if defined(CONFIG_SND_PXA2XX_LIB_AC97)
310static void __init cm_x300_init_ac97(void)
311{
312 pxa_set_ac97_info(NULL);
313}
314#else
315static inline void cm_x300_init_ac97(void) {}
316#endif
317
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100318#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
319static struct mtd_partition cm_x300_nand_partitions[] = {
320 [0] = {
321 .name = "OBM",
322 .offset = 0,
323 .size = SZ_256K,
324 .mask_flags = MTD_WRITEABLE, /* force read-only */
325 },
326 [1] = {
327 .name = "U-Boot",
328 .offset = MTDPART_OFS_APPEND,
329 .size = SZ_256K,
330 .mask_flags = MTD_WRITEABLE, /* force read-only */
331 },
332 [2] = {
333 .name = "Environment",
334 .offset = MTDPART_OFS_APPEND,
335 .size = SZ_256K,
336 },
337 [3] = {
338 .name = "reserved",
339 .offset = MTDPART_OFS_APPEND,
340 .size = SZ_256K + SZ_1M,
341 .mask_flags = MTD_WRITEABLE, /* force read-only */
342 },
343 [4] = {
344 .name = "kernel",
345 .offset = MTDPART_OFS_APPEND,
346 .size = SZ_4M,
347 },
348 [5] = {
349 .name = "fs",
350 .offset = MTDPART_OFS_APPEND,
351 .size = MTDPART_SIZ_FULL,
352 },
353};
354
355static struct pxa3xx_nand_platform_data cm_x300_nand_info = {
356 .enable_arbiter = 1,
Mike Rapoportb3992b62009-06-04 10:44:51 +0300357 .keep_config = 1,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100358 .parts = cm_x300_nand_partitions,
359 .nr_parts = ARRAY_SIZE(cm_x300_nand_partitions),
360};
361
362static void __init cm_x300_init_nand(void)
363{
364 pxa3xx_set_nand_info(&cm_x300_nand_info);
365}
366#else
367static inline void cm_x300_init_nand(void) {}
368#endif
369
370#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200371static struct pxamci_platform_data cm_x300_mci_platform_data = {
372 .detect_delay = 20,
373 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
374 .gpio_card_detect = GPIO82_MMC_IRQ,
375 .gpio_card_ro = GPIO85_MMC_WP,
376 .gpio_power = -1,
377};
378
379/* The second MMC slot of CM-X300 is hardwired to Libertas card and has
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100380 no detection/ro pins */
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200381static int cm_x300_mci2_init(struct device *dev,
382 irq_handler_t cm_x300_detect_int,
383 void *data)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100384{
385 return 0;
386}
387
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200388static void cm_x300_mci2_exit(struct device *dev, void *data)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100389{
390}
391
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100392static struct pxamci_platform_data cm_x300_mci2_platform_data = {
Robert Jarzmik7a648252009-07-06 22:16:42 +0200393 .detect_delay = 20,
394 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200395 .init = cm_x300_mci2_init,
396 .exit = cm_x300_mci2_exit,
397 .gpio_card_detect = -1,
398 .gpio_card_ro = -1,
Robert Jarzmik7a648252009-07-06 22:16:42 +0200399 .gpio_power = -1,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100400};
401
402static void __init cm_x300_init_mmc(void)
403{
404 pxa_set_mci_info(&cm_x300_mci_platform_data);
405 pxa3xx_set_mci2_info(&cm_x300_mci2_platform_data);
406}
407#else
408static inline void cm_x300_init_mmc(void) {}
409#endif
410
411#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100412static struct pxaohci_platform_data cm_x300_ohci_platform_data = {
413 .port_mode = PMM_PERPORT_MODE,
Eric Miao097b5332008-09-27 15:49:57 +0800414 .flags = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100415};
Eric Miao097b5332008-09-27 15:49:57 +0800416
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100417static void __init cm_x300_init_ohci(void)
418{
419 pxa_set_ohci_info(&cm_x300_ohci_platform_data);
420}
421#else
422static inline void cm_x300_init_ohci(void) {}
423#endif
424
425#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
426static struct gpio_led cm_x300_leds[] = {
427 [0] = {
428 .name = "cm-x300:green",
429 .default_trigger = "heartbeat",
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100430 .active_low = 1,
431 },
432};
433
434static struct gpio_led_platform_data cm_x300_gpio_led_pdata = {
435 .num_leds = ARRAY_SIZE(cm_x300_leds),
436 .leds = cm_x300_leds,
437};
438
439static struct platform_device cm_x300_led_device = {
440 .name = "leds-gpio",
441 .id = -1,
442 .dev = {
443 .platform_data = &cm_x300_gpio_led_pdata,
444 },
445};
446
447static void __init cm_x300_init_leds(void)
448{
Igor Grinberg55052ea2009-10-14 09:20:18 +0200449 if (system_rev < 130)
450 cm_x300_leds[0].gpio = 79;
451 else
452 cm_x300_leds[0].gpio = 76;
453
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100454 platform_device_register(&cm_x300_led_device);
455}
456#else
457static inline void cm_x300_init_leds(void) {}
458#endif
459
460#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
461/* PCA9555 */
462static struct pca953x_platform_data cm_x300_gpio_ext_pdata_0 = {
463 .gpio_base = 128,
464};
465
466static struct pca953x_platform_data cm_x300_gpio_ext_pdata_1 = {
467 .gpio_base = 144,
468};
469
470static struct i2c_board_info cm_x300_gpio_ext_info[] = {
471 [0] = {
472 I2C_BOARD_INFO("pca9555", 0x24),
473 .platform_data = &cm_x300_gpio_ext_pdata_0,
474 },
475 [1] = {
476 I2C_BOARD_INFO("pca9555", 0x25),
477 .platform_data = &cm_x300_gpio_ext_pdata_1,
478 },
479};
480
481static void __init cm_x300_init_i2c(void)
482{
483 pxa_set_i2c_info(NULL);
484 i2c_register_board_info(0, cm_x300_gpio_ext_info,
485 ARRAY_SIZE(cm_x300_gpio_ext_info));
486}
487#else
488static inline void cm_x300_init_i2c(void) {}
489#endif
490
Mike Rapoport1858ced2009-06-04 10:44:52 +0300491#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
492struct v3020_platform_data cm_x300_v3020_pdata = {
493 .use_gpio = 1,
494 .gpio_cs = GPIO95_RTC_CS,
495 .gpio_wr = GPIO96_RTC_WR,
496 .gpio_rd = GPIO97_RTC_RD,
497 .gpio_io = GPIO98_RTC_IO,
498};
499
500static struct platform_device cm_x300_rtc_device = {
501 .name = "v3020",
502 .id = -1,
503 .dev = {
504 .platform_data = &cm_x300_v3020_pdata,
505 }
506};
507
508static void __init cm_x300_init_rtc(void)
509{
510 platform_device_register(&cm_x300_rtc_device);
511}
512#else
513static inline void cm_x300_init_rtc(void) {}
514#endif
515
Igor Grinberg55052ea2009-10-14 09:20:18 +0200516static void __init cm_x300_init_mfp(void)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100517{
518 /* board-processor specific GPIO initialization */
519 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_mfp_cfg));
520
Igor Grinberg55052ea2009-10-14 09:20:18 +0200521 if (system_rev < 130)
522 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_rev_lt130_mfp_cfg));
523 else
524 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_rev_ge130_mfp_cfg));
525}
526
527static void __init cm_x300_init(void)
528{
529 cm_x300_init_mfp();
530
Russell Kingcc155c62009-11-09 13:34:08 +0800531 pxa_set_ffuart_info(NULL);
532 pxa_set_btuart_info(NULL);
533 pxa_set_stuart_info(NULL);
534
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100535 cm_x300_init_dm9000();
536 cm_x300_init_lcd();
537 cm_x300_init_ohci();
538 cm_x300_init_mmc();
539 cm_x300_init_nand();
540 cm_x300_init_leds();
541 cm_x300_init_i2c();
Igor Grinberg83e560e2009-10-14 09:20:19 +0200542 cm_x300_init_spi();
Mike Rapoport1858ced2009-06-04 10:44:52 +0300543 cm_x300_init_rtc();
Igor Grinberg74e74de2009-10-14 09:20:20 +0200544 cm_x300_init_ac97();
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100545}
546
Mike Rapoportb5a5c472009-06-04 10:44:54 +0300547static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags,
548 char **cmdline, struct meminfo *mi)
549{
550 mi->nr_banks = 2;
551 mi->bank[0].start = 0xa0000000;
552 mi->bank[0].node = 0;
553 mi->bank[0].size = (64*1024*1024);
554 mi->bank[1].start = 0xc0000000;
555 mi->bank[1].node = 0;
556 mi->bank[1].size = (64*1024*1024);
557}
558
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100559MACHINE_START(CM_X300, "CM-X300 module")
560 .phys_io = 0x40000000,
561 .boot_params = 0xa0000100,
562 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
563 .map_io = pxa_map_io,
564 .init_irq = pxa3xx_init_irq,
565 .timer = &pxa_timer,
566 .init_machine = cm_x300_init,
Mike Rapoportb5a5c472009-06-04 10:44:54 +0300567 .fixup = cm_x300_fixup,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100568MACHINE_END