blob: 48c17372bc1c9c6c8dd0e2ac03948c451a9ce156 [file] [log] [blame]
Stefan Schmidt9ab24e42008-07-09 08:08:17 +01001/*
2 * ezx.c - Common code for the EZX platform.
3 *
4 * Copyright (C) 2005-2006 Harald Welte <laforge@openezx.org>,
5 * 2007-2008 Daniel Ribeiro <drwyrm@gmail.com>,
6 * 2007-2008 Stefan Schmidt <stefan@datenfreihafen.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/delay.h>
18#include <linux/pwm_backlight.h>
Stefan Schmidtfe9490c2008-12-08 15:58:09 +010019#include <linux/input.h>
Antonio Ospite1ce2c512009-06-01 12:26:58 +020020#include <linux/gpio_keys.h>
Stefan Schmidt9ab24e42008-07-09 08:08:17 +010021
22#include <asm/setup.h>
Eric Miao51c62982009-01-02 23:17:22 +080023#include <asm/mach-types.h>
24#include <asm/mach/arch.h>
25
26#include <mach/pxa27x.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010027#include <mach/pxafb.h>
28#include <mach/ohci.h>
Eric Miaof0a83702009-04-13 15:03:11 +080029#include <plat/i2c.h>
Russell King05678a92008-11-28 16:04:54 +000030#include <mach/hardware.h>
Stefan Schmidtfe9490c2008-12-08 15:58:09 +010031#include <mach/pxa27x_keypad.h>
Stefan Schmidt9ab24e42008-07-09 08:08:17 +010032
Stefan Schmidt9ab24e42008-07-09 08:08:17 +010033#include "devices.h"
34#include "generic.h"
35
Antonio Ospite1ce2c512009-06-01 12:26:58 +020036#define GPIO12_A780_FLIP_LID 12
37#define GPIO15_A1200_FLIP_LID 15
38#define GPIO15_A910_FLIP_LID 15
39#define GPIO12_E680_LOCK_SWITCH 12
40#define GPIO15_E6_LOCK_SWITCH 15
41
Stefan Schmidt9ab24e42008-07-09 08:08:17 +010042static struct platform_pwm_backlight_data ezx_backlight_data = {
43 .pwm_id = 0,
44 .max_brightness = 1023,
45 .dft_brightness = 1023,
46 .pwm_period_ns = 78770,
47};
48
49static struct platform_device ezx_backlight_device = {
50 .name = "pwm-backlight",
51 .dev = {
52 .parent = &pxa27x_device_pwm0.dev,
53 .platform_data = &ezx_backlight_data,
54 },
55};
56
57static struct pxafb_mode_info mode_ezx_old = {
58 .pixclock = 150000,
59 .xres = 240,
60 .yres = 320,
61 .bpp = 16,
62 .hsync_len = 10,
63 .left_margin = 20,
64 .right_margin = 10,
65 .vsync_len = 2,
66 .upper_margin = 3,
67 .lower_margin = 2,
68 .sync = 0,
69};
70
71static struct pxafb_mach_info ezx_fb_info_1 = {
72 .modes = &mode_ezx_old,
73 .num_modes = 1,
74 .lcd_conn = LCD_COLOR_TFT_16BPP,
75};
76
77static struct pxafb_mode_info mode_72r89803y01 = {
78 .pixclock = 192308,
79 .xres = 240,
80 .yres = 320,
81 .bpp = 32,
82 .depth = 18,
83 .hsync_len = 10,
84 .left_margin = 20,
85 .right_margin = 10,
86 .vsync_len = 2,
87 .upper_margin = 3,
88 .lower_margin = 2,
89 .sync = 0,
90};
91
92static struct pxafb_mach_info ezx_fb_info_2 = {
93 .modes = &mode_72r89803y01,
94 .num_modes = 1,
95 .lcd_conn = LCD_COLOR_TFT_18BPP,
96};
97
Antonio Ospite1ce2c512009-06-01 12:26:58 +020098static struct platform_device *ezx_devices[] __initdata = {
Stefan Schmidt9ab24e42008-07-09 08:08:17 +010099 &ezx_backlight_device,
100};
101
102static unsigned long ezx_pin_config[] __initdata = {
103 /* PWM backlight */
104 GPIO16_PWM0_OUT,
105
106 /* BTUART */
107 GPIO42_BTUART_RXD,
108 GPIO43_BTUART_TXD,
109 GPIO44_BTUART_CTS,
110 GPIO45_BTUART_RTS,
111
Eric Miao6f584cf2008-11-28 16:00:24 +0800112 /* I2C */
113 GPIO117_I2C_SCL,
114 GPIO118_I2C_SDA,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100115
116 /* PCAP SSP */
117 GPIO29_SSP1_SCLK,
118 GPIO25_SSP1_TXD,
119 GPIO26_SSP1_RXD,
120 GPIO24_GPIO, /* pcap chip select */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300121 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, /* pcap interrupt */
122 GPIO4_GPIO | MFP_LPM_DRIVE_HIGH, /* WDI_AP */
123 GPIO55_GPIO | MFP_LPM_DRIVE_HIGH, /* SYS_RESTART */
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100124
125 /* MMC */
126 GPIO32_MMC_CLK,
127 GPIO92_MMC_DAT_0,
128 GPIO109_MMC_DAT_1,
129 GPIO110_MMC_DAT_2,
130 GPIO111_MMC_DAT_3,
131 GPIO112_MMC_CMD,
132 GPIO11_GPIO, /* mmc detect */
133
134 /* usb to external transceiver */
135 GPIO34_USB_P2_2,
136 GPIO35_USB_P2_1,
137 GPIO36_USB_P2_4,
138 GPIO39_USB_P2_6,
139 GPIO40_USB_P2_5,
140 GPIO53_USB_P2_3,
141
142 /* usb to Neptune GSM chip */
143 GPIO30_USB_P3_2,
144 GPIO31_USB_P3_6,
145 GPIO90_USB_P3_5,
146 GPIO91_USB_P3_1,
147 GPIO56_USB_P3_4,
148 GPIO113_USB_P3_3,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100149};
150
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100151#if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680)
152static unsigned long gen1_pin_config[] __initdata = {
153 /* flip / lockswitch */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300154 GPIO12_GPIO | WAKEUP_ON_EDGE_BOTH,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100155
156 /* bluetooth (bcm2035) */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300157 GPIO14_GPIO | WAKEUP_ON_EDGE_RISE, /* HOSTWAKE */
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100158 GPIO48_GPIO, /* RESET */
159 GPIO28_GPIO, /* WAKEUP */
160
161 /* Neptune handshake */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300162 GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* BP_RDY */
163 GPIO57_GPIO | MFP_LPM_DRIVE_HIGH, /* AP_RDY */
164 GPIO13_GPIO | WAKEUP_ON_EDGE_BOTH, /* WDI */
165 GPIO3_GPIO | WAKEUP_ON_EDGE_BOTH, /* WDI2 */
166 GPIO82_GPIO | MFP_LPM_DRIVE_HIGH, /* RESET */
167 GPIO99_GPIO | MFP_LPM_DRIVE_HIGH, /* TC_MM_EN */
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100168
169 /* sound */
170 GPIO52_SSP3_SCLK,
171 GPIO83_SSP3_SFRM,
172 GPIO81_SSP3_TXD,
173 GPIO89_SSP3_RXD,
174
175 /* ssp2 pins to in */
176 GPIO22_GPIO, /* SSP2_SCLK */
177 GPIO37_GPIO, /* SSP2_SFRM */
178 GPIO38_GPIO, /* SSP2_TXD */
179 GPIO88_GPIO, /* SSP2_RXD */
180
181 /* camera */
182 GPIO23_CIF_MCLK,
183 GPIO54_CIF_PCLK,
184 GPIO85_CIF_LV,
185 GPIO84_CIF_FV,
186 GPIO27_CIF_DD_0,
187 GPIO114_CIF_DD_1,
188 GPIO51_CIF_DD_2,
189 GPIO115_CIF_DD_3,
190 GPIO95_CIF_DD_4,
191 GPIO94_CIF_DD_5,
192 GPIO17_CIF_DD_6,
193 GPIO108_CIF_DD_7,
194 GPIO50_GPIO, /* CAM_EN */
195 GPIO19_GPIO, /* CAM_RST */
196
197 /* EMU */
198 GPIO120_GPIO, /* EMU_MUX1 */
199 GPIO119_GPIO, /* EMU_MUX2 */
200 GPIO86_GPIO, /* SNP_INT_CTL */
201 GPIO87_GPIO, /* SNP_INT_IN */
202};
203#endif
204
205#if defined(CONFIG_MACH_EZX_A1200) || defined(CONFIG_MACH_EZX_A910) || \
206 defined(CONFIG_MACH_EZX_E2) || defined(CONFIG_MACH_EZX_E6)
207static unsigned long gen2_pin_config[] __initdata = {
208 /* flip / lockswitch */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300209 GPIO15_GPIO | WAKEUP_ON_EDGE_BOTH,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100210
211 /* EOC */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300212 GPIO10_GPIO | WAKEUP_ON_EDGE_RISE,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100213
214 /* bluetooth (bcm2045) */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300215 GPIO13_GPIO | WAKEUP_ON_EDGE_RISE, /* HOSTWAKE */
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100216 GPIO37_GPIO, /* RESET */
217 GPIO57_GPIO, /* WAKEUP */
218
219 /* Neptune handshake */
Daniel Ribeiroff713382009-05-15 06:33:50 -0300220 GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* BP_RDY */
221 GPIO96_GPIO | MFP_LPM_DRIVE_HIGH, /* AP_RDY */
222 GPIO3_GPIO | WAKEUP_ON_EDGE_FALL, /* WDI */
223 GPIO116_GPIO | MFP_LPM_DRIVE_HIGH, /* RESET */
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100224 GPIO41_GPIO, /* BP_FLASH */
225
226 /* sound */
227 GPIO52_SSP3_SCLK,
228 GPIO83_SSP3_SFRM,
229 GPIO81_SSP3_TXD,
230 GPIO82_SSP3_RXD,
231
232 /* ssp2 pins to in */
233 GPIO22_GPIO, /* SSP2_SCLK */
234 GPIO14_GPIO, /* SSP2_SFRM */
235 GPIO38_GPIO, /* SSP2_TXD */
236 GPIO88_GPIO, /* SSP2_RXD */
237
238 /* camera */
239 GPIO23_CIF_MCLK,
240 GPIO54_CIF_PCLK,
241 GPIO85_CIF_LV,
242 GPIO84_CIF_FV,
243 GPIO27_CIF_DD_0,
244 GPIO114_CIF_DD_1,
245 GPIO51_CIF_DD_2,
246 GPIO115_CIF_DD_3,
247 GPIO95_CIF_DD_4,
248 GPIO48_CIF_DD_5,
249 GPIO93_CIF_DD_6,
250 GPIO12_CIF_DD_7,
251 GPIO50_GPIO, /* CAM_EN */
252 GPIO28_GPIO, /* CAM_RST */
253 GPIO17_GPIO, /* CAM_FLASH */
254};
255#endif
256
257#ifdef CONFIG_MACH_EZX_A780
258static unsigned long a780_pin_config[] __initdata = {
259 /* keypad */
260 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH,
261 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
262 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
263 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
264 GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
265 GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
266 GPIO103_KP_MKOUT_0,
267 GPIO104_KP_MKOUT_1,
268 GPIO105_KP_MKOUT_2,
269 GPIO106_KP_MKOUT_3,
270 GPIO107_KP_MKOUT_4,
271
272 /* attenuate sound */
273 GPIO96_GPIO,
274};
275#endif
276
277#ifdef CONFIG_MACH_EZX_E680
278static unsigned long e680_pin_config[] __initdata = {
279 /* keypad */
280 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH,
281 GPIO96_KP_DKIN_3 | WAKEUP_ON_LEVEL_HIGH,
282 GPIO97_KP_DKIN_4 | WAKEUP_ON_LEVEL_HIGH,
283 GPIO98_KP_DKIN_5 | WAKEUP_ON_LEVEL_HIGH,
284 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
285 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
286 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
287 GPIO103_KP_MKOUT_0,
288 GPIO104_KP_MKOUT_1,
289 GPIO105_KP_MKOUT_2,
290 GPIO106_KP_MKOUT_3,
291
292 /* MIDI */
293 GPIO79_GPIO, /* VA_SEL_BUL */
294 GPIO80_GPIO, /* FLT_SEL_BUL */
295 GPIO78_GPIO, /* MIDI_RESET */
296 GPIO33_GPIO, /* MIDI_CS */
297 GPIO15_GPIO, /* MIDI_IRQ */
298 GPIO49_GPIO, /* MIDI_NPWE */
299 GPIO18_GPIO, /* MIDI_RDY */
300
301 /* leds */
302 GPIO46_GPIO,
303 GPIO47_GPIO,
304};
305#endif
306
307#ifdef CONFIG_MACH_EZX_A1200
308static unsigned long a1200_pin_config[] __initdata = {
309 /* keypad */
310 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
311 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
312 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
313 GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
314 GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
315 GPIO103_KP_MKOUT_0,
316 GPIO104_KP_MKOUT_1,
317 GPIO105_KP_MKOUT_2,
318 GPIO106_KP_MKOUT_3,
319 GPIO107_KP_MKOUT_4,
320 GPIO108_KP_MKOUT_5,
321};
322#endif
323
324#ifdef CONFIG_MACH_EZX_A910
325static unsigned long a910_pin_config[] __initdata = {
326 /* keypad */
327 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
328 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
329 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
330 GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
331 GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
332 GPIO103_KP_MKOUT_0,
333 GPIO104_KP_MKOUT_1,
334 GPIO105_KP_MKOUT_2,
335 GPIO106_KP_MKOUT_3,
336 GPIO107_KP_MKOUT_4,
337 GPIO108_KP_MKOUT_5,
338
339 /* WLAN */
340 GPIO89_GPIO, /* RESET */
341 GPIO33_GPIO, /* WAKEUP */
342 GPIO94_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */
343
344 /* MMC CS */
345 GPIO20_GPIO,
346};
347#endif
348
349#ifdef CONFIG_MACH_EZX_E2
350static unsigned long e2_pin_config[] __initdata = {
351 /* keypad */
352 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
353 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
354 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
355 GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
356 GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
357 GPIO103_KP_MKOUT_0,
358 GPIO104_KP_MKOUT_1,
359 GPIO105_KP_MKOUT_2,
360 GPIO106_KP_MKOUT_3,
361 GPIO107_KP_MKOUT_4,
362 GPIO108_KP_MKOUT_5,
363};
364#endif
365
366#ifdef CONFIG_MACH_EZX_E6
367static unsigned long e6_pin_config[] __initdata = {
368 /* keypad */
369 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
370 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
371 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
372 GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
373 GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
374 GPIO103_KP_MKOUT_0,
375 GPIO104_KP_MKOUT_1,
376 GPIO105_KP_MKOUT_2,
377 GPIO106_KP_MKOUT_3,
378 GPIO107_KP_MKOUT_4,
379 GPIO108_KP_MKOUT_5,
380};
381#endif
382
Stefan Schmidtfe9490c2008-12-08 15:58:09 +0100383/* KEYPAD */
384#ifdef CONFIG_MACH_EZX_A780
385static unsigned int a780_key_map[] = {
386 KEY(0, 0, KEY_SEND),
387 KEY(0, 1, KEY_BACK),
388 KEY(0, 2, KEY_END),
389 KEY(0, 3, KEY_PAGEUP),
390 KEY(0, 4, KEY_UP),
391
392 KEY(1, 0, KEY_NUMERIC_1),
393 KEY(1, 1, KEY_NUMERIC_2),
394 KEY(1, 2, KEY_NUMERIC_3),
395 KEY(1, 3, KEY_SELECT),
396 KEY(1, 4, KEY_KPENTER),
397
398 KEY(2, 0, KEY_NUMERIC_4),
399 KEY(2, 1, KEY_NUMERIC_5),
400 KEY(2, 2, KEY_NUMERIC_6),
401 KEY(2, 3, KEY_RECORD),
402 KEY(2, 4, KEY_LEFT),
403
404 KEY(3, 0, KEY_NUMERIC_7),
405 KEY(3, 1, KEY_NUMERIC_8),
406 KEY(3, 2, KEY_NUMERIC_9),
407 KEY(3, 3, KEY_HOME),
408 KEY(3, 4, KEY_RIGHT),
409
410 KEY(4, 0, KEY_NUMERIC_STAR),
411 KEY(4, 1, KEY_NUMERIC_0),
412 KEY(4, 2, KEY_NUMERIC_POUND),
413 KEY(4, 3, KEY_PAGEDOWN),
414 KEY(4, 4, KEY_DOWN),
415};
416
417static struct pxa27x_keypad_platform_data a780_keypad_platform_data = {
418 .matrix_key_rows = 5,
419 .matrix_key_cols = 5,
420 .matrix_key_map = a780_key_map,
421 .matrix_key_map_size = ARRAY_SIZE(a780_key_map),
422
423 .direct_key_map = { KEY_CAMERA },
424 .direct_key_num = 1,
425
426 .debounce_interval = 30,
427};
428#endif /* CONFIG_MACH_EZX_A780 */
429
430#ifdef CONFIG_MACH_EZX_E680
431static unsigned int e680_key_map[] = {
432 KEY(0, 0, KEY_UP),
433 KEY(0, 1, KEY_RIGHT),
434 KEY(0, 2, KEY_RESERVED),
435 KEY(0, 3, KEY_SEND),
436
437 KEY(1, 0, KEY_DOWN),
438 KEY(1, 1, KEY_LEFT),
439 KEY(1, 2, KEY_PAGEUP),
440 KEY(1, 3, KEY_PAGEDOWN),
441
442 KEY(2, 0, KEY_RESERVED),
443 KEY(2, 1, KEY_RESERVED),
444 KEY(2, 2, KEY_RESERVED),
445 KEY(2, 3, KEY_KPENTER),
446};
447
448static struct pxa27x_keypad_platform_data e680_keypad_platform_data = {
449 .matrix_key_rows = 3,
450 .matrix_key_cols = 4,
451 .matrix_key_map = e680_key_map,
452 .matrix_key_map_size = ARRAY_SIZE(e680_key_map),
453
454 .direct_key_map = {
455 KEY_CAMERA,
456 KEY_RESERVED,
457 KEY_RESERVED,
458 KEY_F1,
459 KEY_CANCEL,
460 KEY_F2,
461 },
462 .direct_key_num = 6,
463
464 .debounce_interval = 30,
465};
466#endif /* CONFIG_MACH_EZX_E680 */
467
468#ifdef CONFIG_MACH_EZX_A1200
469static unsigned int a1200_key_map[] = {
470 KEY(0, 0, KEY_RESERVED),
471 KEY(0, 1, KEY_RIGHT),
472 KEY(0, 2, KEY_PAGEDOWN),
473 KEY(0, 3, KEY_RESERVED),
474 KEY(0, 4, KEY_RESERVED),
475 KEY(0, 5, KEY_RESERVED),
476
477 KEY(1, 0, KEY_RESERVED),
478 KEY(1, 1, KEY_DOWN),
479 KEY(1, 2, KEY_CAMERA),
480 KEY(1, 3, KEY_RESERVED),
481 KEY(1, 4, KEY_RESERVED),
482 KEY(1, 5, KEY_RESERVED),
483
484 KEY(2, 0, KEY_RESERVED),
485 KEY(2, 1, KEY_KPENTER),
486 KEY(2, 2, KEY_RECORD),
487 KEY(2, 3, KEY_RESERVED),
488 KEY(2, 4, KEY_RESERVED),
489 KEY(2, 5, KEY_SELECT),
490
491 KEY(3, 0, KEY_RESERVED),
492 KEY(3, 1, KEY_UP),
493 KEY(3, 2, KEY_SEND),
494 KEY(3, 3, KEY_RESERVED),
495 KEY(3, 4, KEY_RESERVED),
496 KEY(3, 5, KEY_RESERVED),
497
498 KEY(4, 0, KEY_RESERVED),
499 KEY(4, 1, KEY_LEFT),
500 KEY(4, 2, KEY_PAGEUP),
501 KEY(4, 3, KEY_RESERVED),
502 KEY(4, 4, KEY_RESERVED),
503 KEY(4, 5, KEY_RESERVED),
504};
505
506static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = {
507 .matrix_key_rows = 5,
508 .matrix_key_cols = 6,
509 .matrix_key_map = a1200_key_map,
510 .matrix_key_map_size = ARRAY_SIZE(a1200_key_map),
511
512 .debounce_interval = 30,
513};
514#endif /* CONFIG_MACH_EZX_A1200 */
515
516#ifdef CONFIG_MACH_EZX_E6
517static unsigned int e6_key_map[] = {
518 KEY(0, 0, KEY_RESERVED),
519 KEY(0, 1, KEY_RIGHT),
520 KEY(0, 2, KEY_PAGEDOWN),
521 KEY(0, 3, KEY_RESERVED),
522 KEY(0, 4, KEY_RESERVED),
523 KEY(0, 5, KEY_NEXTSONG),
524
525 KEY(1, 0, KEY_RESERVED),
526 KEY(1, 1, KEY_DOWN),
527 KEY(1, 2, KEY_PROG1),
528 KEY(1, 3, KEY_RESERVED),
529 KEY(1, 4, KEY_RESERVED),
530 KEY(1, 5, KEY_RESERVED),
531
532 KEY(2, 0, KEY_RESERVED),
533 KEY(2, 1, KEY_ENTER),
534 KEY(2, 2, KEY_CAMERA),
535 KEY(2, 3, KEY_RESERVED),
536 KEY(2, 4, KEY_RESERVED),
537 KEY(2, 5, KEY_WWW),
538
539 KEY(3, 0, KEY_RESERVED),
540 KEY(3, 1, KEY_UP),
541 KEY(3, 2, KEY_SEND),
542 KEY(3, 3, KEY_RESERVED),
543 KEY(3, 4, KEY_RESERVED),
544 KEY(3, 5, KEY_PLAYPAUSE),
545
546 KEY(4, 0, KEY_RESERVED),
547 KEY(4, 1, KEY_LEFT),
548 KEY(4, 2, KEY_PAGEUP),
549 KEY(4, 3, KEY_RESERVED),
550 KEY(4, 4, KEY_RESERVED),
551 KEY(4, 5, KEY_PREVIOUSSONG),
552};
553
554static struct pxa27x_keypad_platform_data e6_keypad_platform_data = {
555 .matrix_key_rows = 5,
556 .matrix_key_cols = 6,
557 .matrix_key_map = e6_key_map,
558 .matrix_key_map_size = ARRAY_SIZE(e6_key_map),
559
560 .debounce_interval = 30,
561};
562#endif /* CONFIG_MACH_EZX_E6 */
563
564#ifdef CONFIG_MACH_EZX_A910
565static unsigned int a910_key_map[] = {
566 KEY(0, 0, KEY_NUMERIC_6),
567 KEY(0, 1, KEY_RIGHT),
568 KEY(0, 2, KEY_PAGEDOWN),
569 KEY(0, 3, KEY_KPENTER),
570 KEY(0, 4, KEY_NUMERIC_5),
571 KEY(0, 5, KEY_CAMERA),
572
573 KEY(1, 0, KEY_NUMERIC_8),
574 KEY(1, 1, KEY_DOWN),
575 KEY(1, 2, KEY_RESERVED),
576 KEY(1, 3, KEY_F1), /* Left SoftKey */
577 KEY(1, 4, KEY_NUMERIC_STAR),
578 KEY(1, 5, KEY_RESERVED),
579
580 KEY(2, 0, KEY_NUMERIC_7),
581 KEY(2, 1, KEY_NUMERIC_9),
582 KEY(2, 2, KEY_RECORD),
583 KEY(2, 3, KEY_F2), /* Right SoftKey */
584 KEY(2, 4, KEY_BACK),
585 KEY(2, 5, KEY_SELECT),
586
587 KEY(3, 0, KEY_NUMERIC_2),
588 KEY(3, 1, KEY_UP),
589 KEY(3, 2, KEY_SEND),
590 KEY(3, 3, KEY_NUMERIC_0),
591 KEY(3, 4, KEY_NUMERIC_1),
592 KEY(3, 5, KEY_RECORD),
593
594 KEY(4, 0, KEY_NUMERIC_4),
595 KEY(4, 1, KEY_LEFT),
596 KEY(4, 2, KEY_PAGEUP),
597 KEY(4, 3, KEY_NUMERIC_POUND),
598 KEY(4, 4, KEY_NUMERIC_3),
599 KEY(4, 5, KEY_RESERVED),
600};
601
602static struct pxa27x_keypad_platform_data a910_keypad_platform_data = {
603 .matrix_key_rows = 5,
604 .matrix_key_cols = 6,
605 .matrix_key_map = a910_key_map,
606 .matrix_key_map_size = ARRAY_SIZE(a910_key_map),
607
608 .debounce_interval = 30,
609};
610#endif /* CONFIG_MACH_EZX_A910 */
611
612#ifdef CONFIG_MACH_EZX_E2
613static unsigned int e2_key_map[] = {
614 KEY(0, 0, KEY_NUMERIC_6),
615 KEY(0, 1, KEY_RIGHT),
616 KEY(0, 2, KEY_NUMERIC_9),
617 KEY(0, 3, KEY_NEXTSONG),
618 KEY(0, 4, KEY_NUMERIC_5),
619 KEY(0, 5, KEY_F1), /* Left SoftKey */
620
621 KEY(1, 0, KEY_NUMERIC_8),
622 KEY(1, 1, KEY_DOWN),
623 KEY(1, 2, KEY_RESERVED),
624 KEY(1, 3, KEY_PAGEUP),
625 KEY(1, 4, KEY_NUMERIC_STAR),
626 KEY(1, 5, KEY_F2), /* Right SoftKey */
627
628 KEY(2, 0, KEY_NUMERIC_7),
629 KEY(2, 1, KEY_KPENTER),
630 KEY(2, 2, KEY_RECORD),
631 KEY(2, 3, KEY_PAGEDOWN),
632 KEY(2, 4, KEY_BACK),
633 KEY(2, 5, KEY_NUMERIC_0),
634
635 KEY(3, 0, KEY_NUMERIC_2),
636 KEY(3, 1, KEY_UP),
637 KEY(3, 2, KEY_SEND),
638 KEY(3, 3, KEY_PLAYPAUSE),
639 KEY(3, 4, KEY_NUMERIC_1),
640 KEY(3, 5, KEY_SOUND), /* Music SoftKey */
641
642 KEY(4, 0, KEY_NUMERIC_4),
643 KEY(4, 1, KEY_LEFT),
644 KEY(4, 2, KEY_NUMERIC_POUND),
645 KEY(4, 3, KEY_PREVIOUSSONG),
646 KEY(4, 4, KEY_NUMERIC_3),
647 KEY(4, 5, KEY_RESERVED),
648};
649
650static struct pxa27x_keypad_platform_data e2_keypad_platform_data = {
651 .matrix_key_rows = 5,
652 .matrix_key_cols = 6,
653 .matrix_key_map = e2_key_map,
654 .matrix_key_map_size = ARRAY_SIZE(e2_key_map),
655
656 .debounce_interval = 30,
657};
658#endif /* CONFIG_MACH_EZX_E2 */
659
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100660#ifdef CONFIG_MACH_EZX_A780
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200661/* gpio_keys */
662static struct gpio_keys_button a780_buttons[] = {
663 [0] = {
664 .code = SW_LID,
665 .gpio = GPIO12_A780_FLIP_LID,
666 .active_low = 0,
667 .desc = "A780 flip lid",
668 .type = EV_SW,
669 .wakeup = 1,
670 },
671};
672
673static struct gpio_keys_platform_data a780_gpio_keys_platform_data = {
674 .buttons = a780_buttons,
675 .nbuttons = ARRAY_SIZE(a780_buttons),
676};
677
678static struct platform_device a780_gpio_keys = {
679 .name = "gpio-keys",
680 .id = -1,
681 .dev = {
682 .platform_data = &a780_gpio_keys_platform_data,
683 },
684};
685
686static struct platform_device *a780_devices[] __initdata = {
687 &a780_gpio_keys,
688};
689
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100690static void __init a780_init(void)
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100691{
692 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100693 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config));
694 pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config));
695
Russell Kingcc155c62009-11-09 13:34:08 +0800696 pxa_set_ffuart_info(NULL);
697 pxa_set_btuart_info(NULL);
698 pxa_set_stuart_info(NULL);
699
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100700 pxa_set_i2c_info(NULL);
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100701
702 set_pxa_fb_info(&ezx_fb_info_1);
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100703
Stefan Schmidtfe9490c2008-12-08 15:58:09 +0100704 pxa_set_keypad_info(&a780_keypad_platform_data);
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100705
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200706 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
707 platform_add_devices(ARRAY_AND_SIZE(a780_devices));
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100708}
709
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100710MACHINE_START(EZX_A780, "Motorola EZX A780")
711 .phys_io = 0x40000000,
712 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100713 .boot_params = 0xa0000100,
714 .map_io = pxa_map_io,
715 .init_irq = pxa27x_init_irq,
716 .timer = &pxa_timer,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100717 .init_machine = a780_init,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100718MACHINE_END
719#endif
720
721#ifdef CONFIG_MACH_EZX_E680
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200722/* gpio_keys */
723static struct gpio_keys_button e680_buttons[] = {
724 [0] = {
725 .code = KEY_SCREENLOCK,
726 .gpio = GPIO12_E680_LOCK_SWITCH,
727 .active_low = 0,
728 .desc = "E680 lock switch",
729 .type = EV_KEY,
730 .wakeup = 1,
731 },
732};
733
734static struct gpio_keys_platform_data e680_gpio_keys_platform_data = {
735 .buttons = e680_buttons,
736 .nbuttons = ARRAY_SIZE(e680_buttons),
737};
738
739static struct platform_device e680_gpio_keys = {
740 .name = "gpio-keys",
741 .id = -1,
742 .dev = {
743 .platform_data = &e680_gpio_keys_platform_data,
744 },
745};
746
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100747static struct i2c_board_info __initdata e680_i2c_board_info[] = {
748 { I2C_BOARD_INFO("tea5767", 0x81) },
749};
750
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200751static struct platform_device *e680_devices[] __initdata = {
752 &e680_gpio_keys,
753};
754
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100755static void __init e680_init(void)
756{
757 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
758 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config));
759 pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config));
760
Russell Kingcc155c62009-11-09 13:34:08 +0800761 pxa_set_ffuart_info(NULL);
762 pxa_set_btuart_info(NULL);
763 pxa_set_stuart_info(NULL);
764
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100765 pxa_set_i2c_info(NULL);
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100766 i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100767
768 set_pxa_fb_info(&ezx_fb_info_1);
769
Stefan Schmidtfe9490c2008-12-08 15:58:09 +0100770 pxa_set_keypad_info(&e680_keypad_platform_data);
771
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200772 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
773 platform_add_devices(ARRAY_AND_SIZE(e680_devices));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100774}
775
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100776MACHINE_START(EZX_E680, "Motorola EZX E680")
777 .phys_io = 0x40000000,
778 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100779 .boot_params = 0xa0000100,
780 .map_io = pxa_map_io,
781 .init_irq = pxa27x_init_irq,
782 .timer = &pxa_timer,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100783 .init_machine = e680_init,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100784MACHINE_END
785#endif
786
787#ifdef CONFIG_MACH_EZX_A1200
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200788/* gpio_keys */
789static struct gpio_keys_button a1200_buttons[] = {
790 [0] = {
791 .code = SW_LID,
792 .gpio = GPIO15_A1200_FLIP_LID,
793 .active_low = 0,
794 .desc = "A1200 flip lid",
795 .type = EV_SW,
796 .wakeup = 1,
797 },
798};
799
800static struct gpio_keys_platform_data a1200_gpio_keys_platform_data = {
801 .buttons = a1200_buttons,
802 .nbuttons = ARRAY_SIZE(a1200_buttons),
803};
804
805static struct platform_device a1200_gpio_keys = {
806 .name = "gpio-keys",
807 .id = -1,
808 .dev = {
809 .platform_data = &a1200_gpio_keys_platform_data,
810 },
811};
812
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100813static struct i2c_board_info __initdata a1200_i2c_board_info[] = {
814 { I2C_BOARD_INFO("tea5767", 0x81) },
815};
816
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200817static struct platform_device *a1200_devices[] __initdata = {
818 &a1200_gpio_keys,
819};
820
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100821static void __init a1200_init(void)
822{
823 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
824 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
825 pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config));
826
Russell Kingcc155c62009-11-09 13:34:08 +0800827 pxa_set_ffuart_info(NULL);
828 pxa_set_btuart_info(NULL);
829 pxa_set_stuart_info(NULL);
830
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100831 pxa_set_i2c_info(NULL);
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100832 i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100833
834 set_pxa_fb_info(&ezx_fb_info_2);
835
Stefan Schmidtfe9490c2008-12-08 15:58:09 +0100836 pxa_set_keypad_info(&a1200_keypad_platform_data);
837
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200838 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
839 platform_add_devices(ARRAY_AND_SIZE(a1200_devices));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100840}
841
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100842MACHINE_START(EZX_A1200, "Motorola EZX A1200")
843 .phys_io = 0x40000000,
844 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100845 .boot_params = 0xa0000100,
846 .map_io = pxa_map_io,
847 .init_irq = pxa27x_init_irq,
848 .timer = &pxa_timer,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100849 .init_machine = a1200_init,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100850MACHINE_END
851#endif
852
853#ifdef CONFIG_MACH_EZX_A910
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200854/* gpio_keys */
855static struct gpio_keys_button a910_buttons[] = {
856 [0] = {
857 .code = SW_LID,
858 .gpio = GPIO15_A910_FLIP_LID,
859 .active_low = 0,
860 .desc = "A910 flip lid",
861 .type = EV_SW,
862 .wakeup = 1,
863 },
864};
865
866static struct gpio_keys_platform_data a910_gpio_keys_platform_data = {
867 .buttons = a910_buttons,
868 .nbuttons = ARRAY_SIZE(a910_buttons),
869};
870
871static struct platform_device a910_gpio_keys = {
872 .name = "gpio-keys",
873 .id = -1,
874 .dev = {
875 .platform_data = &a910_gpio_keys_platform_data,
876 },
877};
878
879static struct platform_device *a910_devices[] __initdata = {
880 &a910_gpio_keys,
881};
882
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100883static void __init a910_init(void)
884{
885 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
886 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
887 pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config));
888
Russell Kingcc155c62009-11-09 13:34:08 +0800889 pxa_set_ffuart_info(NULL);
890 pxa_set_btuart_info(NULL);
891 pxa_set_stuart_info(NULL);
892
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100893 pxa_set_i2c_info(NULL);
894
895 set_pxa_fb_info(&ezx_fb_info_2);
896
Stefan Schmidtfe9490c2008-12-08 15:58:09 +0100897 pxa_set_keypad_info(&a910_keypad_platform_data);
898
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200899 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
900 platform_add_devices(ARRAY_AND_SIZE(a910_devices));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100901}
902
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100903MACHINE_START(EZX_A910, "Motorola EZX A910")
904 .phys_io = 0x40000000,
905 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100906 .boot_params = 0xa0000100,
907 .map_io = pxa_map_io,
908 .init_irq = pxa27x_init_irq,
909 .timer = &pxa_timer,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100910 .init_machine = a910_init,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100911MACHINE_END
912#endif
913
914#ifdef CONFIG_MACH_EZX_E6
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200915/* gpio_keys */
916static struct gpio_keys_button e6_buttons[] = {
917 [0] = {
918 .code = KEY_SCREENLOCK,
919 .gpio = GPIO15_E6_LOCK_SWITCH,
920 .active_low = 0,
921 .desc = "E6 lock switch",
922 .type = EV_KEY,
923 .wakeup = 1,
924 },
925};
926
927static struct gpio_keys_platform_data e6_gpio_keys_platform_data = {
928 .buttons = e6_buttons,
929 .nbuttons = ARRAY_SIZE(e6_buttons),
930};
931
932static struct platform_device e6_gpio_keys = {
933 .name = "gpio-keys",
934 .id = -1,
935 .dev = {
936 .platform_data = &e6_gpio_keys_platform_data,
937 },
938};
939
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100940static struct i2c_board_info __initdata e6_i2c_board_info[] = {
941 { I2C_BOARD_INFO("tea5767", 0x81) },
942};
943
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200944static struct platform_device *e6_devices[] __initdata = {
945 &e6_gpio_keys,
946};
947
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100948static void __init e6_init(void)
949{
950 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
951 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
952 pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config));
953
Russell Kingcc155c62009-11-09 13:34:08 +0800954 pxa_set_ffuart_info(NULL);
955 pxa_set_btuart_info(NULL);
956 pxa_set_stuart_info(NULL);
957
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100958 pxa_set_i2c_info(NULL);
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100959 i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100960
961 set_pxa_fb_info(&ezx_fb_info_2);
962
Stefan Schmidtfe9490c2008-12-08 15:58:09 +0100963 pxa_set_keypad_info(&e6_keypad_platform_data);
964
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200965 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
966 platform_add_devices(ARRAY_AND_SIZE(e6_devices));
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100967}
968
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100969MACHINE_START(EZX_E6, "Motorola EZX E6")
970 .phys_io = 0x40000000,
971 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100972 .boot_params = 0xa0000100,
973 .map_io = pxa_map_io,
974 .init_irq = pxa27x_init_irq,
975 .timer = &pxa_timer,
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100976 .init_machine = e6_init,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +0100977MACHINE_END
978#endif
979
980#ifdef CONFIG_MACH_EZX_E2
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100981static struct i2c_board_info __initdata e2_i2c_board_info[] = {
982 { I2C_BOARD_INFO("tea5767", 0x81) },
983};
984
Antonio Ospite1ce2c512009-06-01 12:26:58 +0200985static struct platform_device *e2_devices[] __initdata = {
986};
987
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100988static void __init e2_init(void)
989{
990 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
991 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
992 pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config));
993
Russell Kingcc155c62009-11-09 13:34:08 +0800994 pxa_set_ffuart_info(NULL);
995 pxa_set_btuart_info(NULL);
996 pxa_set_stuart_info(NULL);
997
Stefan Schmidt9078ac22008-12-08 15:58:08 +0100998 pxa_set_i2c_info(NULL);
Stefan Schmidtbc09cf62008-12-08 15:58:10 +0100999 i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info));
Stefan Schmidt9078ac22008-12-08 15:58:08 +01001000
1001 set_pxa_fb_info(&ezx_fb_info_2);
1002
Stefan Schmidtfe9490c2008-12-08 15:58:09 +01001003 pxa_set_keypad_info(&e2_keypad_platform_data);
1004
Antonio Ospite1ce2c512009-06-01 12:26:58 +02001005 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
1006 platform_add_devices(ARRAY_AND_SIZE(e2_devices));
Stefan Schmidt9078ac22008-12-08 15:58:08 +01001007}
1008
Stefan Schmidt9ab24e42008-07-09 08:08:17 +01001009MACHINE_START(EZX_E2, "Motorola EZX E2")
1010 .phys_io = 0x40000000,
1011 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +01001012 .boot_params = 0xa0000100,
1013 .map_io = pxa_map_io,
1014 .init_irq = pxa27x_init_irq,
1015 .timer = &pxa_timer,
Stefan Schmidt9078ac22008-12-08 15:58:08 +01001016 .init_machine = e2_init,
Stefan Schmidt9ab24e42008-07-09 08:08:17 +01001017MACHINE_END
1018#endif