2 * ezx.c - Common code for the EZX platform.
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>
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.
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>
19 #include <linux/input.h>
21 #include <asm/setup.h>
22 #include <mach/pxafb.h>
23 #include <mach/ohci.h>
25 #include <mach/hardware.h>
26 #include <mach/pxa27x_keypad.h>
28 #include <mach/mfp-pxa27x.h>
29 #include <mach/pxa-regs.h>
30 #include <mach/pxa2xx-regs.h>
31 #include <asm/mach-types.h>
32 #include <asm/mach/arch.h>
37 static struct platform_pwm_backlight_data ezx_backlight_data = {
39 .max_brightness = 1023,
40 .dft_brightness = 1023,
41 .pwm_period_ns = 78770,
44 static struct platform_device ezx_backlight_device = {
45 .name = "pwm-backlight",
47 .parent = &pxa27x_device_pwm0.dev,
48 .platform_data = &ezx_backlight_data,
52 static struct pxafb_mode_info mode_ezx_old = {
66 static struct pxafb_mach_info ezx_fb_info_1 = {
67 .modes = &mode_ezx_old,
69 .lcd_conn = LCD_COLOR_TFT_16BPP,
72 static struct pxafb_mode_info mode_72r89803y01 = {
87 static struct pxafb_mach_info ezx_fb_info_2 = {
88 .modes = &mode_72r89803y01,
90 .lcd_conn = LCD_COLOR_TFT_18BPP,
93 static struct platform_device *devices[] __initdata = {
94 &ezx_backlight_device,
97 static unsigned long ezx_pin_config[] __initdata = {
115 GPIO24_GPIO, /* pcap chip select */
116 GPIO1_GPIO, /* pcap interrupt */
117 GPIO4_GPIO, /* WDI_AP */
118 GPIO55_GPIO, /* SYS_RESTART */
127 GPIO11_GPIO, /* mmc detect */
129 /* usb to external transceiver */
137 /* usb to Neptune GSM chip */
146 #if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680)
147 static unsigned long gen1_pin_config[] __initdata = {
148 /* flip / lockswitch */
151 /* bluetooth (bcm2035) */
152 GPIO14_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */
153 GPIO48_GPIO, /* RESET */
154 GPIO28_GPIO, /* WAKEUP */
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 */
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 */
189 GPIO50_GPIO, /* CAM_EN */
190 GPIO19_GPIO, /* CAM_RST */
193 GPIO120_GPIO, /* EMU_MUX1 */
194 GPIO119_GPIO, /* EMU_MUX2 */
195 GPIO86_GPIO, /* SNP_INT_CTL */
196 GPIO87_GPIO, /* SNP_INT_IN */
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 */
209 /* bluetooth (bcm2045) */
210 GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */
211 GPIO37_GPIO, /* RESET */
212 GPIO57_GPIO, /* WAKEUP */
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 */
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 */
246 GPIO50_GPIO, /* CAM_EN */
247 GPIO28_GPIO, /* CAM_RST */
248 GPIO17_GPIO, /* CAM_FLASH */
252 #ifdef CONFIG_MACH_EZX_A780
253 static unsigned long a780_pin_config[] __initdata = {
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,
267 /* attenuate sound */
272 #ifdef CONFIG_MACH_EZX_E680
273 static unsigned long e680_pin_config[] __initdata = {
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,
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 */
302 #ifdef CONFIG_MACH_EZX_A1200
303 static unsigned long a1200_pin_config[] __initdata = {
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,
319 #ifdef CONFIG_MACH_EZX_A910
320 static unsigned long a910_pin_config[] __initdata = {
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,
335 GPIO89_GPIO, /* RESET */
336 GPIO33_GPIO, /* WAKEUP */
337 GPIO94_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */
344 #ifdef CONFIG_MACH_EZX_E2
345 static unsigned long e2_pin_config[] __initdata = {
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,
361 #ifdef CONFIG_MACH_EZX_E6
362 static unsigned long e6_pin_config[] __initdata = {
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,
379 #ifdef CONFIG_MACH_EZX_A780
380 static unsigned int a780_key_map[] = {
384 KEY(0, 3, KEY_PAGEUP),
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),
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),
399 KEY(3, 0, KEY_NUMERIC_7),
400 KEY(3, 1, KEY_NUMERIC_8),
401 KEY(3, 2, KEY_NUMERIC_9),
403 KEY(3, 4, KEY_RIGHT),
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),
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),
418 .direct_key_map = { KEY_CAMERA },
421 .debounce_interval = 30,
423 #endif /* CONFIG_MACH_EZX_A780 */
425 #ifdef CONFIG_MACH_EZX_E680
426 static unsigned int e680_key_map[] = {
428 KEY(0, 1, KEY_RIGHT),
429 KEY(0, 2, KEY_RESERVED),
434 KEY(1, 2, KEY_PAGEUP),
435 KEY(1, 3, KEY_PAGEDOWN),
437 KEY(2, 0, KEY_RESERVED),
438 KEY(2, 1, KEY_RESERVED),
439 KEY(2, 2, KEY_RESERVED),
440 KEY(2, 3, KEY_KPENTER),
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),
459 .debounce_interval = 30,
461 #endif /* CONFIG_MACH_EZX_E680 */
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),
472 KEY(1, 0, KEY_RESERVED),
474 KEY(1, 2, KEY_CAMERA),
475 KEY(1, 3, KEY_RESERVED),
476 KEY(1, 4, KEY_RESERVED),
477 KEY(1, 5, KEY_RESERVED),
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),
486 KEY(3, 0, KEY_RESERVED),
489 KEY(3, 3, KEY_RESERVED),
490 KEY(3, 4, KEY_RESERVED),
491 KEY(3, 5, KEY_RESERVED),
493 KEY(4, 0, KEY_RESERVED),
495 KEY(4, 2, KEY_PAGEUP),
496 KEY(4, 3, KEY_RESERVED),
497 KEY(4, 4, KEY_RESERVED),
498 KEY(4, 5, KEY_RESERVED),
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),
507 .debounce_interval = 30,
509 #endif /* CONFIG_MACH_EZX_A1200 */
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),
520 KEY(1, 0, KEY_RESERVED),
522 KEY(1, 2, KEY_PROG1),
523 KEY(1, 3, KEY_RESERVED),
524 KEY(1, 4, KEY_RESERVED),
525 KEY(1, 5, KEY_RESERVED),
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),
534 KEY(3, 0, KEY_RESERVED),
537 KEY(3, 3, KEY_RESERVED),
538 KEY(3, 4, KEY_RESERVED),
539 KEY(3, 5, KEY_PLAYPAUSE),
541 KEY(4, 0, KEY_RESERVED),
543 KEY(4, 2, KEY_PAGEUP),
544 KEY(4, 3, KEY_RESERVED),
545 KEY(4, 4, KEY_RESERVED),
546 KEY(4, 5, KEY_PREVIOUSSONG),
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),
555 .debounce_interval = 30,
557 #endif /* CONFIG_MACH_EZX_E6 */
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),
568 KEY(1, 0, KEY_NUMERIC_8),
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),
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 */
580 KEY(2, 5, KEY_SELECT),
582 KEY(3, 0, KEY_NUMERIC_2),
585 KEY(3, 3, KEY_NUMERIC_0),
586 KEY(3, 4, KEY_NUMERIC_1),
587 KEY(3, 5, KEY_RECORD),
589 KEY(4, 0, KEY_NUMERIC_4),
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),
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),
603 .debounce_interval = 30,
605 #endif /* CONFIG_MACH_EZX_A910 */
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 */
616 KEY(1, 0, KEY_NUMERIC_8),
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 */
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),
628 KEY(2, 5, KEY_NUMERIC_0),
630 KEY(3, 0, KEY_NUMERIC_2),
633 KEY(3, 3, KEY_PLAYPAUSE),
634 KEY(3, 4, KEY_NUMERIC_1),
635 KEY(3, 5, KEY_SOUND), /* Music SoftKey */
637 KEY(4, 0, KEY_NUMERIC_4),
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),
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),
651 .debounce_interval = 30,
653 #endif /* CONFIG_MACH_EZX_E2 */
655 #ifdef CONFIG_MACH_EZX_A780
656 static void __init a780_init(void)
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));
662 pxa_set_i2c_info(NULL);
664 set_pxa_fb_info(&ezx_fb_info_1);
666 pxa_set_keypad_info(&a780_keypad_platform_data);
668 platform_add_devices(devices, ARRAY_SIZE(devices));
671 MACHINE_START(EZX_A780, "Motorola EZX A780")
672 .phys_io = 0x40000000,
673 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
674 .boot_params = 0xa0000100,
675 .map_io = pxa_map_io,
676 .init_irq = pxa27x_init_irq,
678 .init_machine = a780_init,
682 #ifdef CONFIG_MACH_EZX_E680
683 static struct i2c_board_info __initdata e680_i2c_board_info[] = {
684 { I2C_BOARD_INFO("tea5767", 0x81) },
687 static void __init e680_init(void)
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));
693 pxa_set_i2c_info(NULL);
694 i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info));
696 set_pxa_fb_info(&ezx_fb_info_1);
698 pxa_set_keypad_info(&e680_keypad_platform_data);
700 platform_add_devices(devices, ARRAY_SIZE(devices));
703 MACHINE_START(EZX_E680, "Motorola EZX E680")
704 .phys_io = 0x40000000,
705 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
706 .boot_params = 0xa0000100,
707 .map_io = pxa_map_io,
708 .init_irq = pxa27x_init_irq,
710 .init_machine = e680_init,
714 #ifdef CONFIG_MACH_EZX_A1200
715 static struct i2c_board_info __initdata a1200_i2c_board_info[] = {
716 { I2C_BOARD_INFO("tea5767", 0x81) },
719 static void __init a1200_init(void)
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));
725 pxa_set_i2c_info(NULL);
726 i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info));
728 set_pxa_fb_info(&ezx_fb_info_2);
730 pxa_set_keypad_info(&a1200_keypad_platform_data);
732 platform_add_devices(devices, ARRAY_SIZE(devices));
735 MACHINE_START(EZX_A1200, "Motorola EZX A1200")
736 .phys_io = 0x40000000,
737 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
738 .boot_params = 0xa0000100,
739 .map_io = pxa_map_io,
740 .init_irq = pxa27x_init_irq,
742 .init_machine = a1200_init,
746 #ifdef CONFIG_MACH_EZX_A910
747 static void __init a910_init(void)
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));
753 pxa_set_i2c_info(NULL);
755 set_pxa_fb_info(&ezx_fb_info_2);
757 pxa_set_keypad_info(&a910_keypad_platform_data);
759 platform_add_devices(devices, ARRAY_SIZE(devices));
762 MACHINE_START(EZX_A910, "Motorola EZX A910")
763 .phys_io = 0x40000000,
764 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
765 .boot_params = 0xa0000100,
766 .map_io = pxa_map_io,
767 .init_irq = pxa27x_init_irq,
769 .init_machine = a910_init,
773 #ifdef CONFIG_MACH_EZX_E6
774 static struct i2c_board_info __initdata e6_i2c_board_info[] = {
775 { I2C_BOARD_INFO("tea5767", 0x81) },
778 static void __init e6_init(void)
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));
784 pxa_set_i2c_info(NULL);
785 i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info));
787 set_pxa_fb_info(&ezx_fb_info_2);
789 pxa_set_keypad_info(&e6_keypad_platform_data);
791 platform_add_devices(devices, ARRAY_SIZE(devices));
794 MACHINE_START(EZX_E6, "Motorola EZX E6")
795 .phys_io = 0x40000000,
796 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
797 .boot_params = 0xa0000100,
798 .map_io = pxa_map_io,
799 .init_irq = pxa27x_init_irq,
801 .init_machine = e6_init,
805 #ifdef CONFIG_MACH_EZX_E2
806 static struct i2c_board_info __initdata e2_i2c_board_info[] = {
807 { I2C_BOARD_INFO("tea5767", 0x81) },
810 static void __init e2_init(void)
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));
816 pxa_set_i2c_info(NULL);
817 i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info));
819 set_pxa_fb_info(&ezx_fb_info_2);
821 pxa_set_keypad_info(&e2_keypad_platform_data);
823 platform_add_devices(devices, ARRAY_SIZE(devices));
826 MACHINE_START(EZX_E2, "Motorola EZX E2")
827 .phys_io = 0x40000000,
828 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
829 .boot_params = 0xa0000100,
830 .map_io = pxa_map_io,
831 .init_irq = pxa27x_init_irq,
833 .init_machine = e2_init,