diff options
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 431 |
1 files changed, 346 insertions, 85 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 5294fdd20732..923383386aa1 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -16,8 +16,9 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/usb/sl811.h> | ||
20 | #include <linux/usb/musb.h> | 19 | #include <linux/usb/musb.h> |
20 | #include <linux/leds.h> | ||
21 | #include <linux/input.h> | ||
21 | #include <asm/dma.h> | 22 | #include <asm/dma.h> |
22 | #include <asm/bfin5xx_spi.h> | 23 | #include <asm/bfin5xx_spi.h> |
23 | #include <asm/reboot.h> | 24 | #include <asm/reboot.h> |
@@ -29,7 +30,11 @@ | |||
29 | /* | 30 | /* |
30 | * Name the Board for the /proc/cpuinfo | 31 | * Name the Board for the /proc/cpuinfo |
31 | */ | 32 | */ |
33 | #ifdef CONFIG_BFIN527_EZKIT_V2 | ||
34 | const char bfin_board_name[] = "ADI BF527-EZKIT V2"; | ||
35 | #else | ||
32 | const char bfin_board_name[] = "ADI BF527-EZKIT"; | 36 | const char bfin_board_name[] = "ADI BF527-EZKIT"; |
37 | #endif | ||
33 | 38 | ||
34 | /* | 39 | /* |
35 | * Driver needs to know address, irq and flag pin. | 40 | * Driver needs to know address, irq and flag pin. |
@@ -143,6 +148,33 @@ static struct platform_device bf52x_t350mcqb_device = { | |||
143 | }; | 148 | }; |
144 | #endif | 149 | #endif |
145 | 150 | ||
151 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
152 | #include <asm/bfin-lq035q1.h> | ||
153 | |||
154 | static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { | ||
155 | .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, | ||
156 | .ppi_mode = USE_RGB565_8_BIT_PPI, | ||
157 | }; | ||
158 | |||
159 | static struct resource bfin_lq035q1_resources[] = { | ||
160 | { | ||
161 | .start = IRQ_PPI_ERROR, | ||
162 | .end = IRQ_PPI_ERROR, | ||
163 | .flags = IORESOURCE_IRQ, | ||
164 | }, | ||
165 | }; | ||
166 | |||
167 | static struct platform_device bfin_lq035q1_device = { | ||
168 | .name = "bfin-lq035q1", | ||
169 | .id = -1, | ||
170 | .num_resources = ARRAY_SIZE(bfin_lq035q1_resources), | ||
171 | .resource = bfin_lq035q1_resources, | ||
172 | .dev = { | ||
173 | .platform_data = &bfin_lq035q1_data, | ||
174 | }, | ||
175 | }; | ||
176 | #endif | ||
177 | |||
146 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 178 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
147 | static struct mtd_partition ezkit_partitions[] = { | 179 | static struct mtd_partition ezkit_partitions[] = { |
148 | { | 180 | { |
@@ -326,50 +358,6 @@ static struct platform_device dm9000_device = { | |||
326 | }; | 358 | }; |
327 | #endif | 359 | #endif |
328 | 360 | ||
329 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
330 | static struct resource sl811_hcd_resources[] = { | ||
331 | { | ||
332 | .start = 0x20340000, | ||
333 | .end = 0x20340000, | ||
334 | .flags = IORESOURCE_MEM, | ||
335 | }, { | ||
336 | .start = 0x20340004, | ||
337 | .end = 0x20340004, | ||
338 | .flags = IORESOURCE_MEM, | ||
339 | }, { | ||
340 | .start = CONFIG_USB_SL811_BFIN_IRQ, | ||
341 | .end = CONFIG_USB_SL811_BFIN_IRQ, | ||
342 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
343 | }, | ||
344 | }; | ||
345 | |||
346 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
347 | void sl811_port_power(struct device *dev, int is_on) | ||
348 | { | ||
349 | gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS"); | ||
350 | gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on); | ||
351 | } | ||
352 | #endif | ||
353 | |||
354 | static struct sl811_platform_data sl811_priv = { | ||
355 | .potpg = 10, | ||
356 | .power = 250, /* == 500mA */ | ||
357 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
358 | .port_power = &sl811_port_power, | ||
359 | #endif | ||
360 | }; | ||
361 | |||
362 | static struct platform_device sl811_hcd_device = { | ||
363 | .name = "sl811-hcd", | ||
364 | .id = 0, | ||
365 | .dev = { | ||
366 | .platform_data = &sl811_priv, | ||
367 | }, | ||
368 | .num_resources = ARRAY_SIZE(sl811_hcd_resources), | ||
369 | .resource = sl811_hcd_resources, | ||
370 | }; | ||
371 | #endif | ||
372 | |||
373 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 361 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
374 | static struct platform_device bfin_mii_bus = { | 362 | static struct platform_device bfin_mii_bus = { |
375 | .name = "bfin_mii_bus", | 363 | .name = "bfin_mii_bus", |
@@ -440,8 +428,8 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
440 | }; | 428 | }; |
441 | #endif | 429 | #endif |
442 | 430 | ||
443 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 431 | #if defined(CONFIG_SND_BLACKFIN_AD183X) \ |
444 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 432 | || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
445 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 433 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
446 | .enable_dma = 0, | 434 | .enable_dma = 0, |
447 | .bits_per_word = 16, | 435 | .bits_per_word = 16, |
@@ -488,8 +476,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
488 | .median = 2, /* do 8 measurements */ | 476 | .median = 2, /* do 8 measurements */ |
489 | .averaging = 1, /* take the average of 4 middle samples */ | 477 | .averaging = 1, /* take the average of 4 middle samples */ |
490 | .pen_down_acc_interval = 255, /* 9.4 ms */ | 478 | .pen_down_acc_interval = 255, /* 9.4 ms */ |
491 | .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */ | 479 | .gpio_export = 0, /* Export GPIO to gpiolib */ |
492 | .gpio_default = 1, /* During initialization set GPIO = HIGH */ | ||
493 | }; | 480 | }; |
494 | #endif | 481 | #endif |
495 | 482 | ||
@@ -500,14 +487,6 @@ static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | |||
500 | }; | 487 | }; |
501 | #endif | 488 | #endif |
502 | 489 | ||
503 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
504 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
505 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
506 | .enable_dma = 0, | ||
507 | .bits_per_word = 16, | ||
508 | }; | ||
509 | #endif | ||
510 | |||
511 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | 490 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
512 | static struct bfin5xx_spi_chip spidev_chip_info = { | 491 | static struct bfin5xx_spi_chip spidev_chip_info = { |
513 | .enable_dma = 0, | 492 | .enable_dma = 0, |
@@ -515,6 +494,29 @@ static struct bfin5xx_spi_chip spidev_chip_info = { | |||
515 | }; | 494 | }; |
516 | #endif | 495 | #endif |
517 | 496 | ||
497 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
498 | static struct platform_device bfin_i2s = { | ||
499 | .name = "bfin-i2s", | ||
500 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
501 | /* TODO: add platform data here */ | ||
502 | }; | ||
503 | #endif | ||
504 | |||
505 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
506 | static struct platform_device bfin_tdm = { | ||
507 | .name = "bfin-tdm", | ||
508 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
509 | /* TODO: add platform data here */ | ||
510 | }; | ||
511 | #endif | ||
512 | |||
513 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
514 | static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | ||
515 | .enable_dma = 0, | ||
516 | .bits_per_word = 8, | ||
517 | }; | ||
518 | #endif | ||
519 | |||
518 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 520 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
519 | #if defined(CONFIG_MTD_M25P80) \ | 521 | #if defined(CONFIG_MTD_M25P80) \ |
520 | || defined(CONFIG_MTD_M25P80_MODULE) | 522 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -542,8 +544,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
542 | }, | 544 | }, |
543 | #endif | 545 | #endif |
544 | 546 | ||
545 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 547 | #if defined(CONFIG_SND_BLACKFIN_AD183X) \ |
546 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 548 | || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
547 | { | 549 | { |
548 | .modalias = "ad1836", | 550 | .modalias = "ad1836", |
549 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 551 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -586,17 +588,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
586 | .mode = SPI_CPHA | SPI_CPOL, | 588 | .mode = SPI_CPHA | SPI_CPOL, |
587 | }, | 589 | }, |
588 | #endif | 590 | #endif |
589 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
590 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
591 | { | ||
592 | .modalias = "wm8731", | ||
593 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
594 | .bus_num = 0, | ||
595 | .chip_select = 5, | ||
596 | .controller_data = &spi_wm8731_chip_info, | ||
597 | .mode = SPI_MODE_0, | ||
598 | }, | ||
599 | #endif | ||
600 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | 591 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
601 | { | 592 | { |
602 | .modalias = "spidev", | 593 | .modalias = "spidev", |
@@ -606,6 +597,16 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
606 | .controller_data = &spidev_chip_info, | 597 | .controller_data = &spidev_chip_info, |
607 | }, | 598 | }, |
608 | #endif | 599 | #endif |
600 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
601 | { | ||
602 | .modalias = "bfin-lq035q1-spi", | ||
603 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | ||
604 | .bus_num = 0, | ||
605 | .chip_select = 7, | ||
606 | .controller_data = &lq035q1_spi_chip_info, | ||
607 | .mode = SPI_CPHA | SPI_CPOL, | ||
608 | }, | ||
609 | #endif | ||
609 | }; | 610 | }; |
610 | 611 | ||
611 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 612 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
@@ -647,30 +648,105 @@ static struct platform_device bfin_spi0_device = { | |||
647 | #endif /* spi master and devices */ | 648 | #endif /* spi master and devices */ |
648 | 649 | ||
649 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 650 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
650 | static struct resource bfin_uart_resources[] = { | ||
651 | #ifdef CONFIG_SERIAL_BFIN_UART0 | 651 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
652 | static struct resource bfin_uart0_resources[] = { | ||
652 | { | 653 | { |
653 | .start = 0xFFC00400, | 654 | .start = UART0_THR, |
654 | .end = 0xFFC004FF, | 655 | .end = UART0_GCTL+2, |
655 | .flags = IORESOURCE_MEM, | 656 | .flags = IORESOURCE_MEM, |
656 | }, | 657 | }, |
658 | { | ||
659 | .start = IRQ_UART0_RX, | ||
660 | .end = IRQ_UART0_RX+1, | ||
661 | .flags = IORESOURCE_IRQ, | ||
662 | }, | ||
663 | { | ||
664 | .start = IRQ_UART0_ERROR, | ||
665 | .end = IRQ_UART0_ERROR, | ||
666 | .flags = IORESOURCE_IRQ, | ||
667 | }, | ||
668 | { | ||
669 | .start = CH_UART0_TX, | ||
670 | .end = CH_UART0_TX, | ||
671 | .flags = IORESOURCE_DMA, | ||
672 | }, | ||
673 | { | ||
674 | .start = CH_UART0_RX, | ||
675 | .end = CH_UART0_RX, | ||
676 | .flags = IORESOURCE_DMA, | ||
677 | }, | ||
678 | }; | ||
679 | |||
680 | unsigned short bfin_uart0_peripherals[] = { | ||
681 | P_UART0_TX, P_UART0_RX, 0 | ||
682 | }; | ||
683 | |||
684 | static struct platform_device bfin_uart0_device = { | ||
685 | .name = "bfin-uart", | ||
686 | .id = 0, | ||
687 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
688 | .resource = bfin_uart0_resources, | ||
689 | .dev = { | ||
690 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
691 | }, | ||
692 | }; | ||
657 | #endif | 693 | #endif |
658 | #ifdef CONFIG_SERIAL_BFIN_UART1 | 694 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
695 | static struct resource bfin_uart1_resources[] = { | ||
659 | { | 696 | { |
660 | .start = 0xFFC02000, | 697 | .start = UART1_THR, |
661 | .end = 0xFFC020FF, | 698 | .end = UART1_GCTL+2, |
662 | .flags = IORESOURCE_MEM, | 699 | .flags = IORESOURCE_MEM, |
663 | }, | 700 | }, |
701 | { | ||
702 | .start = IRQ_UART1_RX, | ||
703 | .end = IRQ_UART1_RX+1, | ||
704 | .flags = IORESOURCE_IRQ, | ||
705 | }, | ||
706 | { | ||
707 | .start = IRQ_UART1_ERROR, | ||
708 | .end = IRQ_UART1_ERROR, | ||
709 | .flags = IORESOURCE_IRQ, | ||
710 | }, | ||
711 | { | ||
712 | .start = CH_UART1_TX, | ||
713 | .end = CH_UART1_TX, | ||
714 | .flags = IORESOURCE_DMA, | ||
715 | }, | ||
716 | { | ||
717 | .start = CH_UART1_RX, | ||
718 | .end = CH_UART1_RX, | ||
719 | .flags = IORESOURCE_DMA, | ||
720 | }, | ||
721 | #ifdef CONFIG_BFIN_UART1_CTSRTS | ||
722 | { /* CTS pin */ | ||
723 | .start = GPIO_PF9, | ||
724 | .end = GPIO_PF9, | ||
725 | .flags = IORESOURCE_IO, | ||
726 | }, | ||
727 | { /* RTS pin */ | ||
728 | .start = GPIO_PF10, | ||
729 | .end = GPIO_PF10, | ||
730 | .flags = IORESOURCE_IO, | ||
731 | }, | ||
664 | #endif | 732 | #endif |
665 | }; | 733 | }; |
666 | 734 | ||
667 | static struct platform_device bfin_uart_device = { | 735 | unsigned short bfin_uart1_peripherals[] = { |
736 | P_UART1_TX, P_UART1_RX, 0 | ||
737 | }; | ||
738 | |||
739 | static struct platform_device bfin_uart1_device = { | ||
668 | .name = "bfin-uart", | 740 | .name = "bfin-uart", |
669 | .id = 1, | 741 | .id = 1, |
670 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 742 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
671 | .resource = bfin_uart_resources, | 743 | .resource = bfin_uart1_resources, |
744 | .dev = { | ||
745 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
746 | }, | ||
672 | }; | 747 | }; |
673 | #endif | 748 | #endif |
749 | #endif | ||
674 | 750 | ||
675 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 751 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
676 | #ifdef CONFIG_BFIN_SIR0 | 752 | #ifdef CONFIG_BFIN_SIR0 |
@@ -749,6 +825,71 @@ static struct platform_device i2c_bfin_twi_device = { | |||
749 | }; | 825 | }; |
750 | #endif | 826 | #endif |
751 | 827 | ||
828 | #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) | ||
829 | #include <linux/mfd/adp5520.h> | ||
830 | |||
831 | /* | ||
832 | * ADP5520/5501 LEDs Data | ||
833 | */ | ||
834 | |||
835 | static struct led_info adp5520_leds[] = { | ||
836 | { | ||
837 | .name = "adp5520-led1", | ||
838 | .default_trigger = "none", | ||
839 | .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | ADP5520_LED_OFFT_600ms, | ||
840 | }, | ||
841 | }; | ||
842 | |||
843 | static struct adp5520_leds_platform_data adp5520_leds_data = { | ||
844 | .num_leds = ARRAY_SIZE(adp5520_leds), | ||
845 | .leds = adp5520_leds, | ||
846 | .fade_in = ADP5520_FADE_T_600ms, | ||
847 | .fade_out = ADP5520_FADE_T_600ms, | ||
848 | .led_on_time = ADP5520_LED_ONT_600ms, | ||
849 | }; | ||
850 | |||
851 | /* | ||
852 | * ADP5520 Keypad Data | ||
853 | */ | ||
854 | |||
855 | static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { | ||
856 | [ADP5520_KEY(3, 3)] = KEY_1, | ||
857 | [ADP5520_KEY(2, 3)] = KEY_2, | ||
858 | [ADP5520_KEY(1, 3)] = KEY_3, | ||
859 | [ADP5520_KEY(0, 3)] = KEY_UP, | ||
860 | [ADP5520_KEY(3, 2)] = KEY_4, | ||
861 | [ADP5520_KEY(2, 2)] = KEY_5, | ||
862 | [ADP5520_KEY(1, 2)] = KEY_6, | ||
863 | [ADP5520_KEY(0, 2)] = KEY_DOWN, | ||
864 | [ADP5520_KEY(3, 1)] = KEY_7, | ||
865 | [ADP5520_KEY(2, 1)] = KEY_8, | ||
866 | [ADP5520_KEY(1, 1)] = KEY_9, | ||
867 | [ADP5520_KEY(0, 1)] = KEY_DOT, | ||
868 | [ADP5520_KEY(3, 0)] = KEY_BACKSPACE, | ||
869 | [ADP5520_KEY(2, 0)] = KEY_0, | ||
870 | [ADP5520_KEY(1, 0)] = KEY_HELP, | ||
871 | [ADP5520_KEY(0, 0)] = KEY_ENTER, | ||
872 | }; | ||
873 | |||
874 | static struct adp5520_keys_platform_data adp5520_keys_data = { | ||
875 | .rows_en_mask = ADP5520_ROW_R3 | ADP5520_ROW_R2 | ADP5520_ROW_R1 | ADP5520_ROW_R0, | ||
876 | .cols_en_mask = ADP5520_COL_C3 | ADP5520_COL_C2 | ADP5520_COL_C1 | ADP5520_COL_C0, | ||
877 | .keymap = adp5520_keymap, | ||
878 | .keymapsize = ARRAY_SIZE(adp5520_keymap), | ||
879 | .repeat = 0, | ||
880 | }; | ||
881 | |||
882 | /* | ||
883 | * ADP5520/5501 Multifuction Device Init Data | ||
884 | */ | ||
885 | |||
886 | static struct adp5520_platform_data adp5520_pdev_data = { | ||
887 | .leds = &adp5520_leds_data, | ||
888 | .keys = &adp5520_keys_data, | ||
889 | }; | ||
890 | |||
891 | #endif | ||
892 | |||
752 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 893 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
753 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) | 894 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
754 | { | 895 | { |
@@ -766,22 +907,99 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
766 | I2C_BOARD_INFO("bfin-adv7393", 0x2B), | 907 | I2C_BOARD_INFO("bfin-adv7393", 0x2B), |
767 | }, | 908 | }, |
768 | #endif | 909 | #endif |
910 | #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) | ||
911 | { | ||
912 | I2C_BOARD_INFO("ad7879", 0x2C), | ||
913 | .irq = IRQ_PF8, | ||
914 | .platform_data = (void *)&bfin_ad7879_ts_info, | ||
915 | }, | ||
916 | #endif | ||
917 | #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) | ||
918 | { | ||
919 | I2C_BOARD_INFO("pmic-adp5520", 0x32), | ||
920 | .irq = IRQ_PF9, | ||
921 | .platform_data = (void *)&adp5520_pdev_data, | ||
922 | }, | ||
923 | #endif | ||
924 | #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) | ||
925 | { | ||
926 | I2C_BOARD_INFO("ssm2602", 0x1b), | ||
927 | }, | ||
928 | #endif | ||
769 | }; | 929 | }; |
770 | 930 | ||
771 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 931 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
932 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
933 | static struct resource bfin_sport0_uart_resources[] = { | ||
934 | { | ||
935 | .start = SPORT0_TCR1, | ||
936 | .end = SPORT0_MRCS3+4, | ||
937 | .flags = IORESOURCE_MEM, | ||
938 | }, | ||
939 | { | ||
940 | .start = IRQ_SPORT0_RX, | ||
941 | .end = IRQ_SPORT0_RX+1, | ||
942 | .flags = IORESOURCE_IRQ, | ||
943 | }, | ||
944 | { | ||
945 | .start = IRQ_SPORT0_ERROR, | ||
946 | .end = IRQ_SPORT0_ERROR, | ||
947 | .flags = IORESOURCE_IRQ, | ||
948 | }, | ||
949 | }; | ||
950 | |||
951 | unsigned short bfin_sport0_peripherals[] = { | ||
952 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
953 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
954 | }; | ||
955 | |||
772 | static struct platform_device bfin_sport0_uart_device = { | 956 | static struct platform_device bfin_sport0_uart_device = { |
773 | .name = "bfin-sport-uart", | 957 | .name = "bfin-sport-uart", |
774 | .id = 0, | 958 | .id = 0, |
959 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
960 | .resource = bfin_sport0_uart_resources, | ||
961 | .dev = { | ||
962 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
963 | }, | ||
964 | }; | ||
965 | #endif | ||
966 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
967 | static struct resource bfin_sport1_uart_resources[] = { | ||
968 | { | ||
969 | .start = SPORT1_TCR1, | ||
970 | .end = SPORT1_MRCS3+4, | ||
971 | .flags = IORESOURCE_MEM, | ||
972 | }, | ||
973 | { | ||
974 | .start = IRQ_SPORT1_RX, | ||
975 | .end = IRQ_SPORT1_RX+1, | ||
976 | .flags = IORESOURCE_IRQ, | ||
977 | }, | ||
978 | { | ||
979 | .start = IRQ_SPORT1_ERROR, | ||
980 | .end = IRQ_SPORT1_ERROR, | ||
981 | .flags = IORESOURCE_IRQ, | ||
982 | }, | ||
983 | }; | ||
984 | |||
985 | unsigned short bfin_sport1_peripherals[] = { | ||
986 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
987 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
775 | }; | 988 | }; |
776 | 989 | ||
777 | static struct platform_device bfin_sport1_uart_device = { | 990 | static struct platform_device bfin_sport1_uart_device = { |
778 | .name = "bfin-sport-uart", | 991 | .name = "bfin-sport-uart", |
779 | .id = 1, | 992 | .id = 1, |
993 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
994 | .resource = bfin_sport1_uart_resources, | ||
995 | .dev = { | ||
996 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
997 | }, | ||
780 | }; | 998 | }; |
781 | #endif | 999 | #endif |
1000 | #endif | ||
782 | 1001 | ||
783 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 1002 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
784 | #include <linux/input.h> | ||
785 | #include <linux/gpio_keys.h> | 1003 | #include <linux/gpio_keys.h> |
786 | 1004 | ||
787 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | 1005 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
@@ -803,7 +1021,6 @@ static struct platform_device bfin_device_gpiokeys = { | |||
803 | #endif | 1021 | #endif |
804 | 1022 | ||
805 | #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) | 1023 | #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) |
806 | #include <linux/input.h> | ||
807 | #include <asm/bfin_rotary.h> | 1024 | #include <asm/bfin_rotary.h> |
808 | 1025 | ||
809 | static struct bfin_rotary_platform_data bfin_rotary_data = { | 1026 | static struct bfin_rotary_platform_data bfin_rotary_data = { |
@@ -872,10 +1089,6 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
872 | &rtc_device, | 1089 | &rtc_device, |
873 | #endif | 1090 | #endif |
874 | 1091 | ||
875 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
876 | &sl811_hcd_device, | ||
877 | #endif | ||
878 | |||
879 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | 1092 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
880 | &bfin_isp1760_device, | 1093 | &bfin_isp1760_device, |
881 | #endif | 1094 | #endif |
@@ -909,8 +1122,17 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
909 | &bf52x_t350mcqb_device, | 1122 | &bf52x_t350mcqb_device, |
910 | #endif | 1123 | #endif |
911 | 1124 | ||
1125 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
1126 | &bfin_lq035q1_device, | ||
1127 | #endif | ||
1128 | |||
912 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 1129 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
913 | &bfin_uart_device, | 1130 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
1131 | &bfin_uart0_device, | ||
1132 | #endif | ||
1133 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1134 | &bfin_uart1_device, | ||
1135 | #endif | ||
914 | #endif | 1136 | #endif |
915 | 1137 | ||
916 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 1138 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -927,9 +1149,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
927 | #endif | 1149 | #endif |
928 | 1150 | ||
929 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 1151 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
1152 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
930 | &bfin_sport0_uart_device, | 1153 | &bfin_sport0_uart_device, |
1154 | #endif | ||
1155 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
931 | &bfin_sport1_uart_device, | 1156 | &bfin_sport1_uart_device, |
932 | #endif | 1157 | #endif |
1158 | #endif | ||
933 | 1159 | ||
934 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 1160 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
935 | &bfin_device_gpiokeys, | 1161 | &bfin_device_gpiokeys, |
@@ -942,6 +1168,14 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
942 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 1168 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
943 | &ezkit_flash_device, | 1169 | &ezkit_flash_device, |
944 | #endif | 1170 | #endif |
1171 | |||
1172 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
1173 | &bfin_i2s, | ||
1174 | #endif | ||
1175 | |||
1176 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
1177 | &bfin_tdm, | ||
1178 | #endif | ||
945 | }; | 1179 | }; |
946 | 1180 | ||
947 | static int __init ezkit_init(void) | 1181 | static int __init ezkit_init(void) |
@@ -956,6 +1190,33 @@ static int __init ezkit_init(void) | |||
956 | 1190 | ||
957 | arch_initcall(ezkit_init); | 1191 | arch_initcall(ezkit_init); |
958 | 1192 | ||
1193 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
1194 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1195 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1196 | &bfin_uart0_device, | ||
1197 | #endif | ||
1198 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1199 | &bfin_uart1_device, | ||
1200 | #endif | ||
1201 | #endif | ||
1202 | |||
1203 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1204 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1205 | &bfin_sport0_uart_device, | ||
1206 | #endif | ||
1207 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1208 | &bfin_sport1_uart_device, | ||
1209 | #endif | ||
1210 | #endif | ||
1211 | }; | ||
1212 | |||
1213 | void __init native_machine_early_platform_add_devices(void) | ||
1214 | { | ||
1215 | printk(KERN_INFO "register early platform devices\n"); | ||
1216 | early_platform_add_devices(ezkit_early_devices, | ||
1217 | ARRAY_SIZE(ezkit_early_devices)); | ||
1218 | } | ||
1219 | |||
959 | void native_machine_restart(char *cmd) | 1220 | void native_machine_restart(char *cmd) |
960 | { | 1221 | { |
961 | /* workaround reboot hang when booting from SPI */ | 1222 | /* workaround reboot hang when booting from SPI */ |