2 * File: arch/blackfin/mach-bf527/boards/ezkit.c
3 * Based on: arch/blackfin/mach-bf537/boards/stamp.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2008 Analog Devices Inc.
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <linux/device.h>
32 #include <linux/platform_device.h>
33 #include <linux/mtd/mtd.h>
34 #include <linux/mtd/partitions.h>
35 #include <linux/mtd/physmap.h>
36 #include <linux/spi/spi.h>
37 #include <linux/spi/flash.h>
38 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
39 #include <linux/usb/isp1362.h>
41 #include <linux/ata_platform.h>
42 #include <linux/irq.h>
43 #include <linux/interrupt.h>
44 #include <linux/usb/sl811.h>
45 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
46 #include <linux/usb/musb.h>
50 #include <asm/bfin5xx_spi.h>
51 #include <asm/reboot.h>
53 #include <asm/portmux.h>
55 #include <linux/spi/ad7877.h>
58 * Name the Board for the /proc/cpuinfo
60 const char bfin_board_name[] = "ADDS-BF527-EZKIT";
63 * Driver needs to know address, irq and flag pin.
66 #define ISP1761_BASE 0x203C0000
67 #define ISP1761_IRQ IRQ_PF7
69 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
70 static struct resource bfin_isp1761_resources[] = {
72 .name = "isp1761-regs",
73 .start = ISP1761_BASE + 0x00000000,
74 .end = ISP1761_BASE + 0x000fffff,
75 .flags = IORESOURCE_MEM,
80 .flags = IORESOURCE_IRQ,
84 static struct platform_device bfin_isp1761_device = {
87 .num_resources = ARRAY_SIZE(bfin_isp1761_resources),
88 .resource = bfin_isp1761_resources,
91 static struct platform_device *bfin_isp1761_devices[] = {
95 int __init bfin_isp1761_init(void)
97 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
99 printk(KERN_INFO "%s(): registering device resources\n", __func__);
100 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
102 return platform_add_devices(bfin_isp1761_devices, num_devices);
105 void __exit bfin_isp1761_exit(void)
107 platform_device_unregister(&bfin_isp1761_device);
110 arch_initcall(bfin_isp1761_init);
113 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
114 static struct resource musb_resources[] = {
118 .flags = IORESOURCE_MEM,
120 [1] = { /* general IRQ */
121 .start = IRQ_USB_INT0,
123 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
125 [2] = { /* DMA IRQ */
126 .start = IRQ_USB_DMA,
128 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
132 static struct musb_hdrc_platform_data musb_plat = {
133 #if defined(CONFIG_USB_MUSB_OTG)
135 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
137 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
138 .mode = MUSB_PERIPHERAL,
143 static u64 musb_dmamask = ~(u32)0;
145 static struct platform_device musb_device = {
149 .dma_mask = &musb_dmamask,
150 .coherent_dma_mask = 0xffffffff,
151 .platform_data = &musb_plat,
153 .num_resources = ARRAY_SIZE(musb_resources),
154 .resource = musb_resources,
158 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
160 static struct resource bf52x_t350mcqb_resources[] = {
162 .start = IRQ_PPI_ERROR,
163 .end = IRQ_PPI_ERROR,
164 .flags = IORESOURCE_IRQ,
168 static struct platform_device bf52x_t350mcqb_device = {
169 .name = "bfin-t350mcqb",
171 .num_resources = ARRAY_SIZE(bf52x_t350mcqb_resources),
172 .resource = bf52x_t350mcqb_resources,
176 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
177 static struct mtd_partition ezkit_partitions[] = {
179 .name = "Bootloader",
185 .offset = MTDPART_OFS_APPEND,
188 .size = MTDPART_SIZ_FULL,
189 .offset = MTDPART_OFS_APPEND,
193 static struct physmap_flash_data ezkit_flash_data = {
195 .parts = ezkit_partitions,
196 .nr_parts = ARRAY_SIZE(ezkit_partitions),
199 static struct resource ezkit_flash_resource = {
202 .flags = IORESOURCE_MEM,
205 static struct platform_device ezkit_flash_device = {
206 .name = "physmap-flash",
209 .platform_data = &ezkit_flash_data,
212 .resource = &ezkit_flash_resource,
216 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
217 static struct mtd_partition partition_info[] = {
219 .name = "Linux Kernel",
224 .name = "File System",
225 .offset = MTDPART_OFS_APPEND,
226 .size = MTDPART_SIZ_FULL,
230 static struct bf5xx_nand_platform bf5xx_nand_platform = {
231 .page_size = NFC_PG_SIZE_256,
232 .data_width = NFC_NWIDTH_8,
233 .partitions = partition_info,
234 .nr_partitions = ARRAY_SIZE(partition_info),
239 static struct resource bf5xx_nand_resources[] = {
242 .end = NFC_DATA_RD + 2,
243 .flags = IORESOURCE_MEM,
248 .flags = IORESOURCE_IRQ,
252 static struct platform_device bf5xx_nand_device = {
253 .name = "bf5xx-nand",
255 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
256 .resource = bf5xx_nand_resources,
258 .platform_data = &bf5xx_nand_platform,
263 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
264 static struct resource bfin_pcmcia_cf_resources[] = {
266 .start = 0x20310000, /* IO PORT */
268 .flags = IORESOURCE_MEM,
270 .start = 0x20311000, /* Attribute Memory */
272 .flags = IORESOURCE_MEM,
276 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
278 .start = 6, /* Card Detect PF6 */
280 .flags = IORESOURCE_IRQ,
284 static struct platform_device bfin_pcmcia_cf_device = {
285 .name = "bfin_cf_pcmcia",
287 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
288 .resource = bfin_pcmcia_cf_resources,
292 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
293 static struct platform_device rtc_device = {
299 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
300 static struct resource smc91x_resources[] = {
302 .name = "smc91x-regs",
304 .end = 0x20300300 + 16,
305 .flags = IORESOURCE_MEM,
310 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
313 static struct platform_device smc91x_device = {
316 .num_resources = ARRAY_SIZE(smc91x_resources),
317 .resource = smc91x_resources,
321 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
322 static struct resource dm9000_resources[] = {
325 .end = 0x203FB800 + 8,
326 .flags = IORESOURCE_MEM,
331 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
335 static struct platform_device dm9000_device = {
338 .num_resources = ARRAY_SIZE(dm9000_resources),
339 .resource = dm9000_resources,
343 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
344 static struct resource sl811_hcd_resources[] = {
348 .flags = IORESOURCE_MEM,
352 .flags = IORESOURCE_MEM,
354 .start = CONFIG_USB_SL811_BFIN_IRQ,
355 .end = CONFIG_USB_SL811_BFIN_IRQ,
356 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
360 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
361 void sl811_port_power(struct device *dev, int is_on)
363 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
364 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
368 static struct sl811_platform_data sl811_priv = {
370 .power = 250, /* == 500mA */
371 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
372 .port_power = &sl811_port_power,
376 static struct platform_device sl811_hcd_device = {
380 .platform_data = &sl811_priv,
382 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
383 .resource = sl811_hcd_resources,
387 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
388 static struct resource isp1362_hcd_resources[] = {
392 .flags = IORESOURCE_MEM,
396 .flags = IORESOURCE_MEM,
398 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
399 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
400 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
404 static struct isp1362_platform_data isp1362_priv = {
409 .int_edge_triggered = 0,
410 .remote_wakeup_connected = 0,
411 .no_power_switching = 1,
412 .power_switching_mode = 0,
415 static struct platform_device isp1362_hcd_device = {
416 .name = "isp1362-hcd",
419 .platform_data = &isp1362_priv,
421 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
422 .resource = isp1362_hcd_resources,
426 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
427 static struct platform_device bfin_mac_device = {
432 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
433 static struct resource net2272_bfin_resources[] = {
436 .end = 0x20300000 + 0x100,
437 .flags = IORESOURCE_MEM,
441 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
445 static struct platform_device net2272_bfin_device = {
448 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
449 .resource = net2272_bfin_resources,
453 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
454 /* all SPI peripherals info goes here */
456 #if defined(CONFIG_MTD_M25P80) \
457 || defined(CONFIG_MTD_M25P80_MODULE)
458 static struct mtd_partition bfin_spi_flash_partitions[] = {
460 .name = "bootloader",
463 .mask_flags = MTD_CAP_ROM
467 .offset = MTDPART_OFS_APPEND,
469 .name = "file system",
470 .size = MTDPART_SIZ_FULL,
471 .offset = MTDPART_OFS_APPEND,
475 static struct flash_platform_data bfin_spi_flash_data = {
477 .parts = bfin_spi_flash_partitions,
478 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
482 /* SPI flash chip (m25p64) */
483 static struct bfin5xx_spi_chip spi_flash_chip_info = {
484 .enable_dma = 0, /* use dma transfer with this chip*/
489 #if defined(CONFIG_SPI_ADC_BF533) \
490 || defined(CONFIG_SPI_ADC_BF533_MODULE)
492 static struct bfin5xx_spi_chip spi_adc_chip_info = {
493 .enable_dma = 1, /* use dma transfer with this chip*/
498 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
499 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
500 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
506 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
507 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
513 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
514 static struct bfin5xx_spi_chip spi_mmc_chip_info = {
520 #if defined(CONFIG_PBX)
521 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
522 .ctl_reg = 0x4, /* send zero */
525 .cs_change_per_word = 1,
529 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
530 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
535 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
537 .vref_delay_usecs = 50, /* internal, no capacitor */
540 .pressure_max = 1000,
542 .stopacq_polarity = 1,
543 .first_conversion_delay = 3,
544 .acquisition_time = 1,
546 .pen_down_acc_interval = 1,
550 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
551 && defined(CONFIG_SND_SOC_WM8731_SPI)
552 static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
558 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
559 static struct bfin5xx_spi_chip spidev_chip_info = {
565 static struct spi_board_info bfin_spi_board_info[] __initdata = {
566 #if defined(CONFIG_MTD_M25P80) \
567 || defined(CONFIG_MTD_M25P80_MODULE)
569 /* the modalias must be the same as spi device driver name */
570 .modalias = "m25p80", /* Name of spi_driver for this device */
571 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
572 .bus_num = 0, /* Framework bus number */
573 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
574 .platform_data = &bfin_spi_flash_data,
575 .controller_data = &spi_flash_chip_info,
580 #if defined(CONFIG_SPI_ADC_BF533) \
581 || defined(CONFIG_SPI_ADC_BF533_MODULE)
583 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
584 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
585 .bus_num = 0, /* Framework bus number */
586 .chip_select = 1, /* Framework chip select. */
587 .platform_data = NULL, /* No spi_driver specific config */
588 .controller_data = &spi_adc_chip_info,
592 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
593 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
595 .modalias = "ad1836-spi",
596 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
598 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
599 .controller_data = &ad1836_spi_chip_info,
602 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
604 .modalias = "ad9960-spi",
605 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
608 .controller_data = &ad9960_spi_chip_info,
611 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
613 .modalias = "spi_mmc_dummy",
614 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
617 .platform_data = NULL,
618 .controller_data = &spi_mmc_chip_info,
622 .modalias = "spi_mmc",
623 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
625 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
626 .platform_data = NULL,
627 .controller_data = &spi_mmc_chip_info,
631 #if defined(CONFIG_PBX)
633 .modalias = "fxs-spi",
634 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
636 .chip_select = 8 - CONFIG_J11_JUMPER,
637 .controller_data = &spi_si3xxx_chip_info,
641 .modalias = "fxo-spi",
642 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
644 .chip_select = 8 - CONFIG_J19_JUMPER,
645 .controller_data = &spi_si3xxx_chip_info,
649 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
651 .modalias = "ad7877",
652 .platform_data = &bfin_ad7877_ts_info,
654 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
657 .controller_data = &spi_ad7877_chip_info,
660 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
661 && defined(CONFIG_SND_SOC_WM8731_SPI)
663 .modalias = "wm8731",
664 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
667 .controller_data = &spi_wm8731_chip_info,
671 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
673 .modalias = "spidev",
674 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
677 .controller_data = &spidev_chip_info,
682 /* SPI controller data */
683 static struct bfin5xx_spi_master bfin_spi0_info = {
685 .enable_dma = 1, /* master has the ability to do dma transfer */
686 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
690 static struct resource bfin_spi0_resource[] = {
692 .start = SPI0_REGBASE,
693 .end = SPI0_REGBASE + 0xFF,
694 .flags = IORESOURCE_MEM,
699 .flags = IORESOURCE_IRQ,
703 static struct platform_device bfin_spi0_device = {
705 .id = 0, /* Bus number */
706 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
707 .resource = bfin_spi0_resource,
709 .platform_data = &bfin_spi0_info, /* Passed to driver */
712 #endif /* spi master and devices */
714 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
715 static struct platform_device bfin_fb_device = {
716 .name = "bf537-lq035",
720 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
721 static struct platform_device bfin_fb_adv7393_device = {
722 .name = "bfin-adv7393",
726 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
727 static struct resource bfin_uart_resources[] = {
728 #ifdef CONFIG_SERIAL_BFIN_UART0
732 .flags = IORESOURCE_MEM,
735 #ifdef CONFIG_SERIAL_BFIN_UART1
739 .flags = IORESOURCE_MEM,
744 static struct platform_device bfin_uart_device = {
747 .num_resources = ARRAY_SIZE(bfin_uart_resources),
748 .resource = bfin_uart_resources,
752 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
753 static struct resource bfin_sir_resources[] = {
754 #ifdef CONFIG_BFIN_SIR0
758 .flags = IORESOURCE_MEM,
761 #ifdef CONFIG_BFIN_SIR1
765 .flags = IORESOURCE_MEM,
770 static struct platform_device bfin_sir_device = {
773 .num_resources = ARRAY_SIZE(bfin_sir_resources),
774 .resource = bfin_sir_resources,
778 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
779 static struct resource bfin_twi0_resource[] = {
781 .start = TWI0_REGBASE,
783 .flags = IORESOURCE_MEM,
788 .flags = IORESOURCE_IRQ,
792 static struct platform_device i2c_bfin_twi_device = {
793 .name = "i2c-bfin-twi",
795 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
796 .resource = bfin_twi0_resource,
800 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
801 static struct platform_device bfin_sport0_uart_device = {
802 .name = "bfin-sport-uart",
806 static struct platform_device bfin_sport1_uart_device = {
807 .name = "bfin-sport-uart",
812 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
815 static struct pata_platform_info bfin_pata_platform_data = {
817 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
820 static struct resource bfin_pata_resources[] = {
824 .flags = IORESOURCE_MEM,
829 .flags = IORESOURCE_MEM,
834 .flags = IORESOURCE_IRQ,
838 static struct platform_device bfin_pata_device = {
839 .name = "pata_platform",
841 .num_resources = ARRAY_SIZE(bfin_pata_resources),
842 .resource = bfin_pata_resources,
844 .platform_data = &bfin_pata_platform_data,
849 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
850 #include <linux/input.h>
851 #include <linux/gpio_keys.h>
853 static struct gpio_keys_button bfin_gpio_keys_table[] = {
854 {BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"},
855 {BTN_1, GPIO_PG13, 1, "gpio-keys: BTN1"},
858 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
859 .buttons = bfin_gpio_keys_table,
860 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
863 static struct platform_device bfin_device_gpiokeys = {
866 .platform_data = &bfin_gpio_keys_data,
871 static struct resource bfin_gpios_resources = {
873 .end = MAX_BLACKFIN_GPIOS - 1,
874 .flags = IORESOURCE_IRQ,
877 static struct platform_device bfin_gpios_device = {
878 .name = "simple-gpio",
881 .resource = &bfin_gpios_resources,
884 static const unsigned int cclk_vlev_datasheet[] =
886 VRPAIR(VLEV_100, 400000000),
887 VRPAIR(VLEV_105, 426000000),
888 VRPAIR(VLEV_110, 500000000),
889 VRPAIR(VLEV_115, 533000000),
890 VRPAIR(VLEV_120, 600000000),
893 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
894 .tuple_tab = cclk_vlev_datasheet,
895 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
896 .vr_settling_time = 25 /* us */,
899 static struct platform_device bfin_dpmc = {
902 .platform_data = &bfin_dmpc_vreg_data,
906 static struct platform_device *stamp_devices[] __initdata = {
910 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
914 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
915 &bfin_pcmcia_cf_device,
918 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
922 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
926 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
930 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
934 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
938 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
942 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
946 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
947 &net2272_bfin_device,
950 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
954 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
958 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
959 &bf52x_t350mcqb_device,
962 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
963 &bfin_fb_adv7393_device,
966 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
970 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
974 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
975 &i2c_bfin_twi_device,
978 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
979 &bfin_sport0_uart_device,
980 &bfin_sport1_uart_device,
983 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
987 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
988 &bfin_device_gpiokeys,
991 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
998 static int __init stamp_init(void)
1000 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1001 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1002 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1003 spi_register_board_info(bfin_spi_board_info,
1004 ARRAY_SIZE(bfin_spi_board_info));
1007 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1008 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
1013 arch_initcall(stamp_init);
1015 void native_machine_restart(char *cmd)
1017 /* workaround reboot hang when booting from SPI */
1018 if ((bfin_read_SYSCR() & 0x7) == 0x3)
1019 bfin_gpio_reset_spi0_ssel1();
1022 void bfin_get_ether_addr(char *addr)
1024 /* the MAC is stored in OTP memory page 0xDF */
1027 u32 (*otp_read)(u32 page, u32 flags, u64 *page_content) = (void *)0xEF00001A;
1029 ret = otp_read(0xDF, 0x00, &otp_mac);
1031 char *otp_mac_p = (char *)&otp_mac;
1032 for (ret = 0; ret < 6; ++ret)
1033 addr[ret] = otp_mac_p[5 - ret];
1036 EXPORT_SYMBOL(bfin_get_ether_addr);