diff options
Diffstat (limited to 'arch/arm/mach-pxa/ezx.c')
-rw-r--r-- | arch/arm/mach-pxa/ezx.c | 701 |
1 files changed, 658 insertions, 43 deletions
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index cc3d850cc0b6..df5f822f3b6c 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -16,11 +16,14 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/pwm_backlight.h> | 18 | #include <linux/pwm_backlight.h> |
19 | #include <linux/input.h> | ||
19 | 20 | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
21 | #include <mach/pxafb.h> | 22 | #include <mach/pxafb.h> |
22 | #include <mach/ohci.h> | 23 | #include <mach/ohci.h> |
23 | #include <mach/i2c.h> | 24 | #include <mach/i2c.h> |
25 | #include <mach/hardware.h> | ||
26 | #include <mach/pxa27x_keypad.h> | ||
24 | 27 | ||
25 | #include <mach/mfp-pxa27x.h> | 28 | #include <mach/mfp-pxa27x.h> |
26 | #include <mach/pxa-regs.h> | 29 | #include <mach/pxa-regs.h> |
@@ -101,120 +104,732 @@ static unsigned long ezx_pin_config[] __initdata = { | |||
101 | GPIO44_BTUART_CTS, | 104 | GPIO44_BTUART_CTS, |
102 | GPIO45_BTUART_RTS, | 105 | GPIO45_BTUART_RTS, |
103 | 106 | ||
104 | /* STUART */ | 107 | /* I2C */ |
105 | GPIO46_STUART_RXD, | 108 | GPIO117_I2C_SCL, |
106 | GPIO47_STUART_TXD, | 109 | GPIO118_I2C_SDA, |
107 | 110 | ||
108 | /* For A780 support (connected with Neptune GSM chip) */ | 111 | /* PCAP SSP */ |
109 | GPIO30_USB_P3_2, /* ICL_TXENB */ | 112 | GPIO29_SSP1_SCLK, |
110 | GPIO31_USB_P3_6, /* ICL_VPOUT */ | 113 | GPIO25_SSP1_TXD, |
111 | GPIO90_USB_P3_5, /* ICL_VPIN */ | 114 | GPIO26_SSP1_RXD, |
112 | GPIO91_USB_P3_1, /* ICL_XRXD */ | 115 | GPIO24_GPIO, /* pcap chip select */ |
113 | GPIO56_USB_P3_4, /* ICL_VMOUT */ | 116 | GPIO1_GPIO, /* pcap interrupt */ |
114 | GPIO113_USB_P3_3, /* /ICL_VMIN */ | 117 | GPIO4_GPIO, /* WDI_AP */ |
118 | GPIO55_GPIO, /* SYS_RESTART */ | ||
119 | |||
120 | /* MMC */ | ||
121 | GPIO32_MMC_CLK, | ||
122 | GPIO92_MMC_DAT_0, | ||
123 | GPIO109_MMC_DAT_1, | ||
124 | GPIO110_MMC_DAT_2, | ||
125 | GPIO111_MMC_DAT_3, | ||
126 | GPIO112_MMC_CMD, | ||
127 | GPIO11_GPIO, /* mmc detect */ | ||
128 | |||
129 | /* usb to external transceiver */ | ||
130 | GPIO34_USB_P2_2, | ||
131 | GPIO35_USB_P2_1, | ||
132 | GPIO36_USB_P2_4, | ||
133 | GPIO39_USB_P2_6, | ||
134 | GPIO40_USB_P2_5, | ||
135 | GPIO53_USB_P2_3, | ||
136 | |||
137 | /* usb to Neptune GSM chip */ | ||
138 | GPIO30_USB_P3_2, | ||
139 | GPIO31_USB_P3_6, | ||
140 | GPIO90_USB_P3_5, | ||
141 | GPIO91_USB_P3_1, | ||
142 | GPIO56_USB_P3_4, | ||
143 | GPIO113_USB_P3_3, | ||
144 | }; | ||
145 | |||
146 | #if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680) | ||
147 | static unsigned long gen1_pin_config[] __initdata = { | ||
148 | /* flip / lockswitch */ | ||
149 | GPIO12_GPIO, | ||
150 | |||
151 | /* bluetooth (bcm2035) */ | ||
152 | GPIO14_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | ||
153 | GPIO48_GPIO, /* RESET */ | ||
154 | GPIO28_GPIO, /* WAKEUP */ | ||
155 | |||
156 | /* Neptune handshake */ | ||
157 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ | ||
158 | GPIO57_GPIO, /* AP_RDY */ | ||
159 | GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ | ||
160 | GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI2 */ | ||
161 | GPIO82_GPIO, /* RESET */ | ||
162 | GPIO99_GPIO, /* TC_MM_EN */ | ||
163 | |||
164 | /* sound */ | ||
165 | GPIO52_SSP3_SCLK, | ||
166 | GPIO83_SSP3_SFRM, | ||
167 | GPIO81_SSP3_TXD, | ||
168 | GPIO89_SSP3_RXD, | ||
169 | |||
170 | /* ssp2 pins to in */ | ||
171 | GPIO22_GPIO, /* SSP2_SCLK */ | ||
172 | GPIO37_GPIO, /* SSP2_SFRM */ | ||
173 | GPIO38_GPIO, /* SSP2_TXD */ | ||
174 | GPIO88_GPIO, /* SSP2_RXD */ | ||
175 | |||
176 | /* camera */ | ||
177 | GPIO23_CIF_MCLK, | ||
178 | GPIO54_CIF_PCLK, | ||
179 | GPIO85_CIF_LV, | ||
180 | GPIO84_CIF_FV, | ||
181 | GPIO27_CIF_DD_0, | ||
182 | GPIO114_CIF_DD_1, | ||
183 | GPIO51_CIF_DD_2, | ||
184 | GPIO115_CIF_DD_3, | ||
185 | GPIO95_CIF_DD_4, | ||
186 | GPIO94_CIF_DD_5, | ||
187 | GPIO17_CIF_DD_6, | ||
188 | GPIO108_CIF_DD_7, | ||
189 | GPIO50_GPIO, /* CAM_EN */ | ||
190 | GPIO19_GPIO, /* CAM_RST */ | ||
191 | |||
192 | /* EMU */ | ||
193 | GPIO120_GPIO, /* EMU_MUX1 */ | ||
194 | GPIO119_GPIO, /* EMU_MUX2 */ | ||
195 | GPIO86_GPIO, /* SNP_INT_CTL */ | ||
196 | GPIO87_GPIO, /* SNP_INT_IN */ | ||
197 | }; | ||
198 | #endif | ||
199 | |||
200 | #if defined(CONFIG_MACH_EZX_A1200) || defined(CONFIG_MACH_EZX_A910) || \ | ||
201 | defined(CONFIG_MACH_EZX_E2) || defined(CONFIG_MACH_EZX_E6) | ||
202 | static unsigned long gen2_pin_config[] __initdata = { | ||
203 | /* flip / lockswitch */ | ||
204 | GPIO15_GPIO, | ||
205 | |||
206 | /* EOC */ | ||
207 | GPIO10_GPIO, | ||
208 | |||
209 | /* bluetooth (bcm2045) */ | ||
210 | GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | ||
211 | GPIO37_GPIO, /* RESET */ | ||
212 | GPIO57_GPIO, /* WAKEUP */ | ||
213 | |||
214 | /* Neptune handshake */ | ||
215 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ | ||
216 | GPIO96_GPIO, /* AP_RDY */ | ||
217 | GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ | ||
218 | GPIO116_GPIO, /* RESET */ | ||
219 | GPIO41_GPIO, /* BP_FLASH */ | ||
220 | |||
221 | /* sound */ | ||
222 | GPIO52_SSP3_SCLK, | ||
223 | GPIO83_SSP3_SFRM, | ||
224 | GPIO81_SSP3_TXD, | ||
225 | GPIO82_SSP3_RXD, | ||
226 | |||
227 | /* ssp2 pins to in */ | ||
228 | GPIO22_GPIO, /* SSP2_SCLK */ | ||
229 | GPIO14_GPIO, /* SSP2_SFRM */ | ||
230 | GPIO38_GPIO, /* SSP2_TXD */ | ||
231 | GPIO88_GPIO, /* SSP2_RXD */ | ||
232 | |||
233 | /* camera */ | ||
234 | GPIO23_CIF_MCLK, | ||
235 | GPIO54_CIF_PCLK, | ||
236 | GPIO85_CIF_LV, | ||
237 | GPIO84_CIF_FV, | ||
238 | GPIO27_CIF_DD_0, | ||
239 | GPIO114_CIF_DD_1, | ||
240 | GPIO51_CIF_DD_2, | ||
241 | GPIO115_CIF_DD_3, | ||
242 | GPIO95_CIF_DD_4, | ||
243 | GPIO48_CIF_DD_5, | ||
244 | GPIO93_CIF_DD_6, | ||
245 | GPIO12_CIF_DD_7, | ||
246 | GPIO50_GPIO, /* CAM_EN */ | ||
247 | GPIO28_GPIO, /* CAM_RST */ | ||
248 | GPIO17_GPIO, /* CAM_FLASH */ | ||
249 | }; | ||
250 | #endif | ||
251 | |||
252 | #ifdef CONFIG_MACH_EZX_A780 | ||
253 | static unsigned long a780_pin_config[] __initdata = { | ||
254 | /* keypad */ | ||
255 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
256 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
257 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
258 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
259 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
260 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
261 | GPIO103_KP_MKOUT_0, | ||
262 | GPIO104_KP_MKOUT_1, | ||
263 | GPIO105_KP_MKOUT_2, | ||
264 | GPIO106_KP_MKOUT_3, | ||
265 | GPIO107_KP_MKOUT_4, | ||
266 | |||
267 | /* attenuate sound */ | ||
268 | GPIO96_GPIO, | ||
269 | }; | ||
270 | #endif | ||
271 | |||
272 | #ifdef CONFIG_MACH_EZX_E680 | ||
273 | static unsigned long e680_pin_config[] __initdata = { | ||
274 | /* keypad */ | ||
275 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
276 | GPIO96_KP_DKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
277 | GPIO97_KP_DKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
278 | GPIO98_KP_DKIN_5 | WAKEUP_ON_LEVEL_HIGH, | ||
279 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
280 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
281 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
282 | GPIO103_KP_MKOUT_0, | ||
283 | GPIO104_KP_MKOUT_1, | ||
284 | GPIO105_KP_MKOUT_2, | ||
285 | GPIO106_KP_MKOUT_3, | ||
286 | |||
287 | /* MIDI */ | ||
288 | GPIO79_GPIO, /* VA_SEL_BUL */ | ||
289 | GPIO80_GPIO, /* FLT_SEL_BUL */ | ||
290 | GPIO78_GPIO, /* MIDI_RESET */ | ||
291 | GPIO33_GPIO, /* MIDI_CS */ | ||
292 | GPIO15_GPIO, /* MIDI_IRQ */ | ||
293 | GPIO49_GPIO, /* MIDI_NPWE */ | ||
294 | GPIO18_GPIO, /* MIDI_RDY */ | ||
295 | |||
296 | /* leds */ | ||
297 | GPIO46_GPIO, | ||
298 | GPIO47_GPIO, | ||
299 | }; | ||
300 | #endif | ||
301 | |||
302 | #ifdef CONFIG_MACH_EZX_A1200 | ||
303 | static unsigned long a1200_pin_config[] __initdata = { | ||
304 | /* keypad */ | ||
305 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
306 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
307 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
308 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
309 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
310 | GPIO103_KP_MKOUT_0, | ||
311 | GPIO104_KP_MKOUT_1, | ||
312 | GPIO105_KP_MKOUT_2, | ||
313 | GPIO106_KP_MKOUT_3, | ||
314 | GPIO107_KP_MKOUT_4, | ||
315 | GPIO108_KP_MKOUT_5, | ||
316 | }; | ||
317 | #endif | ||
318 | |||
319 | #ifdef CONFIG_MACH_EZX_A910 | ||
320 | static unsigned long a910_pin_config[] __initdata = { | ||
321 | /* keypad */ | ||
322 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
323 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
324 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
325 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
326 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
327 | GPIO103_KP_MKOUT_0, | ||
328 | GPIO104_KP_MKOUT_1, | ||
329 | GPIO105_KP_MKOUT_2, | ||
330 | GPIO106_KP_MKOUT_3, | ||
331 | GPIO107_KP_MKOUT_4, | ||
332 | GPIO108_KP_MKOUT_5, | ||
333 | |||
334 | /* WLAN */ | ||
335 | GPIO89_GPIO, /* RESET */ | ||
336 | GPIO33_GPIO, /* WAKEUP */ | ||
337 | GPIO94_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | ||
338 | |||
339 | /* MMC CS */ | ||
340 | GPIO20_GPIO, | ||
341 | }; | ||
342 | #endif | ||
343 | |||
344 | #ifdef CONFIG_MACH_EZX_E2 | ||
345 | static unsigned long e2_pin_config[] __initdata = { | ||
346 | /* keypad */ | ||
347 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
348 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
349 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
350 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
351 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
352 | GPIO103_KP_MKOUT_0, | ||
353 | GPIO104_KP_MKOUT_1, | ||
354 | GPIO105_KP_MKOUT_2, | ||
355 | GPIO106_KP_MKOUT_3, | ||
356 | GPIO107_KP_MKOUT_4, | ||
357 | GPIO108_KP_MKOUT_5, | ||
115 | }; | 358 | }; |
359 | #endif | ||
360 | |||
361 | #ifdef CONFIG_MACH_EZX_E6 | ||
362 | static unsigned long e6_pin_config[] __initdata = { | ||
363 | /* keypad */ | ||
364 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
365 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
366 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
367 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
368 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
369 | GPIO103_KP_MKOUT_0, | ||
370 | GPIO104_KP_MKOUT_1, | ||
371 | GPIO105_KP_MKOUT_2, | ||
372 | GPIO106_KP_MKOUT_3, | ||
373 | GPIO107_KP_MKOUT_4, | ||
374 | GPIO108_KP_MKOUT_5, | ||
375 | }; | ||
376 | #endif | ||
377 | |||
378 | /* KEYPAD */ | ||
379 | #ifdef CONFIG_MACH_EZX_A780 | ||
380 | static unsigned int a780_key_map[] = { | ||
381 | KEY(0, 0, KEY_SEND), | ||
382 | KEY(0, 1, KEY_BACK), | ||
383 | KEY(0, 2, KEY_END), | ||
384 | KEY(0, 3, KEY_PAGEUP), | ||
385 | KEY(0, 4, KEY_UP), | ||
386 | |||
387 | KEY(1, 0, KEY_NUMERIC_1), | ||
388 | KEY(1, 1, KEY_NUMERIC_2), | ||
389 | KEY(1, 2, KEY_NUMERIC_3), | ||
390 | KEY(1, 3, KEY_SELECT), | ||
391 | KEY(1, 4, KEY_KPENTER), | ||
392 | |||
393 | KEY(2, 0, KEY_NUMERIC_4), | ||
394 | KEY(2, 1, KEY_NUMERIC_5), | ||
395 | KEY(2, 2, KEY_NUMERIC_6), | ||
396 | KEY(2, 3, KEY_RECORD), | ||
397 | KEY(2, 4, KEY_LEFT), | ||
398 | |||
399 | KEY(3, 0, KEY_NUMERIC_7), | ||
400 | KEY(3, 1, KEY_NUMERIC_8), | ||
401 | KEY(3, 2, KEY_NUMERIC_9), | ||
402 | KEY(3, 3, KEY_HOME), | ||
403 | KEY(3, 4, KEY_RIGHT), | ||
404 | |||
405 | KEY(4, 0, KEY_NUMERIC_STAR), | ||
406 | KEY(4, 1, KEY_NUMERIC_0), | ||
407 | KEY(4, 2, KEY_NUMERIC_POUND), | ||
408 | KEY(4, 3, KEY_PAGEDOWN), | ||
409 | KEY(4, 4, KEY_DOWN), | ||
410 | }; | ||
411 | |||
412 | static struct pxa27x_keypad_platform_data a780_keypad_platform_data = { | ||
413 | .matrix_key_rows = 5, | ||
414 | .matrix_key_cols = 5, | ||
415 | .matrix_key_map = a780_key_map, | ||
416 | .matrix_key_map_size = ARRAY_SIZE(a780_key_map), | ||
417 | |||
418 | .direct_key_map = { KEY_CAMERA }, | ||
419 | .direct_key_num = 1, | ||
420 | |||
421 | .debounce_interval = 30, | ||
422 | }; | ||
423 | #endif /* CONFIG_MACH_EZX_A780 */ | ||
424 | |||
425 | #ifdef CONFIG_MACH_EZX_E680 | ||
426 | static unsigned int e680_key_map[] = { | ||
427 | KEY(0, 0, KEY_UP), | ||
428 | KEY(0, 1, KEY_RIGHT), | ||
429 | KEY(0, 2, KEY_RESERVED), | ||
430 | KEY(0, 3, KEY_SEND), | ||
431 | |||
432 | KEY(1, 0, KEY_DOWN), | ||
433 | KEY(1, 1, KEY_LEFT), | ||
434 | KEY(1, 2, KEY_PAGEUP), | ||
435 | KEY(1, 3, KEY_PAGEDOWN), | ||
436 | |||
437 | KEY(2, 0, KEY_RESERVED), | ||
438 | KEY(2, 1, KEY_RESERVED), | ||
439 | KEY(2, 2, KEY_RESERVED), | ||
440 | KEY(2, 3, KEY_KPENTER), | ||
441 | }; | ||
442 | |||
443 | static struct pxa27x_keypad_platform_data e680_keypad_platform_data = { | ||
444 | .matrix_key_rows = 3, | ||
445 | .matrix_key_cols = 4, | ||
446 | .matrix_key_map = e680_key_map, | ||
447 | .matrix_key_map_size = ARRAY_SIZE(e680_key_map), | ||
448 | |||
449 | .direct_key_map = { | ||
450 | KEY_CAMERA, | ||
451 | KEY_RESERVED, | ||
452 | KEY_RESERVED, | ||
453 | KEY_F1, | ||
454 | KEY_CANCEL, | ||
455 | KEY_F2, | ||
456 | }, | ||
457 | .direct_key_num = 6, | ||
458 | |||
459 | .debounce_interval = 30, | ||
460 | }; | ||
461 | #endif /* CONFIG_MACH_EZX_E680 */ | ||
462 | |||
463 | #ifdef CONFIG_MACH_EZX_A1200 | ||
464 | static unsigned int a1200_key_map[] = { | ||
465 | KEY(0, 0, KEY_RESERVED), | ||
466 | KEY(0, 1, KEY_RIGHT), | ||
467 | KEY(0, 2, KEY_PAGEDOWN), | ||
468 | KEY(0, 3, KEY_RESERVED), | ||
469 | KEY(0, 4, KEY_RESERVED), | ||
470 | KEY(0, 5, KEY_RESERVED), | ||
471 | |||
472 | KEY(1, 0, KEY_RESERVED), | ||
473 | KEY(1, 1, KEY_DOWN), | ||
474 | KEY(1, 2, KEY_CAMERA), | ||
475 | KEY(1, 3, KEY_RESERVED), | ||
476 | KEY(1, 4, KEY_RESERVED), | ||
477 | KEY(1, 5, KEY_RESERVED), | ||
478 | |||
479 | KEY(2, 0, KEY_RESERVED), | ||
480 | KEY(2, 1, KEY_KPENTER), | ||
481 | KEY(2, 2, KEY_RECORD), | ||
482 | KEY(2, 3, KEY_RESERVED), | ||
483 | KEY(2, 4, KEY_RESERVED), | ||
484 | KEY(2, 5, KEY_SELECT), | ||
485 | |||
486 | KEY(3, 0, KEY_RESERVED), | ||
487 | KEY(3, 1, KEY_UP), | ||
488 | KEY(3, 2, KEY_SEND), | ||
489 | KEY(3, 3, KEY_RESERVED), | ||
490 | KEY(3, 4, KEY_RESERVED), | ||
491 | KEY(3, 5, KEY_RESERVED), | ||
492 | |||
493 | KEY(4, 0, KEY_RESERVED), | ||
494 | KEY(4, 1, KEY_LEFT), | ||
495 | KEY(4, 2, KEY_PAGEUP), | ||
496 | KEY(4, 3, KEY_RESERVED), | ||
497 | KEY(4, 4, KEY_RESERVED), | ||
498 | KEY(4, 5, KEY_RESERVED), | ||
499 | }; | ||
500 | |||
501 | static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = { | ||
502 | .matrix_key_rows = 5, | ||
503 | .matrix_key_cols = 6, | ||
504 | .matrix_key_map = a1200_key_map, | ||
505 | .matrix_key_map_size = ARRAY_SIZE(a1200_key_map), | ||
506 | |||
507 | .debounce_interval = 30, | ||
508 | }; | ||
509 | #endif /* CONFIG_MACH_EZX_A1200 */ | ||
510 | |||
511 | #ifdef CONFIG_MACH_EZX_E6 | ||
512 | static unsigned int e6_key_map[] = { | ||
513 | KEY(0, 0, KEY_RESERVED), | ||
514 | KEY(0, 1, KEY_RIGHT), | ||
515 | KEY(0, 2, KEY_PAGEDOWN), | ||
516 | KEY(0, 3, KEY_RESERVED), | ||
517 | KEY(0, 4, KEY_RESERVED), | ||
518 | KEY(0, 5, KEY_NEXTSONG), | ||
519 | |||
520 | KEY(1, 0, KEY_RESERVED), | ||
521 | KEY(1, 1, KEY_DOWN), | ||
522 | KEY(1, 2, KEY_PROG1), | ||
523 | KEY(1, 3, KEY_RESERVED), | ||
524 | KEY(1, 4, KEY_RESERVED), | ||
525 | KEY(1, 5, KEY_RESERVED), | ||
526 | |||
527 | KEY(2, 0, KEY_RESERVED), | ||
528 | KEY(2, 1, KEY_ENTER), | ||
529 | KEY(2, 2, KEY_CAMERA), | ||
530 | KEY(2, 3, KEY_RESERVED), | ||
531 | KEY(2, 4, KEY_RESERVED), | ||
532 | KEY(2, 5, KEY_WWW), | ||
533 | |||
534 | KEY(3, 0, KEY_RESERVED), | ||
535 | KEY(3, 1, KEY_UP), | ||
536 | KEY(3, 2, KEY_SEND), | ||
537 | KEY(3, 3, KEY_RESERVED), | ||
538 | KEY(3, 4, KEY_RESERVED), | ||
539 | KEY(3, 5, KEY_PLAYPAUSE), | ||
540 | |||
541 | KEY(4, 0, KEY_RESERVED), | ||
542 | KEY(4, 1, KEY_LEFT), | ||
543 | KEY(4, 2, KEY_PAGEUP), | ||
544 | KEY(4, 3, KEY_RESERVED), | ||
545 | KEY(4, 4, KEY_RESERVED), | ||
546 | KEY(4, 5, KEY_PREVIOUSSONG), | ||
547 | }; | ||
548 | |||
549 | static struct pxa27x_keypad_platform_data e6_keypad_platform_data = { | ||
550 | .matrix_key_rows = 5, | ||
551 | .matrix_key_cols = 6, | ||
552 | .matrix_key_map = e6_key_map, | ||
553 | .matrix_key_map_size = ARRAY_SIZE(e6_key_map), | ||
116 | 554 | ||
117 | static void __init ezx_init(void) | 555 | .debounce_interval = 30, |
556 | }; | ||
557 | #endif /* CONFIG_MACH_EZX_E6 */ | ||
558 | |||
559 | #ifdef CONFIG_MACH_EZX_A910 | ||
560 | static unsigned int a910_key_map[] = { | ||
561 | KEY(0, 0, KEY_NUMERIC_6), | ||
562 | KEY(0, 1, KEY_RIGHT), | ||
563 | KEY(0, 2, KEY_PAGEDOWN), | ||
564 | KEY(0, 3, KEY_KPENTER), | ||
565 | KEY(0, 4, KEY_NUMERIC_5), | ||
566 | KEY(0, 5, KEY_CAMERA), | ||
567 | |||
568 | KEY(1, 0, KEY_NUMERIC_8), | ||
569 | KEY(1, 1, KEY_DOWN), | ||
570 | KEY(1, 2, KEY_RESERVED), | ||
571 | KEY(1, 3, KEY_F1), /* Left SoftKey */ | ||
572 | KEY(1, 4, KEY_NUMERIC_STAR), | ||
573 | KEY(1, 5, KEY_RESERVED), | ||
574 | |||
575 | KEY(2, 0, KEY_NUMERIC_7), | ||
576 | KEY(2, 1, KEY_NUMERIC_9), | ||
577 | KEY(2, 2, KEY_RECORD), | ||
578 | KEY(2, 3, KEY_F2), /* Right SoftKey */ | ||
579 | KEY(2, 4, KEY_BACK), | ||
580 | KEY(2, 5, KEY_SELECT), | ||
581 | |||
582 | KEY(3, 0, KEY_NUMERIC_2), | ||
583 | KEY(3, 1, KEY_UP), | ||
584 | KEY(3, 2, KEY_SEND), | ||
585 | KEY(3, 3, KEY_NUMERIC_0), | ||
586 | KEY(3, 4, KEY_NUMERIC_1), | ||
587 | KEY(3, 5, KEY_RECORD), | ||
588 | |||
589 | KEY(4, 0, KEY_NUMERIC_4), | ||
590 | KEY(4, 1, KEY_LEFT), | ||
591 | KEY(4, 2, KEY_PAGEUP), | ||
592 | KEY(4, 3, KEY_NUMERIC_POUND), | ||
593 | KEY(4, 4, KEY_NUMERIC_3), | ||
594 | KEY(4, 5, KEY_RESERVED), | ||
595 | }; | ||
596 | |||
597 | static struct pxa27x_keypad_platform_data a910_keypad_platform_data = { | ||
598 | .matrix_key_rows = 5, | ||
599 | .matrix_key_cols = 6, | ||
600 | .matrix_key_map = a910_key_map, | ||
601 | .matrix_key_map_size = ARRAY_SIZE(a910_key_map), | ||
602 | |||
603 | .debounce_interval = 30, | ||
604 | }; | ||
605 | #endif /* CONFIG_MACH_EZX_A910 */ | ||
606 | |||
607 | #ifdef CONFIG_MACH_EZX_E2 | ||
608 | static unsigned int e2_key_map[] = { | ||
609 | KEY(0, 0, KEY_NUMERIC_6), | ||
610 | KEY(0, 1, KEY_RIGHT), | ||
611 | KEY(0, 2, KEY_NUMERIC_9), | ||
612 | KEY(0, 3, KEY_NEXTSONG), | ||
613 | KEY(0, 4, KEY_NUMERIC_5), | ||
614 | KEY(0, 5, KEY_F1), /* Left SoftKey */ | ||
615 | |||
616 | KEY(1, 0, KEY_NUMERIC_8), | ||
617 | KEY(1, 1, KEY_DOWN), | ||
618 | KEY(1, 2, KEY_RESERVED), | ||
619 | KEY(1, 3, KEY_PAGEUP), | ||
620 | KEY(1, 4, KEY_NUMERIC_STAR), | ||
621 | KEY(1, 5, KEY_F2), /* Right SoftKey */ | ||
622 | |||
623 | KEY(2, 0, KEY_NUMERIC_7), | ||
624 | KEY(2, 1, KEY_KPENTER), | ||
625 | KEY(2, 2, KEY_RECORD), | ||
626 | KEY(2, 3, KEY_PAGEDOWN), | ||
627 | KEY(2, 4, KEY_BACK), | ||
628 | KEY(2, 5, KEY_NUMERIC_0), | ||
629 | |||
630 | KEY(3, 0, KEY_NUMERIC_2), | ||
631 | KEY(3, 1, KEY_UP), | ||
632 | KEY(3, 2, KEY_SEND), | ||
633 | KEY(3, 3, KEY_PLAYPAUSE), | ||
634 | KEY(3, 4, KEY_NUMERIC_1), | ||
635 | KEY(3, 5, KEY_SOUND), /* Music SoftKey */ | ||
636 | |||
637 | KEY(4, 0, KEY_NUMERIC_4), | ||
638 | KEY(4, 1, KEY_LEFT), | ||
639 | KEY(4, 2, KEY_NUMERIC_POUND), | ||
640 | KEY(4, 3, KEY_PREVIOUSSONG), | ||
641 | KEY(4, 4, KEY_NUMERIC_3), | ||
642 | KEY(4, 5, KEY_RESERVED), | ||
643 | }; | ||
644 | |||
645 | static struct pxa27x_keypad_platform_data e2_keypad_platform_data = { | ||
646 | .matrix_key_rows = 5, | ||
647 | .matrix_key_cols = 6, | ||
648 | .matrix_key_map = e2_key_map, | ||
649 | .matrix_key_map_size = ARRAY_SIZE(e2_key_map), | ||
650 | |||
651 | .debounce_interval = 30, | ||
652 | }; | ||
653 | #endif /* CONFIG_MACH_EZX_E2 */ | ||
654 | |||
655 | #ifdef CONFIG_MACH_EZX_A780 | ||
656 | static void __init a780_init(void) | ||
118 | { | 657 | { |
119 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | 658 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); |
659 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); | ||
660 | pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config)); | ||
661 | |||
120 | pxa_set_i2c_info(NULL); | 662 | pxa_set_i2c_info(NULL); |
121 | if (machine_is_ezx_a780() || machine_is_ezx_e680()) | ||
122 | set_pxa_fb_info(&ezx_fb_info_1); | ||
123 | else | ||
124 | set_pxa_fb_info(&ezx_fb_info_2); | ||
125 | 663 | ||
126 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 664 | set_pxa_fb_info(&ezx_fb_info_1); |
127 | } | ||
128 | 665 | ||
129 | static void __init ezx_fixup(struct machine_desc *desc, struct tag *tags, | 666 | pxa_set_keypad_info(&a780_keypad_platform_data); |
130 | char **cmdline, struct meminfo *mi) | 667 | |
131 | { | 668 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
132 | /* We have two ram chips. First one with 32MB at 0xA0000000 and a second | ||
133 | * 16MB one at 0xAC000000 | ||
134 | */ | ||
135 | mi->nr_banks = 2; | ||
136 | mi->bank[0].start = 0xa0000000; | ||
137 | mi->bank[0].node = 0; | ||
138 | mi->bank[0].size = (32*1024*1024); | ||
139 | mi->bank[1].start = 0xac000000; | ||
140 | mi->bank[1].node = 1; | ||
141 | mi->bank[1].size = (16*1024*1024); | ||
142 | } | 669 | } |
143 | 670 | ||
144 | #ifdef CONFIG_MACH_EZX_A780 | ||
145 | MACHINE_START(EZX_A780, "Motorola EZX A780") | 671 | MACHINE_START(EZX_A780, "Motorola EZX A780") |
146 | .phys_io = 0x40000000, | 672 | .phys_io = 0x40000000, |
147 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 673 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
148 | .fixup = ezx_fixup, | ||
149 | .boot_params = 0xa0000100, | 674 | .boot_params = 0xa0000100, |
150 | .map_io = pxa_map_io, | 675 | .map_io = pxa_map_io, |
151 | .init_irq = pxa27x_init_irq, | 676 | .init_irq = pxa27x_init_irq, |
152 | .timer = &pxa_timer, | 677 | .timer = &pxa_timer, |
153 | .init_machine = &ezx_init, | 678 | .init_machine = a780_init, |
154 | MACHINE_END | 679 | MACHINE_END |
155 | #endif | 680 | #endif |
156 | 681 | ||
157 | #ifdef CONFIG_MACH_EZX_E680 | 682 | #ifdef CONFIG_MACH_EZX_E680 |
683 | static struct i2c_board_info __initdata e680_i2c_board_info[] = { | ||
684 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
685 | }; | ||
686 | |||
687 | static void __init e680_init(void) | ||
688 | { | ||
689 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
690 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); | ||
691 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config)); | ||
692 | |||
693 | pxa_set_i2c_info(NULL); | ||
694 | i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); | ||
695 | |||
696 | set_pxa_fb_info(&ezx_fb_info_1); | ||
697 | |||
698 | pxa_set_keypad_info(&e680_keypad_platform_data); | ||
699 | |||
700 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
701 | } | ||
702 | |||
158 | MACHINE_START(EZX_E680, "Motorola EZX E680") | 703 | MACHINE_START(EZX_E680, "Motorola EZX E680") |
159 | .phys_io = 0x40000000, | 704 | .phys_io = 0x40000000, |
160 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 705 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
161 | .fixup = ezx_fixup, | ||
162 | .boot_params = 0xa0000100, | 706 | .boot_params = 0xa0000100, |
163 | .map_io = pxa_map_io, | 707 | .map_io = pxa_map_io, |
164 | .init_irq = pxa27x_init_irq, | 708 | .init_irq = pxa27x_init_irq, |
165 | .timer = &pxa_timer, | 709 | .timer = &pxa_timer, |
166 | .init_machine = &ezx_init, | 710 | .init_machine = e680_init, |
167 | MACHINE_END | 711 | MACHINE_END |
168 | #endif | 712 | #endif |
169 | 713 | ||
170 | #ifdef CONFIG_MACH_EZX_A1200 | 714 | #ifdef CONFIG_MACH_EZX_A1200 |
715 | static struct i2c_board_info __initdata a1200_i2c_board_info[] = { | ||
716 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
717 | }; | ||
718 | |||
719 | static void __init a1200_init(void) | ||
720 | { | ||
721 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
722 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
723 | pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config)); | ||
724 | |||
725 | pxa_set_i2c_info(NULL); | ||
726 | i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); | ||
727 | |||
728 | set_pxa_fb_info(&ezx_fb_info_2); | ||
729 | |||
730 | pxa_set_keypad_info(&a1200_keypad_platform_data); | ||
731 | |||
732 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
733 | } | ||
734 | |||
171 | MACHINE_START(EZX_A1200, "Motorola EZX A1200") | 735 | MACHINE_START(EZX_A1200, "Motorola EZX A1200") |
172 | .phys_io = 0x40000000, | 736 | .phys_io = 0x40000000, |
173 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 737 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
174 | .fixup = ezx_fixup, | ||
175 | .boot_params = 0xa0000100, | 738 | .boot_params = 0xa0000100, |
176 | .map_io = pxa_map_io, | 739 | .map_io = pxa_map_io, |
177 | .init_irq = pxa27x_init_irq, | 740 | .init_irq = pxa27x_init_irq, |
178 | .timer = &pxa_timer, | 741 | .timer = &pxa_timer, |
179 | .init_machine = &ezx_init, | 742 | .init_machine = a1200_init, |
180 | MACHINE_END | 743 | MACHINE_END |
181 | #endif | 744 | #endif |
182 | 745 | ||
183 | #ifdef CONFIG_MACH_EZX_A910 | 746 | #ifdef CONFIG_MACH_EZX_A910 |
747 | static void __init a910_init(void) | ||
748 | { | ||
749 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
750 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
751 | pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config)); | ||
752 | |||
753 | pxa_set_i2c_info(NULL); | ||
754 | |||
755 | set_pxa_fb_info(&ezx_fb_info_2); | ||
756 | |||
757 | pxa_set_keypad_info(&a910_keypad_platform_data); | ||
758 | |||
759 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
760 | } | ||
761 | |||
184 | MACHINE_START(EZX_A910, "Motorola EZX A910") | 762 | MACHINE_START(EZX_A910, "Motorola EZX A910") |
185 | .phys_io = 0x40000000, | 763 | .phys_io = 0x40000000, |
186 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 764 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
187 | .fixup = ezx_fixup, | ||
188 | .boot_params = 0xa0000100, | 765 | .boot_params = 0xa0000100, |
189 | .map_io = pxa_map_io, | 766 | .map_io = pxa_map_io, |
190 | .init_irq = pxa27x_init_irq, | 767 | .init_irq = pxa27x_init_irq, |
191 | .timer = &pxa_timer, | 768 | .timer = &pxa_timer, |
192 | .init_machine = &ezx_init, | 769 | .init_machine = a910_init, |
193 | MACHINE_END | 770 | MACHINE_END |
194 | #endif | 771 | #endif |
195 | 772 | ||
196 | #ifdef CONFIG_MACH_EZX_E6 | 773 | #ifdef CONFIG_MACH_EZX_E6 |
774 | static struct i2c_board_info __initdata e6_i2c_board_info[] = { | ||
775 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
776 | }; | ||
777 | |||
778 | static void __init e6_init(void) | ||
779 | { | ||
780 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
781 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
782 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config)); | ||
783 | |||
784 | pxa_set_i2c_info(NULL); | ||
785 | i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); | ||
786 | |||
787 | set_pxa_fb_info(&ezx_fb_info_2); | ||
788 | |||
789 | pxa_set_keypad_info(&e6_keypad_platform_data); | ||
790 | |||
791 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
792 | } | ||
793 | |||
197 | MACHINE_START(EZX_E6, "Motorola EZX E6") | 794 | MACHINE_START(EZX_E6, "Motorola EZX E6") |
198 | .phys_io = 0x40000000, | 795 | .phys_io = 0x40000000, |
199 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 796 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
200 | .fixup = ezx_fixup, | ||
201 | .boot_params = 0xa0000100, | 797 | .boot_params = 0xa0000100, |
202 | .map_io = pxa_map_io, | 798 | .map_io = pxa_map_io, |
203 | .init_irq = pxa27x_init_irq, | 799 | .init_irq = pxa27x_init_irq, |
204 | .timer = &pxa_timer, | 800 | .timer = &pxa_timer, |
205 | .init_machine = &ezx_init, | 801 | .init_machine = e6_init, |
206 | MACHINE_END | 802 | MACHINE_END |
207 | #endif | 803 | #endif |
208 | 804 | ||
209 | #ifdef CONFIG_MACH_EZX_E2 | 805 | #ifdef CONFIG_MACH_EZX_E2 |
806 | static struct i2c_board_info __initdata e2_i2c_board_info[] = { | ||
807 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
808 | }; | ||
809 | |||
810 | static void __init e2_init(void) | ||
811 | { | ||
812 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
813 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
814 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config)); | ||
815 | |||
816 | pxa_set_i2c_info(NULL); | ||
817 | i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); | ||
818 | |||
819 | set_pxa_fb_info(&ezx_fb_info_2); | ||
820 | |||
821 | pxa_set_keypad_info(&e2_keypad_platform_data); | ||
822 | |||
823 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
824 | } | ||
825 | |||
210 | MACHINE_START(EZX_E2, "Motorola EZX E2") | 826 | MACHINE_START(EZX_E2, "Motorola EZX E2") |
211 | .phys_io = 0x40000000, | 827 | .phys_io = 0x40000000, |
212 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 828 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
213 | .fixup = ezx_fixup, | ||
214 | .boot_params = 0xa0000100, | 829 | .boot_params = 0xa0000100, |
215 | .map_io = pxa_map_io, | 830 | .map_io = pxa_map_io, |
216 | .init_irq = pxa27x_init_irq, | 831 | .init_irq = pxa27x_init_irq, |
217 | .timer = &pxa_timer, | 832 | .timer = &pxa_timer, |
218 | .init_machine = &ezx_init, | 833 | .init_machine = e2_init, |
219 | MACHINE_END | 834 | MACHINE_END |
220 | #endif | 835 | #endif |