2 * File: arch/blackfin/mach-bf548/boards/ezkit.c
3 * Based on: arch/blackfin/mach-bf537/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2007 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 #include <linux/irq.h>
39 #include <linux/i2c.h>
40 #include <linux/interrupt.h>
41 #include <linux/usb/musb.h>
42 #include <asm/bfin5xx_spi.h>
47 #include <asm/portmux.h>
48 #include <asm/bfin_sdh.h>
49 #include <mach/bf54x_keys.h>
50 #include <linux/input.h>
51 #include <linux/spi/ad7877.h>
54 * Name the Board for the /proc/cpuinfo
56 const char bfin_board_name[] = "ADI BF548-EZKIT";
59 * Driver needs to know address, irq and flag pin.
62 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
63 #include <linux/usb/isp1760.h>
64 static struct resource bfin_isp1760_resources[] = {
67 .end = 0x2C0C0000 + 0xfffff,
68 .flags = IORESOURCE_MEM,
73 .flags = IORESOURCE_IRQ,
77 static struct isp1760_platform_data isp1760_priv = {
83 .dack_polarity_high = 0,
84 .dreq_polarity_high = 0,
87 static struct platform_device bfin_isp1760_device = {
88 .name = "isp1760-hcd",
91 .platform_data = &isp1760_priv,
93 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
94 .resource = bfin_isp1760_resources,
98 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
100 #include <mach/bf54x-lq043.h>
102 static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
105 .xres = {480, 480, 480},
106 .yres = {272, 272, 272},
111 static struct resource bf54x_lq043_resources[] = {
113 .start = IRQ_EPPI0_ERR,
114 .end = IRQ_EPPI0_ERR,
115 .flags = IORESOURCE_IRQ,
119 static struct platform_device bf54x_lq043_device = {
120 .name = "bf54x-lq043",
122 .num_resources = ARRAY_SIZE(bf54x_lq043_resources),
123 .resource = bf54x_lq043_resources,
125 .platform_data = &bf54x_lq043_data,
130 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
131 static const unsigned int bf548_keymap[] = {
132 KEYVAL(0, 0, KEY_ENTER),
133 KEYVAL(0, 1, KEY_HELP),
135 KEYVAL(0, 3, KEY_BACKSPACE),
136 KEYVAL(1, 0, KEY_TAB),
140 KEYVAL(2, 0, KEY_DOWN),
144 KEYVAL(3, 0, KEY_UP),
150 static struct bfin_kpad_platform_data bf54x_kpad_data = {
153 .keymap = bf548_keymap,
154 .keymapsize = ARRAY_SIZE(bf548_keymap),
156 .debounce_time = 5000, /* ns (5ms) */
157 .coldrive_time = 1000, /* ns (1ms) */
158 .keyup_test_interval = 50, /* ms (50ms) */
161 static struct resource bf54x_kpad_resources[] = {
165 .flags = IORESOURCE_IRQ,
169 static struct platform_device bf54x_kpad_device = {
170 .name = "bf54x-keys",
172 .num_resources = ARRAY_SIZE(bf54x_kpad_resources),
173 .resource = bf54x_kpad_resources,
175 .platform_data = &bf54x_kpad_data,
180 #if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
181 #include <asm/bfin_rotary.h>
183 static struct bfin_rotary_platform_data bfin_rotary_data = {
184 /*.rotary_up_key = KEY_UP,*/
185 /*.rotary_down_key = KEY_DOWN,*/
186 .rotary_rel_code = REL_WHEEL,
187 .rotary_button_key = KEY_ENTER,
188 .debounce = 10, /* 0..17 */
189 .mode = ROT_QUAD_ENC | ROT_DEBE,
192 static struct resource bfin_rotary_resources[] = {
196 .flags = IORESOURCE_IRQ,
200 static struct platform_device bfin_rotary_device = {
201 .name = "bfin-rotary",
203 .num_resources = ARRAY_SIZE(bfin_rotary_resources),
204 .resource = bfin_rotary_resources,
206 .platform_data = &bfin_rotary_data,
211 #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
212 #include <linux/input.h>
213 #include <linux/spi/adxl34x.h>
214 static const struct adxl34x_platform_data adxl34x_info = {
218 .tap_threshold = 0x31,
219 .tap_duration = 0x10,
222 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
223 .act_axis_control = 0xFF,
224 .activity_threshold = 5,
225 .inactivity_threshold = 3,
226 .inactivity_time = 4,
227 .free_fall_threshold = 0x7,
228 .free_fall_time = 0x20,
230 .data_range = ADXL_FULL_RES,
233 .ev_code_x = ABS_X, /* EV_REL */
234 .ev_code_y = ABS_Y, /* EV_REL */
235 .ev_code_z = ABS_Z, /* EV_REL */
237 .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */
238 .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */
239 .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */
241 /* .ev_code_ff = KEY_F,*/ /* EV_KEY */
242 /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
243 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
244 .fifo_mode = ADXL_FIFO_STREAM,
248 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
249 static struct platform_device rtc_device = {
255 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
256 static struct resource bfin_uart_resources[] = {
257 #ifdef CONFIG_SERIAL_BFIN_UART0
261 .flags = IORESOURCE_MEM,
264 #ifdef CONFIG_SERIAL_BFIN_UART1
268 .flags = IORESOURCE_MEM,
271 #ifdef CONFIG_SERIAL_BFIN_UART2
275 .flags = IORESOURCE_MEM,
278 #ifdef CONFIG_SERIAL_BFIN_UART3
282 .flags = IORESOURCE_MEM,
287 static struct platform_device bfin_uart_device = {
290 .num_resources = ARRAY_SIZE(bfin_uart_resources),
291 .resource = bfin_uart_resources,
295 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
296 #ifdef CONFIG_BFIN_SIR0
297 static struct resource bfin_sir0_resources[] = {
301 .flags = IORESOURCE_MEM,
304 .start = IRQ_UART0_RX,
305 .end = IRQ_UART0_RX+1,
306 .flags = IORESOURCE_IRQ,
309 .start = CH_UART0_RX,
310 .end = CH_UART0_RX+1,
311 .flags = IORESOURCE_DMA,
314 static struct platform_device bfin_sir0_device = {
317 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
318 .resource = bfin_sir0_resources,
321 #ifdef CONFIG_BFIN_SIR1
322 static struct resource bfin_sir1_resources[] = {
326 .flags = IORESOURCE_MEM,
329 .start = IRQ_UART1_RX,
330 .end = IRQ_UART1_RX+1,
331 .flags = IORESOURCE_IRQ,
334 .start = CH_UART1_RX,
335 .end = CH_UART1_RX+1,
336 .flags = IORESOURCE_DMA,
339 static struct platform_device bfin_sir1_device = {
342 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
343 .resource = bfin_sir1_resources,
346 #ifdef CONFIG_BFIN_SIR2
347 static struct resource bfin_sir2_resources[] = {
351 .flags = IORESOURCE_MEM,
354 .start = IRQ_UART2_RX,
355 .end = IRQ_UART2_RX+1,
356 .flags = IORESOURCE_IRQ,
359 .start = CH_UART2_RX,
360 .end = CH_UART2_RX+1,
361 .flags = IORESOURCE_DMA,
364 static struct platform_device bfin_sir2_device = {
367 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
368 .resource = bfin_sir2_resources,
371 #ifdef CONFIG_BFIN_SIR3
372 static struct resource bfin_sir3_resources[] = {
376 .flags = IORESOURCE_MEM,
379 .start = IRQ_UART3_RX,
380 .end = IRQ_UART3_RX+1,
381 .flags = IORESOURCE_IRQ,
384 .start = CH_UART3_RX,
385 .end = CH_UART3_RX+1,
386 .flags = IORESOURCE_DMA,
389 static struct platform_device bfin_sir3_device = {
392 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
393 .resource = bfin_sir3_resources,
398 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
399 #include <linux/smsc911x.h>
401 static struct resource smsc911x_resources[] = {
403 .name = "smsc911x-memory",
405 .end = 0x24000000 + 0xFF,
406 .flags = IORESOURCE_MEM,
411 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
415 static struct smsc911x_platform_config smsc911x_config = {
416 .flags = SMSC911X_USE_32BIT,
417 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
418 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
419 .phy_interface = PHY_INTERFACE_MODE_MII,
422 static struct platform_device smsc911x_device = {
425 .num_resources = ARRAY_SIZE(smsc911x_resources),
426 .resource = smsc911x_resources,
428 .platform_data = &smsc911x_config,
433 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
434 static struct resource musb_resources[] = {
438 .flags = IORESOURCE_MEM,
440 [1] = { /* general IRQ */
441 .start = IRQ_USB_INT0,
443 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
445 [2] = { /* DMA IRQ */
446 .start = IRQ_USB_DMA,
448 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
452 static struct musb_hdrc_config musb_config = {
459 .gpio_vrsel = GPIO_PE7,
462 static struct musb_hdrc_platform_data musb_plat = {
463 #if defined(CONFIG_USB_MUSB_OTG)
465 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
467 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
468 .mode = MUSB_PERIPHERAL,
470 .config = &musb_config,
473 static u64 musb_dmamask = ~(u32)0;
475 static struct platform_device musb_device = {
479 .dma_mask = &musb_dmamask,
480 .coherent_dma_mask = 0xffffffff,
481 .platform_data = &musb_plat,
483 .num_resources = ARRAY_SIZE(musb_resources),
484 .resource = musb_resources,
488 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
489 static struct resource bfin_atapi_resources[] = {
493 .flags = IORESOURCE_MEM,
496 .start = IRQ_ATAPI_ERR,
497 .end = IRQ_ATAPI_ERR,
498 .flags = IORESOURCE_IRQ,
502 static struct platform_device bfin_atapi_device = {
503 .name = "pata-bf54x",
505 .num_resources = ARRAY_SIZE(bfin_atapi_resources),
506 .resource = bfin_atapi_resources,
510 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
511 static struct mtd_partition partition_info[] = {
513 .name = "linux kernel(nand)",
515 .size = 4 * 1024 * 1024,
518 .name = "file system(nand)",
519 .offset = MTDPART_OFS_APPEND,
520 .size = MTDPART_SIZ_FULL,
524 static struct bf5xx_nand_platform bf5xx_nand_platform = {
525 .page_size = NFC_PG_SIZE_256,
526 .data_width = NFC_NWIDTH_8,
527 .partitions = partition_info,
528 .nr_partitions = ARRAY_SIZE(partition_info),
533 static struct resource bf5xx_nand_resources[] = {
537 .flags = IORESOURCE_MEM,
542 .flags = IORESOURCE_IRQ,
546 static struct platform_device bf5xx_nand_device = {
547 .name = "bf5xx-nand",
549 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
550 .resource = bf5xx_nand_resources,
552 .platform_data = &bf5xx_nand_platform,
557 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
559 static struct bfin_sd_host bfin_sdh_data = {
561 .irq_int0 = IRQ_SDH_MASK0,
562 .pin_req = {P_SD_D0, P_SD_D1, P_SD_D2, P_SD_D3, P_SD_CLK, P_SD_CMD, 0},
565 static struct platform_device bf54x_sdh_device = {
569 .platform_data = &bfin_sdh_data,
574 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
575 static struct mtd_partition ezkit_partitions[] = {
577 .name = "bootloader(nor)",
581 .name = "linux kernel(nor)",
583 .offset = MTDPART_OFS_APPEND,
585 .name = "file system(nor)",
586 .size = MTDPART_SIZ_FULL,
587 .offset = MTDPART_OFS_APPEND,
591 static struct physmap_flash_data ezkit_flash_data = {
593 .parts = ezkit_partitions,
594 .nr_parts = ARRAY_SIZE(ezkit_partitions),
597 static struct resource ezkit_flash_resource = {
600 .flags = IORESOURCE_MEM,
603 static struct platform_device ezkit_flash_device = {
604 .name = "physmap-flash",
607 .platform_data = &ezkit_flash_data,
610 .resource = &ezkit_flash_resource,
614 #if defined(CONFIG_MTD_M25P80) \
615 || defined(CONFIG_MTD_M25P80_MODULE)
616 /* SPI flash chip (m25p16) */
617 static struct mtd_partition bfin_spi_flash_partitions[] = {
619 .name = "bootloader(spi)",
622 .mask_flags = MTD_CAP_ROM
624 .name = "linux kernel(spi)",
625 .size = MTDPART_SIZ_FULL,
626 .offset = MTDPART_OFS_APPEND,
630 static struct flash_platform_data bfin_spi_flash_data = {
632 .parts = bfin_spi_flash_partitions,
633 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
637 static struct bfin5xx_spi_chip spi_flash_chip_info = {
638 .enable_dma = 0, /* use dma transfer with this chip*/
640 .cs_change_per_word = 0,
644 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
645 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
646 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
652 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
653 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
654 .cs_change_per_word = 0,
659 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
661 .vref_delay_usecs = 50, /* internal, no capacitor */
664 .pressure_max = 1000,
666 .stopacq_polarity = 1,
667 .first_conversion_delay = 3,
668 .acquisition_time = 1,
670 .pen_down_acc_interval = 1,
674 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
675 static struct bfin5xx_spi_chip spidev_chip_info = {
681 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
682 static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
683 .enable_dma = 0, /* use dma transfer with this chip*/
685 .cs_change_per_word = 0,
689 static struct spi_board_info bfin_spi_board_info[] __initdata = {
690 #if defined(CONFIG_MTD_M25P80) \
691 || defined(CONFIG_MTD_M25P80_MODULE)
693 /* the modalias must be the same as spi device driver name */
694 .modalias = "m25p80", /* Name of spi_driver for this device */
695 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
696 .bus_num = 0, /* Framework bus number */
697 .chip_select = 1, /* SPI_SSEL1*/
698 .platform_data = &bfin_spi_flash_data,
699 .controller_data = &spi_flash_chip_info,
703 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
704 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
706 .modalias = "ad1836-spi",
707 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
709 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
710 .controller_data = &ad1836_spi_chip_info,
713 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
715 .modalias = "ad7877",
716 .platform_data = &bfin_ad7877_ts_info,
717 .irq = IRQ_PB4, /* old boards (<=Rev 1.3) use IRQ_PJ11 */
718 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
721 .controller_data = &spi_ad7877_chip_info,
724 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
726 .modalias = "spidev",
727 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
730 .controller_data = &spidev_chip_info,
733 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
735 .modalias = "adxl34x",
736 .platform_data = &adxl34x_info,
738 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
741 .controller_data = &spi_adxl34x_chip_info,
746 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
748 static struct resource bfin_spi0_resource[] = {
750 .start = SPI0_REGBASE,
751 .end = SPI0_REGBASE + 0xFF,
752 .flags = IORESOURCE_MEM,
757 .flags = IORESOURCE_DMA,
762 .flags = IORESOURCE_IRQ,
767 static struct resource bfin_spi1_resource[] = {
769 .start = SPI1_REGBASE,
770 .end = SPI1_REGBASE + 0xFF,
771 .flags = IORESOURCE_MEM,
776 .flags = IORESOURCE_DMA,
781 .flags = IORESOURCE_IRQ,
785 /* SPI controller data */
786 static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
788 .enable_dma = 1, /* master has the ability to do dma transfer */
789 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
792 static struct platform_device bf54x_spi_master0 = {
794 .id = 0, /* Bus number */
795 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
796 .resource = bfin_spi0_resource,
798 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
802 static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
804 .enable_dma = 1, /* master has the ability to do dma transfer */
805 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
808 static struct platform_device bf54x_spi_master1 = {
810 .id = 1, /* Bus number */
811 .num_resources = ARRAY_SIZE(bfin_spi1_resource),
812 .resource = bfin_spi1_resource,
814 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
817 #endif /* spi master and devices */
819 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
820 static struct resource bfin_twi0_resource[] = {
822 .start = TWI0_REGBASE,
823 .end = TWI0_REGBASE + 0xFF,
824 .flags = IORESOURCE_MEM,
829 .flags = IORESOURCE_IRQ,
833 static struct platform_device i2c_bfin_twi0_device = {
834 .name = "i2c-bfin-twi",
836 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
837 .resource = bfin_twi0_resource,
840 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
841 static struct resource bfin_twi1_resource[] = {
843 .start = TWI1_REGBASE,
844 .end = TWI1_REGBASE + 0xFF,
845 .flags = IORESOURCE_MEM,
850 .flags = IORESOURCE_IRQ,
854 static struct platform_device i2c_bfin_twi1_device = {
855 .name = "i2c-bfin-twi",
857 .num_resources = ARRAY_SIZE(bfin_twi1_resource),
858 .resource = bfin_twi1_resource,
863 static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
866 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
867 static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
868 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
870 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
873 #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
875 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
879 #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
881 I2C_BOARD_INFO("adxl34x", 0x53),
883 .platform_data = (void *)&adxl34x_info,
889 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
890 #include <linux/gpio_keys.h>
892 static struct gpio_keys_button bfin_gpio_keys_table[] = {
893 {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"},
894 {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"},
895 {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"},
896 {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"},
899 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
900 .buttons = bfin_gpio_keys_table,
901 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
904 static struct platform_device bfin_device_gpiokeys = {
907 .platform_data = &bfin_gpio_keys_data,
912 static struct resource bfin_gpios_resources = {
914 .end = MAX_BLACKFIN_GPIOS - 1,
915 .flags = IORESOURCE_IRQ,
918 static struct platform_device bfin_gpios_device = {
919 .name = "simple-gpio",
922 .resource = &bfin_gpios_resources,
925 static const unsigned int cclk_vlev_datasheet[] =
928 * Internal VLEV BF54XSBBC1533
929 ****temporarily using these values until data sheet is updated
931 VRPAIR(VLEV_085, 150000000),
932 VRPAIR(VLEV_090, 250000000),
933 VRPAIR(VLEV_110, 276000000),
934 VRPAIR(VLEV_115, 301000000),
935 VRPAIR(VLEV_120, 525000000),
936 VRPAIR(VLEV_125, 550000000),
937 VRPAIR(VLEV_130, 600000000),
940 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
941 .tuple_tab = cclk_vlev_datasheet,
942 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
943 .vr_settling_time = 25 /* us */,
946 static struct platform_device bfin_dpmc = {
949 .platform_data = &bfin_dmpc_vreg_data,
953 static struct platform_device *ezkit_devices[] __initdata = {
957 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
961 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
965 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
966 #ifdef CONFIG_BFIN_SIR0
969 #ifdef CONFIG_BFIN_SIR1
972 #ifdef CONFIG_BFIN_SIR2
975 #ifdef CONFIG_BFIN_SIR3
980 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
984 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
988 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
992 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
993 &bfin_isp1760_device,
996 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
1000 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
1004 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
1008 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1013 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
1017 #if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
1018 &bfin_rotary_device,
1021 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1022 &i2c_bfin_twi0_device,
1023 #if !defined(CONFIG_BF542)
1024 &i2c_bfin_twi1_device,
1028 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1029 &bfin_device_gpiokeys,
1034 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1035 &ezkit_flash_device,
1039 static int __init ezkit_init(void)
1041 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1043 i2c_register_board_info(0, bfin_i2c_board_info0,
1044 ARRAY_SIZE(bfin_i2c_board_info0));
1045 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1046 i2c_register_board_info(1, bfin_i2c_board_info1,
1047 ARRAY_SIZE(bfin_i2c_board_info1));
1050 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
1052 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1057 arch_initcall(ezkit_init);