aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/ezkit.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/blackfin/mach-bf527/boards/ezkit.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c145
1 files changed, 127 insertions, 18 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 87b41e994ba3..e67ac7720668 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -26,6 +26,7 @@
26#include <asm/portmux.h> 26#include <asm/portmux.h>
27#include <asm/dpmc.h> 27#include <asm/dpmc.h>
28#include <linux/spi/ad7877.h> 28#include <linux/spi/ad7877.h>
29#include <asm/bfin_sport.h>
29 30
30/* 31/*
31 * Name the Board for the /proc/cpuinfo 32 * Name the Board for the /proc/cpuinfo
@@ -86,11 +87,13 @@ static struct resource musb_resources[] = {
86 .start = IRQ_USB_INT0, 87 .start = IRQ_USB_INT0,
87 .end = IRQ_USB_INT0, 88 .end = IRQ_USB_INT0,
88 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
90 .name = "mc"
89 }, 91 },
90 [2] = { /* DMA IRQ */ 92 [2] = { /* DMA IRQ */
91 .start = IRQ_USB_DMA, 93 .start = IRQ_USB_DMA,
92 .end = IRQ_USB_DMA, 94 .end = IRQ_USB_DMA,
93 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 95 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
96 .name = "dma"
94 }, 97 },
95}; 98};
96 99
@@ -106,6 +109,7 @@ static struct musb_hdrc_config musb_config = {
106 * if it is the case. 109 * if it is the case.
107 */ 110 */
108 .gpio_vrsel_active = 1, 111 .gpio_vrsel_active = 1,
112 .clkin = 24, /* musb CLKIN in MHZ */
109}; 113};
110 114
111static struct musb_hdrc_platform_data musb_plat = { 115static struct musb_hdrc_platform_data musb_plat = {
@@ -122,7 +126,7 @@ static struct musb_hdrc_platform_data musb_plat = {
122static u64 musb_dmamask = ~(u32)0; 126static u64 musb_dmamask = ~(u32)0;
123 127
124static struct platform_device musb_device = { 128static struct platform_device musb_device = {
125 .name = "musb_hdrc", 129 .name = "musb-blackfin",
126 .id = 0, 130 .id = 0,
127 .dev = { 131 .dev = {
128 .dma_mask = &musb_dmamask, 132 .dma_mask = &musb_dmamask,
@@ -222,8 +226,12 @@ static struct platform_device ezkit_flash_device = {
222#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 226#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
223static struct mtd_partition partition_info[] = { 227static struct mtd_partition partition_info[] = {
224 { 228 {
225 .name = "linux kernel(nand)", 229 .name = "bootloader(nand)",
226 .offset = 0, 230 .offset = 0,
231 .size = 0x40000,
232 }, {
233 .name = "linux kernel(nand)",
234 .offset = MTDPART_OFS_APPEND,
227 .size = 4 * 1024 * 1024, 235 .size = 4 * 1024 * 1024,
228 }, 236 },
229 { 237 {
@@ -362,13 +370,35 @@ static struct platform_device dm9000_device = {
362#endif 370#endif
363 371
364#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 372#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
373#include <linux/bfin_mac.h>
374static const unsigned short bfin_mac_peripherals[] = P_RMII0;
375
376static struct bfin_phydev_platform_data bfin_phydev_data[] = {
377 {
378 .addr = 1,
379 .irq = IRQ_MAC_PHYINT,
380 },
381};
382
383static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
384 .phydev_number = 1,
385 .phydev_data = bfin_phydev_data,
386 .phy_mode = PHY_INTERFACE_MODE_RMII,
387 .mac_peripherals = bfin_mac_peripherals,
388};
389
365static struct platform_device bfin_mii_bus = { 390static struct platform_device bfin_mii_bus = {
366 .name = "bfin_mii_bus", 391 .name = "bfin_mii_bus",
392 .dev = {
393 .platform_data = &bfin_mii_bus_data,
394 }
367}; 395};
368 396
369static struct platform_device bfin_mac_device = { 397static struct platform_device bfin_mac_device = {
370 .name = "bfin_mac", 398 .name = "bfin_mac",
371 .dev.platform_data = &bfin_mii_bus, 399 .dev = {
400 .platform_data = &bfin_mii_bus,
401 }
372}; 402};
373#endif 403#endif
374 404
@@ -431,8 +461,8 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
431}; 461};
432#endif 462#endif
433 463
434#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 464#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
435 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 465 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
436static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 466static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
437 .enable_dma = 0, 467 .enable_dma = 0,
438 .bits_per_word = 16, 468 .bits_per_word = 16,
@@ -497,11 +527,69 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
497}; 527};
498#endif 528#endif
499 529
530#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
531 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
532
533static const u16 bfin_snd_pin[][7] = {
534 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
535 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0, 0},
536 {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
537 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_TFS, 0},
538};
539
540static struct bfin_snd_platform_data bfin_snd_data[] = {
541 {
542 .pin_req = &bfin_snd_pin[0][0],
543 },
544 {
545 .pin_req = &bfin_snd_pin[1][0],
546 },
547};
548
549#define BFIN_SND_RES(x) \
550 [x] = { \
551 { \
552 .start = SPORT##x##_TCR1, \
553 .end = SPORT##x##_TCR1, \
554 .flags = IORESOURCE_MEM \
555 }, \
556 { \
557 .start = CH_SPORT##x##_RX, \
558 .end = CH_SPORT##x##_RX, \
559 .flags = IORESOURCE_DMA, \
560 }, \
561 { \
562 .start = CH_SPORT##x##_TX, \
563 .end = CH_SPORT##x##_TX, \
564 .flags = IORESOURCE_DMA, \
565 }, \
566 { \
567 .start = IRQ_SPORT##x##_ERROR, \
568 .end = IRQ_SPORT##x##_ERROR, \
569 .flags = IORESOURCE_IRQ, \
570 } \
571 }
572
573static struct resource bfin_snd_resources[][4] = {
574 BFIN_SND_RES(0),
575 BFIN_SND_RES(1),
576};
577
578static struct platform_device bfin_pcm = {
579 .name = "bfin-pcm-audio",
580 .id = -1,
581};
582#endif
583
500#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 584#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
501static struct platform_device bfin_i2s = { 585static struct platform_device bfin_i2s = {
502 .name = "bfin-i2s", 586 .name = "bfin-i2s",
503 .id = CONFIG_SND_BF5XX_SPORT_NUM, 587 .id = CONFIG_SND_BF5XX_SPORT_NUM,
504 /* TODO: add platform data here */ 588 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
589 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
590 .dev = {
591 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
592 },
505}; 593};
506#endif 594#endif
507 595
@@ -509,7 +597,11 @@ static struct platform_device bfin_i2s = {
509static struct platform_device bfin_tdm = { 597static struct platform_device bfin_tdm = {
510 .name = "bfin-tdm", 598 .name = "bfin-tdm",
511 .id = CONFIG_SND_BF5XX_SPORT_NUM, 599 .id = CONFIG_SND_BF5XX_SPORT_NUM,
512 /* TODO: add platform data here */ 600 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
601 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
602 .dev = {
603 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
604 },
513}; 605};
514#endif 606#endif
515 607
@@ -547,14 +639,16 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
547 }, 639 },
548#endif 640#endif
549 641
550#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 642#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
551 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 643 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
552 { 644 {
553 .modalias = "ad1836", 645 .modalias = "ad183x",
554 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 646 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
555 .bus_num = 0, 647 .bus_num = 0,
556 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 648 .chip_select = 4,
649 .platform_data = "ad1836",
557 .controller_data = &ad1836_spi_chip_info, 650 .controller_data = &ad1836_spi_chip_info,
651 .mode = SPI_MODE_3,
558 }, 652 },
559#endif 653#endif
560#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 654#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
@@ -680,7 +774,7 @@ static struct resource bfin_uart0_resources[] = {
680 }, 774 },
681}; 775};
682 776
683unsigned short bfin_uart0_peripherals[] = { 777static unsigned short bfin_uart0_peripherals[] = {
684 P_UART0_TX, P_UART0_RX, 0 778 P_UART0_TX, P_UART0_RX, 0
685}; 779};
686 780
@@ -735,7 +829,7 @@ static struct resource bfin_uart1_resources[] = {
735#endif 829#endif
736}; 830};
737 831
738unsigned short bfin_uart1_peripherals[] = { 832static unsigned short bfin_uart1_peripherals[] = {
739 P_UART1_TX, P_UART1_RX, 0 833 P_UART1_TX, P_UART1_RX, 0
740}; 834};
741 835
@@ -883,7 +977,7 @@ static struct adp5520_keys_platform_data adp5520_keys_data = {
883}; 977};
884 978
885 /* 979 /*
886 * ADP5520/5501 Multifuction Device Init Data 980 * ADP5520/5501 Multifunction Device Init Data
887 */ 981 */
888 982
889static struct adp5520_platform_data adp5520_pdev_data = { 983static struct adp5520_platform_data adp5520_pdev_data = {
@@ -929,6 +1023,16 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
929 I2C_BOARD_INFO("ssm2602", 0x1b), 1023 I2C_BOARD_INFO("ssm2602", 0x1b),
930 }, 1024 },
931#endif 1025#endif
1026#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
1027 {
1028 I2C_BOARD_INFO("ad5252", 0x2f),
1029 },
1030#endif
1031#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE)
1032 {
1033 I2C_BOARD_INFO("adau1373", 0x1A),
1034 },
1035#endif
932}; 1036};
933 1037
934#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1038#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -951,9 +1055,9 @@ static struct resource bfin_sport0_uart_resources[] = {
951 }, 1055 },
952}; 1056};
953 1057
954unsigned short bfin_sport0_peripherals[] = { 1058static unsigned short bfin_sport0_peripherals[] = {
955 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 1059 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
956 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 1060 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
957}; 1061};
958 1062
959static struct platform_device bfin_sport0_uart_device = { 1063static struct platform_device bfin_sport0_uart_device = {
@@ -985,9 +1089,9 @@ static struct resource bfin_sport1_uart_resources[] = {
985 }, 1089 },
986}; 1090};
987 1091
988unsigned short bfin_sport1_peripherals[] = { 1092static unsigned short bfin_sport1_peripherals[] = {
989 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, 1093 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
990 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 1094 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
991}; 1095};
992 1096
993static struct platform_device bfin_sport1_uart_device = { 1097static struct platform_device bfin_sport1_uart_device = {
@@ -1172,6 +1276,11 @@ static struct platform_device *stamp_devices[] __initdata = {
1172 &ezkit_flash_device, 1276 &ezkit_flash_device,
1173#endif 1277#endif
1174 1278
1279#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
1280 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1281 &bfin_pcm,
1282#endif
1283
1175#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1284#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1176 &bfin_i2s, 1285 &bfin_i2s,
1177#endif 1286#endif