2 * Copyright 2004-2009 Analog Devices Inc.
3 * 2005 National ICT Australia (NICTA)
4 * Aidan Williams <aidan@nicta.com.au>
6 * Licensed under the GPL-2 or later.
9 #include <linux/device.h>
10 #include <linux/platform_device.h>
11 #include <linux/mtd/mtd.h>
12 #include <linux/mtd/partitions.h>
13 #include <linux/mtd/physmap.h>
14 #include <linux/spi/spi.h>
15 #include <linux/spi/flash.h>
16 #include <linux/irq.h>
17 #include <linux/i2c.h>
18 #include <linux/interrupt.h>
19 #include <linux/usb/musb.h>
20 #include <asm/bfin_spi3.h>
25 #include <asm/portmux.h>
26 #include <asm/bfin_sdh.h>
27 #include <linux/input.h>
28 #include <linux/spi/ad7877.h>
31 * Name the Board for the /proc/cpuinfo
33 const char bfin_board_name[] = "ADI BF609-EZKIT";
36 * Driver needs to know address, irq and flag pin.
39 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
40 #include <linux/usb/isp1760.h>
41 static struct resource bfin_isp1760_resources[] = {
44 .end = 0x2C0C0000 + 0xfffff,
45 .flags = IORESOURCE_MEM,
50 .flags = IORESOURCE_IRQ,
54 static struct isp1760_platform_data isp1760_priv = {
59 .dack_polarity_high = 0,
60 .dreq_polarity_high = 0,
63 static struct platform_device bfin_isp1760_device = {
67 .platform_data = &isp1760_priv,
69 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
70 .resource = bfin_isp1760_resources,
74 #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
75 #include <asm/bfin_rotary.h>
77 static struct bfin_rotary_platform_data bfin_rotary_data = {
78 /*.rotary_up_key = KEY_UP,*/
79 /*.rotary_down_key = KEY_DOWN,*/
80 .rotary_rel_code = REL_WHEEL,
81 .rotary_button_key = KEY_ENTER,
82 .debounce = 10, /* 0..17 */
83 .mode = ROT_QUAD_ENC | ROT_DEBE,
86 static struct resource bfin_rotary_resources[] = {
90 .flags = IORESOURCE_IRQ,
94 static struct platform_device bfin_rotary_device = {
95 .name = "bfin-rotary",
97 .num_resources = ARRAY_SIZE(bfin_rotary_resources),
98 .resource = bfin_rotary_resources,
100 .platform_data = &bfin_rotary_data,
105 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
106 #include <linux/stmmac.h>
107 #include <linux/phy.h>
109 static unsigned short pins[] = P_RMII0;
111 static struct stmmac_mdio_bus_data phy_private_data = {
115 static struct stmmac_dma_cfg eth_dma_cfg = {
119 int stmmac_ptp_clk_init(struct platform_device *pdev)
121 bfin_write32(PADS0_EMAC_PTP_CLKSEL, 0);
125 static struct plat_stmmacenet_data eth_private_data = {
130 .mdio_bus_data = &phy_private_data,
131 .dma_cfg = ð_dma_cfg,
132 .force_thresh_dma_mode = 1,
133 .interface = PHY_INTERFACE_MODE_RMII,
134 .init = stmmac_ptp_clk_init,
137 static struct platform_device bfin_eth_device = {
141 .resource = (struct resource[]) {
143 .start = EMAC0_MACCFG,
144 .end = EMAC0_MACCFG + 0x1274,
145 .flags = IORESOURCE_MEM,
149 .start = IRQ_EMAC0_STAT,
150 .end = IRQ_EMAC0_STAT,
151 .flags = IORESOURCE_IRQ,
155 .power.can_wakeup = 1,
156 .platform_data = ð_private_data,
161 #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
162 #include <linux/input/adxl34x.h>
163 static const struct adxl34x_platform_data adxl34x_info = {
167 .tap_threshold = 0x31,
168 .tap_duration = 0x10,
171 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
172 .act_axis_control = 0xFF,
173 .activity_threshold = 5,
174 .inactivity_threshold = 3,
175 .inactivity_time = 4,
176 .free_fall_threshold = 0x7,
177 .free_fall_time = 0x20,
179 .data_range = ADXL_FULL_RES,
182 .ev_code_x = ABS_X, /* EV_REL */
183 .ev_code_y = ABS_Y, /* EV_REL */
184 .ev_code_z = ABS_Z, /* EV_REL */
186 .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
188 /* .ev_code_ff = KEY_F,*/ /* EV_KEY */
189 /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
190 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
191 .fifo_mode = ADXL_FIFO_STREAM,
192 .orientation_enable = ADXL_EN_ORIENTATION_3D,
193 .deadzone_angle = ADXL_DEADZONE_ANGLE_10p8,
194 .divisor_length = ADXL_LP_FILTER_DIVISOR_16,
195 /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
196 .ev_codes_orient_3d = {BTN_Z, BTN_Y, BTN_X, BTN_A, BTN_B, BTN_C},
200 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
201 static struct platform_device rtc_device = {
207 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
208 #ifdef CONFIG_SERIAL_BFIN_UART0
209 static struct resource bfin_uart0_resources[] = {
211 .start = UART0_REVID,
212 .end = UART0_RXDIV+4,
213 .flags = IORESOURCE_MEM,
216 .start = IRQ_UART0_TX,
218 .flags = IORESOURCE_IRQ,
221 .start = IRQ_UART0_RX,
223 .flags = IORESOURCE_IRQ,
226 .start = IRQ_UART0_STAT,
227 .end = IRQ_UART0_STAT,
228 .flags = IORESOURCE_IRQ,
231 .start = CH_UART0_TX,
233 .flags = IORESOURCE_DMA,
236 .start = CH_UART0_RX,
238 .flags = IORESOURCE_DMA,
240 #ifdef CONFIG_BFIN_UART0_CTSRTS
241 { /* CTS pin -- 0 means not supported */
244 .flags = IORESOURCE_IO,
246 { /* RTS pin -- 0 means not supported */
249 .flags = IORESOURCE_IO,
254 static unsigned short bfin_uart0_peripherals[] = {
255 P_UART0_TX, P_UART0_RX,
256 #ifdef CONFIG_BFIN_UART0_CTSRTS
257 P_UART0_RTS, P_UART0_CTS,
262 static struct platform_device bfin_uart0_device = {
265 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
266 .resource = bfin_uart0_resources,
268 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
272 #ifdef CONFIG_SERIAL_BFIN_UART1
273 static struct resource bfin_uart1_resources[] = {
275 .start = UART1_REVID,
276 .end = UART1_RXDIV+4,
277 .flags = IORESOURCE_MEM,
280 .start = IRQ_UART1_TX,
282 .flags = IORESOURCE_IRQ,
285 .start = IRQ_UART1_RX,
287 .flags = IORESOURCE_IRQ,
290 .start = IRQ_UART1_STAT,
291 .end = IRQ_UART1_STAT,
292 .flags = IORESOURCE_IRQ,
295 .start = CH_UART1_TX,
297 .flags = IORESOURCE_DMA,
300 .start = CH_UART1_RX,
302 .flags = IORESOURCE_DMA,
304 #ifdef CONFIG_BFIN_UART1_CTSRTS
305 { /* CTS pin -- 0 means not supported */
308 .flags = IORESOURCE_IO,
310 { /* RTS pin -- 0 means not supported */
313 .flags = IORESOURCE_IO,
318 static unsigned short bfin_uart1_peripherals[] = {
319 P_UART1_TX, P_UART1_RX,
320 #ifdef CONFIG_BFIN_UART1_CTSRTS
321 P_UART1_RTS, P_UART1_CTS,
326 static struct platform_device bfin_uart1_device = {
329 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
330 .resource = bfin_uart1_resources,
332 .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
338 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
339 #ifdef CONFIG_BFIN_SIR0
340 static struct resource bfin_sir0_resources[] = {
344 .flags = IORESOURCE_MEM,
347 .start = IRQ_UART0_TX,
348 .end = IRQ_UART0_TX+1,
349 .flags = IORESOURCE_IRQ,
352 .start = CH_UART0_TX,
353 .end = CH_UART0_TX+1,
354 .flags = IORESOURCE_DMA,
357 static struct platform_device bfin_sir0_device = {
360 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
361 .resource = bfin_sir0_resources,
364 #ifdef CONFIG_BFIN_SIR1
365 static struct resource bfin_sir1_resources[] = {
369 .flags = IORESOURCE_MEM,
372 .start = IRQ_UART1_TX,
373 .end = IRQ_UART1_TX+1,
374 .flags = IORESOURCE_IRQ,
377 .start = CH_UART1_TX,
378 .end = CH_UART1_TX+1,
379 .flags = IORESOURCE_DMA,
382 static struct platform_device bfin_sir1_device = {
385 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
386 .resource = bfin_sir1_resources,
391 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
392 static struct resource musb_resources[] = {
396 .flags = IORESOURCE_MEM,
398 [1] = { /* general IRQ */
399 .start = IRQ_USB_STAT,
401 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
404 [2] = { /* DMA IRQ */
405 .start = IRQ_USB_DMA,
407 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
412 static struct musb_hdrc_config musb_config = {
418 .clkin = 48, /* musb CLKIN in MHZ */
421 static struct musb_hdrc_platform_data musb_plat = {
422 #if defined(CONFIG_USB_MUSB_HDRC) && defined(CONFIG_USB_GADGET_MUSB_HDRC)
424 #elif defined(CONFIG_USB_MUSB_HDRC)
426 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
427 .mode = MUSB_PERIPHERAL,
429 .config = &musb_config,
432 static u64 musb_dmamask = ~(u32)0;
434 static struct platform_device musb_device = {
435 .name = "musb-blackfin",
438 .dma_mask = &musb_dmamask,
439 .coherent_dma_mask = 0xffffffff,
440 .platform_data = &musb_plat,
442 .num_resources = ARRAY_SIZE(musb_resources),
443 .resource = musb_resources,
447 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
448 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
449 static struct resource bfin_sport0_uart_resources[] = {
451 .start = SPORT0_TCR1,
452 .end = SPORT0_MRCS3+4,
453 .flags = IORESOURCE_MEM,
456 .start = IRQ_SPORT0_RX,
457 .end = IRQ_SPORT0_RX+1,
458 .flags = IORESOURCE_IRQ,
461 .start = IRQ_SPORT0_ERROR,
462 .end = IRQ_SPORT0_ERROR,
463 .flags = IORESOURCE_IRQ,
467 static unsigned short bfin_sport0_peripherals[] = {
468 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
469 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
472 static struct platform_device bfin_sport0_uart_device = {
473 .name = "bfin-sport-uart",
475 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
476 .resource = bfin_sport0_uart_resources,
478 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
482 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
483 static struct resource bfin_sport1_uart_resources[] = {
485 .start = SPORT1_TCR1,
486 .end = SPORT1_MRCS3+4,
487 .flags = IORESOURCE_MEM,
490 .start = IRQ_SPORT1_RX,
491 .end = IRQ_SPORT1_RX+1,
492 .flags = IORESOURCE_IRQ,
495 .start = IRQ_SPORT1_ERROR,
496 .end = IRQ_SPORT1_ERROR,
497 .flags = IORESOURCE_IRQ,
501 static unsigned short bfin_sport1_peripherals[] = {
502 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
503 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
506 static struct platform_device bfin_sport1_uart_device = {
507 .name = "bfin-sport-uart",
509 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
510 .resource = bfin_sport1_uart_resources,
512 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
516 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
517 static struct resource bfin_sport2_uart_resources[] = {
519 .start = SPORT2_TCR1,
520 .end = SPORT2_MRCS3+4,
521 .flags = IORESOURCE_MEM,
524 .start = IRQ_SPORT2_RX,
525 .end = IRQ_SPORT2_RX+1,
526 .flags = IORESOURCE_IRQ,
529 .start = IRQ_SPORT2_ERROR,
530 .end = IRQ_SPORT2_ERROR,
531 .flags = IORESOURCE_IRQ,
535 static unsigned short bfin_sport2_peripherals[] = {
536 P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS,
537 P_SPORT2_DRPRI, P_SPORT2_RSCLK, P_SPORT2_DRSEC, P_SPORT2_DTSEC, 0
540 static struct platform_device bfin_sport2_uart_device = {
541 .name = "bfin-sport-uart",
543 .num_resources = ARRAY_SIZE(bfin_sport2_uart_resources),
544 .resource = bfin_sport2_uart_resources,
546 .platform_data = &bfin_sport2_peripherals, /* Passed to driver */
552 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
554 static unsigned short bfin_can0_peripherals[] = {
555 P_CAN0_RX, P_CAN0_TX, 0
558 static struct resource bfin_can0_resources[] = {
562 .flags = IORESOURCE_MEM,
565 .start = IRQ_CAN0_RX,
567 .flags = IORESOURCE_IRQ,
570 .start = IRQ_CAN0_TX,
572 .flags = IORESOURCE_IRQ,
575 .start = IRQ_CAN0_STAT,
576 .end = IRQ_CAN0_STAT,
577 .flags = IORESOURCE_IRQ,
581 static struct platform_device bfin_can0_device = {
584 .num_resources = ARRAY_SIZE(bfin_can0_resources),
585 .resource = bfin_can0_resources,
587 .platform_data = &bfin_can0_peripherals, /* Passed to driver */
593 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
594 static struct mtd_partition partition_info[] = {
596 .name = "bootloader(nand)",
600 .name = "linux kernel(nand)",
601 .offset = MTDPART_OFS_APPEND,
602 .size = 4 * 1024 * 1024,
605 .name = "file system(nand)",
606 .offset = MTDPART_OFS_APPEND,
607 .size = MTDPART_SIZ_FULL,
611 static struct bf5xx_nand_platform bfin_nand_platform = {
612 .data_width = NFC_NWIDTH_8,
613 .partitions = partition_info,
614 .nr_partitions = ARRAY_SIZE(partition_info),
619 static struct resource bfin_nand_resources[] = {
623 .flags = IORESOURCE_MEM,
628 .flags = IORESOURCE_IRQ,
632 static struct platform_device bfin_nand_device = {
635 .num_resources = ARRAY_SIZE(bfin_nand_resources),
636 .resource = bfin_nand_resources,
638 .platform_data = &bfin_nand_platform,
643 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
645 static struct bfin_sd_host bfin_sdh_data = {
647 .irq_int0 = IRQ_RSI_INT0,
648 .pin_req = {P_RSI_DATA0, P_RSI_DATA1, P_RSI_DATA2, P_RSI_DATA3, P_RSI_CMD, P_RSI_CLK, 0},
651 static struct platform_device bfin_sdh_device = {
655 .platform_data = &bfin_sdh_data,
660 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
661 static struct mtd_partition ezkit_partitions[] = {
663 .name = "bootloader(nor)",
667 .name = "linux kernel(nor)",
669 .offset = MTDPART_OFS_APPEND,
671 .name = "file system(nor)",
672 .size = 0x1000000 - 0x80000 - 0x400000,
673 .offset = MTDPART_OFS_APPEND,
677 int bf609_nor_flash_init(struct platform_device *dev)
679 #define CONFIG_SMC_GCTL_VAL 0x00000010
680 const unsigned short pins[] = {
681 P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
682 P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
683 P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
686 peripheral_request_list(pins, "smc0");
688 bfin_write32(SMC_GCTL, CONFIG_SMC_GCTL_VAL);
689 bfin_write32(SMC_B0CTL, 0x01002011);
690 bfin_write32(SMC_B0TIM, 0x08170977);
691 bfin_write32(SMC_B0ETIM, 0x00092231);
695 void bf609_nor_flash_exit(struct platform_device *dev)
697 const unsigned short pins[] = {
698 P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
699 P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
700 P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
703 peripheral_free_list(pins);
705 bfin_write32(SMC_GCTL, 0);
708 static struct physmap_flash_data ezkit_flash_data = {
710 .parts = ezkit_partitions,
711 .init = bf609_nor_flash_init,
712 .exit = bf609_nor_flash_exit,
713 .nr_parts = ARRAY_SIZE(ezkit_partitions),
714 #ifdef CONFIG_ROMKERNEL
715 .probe_type = "map_rom",
719 static struct resource ezkit_flash_resource = {
722 .flags = IORESOURCE_MEM,
725 static struct platform_device ezkit_flash_device = {
726 .name = "physmap-flash",
729 .platform_data = &ezkit_flash_data,
732 .resource = &ezkit_flash_resource,
736 #if defined(CONFIG_MTD_M25P80) \
737 || defined(CONFIG_MTD_M25P80_MODULE)
738 /* SPI flash chip (w25q32) */
739 static struct mtd_partition bfin_spi_flash_partitions[] = {
741 .name = "bootloader(spi)",
744 .mask_flags = MTD_CAP_ROM
746 .name = "linux kernel(spi)",
748 .offset = MTDPART_OFS_APPEND,
750 .name = "file system(spi)",
751 .size = MTDPART_SIZ_FULL,
752 .offset = MTDPART_OFS_APPEND,
756 static struct flash_platform_data bfin_spi_flash_data = {
758 .parts = bfin_spi_flash_partitions,
759 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
763 static struct bfin_spi3_chip spi_flash_chip_info = {
764 .enable_dma = true, /* use dma transfer with this chip*/
768 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
769 static struct bfin_spi3_chip spidev_chip_info = {
774 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
775 static struct platform_device bfin_i2s_pcm = {
776 .name = "bfin-i2s-pcm-audio",
781 #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \
782 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
783 #include <asm/bfin_sport3.h>
784 static struct resource bfin_snd_resources[] = {
786 .start = SPORT0_CTL_A,
788 .flags = IORESOURCE_MEM,
791 .start = SPORT0_CTL_B,
793 .flags = IORESOURCE_MEM,
796 .start = CH_SPORT0_TX,
798 .flags = IORESOURCE_DMA,
801 .start = CH_SPORT0_RX,
803 .flags = IORESOURCE_DMA,
806 .start = IRQ_SPORT0_TX_STAT,
807 .end = IRQ_SPORT0_TX_STAT,
808 .flags = IORESOURCE_IRQ,
811 .start = IRQ_SPORT0_RX_STAT,
812 .end = IRQ_SPORT0_RX_STAT,
813 .flags = IORESOURCE_IRQ,
817 static const unsigned short bfin_snd_pin[] = {
818 P_SPORT0_ACLK, P_SPORT0_AFS, P_SPORT0_AD0, P_SPORT0_BCLK,
819 P_SPORT0_BFS, P_SPORT0_BD0, 0,
822 static struct bfin_snd_platform_data bfin_snd_data = {
823 .pin_req = bfin_snd_pin,
826 static struct platform_device bfin_i2s = {
828 .num_resources = ARRAY_SIZE(bfin_snd_resources),
829 .resource = bfin_snd_resources,
831 .platform_data = &bfin_snd_data,
836 #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
837 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
838 static const char * const ad1836_link[] = {
842 static struct platform_device bfin_ad1836_machine = {
843 .name = "bfin-snd-ad1836",
846 .platform_data = (void *)ad1836_link,
851 #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
852 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
853 static struct platform_device adau1761_device = {
854 .name = "bfin-eval-adau1x61",
858 #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
859 #include <sound/adau17x1.h>
860 static struct adau1761_platform_data adau1761_info = {
861 .lineout_mode = ADAU1761_OUTPUT_MODE_LINE,
862 .headphone_mode = ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS,
866 #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
867 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
868 #include <linux/videodev2.h>
869 #include <media/blackfin/bfin_capture.h>
870 #include <media/blackfin/ppi.h>
872 static const unsigned short ppi_req[] = {
873 P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
874 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
875 P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
876 P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
877 #if !defined(CONFIG_VIDEO_VS6624) && !defined(CONFIG_VIDEO_VS6624_MODULE)
878 P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19,
879 P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23,
881 P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
885 static const struct ppi_info ppi_info = {
886 .type = PPI_TYPE_EPPI3,
887 .dma_ch = CH_EPPI0_CH0,
888 .irq_err = IRQ_EPPI0_STAT,
889 .base = (void __iomem *)EPPI0_STAT,
893 #if defined(CONFIG_VIDEO_VS6624) \
894 || defined(CONFIG_VIDEO_VS6624_MODULE)
895 static struct v4l2_input vs6624_inputs[] = {
899 .type = V4L2_INPUT_TYPE_CAMERA,
900 .std = V4L2_STD_UNKNOWN,
904 static struct bcap_route vs6624_routes[] = {
911 static const unsigned vs6624_ce_pin = GPIO_PE4;
913 static struct bfin_capture_config bfin_capture_data = {
914 .card_name = "BF609",
915 .inputs = vs6624_inputs,
916 .num_inputs = ARRAY_SIZE(vs6624_inputs),
917 .routes = vs6624_routes,
922 .platform_data = (void *)&vs6624_ce_pin,
924 .ppi_info = &ppi_info,
925 .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FS1HI_FS2HI
926 | EPPI_CTL_POLC3 | EPPI_CTL_SYNC2 | EPPI_CTL_NON656),
931 #if defined(CONFIG_VIDEO_ADV7842) \
932 || defined(CONFIG_VIDEO_ADV7842_MODULE)
933 #include <media/adv7842.h>
935 static struct v4l2_input adv7842_inputs[] = {
939 .type = V4L2_INPUT_TYPE_CAMERA,
941 .capabilities = V4L2_IN_CAP_STD,
946 .type = V4L2_INPUT_TYPE_CAMERA,
948 .capabilities = V4L2_IN_CAP_STD,
953 .type = V4L2_INPUT_TYPE_CAMERA,
954 .capabilities = V4L2_IN_CAP_DV_TIMINGS,
959 .type = V4L2_INPUT_TYPE_CAMERA,
960 .capabilities = V4L2_IN_CAP_DV_TIMINGS,
965 .type = V4L2_INPUT_TYPE_CAMERA,
966 .capabilities = V4L2_IN_CAP_DV_TIMINGS,
970 static struct bcap_route adv7842_routes[] = {
974 .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FLDSEL
975 | EPPI_CTL_ACTIVE656),
992 .ppi_control = (EPPI_CTL_SPLTWRD | PACK_EN | DLEN_16
993 | EPPI_CTL_FS1LO_FS2LO | EPPI_CTL_POLC2
994 | EPPI_CTL_SYNC2 | EPPI_CTL_NON656),
998 static struct adv7842_output_format adv7842_opf[] = {
1000 .op_ch_sel = ADV7842_OP_CH_SEL_BRG,
1001 .op_format_sel = ADV7842_OP_FORMAT_SEL_SDR_ITU656_8,
1004 .insert_av_codes = 1,
1007 .op_ch_sel = ADV7842_OP_CH_SEL_RGB,
1008 .op_format_sel = ADV7842_OP_FORMAT_SEL_SDR_ITU656_16,
1014 static struct adv7842_platform_data adv7842_data = {
1016 .num_opf = ARRAY_SIZE(adv7842_opf),
1017 .ain_sel = ADV7842_AIN10_11_12_NC_SYNC_4_1,
1018 .prim_mode = ADV7842_PRIM_MODE_SDP,
1019 .vid_std_select = ADV7842_SDP_VID_STD_CVBS_SD_4x1,
1020 .inp_color_space = ADV7842_INP_COLOR_SPACE_AUTO,
1027 .i2c_repeater = 0x46,
1029 .i2c_infoframe = 0x48,
1035 static struct bfin_capture_config bfin_capture_data = {
1036 .card_name = "BF609",
1037 .inputs = adv7842_inputs,
1038 .num_inputs = ARRAY_SIZE(adv7842_inputs),
1039 .routes = adv7842_routes,
1040 .i2c_adapter_id = 0,
1044 .platform_data = (void *)&adv7842_data,
1046 .ppi_info = &ppi_info,
1047 .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FLDSEL
1048 | EPPI_CTL_ACTIVE656),
1052 static struct platform_device bfin_capture_device = {
1053 .name = "bfin_capture",
1055 .platform_data = &bfin_capture_data,
1060 #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \
1061 || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
1062 #include <linux/videodev2.h>
1063 #include <media/blackfin/bfin_display.h>
1064 #include <media/blackfin/ppi.h>
1066 static const unsigned short ppi_req_disp[] = {
1067 P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
1068 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
1069 P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
1070 P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
1071 P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
1075 static const struct ppi_info ppi_info = {
1076 .type = PPI_TYPE_EPPI3,
1077 .dma_ch = CH_EPPI0_CH0,
1078 .irq_err = IRQ_EPPI0_STAT,
1079 .base = (void __iomem *)EPPI0_STAT,
1080 .pin_req = ppi_req_disp,
1083 #if defined(CONFIG_VIDEO_ADV7511) \
1084 || defined(CONFIG_VIDEO_ADV7511_MODULE)
1085 #include <media/adv7511.h>
1087 static struct v4l2_output adv7511_outputs[] = {
1091 .type = V4L2_INPUT_TYPE_CAMERA,
1092 .capabilities = V4L2_OUT_CAP_DV_TIMINGS,
1096 static struct disp_route adv7511_routes[] = {
1102 static struct adv7511_platform_data adv7511_data = {
1107 static struct bfin_display_config bfin_display_data = {
1108 .card_name = "BF609",
1109 .outputs = adv7511_outputs,
1110 .num_outputs = ARRAY_SIZE(adv7511_outputs),
1111 .routes = adv7511_routes,
1112 .i2c_adapter_id = 0,
1116 .platform_data = (void *)&adv7511_data,
1118 .ppi_info = &ppi_info,
1119 .ppi_control = (EPPI_CTL_SPLTWRD | PACK_EN | DLEN_16
1120 | EPPI_CTL_FS1LO_FS2LO | EPPI_CTL_POLC3
1121 | EPPI_CTL_IFSGEN | EPPI_CTL_SYNC2
1122 | EPPI_CTL_NON656 | EPPI_CTL_DIR),
1126 #if IS_ENABLED(CONFIG_VIDEO_ADV7343)
1127 #include <media/adv7343.h>
1129 static struct v4l2_output adv7343_outputs[] = {
1132 .name = "Composite",
1133 .type = V4L2_OUTPUT_TYPE_ANALOG,
1134 .std = V4L2_STD_ALL,
1135 .capabilities = V4L2_OUT_CAP_STD,
1140 .type = V4L2_OUTPUT_TYPE_ANALOG,
1141 .std = V4L2_STD_ALL,
1142 .capabilities = V4L2_OUT_CAP_STD,
1146 .name = "Component",
1147 .type = V4L2_OUTPUT_TYPE_ANALOG,
1148 .std = V4L2_STD_ALL,
1149 .capabilities = V4L2_OUT_CAP_STD,
1154 static struct disp_route adv7343_routes[] = {
1156 .output = ADV7343_COMPOSITE_ID,
1159 .output = ADV7343_SVIDEO_ID,
1162 .output = ADV7343_COMPONENT_ID,
1166 static struct adv7343_platform_data adv7343_data = {
1168 .sleep_mode = false,
1169 .pll_control = false,
1178 .sd_dac_out1 = false,
1179 .sd_dac_out2 = false,
1183 static struct bfin_display_config bfin_display_data = {
1184 .card_name = "BF609",
1185 .outputs = adv7343_outputs,
1186 .num_outputs = ARRAY_SIZE(adv7343_outputs),
1187 .routes = adv7343_routes,
1188 .i2c_adapter_id = 0,
1192 .platform_data = (void *)&adv7343_data,
1194 .ppi_info = &ppi_info_disp,
1195 .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FS1LO_FS2LO
1196 | EPPI_CTL_POLC3 | EPPI_CTL_BLANKGEN | EPPI_CTL_SYNC2
1197 | EPPI_CTL_NON656 | EPPI_CTL_DIR),
1201 static struct platform_device bfin_display_device = {
1202 .name = "bfin_display",
1204 .platform_data = &bfin_display_data,
1209 #if defined(CONFIG_BFIN_CRC)
1210 #define BFIN_CRC_NAME "bfin-crc"
1212 static struct resource bfin_crc0_resources[] = {
1214 .start = REG_CRC0_CTL,
1215 .end = REG_CRC0_REVID+4,
1216 .flags = IORESOURCE_MEM,
1219 .start = IRQ_CRC0_DCNTEXP,
1220 .end = IRQ_CRC0_DCNTEXP,
1221 .flags = IORESOURCE_IRQ,
1224 .start = CH_MEM_STREAM0_SRC_CRC0,
1225 .end = CH_MEM_STREAM0_SRC_CRC0,
1226 .flags = IORESOURCE_DMA,
1229 .start = CH_MEM_STREAM0_DEST_CRC0,
1230 .end = CH_MEM_STREAM0_DEST_CRC0,
1231 .flags = IORESOURCE_DMA,
1235 static struct platform_device bfin_crc0_device = {
1236 .name = BFIN_CRC_NAME,
1238 .num_resources = ARRAY_SIZE(bfin_crc0_resources),
1239 .resource = bfin_crc0_resources,
1242 static struct resource bfin_crc1_resources[] = {
1244 .start = REG_CRC1_CTL,
1245 .end = REG_CRC1_REVID+4,
1246 .flags = IORESOURCE_MEM,
1249 .start = IRQ_CRC1_DCNTEXP,
1250 .end = IRQ_CRC1_DCNTEXP,
1251 .flags = IORESOURCE_IRQ,
1254 .start = CH_MEM_STREAM1_SRC_CRC1,
1255 .end = CH_MEM_STREAM1_SRC_CRC1,
1256 .flags = IORESOURCE_DMA,
1259 .start = CH_MEM_STREAM1_DEST_CRC1,
1260 .end = CH_MEM_STREAM1_DEST_CRC1,
1261 .flags = IORESOURCE_DMA,
1265 static struct platform_device bfin_crc1_device = {
1266 .name = BFIN_CRC_NAME,
1268 .num_resources = ARRAY_SIZE(bfin_crc1_resources),
1269 .resource = bfin_crc1_resources,
1273 #if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
1274 #define BFIN_CRYPTO_CRC_NAME "bfin-hmac-crc"
1275 #define BFIN_CRYPTO_CRC_POLY_DATA 0x5c5c5c5c
1277 static struct resource bfin_crypto_crc_resources[] = {
1279 .start = REG_CRC0_CTL,
1280 .end = REG_CRC0_REVID+4,
1281 .flags = IORESOURCE_MEM,
1284 .start = IRQ_CRC0_DCNTEXP,
1285 .end = IRQ_CRC0_DCNTEXP,
1286 .flags = IORESOURCE_IRQ,
1289 .start = CH_MEM_STREAM0_SRC_CRC0,
1290 .end = CH_MEM_STREAM0_SRC_CRC0,
1291 .flags = IORESOURCE_DMA,
1295 static struct platform_device bfin_crypto_crc_device = {
1296 .name = BFIN_CRYPTO_CRC_NAME,
1298 .num_resources = ARRAY_SIZE(bfin_crypto_crc_resources),
1299 .resource = bfin_crypto_crc_resources,
1301 .platform_data = (void *)BFIN_CRYPTO_CRC_POLY_DATA,
1306 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
1307 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
1309 .vref_delay_usecs = 50, /* internal, no capacitor */
1310 .x_plate_ohms = 419,
1311 .y_plate_ohms = 486,
1312 .pressure_max = 1000,
1314 .stopacq_polarity = 1,
1315 .first_conversion_delay = 3,
1316 .acquisition_time = 1,
1318 .pen_down_acc_interval = 1,
1322 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1323 #include <linux/input.h>
1324 #include <linux/gpio_keys.h>
1326 static struct gpio_keys_button bfin_gpio_keys_table[] = {
1327 {BTN_0, GPIO_PB10, 1, "gpio-keys: BTN0"},
1328 {BTN_1, GPIO_PE1, 1, "gpio-keys: BTN1"},
1331 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
1332 .buttons = bfin_gpio_keys_table,
1333 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
1336 static struct platform_device bfin_device_gpiokeys = {
1337 .name = "gpio-keys",
1339 .platform_data = &bfin_gpio_keys_data,
1344 static struct spi_board_info bfin_spi_board_info[] __initdata = {
1345 #if defined(CONFIG_MTD_M25P80) \
1346 || defined(CONFIG_MTD_M25P80_MODULE)
1348 /* the modalias must be the same as spi device driver name */
1349 .modalias = "m25p80", /* Name of spi_driver for this device */
1350 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
1351 .bus_num = 0, /* Framework bus number */
1352 .chip_select = 1, /* SPI_SSEL1*/
1353 .platform_data = &bfin_spi_flash_data,
1354 .controller_data = &spi_flash_chip_info,
1358 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
1360 .modalias = "ad7877",
1361 .platform_data = &bfin_ad7877_ts_info,
1363 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
1368 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
1370 .modalias = "spidev",
1371 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1374 .controller_data = &spidev_chip_info,
1377 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1379 .modalias = "adxl34x",
1380 .platform_data = &adxl34x_info,
1382 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
1389 #if IS_ENABLED(CONFIG_SPI_BFIN_V3)
1391 static struct resource bfin_spi0_resource[] = {
1393 .start = SPI0_REGBASE,
1394 .end = SPI0_REGBASE + 0xFF,
1395 .flags = IORESOURCE_MEM,
1398 .start = CH_SPI0_TX,
1400 .flags = IORESOURCE_DMA,
1403 .start = CH_SPI0_RX,
1405 .flags = IORESOURCE_DMA,
1410 static struct resource bfin_spi1_resource[] = {
1412 .start = SPI1_REGBASE,
1413 .end = SPI1_REGBASE + 0xFF,
1414 .flags = IORESOURCE_MEM,
1417 .start = CH_SPI1_TX,
1419 .flags = IORESOURCE_DMA,
1422 .start = CH_SPI1_RX,
1424 .flags = IORESOURCE_DMA,
1429 /* SPI controller data */
1430 static struct bfin_spi3_master bf60x_spi_master_info0 = {
1431 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
1432 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
1435 static struct platform_device bf60x_spi_master0 = {
1436 .name = "bfin-spi3",
1437 .id = 0, /* Bus number */
1438 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
1439 .resource = bfin_spi0_resource,
1441 .platform_data = &bf60x_spi_master_info0, /* Passed to driver */
1445 static struct bfin_spi3_master bf60x_spi_master_info1 = {
1446 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
1447 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
1450 static struct platform_device bf60x_spi_master1 = {
1451 .name = "bfin-spi3",
1452 .id = 1, /* Bus number */
1453 .num_resources = ARRAY_SIZE(bfin_spi1_resource),
1454 .resource = bfin_spi1_resource,
1456 .platform_data = &bf60x_spi_master_info1, /* Passed to driver */
1459 #endif /* spi master and devices */
1461 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1462 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
1464 static struct resource bfin_twi0_resource[] = {
1466 .start = TWI0_CLKDIV,
1467 .end = TWI0_CLKDIV + 0xFF,
1468 .flags = IORESOURCE_MEM,
1473 .flags = IORESOURCE_IRQ,
1477 static struct platform_device i2c_bfin_twi0_device = {
1478 .name = "i2c-bfin-twi",
1480 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
1481 .resource = bfin_twi0_resource,
1483 .platform_data = &bfin_twi0_pins,
1487 static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
1489 static struct resource bfin_twi1_resource[] = {
1491 .start = TWI1_CLKDIV,
1492 .end = TWI1_CLKDIV + 0xFF,
1493 .flags = IORESOURCE_MEM,
1498 .flags = IORESOURCE_IRQ,
1502 static struct platform_device i2c_bfin_twi1_device = {
1503 .name = "i2c-bfin-twi",
1505 .num_resources = ARRAY_SIZE(bfin_twi1_resource),
1506 .resource = bfin_twi1_resource,
1508 .platform_data = &bfin_twi1_pins,
1513 static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
1514 #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
1516 I2C_BOARD_INFO("adxl34x", 0x53),
1518 .platform_data = (void *)&adxl34x_info,
1521 #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
1523 I2C_BOARD_INFO("adau1761", 0x38),
1524 .platform_data = (void *)&adau1761_info
1527 #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE)
1529 I2C_BOARD_INFO("ssm2602", 0x1b),
1534 static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
1537 static const unsigned int cclk_vlev_datasheet[] =
1540 * Internal VLEV BF54XSBBC1533
1541 ****temporarily using these values until data sheet is updated
1543 VRPAIR(VLEV_085, 150000000),
1544 VRPAIR(VLEV_090, 250000000),
1545 VRPAIR(VLEV_110, 276000000),
1546 VRPAIR(VLEV_115, 301000000),
1547 VRPAIR(VLEV_120, 525000000),
1548 VRPAIR(VLEV_125, 550000000),
1549 VRPAIR(VLEV_130, 600000000),
1552 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
1553 .tuple_tab = cclk_vlev_datasheet,
1554 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
1555 .vr_settling_time = 25 /* us */,
1558 static struct platform_device bfin_dpmc = {
1559 .name = "bfin dpmc",
1561 .platform_data = &bfin_dmpc_vreg_data,
1565 static struct platform_device *ezkit_devices[] __initdata = {
1569 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
1573 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1574 #ifdef CONFIG_SERIAL_BFIN_UART0
1577 #ifdef CONFIG_SERIAL_BFIN_UART1
1582 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1583 #ifdef CONFIG_BFIN_SIR0
1586 #ifdef CONFIG_BFIN_SIR1
1591 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
1595 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
1599 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
1600 &bfin_isp1760_device,
1603 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1604 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1605 &bfin_sport0_uart_device,
1607 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1608 &bfin_sport1_uart_device,
1610 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1611 &bfin_sport2_uart_device,
1615 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
1619 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
1623 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
1627 #if IS_ENABLED(CONFIG_SPI_BFIN_V3)
1632 #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
1633 &bfin_rotary_device,
1636 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1637 &i2c_bfin_twi0_device,
1638 #if !defined(CONFIG_BF542)
1639 &i2c_bfin_twi1_device,
1643 #if defined(CONFIG_BFIN_CRC)
1647 #if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
1648 &bfin_crypto_crc_device,
1651 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1652 &bfin_device_gpiokeys,
1655 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1656 &ezkit_flash_device,
1658 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1661 #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \
1662 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
1665 #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
1666 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1667 &bfin_ad1836_machine,
1669 #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
1670 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
1673 #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
1674 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1675 &bfin_capture_device,
1677 #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \
1678 || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
1679 &bfin_display_device,
1684 static int __init ezkit_init(void)
1686 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1688 i2c_register_board_info(0, bfin_i2c_board_info0,
1689 ARRAY_SIZE(bfin_i2c_board_info0));
1690 i2c_register_board_info(1, bfin_i2c_board_info1,
1691 ARRAY_SIZE(bfin_i2c_board_info1));
1693 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
1694 if (!peripheral_request_list(pins, "emac0"))
1695 printk(KERN_ERR "%s(): request emac pins failed\n", __func__);
1698 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
1700 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1705 arch_initcall(ezkit_init);
1707 static struct platform_device *ezkit_early_devices[] __initdata = {
1708 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
1709 #ifdef CONFIG_SERIAL_BFIN_UART0
1712 #ifdef CONFIG_SERIAL_BFIN_UART1
1717 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
1718 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1719 &bfin_sport0_uart_device,
1721 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1722 &bfin_sport1_uart_device,
1724 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1725 &bfin_sport2_uart_device,
1730 void __init native_machine_early_platform_add_devices(void)
1732 printk(KERN_INFO "register early platform devices\n");
1733 early_platform_add_devices(ezkit_early_devices,
1734 ARRAY_SIZE(ezkit_early_devices));