Blackfin arch: use physmap in board resources rather than legacy config method
[linux-2.6.git] / arch / blackfin / mach-bf548 / boards / cm_bf548.c
1 /*
2  * File:         arch/blackfin/mach-bf548/boards/cm_bf548.c
3  * Based on:     arch/blackfin/mach-bf537/boards/ezkit.c
4  * Author:       Aidan Williams <aidan@nicta.com.au>
5  *
6  * Created:
7  * Description:
8  *
9  * Modified:
10  *               Copyright 2005 National ICT Australia (NICTA)
11  *               Copyright 2004-2008 Analog Devices Inc.
12  *
13  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
14  *
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.
19  *
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.
24  *
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
29  */
30
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/interrupt.h>
40 #include <linux/usb/musb.h>
41 #include <asm/bfin5xx_spi.h>
42 #include <asm/dma.h>
43 #include <asm/gpio.h>
44 #include <asm/nand.h>
45 #include <asm/portmux.h>
46 #include <mach/bf54x_keys.h>
47 #include <asm/dpmc.h>
48 #include <linux/input.h>
49 #include <linux/spi/ad7877.h>
50
51 /*
52  * Name the Board for the /proc/cpuinfo
53  */
54 const char bfin_board_name[] = "Bluetechnix CM-BF548";
55
56 /*
57  *  Driver needs to know address, irq and flag pin.
58  */
59
60 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
61
62 #include <mach/bf54x-lq043.h>
63
64 static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
65         .width =        480,
66         .height =       272,
67         .xres =         {480, 480, 480},
68         .yres =         {272, 272, 272},
69         .bpp =          {24, 24, 24},
70         .disp =         GPIO_PE3,
71 };
72
73 static struct resource bf54x_lq043_resources[] = {
74         {
75                 .start = IRQ_EPPI0_ERR,
76                 .end = IRQ_EPPI0_ERR,
77                 .flags = IORESOURCE_IRQ,
78         },
79 };
80
81 static struct platform_device bf54x_lq043_device = {
82         .name           = "bf54x-lq043",
83         .id             = -1,
84         .num_resources  = ARRAY_SIZE(bf54x_lq043_resources),
85         .resource       = bf54x_lq043_resources,
86         .dev            = {
87                 .platform_data = &bf54x_lq043_data,
88         },
89 };
90 #endif
91
92 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
93 static unsigned int bf548_keymap[] = {
94         KEYVAL(0, 0, KEY_ENTER),
95         KEYVAL(0, 1, KEY_HELP),
96         KEYVAL(0, 2, KEY_0),
97         KEYVAL(0, 3, KEY_BACKSPACE),
98         KEYVAL(1, 0, KEY_TAB),
99         KEYVAL(1, 1, KEY_9),
100         KEYVAL(1, 2, KEY_8),
101         KEYVAL(1, 3, KEY_7),
102         KEYVAL(2, 0, KEY_DOWN),
103         KEYVAL(2, 1, KEY_6),
104         KEYVAL(2, 2, KEY_5),
105         KEYVAL(2, 3, KEY_4),
106         KEYVAL(3, 0, KEY_UP),
107         KEYVAL(3, 1, KEY_3),
108         KEYVAL(3, 2, KEY_2),
109         KEYVAL(3, 3, KEY_1),
110 };
111
112 static struct bfin_kpad_platform_data bf54x_kpad_data = {
113         .rows                   = 4,
114         .cols                   = 4,
115         .keymap                 = bf548_keymap,
116         .keymapsize             = ARRAY_SIZE(bf548_keymap),
117         .repeat                 = 0,
118         .debounce_time          = 5000, /* ns (5ms) */
119         .coldrive_time          = 1000, /* ns (1ms) */
120         .keyup_test_interval    = 50, /* ms (50ms) */
121 };
122
123 static struct resource bf54x_kpad_resources[] = {
124         {
125                 .start = IRQ_KEY,
126                 .end = IRQ_KEY,
127                 .flags = IORESOURCE_IRQ,
128         },
129 };
130
131 static struct platform_device bf54x_kpad_device = {
132         .name           = "bf54x-keys",
133         .id             = -1,
134         .num_resources  = ARRAY_SIZE(bf54x_kpad_resources),
135         .resource       = bf54x_kpad_resources,
136         .dev            = {
137                 .platform_data = &bf54x_kpad_data,
138         },
139 };
140 #endif
141
142 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
143 static struct platform_device rtc_device = {
144         .name = "rtc-bfin",
145         .id   = -1,
146 };
147 #endif
148
149 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
150 static struct resource bfin_uart_resources[] = {
151 #ifdef CONFIG_SERIAL_BFIN_UART0
152         {
153                 .start = 0xFFC00400,
154                 .end = 0xFFC004FF,
155                 .flags = IORESOURCE_MEM,
156         },
157 #endif
158 #ifdef CONFIG_SERIAL_BFIN_UART1
159         {
160                 .start = 0xFFC02000,
161                 .end = 0xFFC020FF,
162                 .flags = IORESOURCE_MEM,
163         },
164 #endif
165 #ifdef CONFIG_SERIAL_BFIN_UART2
166         {
167                 .start = 0xFFC02100,
168                 .end = 0xFFC021FF,
169                 .flags = IORESOURCE_MEM,
170         },
171 #endif
172 #ifdef CONFIG_SERIAL_BFIN_UART3
173         {
174                 .start = 0xFFC03100,
175                 .end = 0xFFC031FF,
176                 .flags = IORESOURCE_MEM,
177         },
178 #endif
179 };
180
181 static struct platform_device bfin_uart_device = {
182         .name = "bfin-uart",
183         .id = 1,
184         .num_resources = ARRAY_SIZE(bfin_uart_resources),
185         .resource = bfin_uart_resources,
186 };
187 #endif
188
189 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
190 static struct resource bfin_sir_resources[] = {
191 #ifdef CONFIG_BFIN_SIR0
192         {
193                 .start = 0xFFC00400,
194                 .end = 0xFFC004FF,
195                 .flags = IORESOURCE_MEM,
196         },
197 #endif
198 #ifdef CONFIG_BFIN_SIR1
199         {
200                 .start = 0xFFC02000,
201                 .end = 0xFFC020FF,
202                 .flags = IORESOURCE_MEM,
203         },
204 #endif
205 #ifdef CONFIG_BFIN_SIR2
206         {
207                 .start = 0xFFC02100,
208                 .end = 0xFFC021FF,
209                 .flags = IORESOURCE_MEM,
210         },
211 #endif
212 #ifdef CONFIG_BFIN_SIR3
213         {
214                 .start = 0xFFC03100,
215                 .end = 0xFFC031FF,
216                 .flags = IORESOURCE_MEM,
217         },
218 #endif
219 };
220
221 static struct platform_device bfin_sir_device = {
222         .name = "bfin_sir",
223         .id = 0,
224         .num_resources = ARRAY_SIZE(bfin_sir_resources),
225         .resource = bfin_sir_resources,
226 };
227 #endif
228
229 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
230 static struct resource smsc911x_resources[] = {
231         {
232                 .name = "smsc911x-memory",
233                 .start = 0x24000000,
234                 .end = 0x24000000 + 0xFF,
235                 .flags = IORESOURCE_MEM,
236         },
237         {
238                 .start = IRQ_PE6,
239                 .end = IRQ_PE6,
240                 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
241         },
242 };
243 static struct platform_device smsc911x_device = {
244         .name = "smsc911x",
245         .id = 0,
246         .num_resources = ARRAY_SIZE(smsc911x_resources),
247         .resource = smsc911x_resources,
248 };
249 #endif
250
251 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
252 static struct resource musb_resources[] = {
253         [0] = {
254                 .start  = 0xFFC03C00,
255                 .end    = 0xFFC040FF,
256                 .flags  = IORESOURCE_MEM,
257         },
258         [1] = { /* general IRQ */
259                 .start  = IRQ_USB_INT0,
260                 .end    = IRQ_USB_INT0,
261                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
262         },
263         [2] = { /* DMA IRQ */
264                 .start  = IRQ_USB_DMA,
265                 .end    = IRQ_USB_DMA,
266                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
267         },
268 };
269
270 static struct musb_hdrc_config musb_config = {
271         .multipoint     = 0,
272         .dyn_fifo       = 0,
273         .soft_con       = 1,
274         .dma            = 1,
275         .num_eps        = 7,
276         .dma_channels   = 7,
277         .gpio_vrsel     = GPIO_PH6,
278 };
279
280 static struct musb_hdrc_platform_data musb_plat = {
281 #if defined(CONFIG_USB_MUSB_OTG)
282         .mode           = MUSB_OTG,
283 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
284         .mode           = MUSB_HOST,
285 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
286         .mode           = MUSB_PERIPHERAL,
287 #endif
288         .config         = &musb_config,
289 };
290
291 static u64 musb_dmamask = ~(u32)0;
292
293 static struct platform_device musb_device = {
294         .name           = "musb_hdrc",
295         .id             = 0,
296         .dev = {
297                 .dma_mask               = &musb_dmamask,
298                 .coherent_dma_mask      = 0xffffffff,
299                 .platform_data          = &musb_plat,
300         },
301         .num_resources  = ARRAY_SIZE(musb_resources),
302         .resource       = musb_resources,
303 };
304 #endif
305
306 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
307 static struct resource bfin_atapi_resources[] = {
308         {
309                 .start = 0xFFC03800,
310                 .end = 0xFFC0386F,
311                 .flags = IORESOURCE_MEM,
312         },
313         {
314                 .start = IRQ_ATAPI_ERR,
315                 .end = IRQ_ATAPI_ERR,
316                 .flags = IORESOURCE_IRQ,
317         },
318 };
319
320 static struct platform_device bfin_atapi_device = {
321         .name = "pata-bf54x",
322         .id = -1,
323         .num_resources = ARRAY_SIZE(bfin_atapi_resources),
324         .resource = bfin_atapi_resources,
325 };
326 #endif
327
328 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
329 static struct mtd_partition partition_info[] = {
330         {
331                 .name = "linux kernel(nand)",
332                 .offset = 0,
333                 .size = 4 * 1024 * 1024,
334         },
335         {
336                 .name = "file system(nand)",
337                 .offset = 4 * 1024 * 1024,
338                 .size = (256 - 4) * 1024 * 1024,
339         },
340 };
341
342 static struct bf5xx_nand_platform bf5xx_nand_platform = {
343         .page_size = NFC_PG_SIZE_256,
344         .data_width = NFC_NWIDTH_8,
345         .partitions = partition_info,
346         .nr_partitions = ARRAY_SIZE(partition_info),
347         .rd_dly = 3,
348         .wr_dly = 3,
349 };
350
351 static struct resource bf5xx_nand_resources[] = {
352         {
353                 .start = 0xFFC03B00,
354                 .end = 0xFFC03B4F,
355                 .flags = IORESOURCE_MEM,
356         },
357         {
358                 .start = CH_NFC,
359                 .end = CH_NFC,
360                 .flags = IORESOURCE_IRQ,
361         },
362 };
363
364 static struct platform_device bf5xx_nand_device = {
365         .name = "bf5xx-nand",
366         .id = 0,
367         .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
368         .resource = bf5xx_nand_resources,
369         .dev = {
370                 .platform_data = &bf5xx_nand_platform,
371         },
372 };
373 #endif
374
375 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
376 static struct platform_device bf54x_sdh_device = {
377         .name = "bfin-sdh",
378         .id = 0,
379 };
380 #endif
381
382 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
383 static struct mtd_partition para_partitions[] = {
384         {
385                 .name       = "bootloader(nor)",
386                 .size       = 0x40000,
387                 .offset     = 0,
388         }, {
389                 .name       = "linux kernel(nor)",
390                 .size       = 0x400000,
391                 .offset     = MTDPART_OFS_APPEND,
392         }, {
393                 .name       = "file system(nor)",
394                 .size       = MTDPART_SIZ_FULL,
395                 .offset     = MTDPART_OFS_APPEND,
396         }
397 };
398
399 static struct physmap_flash_data para_flash_data = {
400         .width      = 2,
401         .parts      = para_partitions,
402         .nr_parts   = ARRAY_SIZE(para_partitions),
403 };
404
405 static struct resource para_flash_resource = {
406         .start = 0x20000000,
407         .end   = 0x207fffff,
408         .flags = IORESOURCE_MEM,
409 };
410
411 static struct platform_device para_flash_device = {
412         .name          = "physmap-flash",
413         .id            = 0,
414         .dev = {
415                 .platform_data = &para_flash_data,
416         },
417         .num_resources = 1,
418         .resource      = &para_flash_resource,
419 };
420 #endif
421
422 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
423 /* all SPI peripherals info goes here */
424 #if defined(CONFIG_MTD_M25P80) \
425         || defined(CONFIG_MTD_M25P80_MODULE)
426 /* SPI flash chip (m25p16) */
427 static struct mtd_partition bfin_spi_flash_partitions[] = {
428         {
429                 .name = "bootloader(spi)",
430                 .size = 0x00040000,
431                 .offset = 0,
432                 .mask_flags = MTD_CAP_ROM
433         }, {
434                 .name = "linux kernel(spi)",
435                 .size = 0x1c0000,
436                 .offset = 0x40000
437         }
438 };
439
440 static struct flash_platform_data bfin_spi_flash_data = {
441         .name = "m25p80",
442         .parts = bfin_spi_flash_partitions,
443         .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
444         .type = "m25p16",
445 };
446
447 static struct bfin5xx_spi_chip spi_flash_chip_info = {
448         .enable_dma = 0,         /* use dma transfer with this chip*/
449         .bits_per_word = 8,
450         .cs_change_per_word = 0,
451 };
452 #endif
453
454 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
455 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
456         .cs_change_per_word = 0,
457         .enable_dma = 0,
458         .bits_per_word = 16,
459 };
460
461 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
462         .model                  = 7877,
463         .vref_delay_usecs       = 50,   /* internal, no capacitor */
464         .x_plate_ohms           = 419,
465         .y_plate_ohms           = 486,
466         .pressure_max           = 1000,
467         .pressure_min           = 0,
468         .stopacq_polarity       = 1,
469         .first_conversion_delay = 3,
470         .acquisition_time       = 1,
471         .averaging              = 1,
472         .pen_down_acc_interval  = 1,
473 };
474 #endif
475
476 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
477 static struct bfin5xx_spi_chip spidev_chip_info = {
478         .enable_dma = 0,
479         .bits_per_word = 8,
480 };
481 #endif
482
483 static struct spi_board_info bf54x_spi_board_info[] __initdata = {
484 #if defined(CONFIG_MTD_M25P80) \
485         || defined(CONFIG_MTD_M25P80_MODULE)
486         {
487                 /* the modalias must be the same as spi device driver name */
488                 .modalias = "m25p80", /* Name of spi_driver for this device */
489                 .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
490                 .bus_num = 0, /* Framework bus number */
491                 .chip_select = 1, /* SPI_SSEL1*/
492                 .platform_data = &bfin_spi_flash_data,
493                 .controller_data = &spi_flash_chip_info,
494                 .mode = SPI_MODE_3,
495         },
496 #endif
497 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
498 {
499         .modalias               = "ad7877",
500         .platform_data          = &bfin_ad7877_ts_info,
501         .irq                    = IRQ_PJ11,
502         .max_speed_hz           = 12500000,     /* max spi clock (SCK) speed in HZ */
503         .bus_num                = 0,
504         .chip_select            = 2,
505         .controller_data = &spi_ad7877_chip_info,
506 },
507 #endif
508 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
509         {
510                 .modalias = "spidev",
511                 .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
512                 .bus_num = 0,
513                 .chip_select = 1,
514                 .controller_data = &spidev_chip_info,
515         },
516 #endif
517 };
518
519 /* SPI (0) */
520 static struct resource bfin_spi0_resource[] = {
521         [0] = {
522                 .start = SPI0_REGBASE,
523                 .end   = SPI0_REGBASE + 0xFF,
524                 .flags = IORESOURCE_MEM,
525         },
526         [1] = {
527                 .start = CH_SPI0,
528                 .end   = CH_SPI0,
529                 .flags = IORESOURCE_IRQ,
530         }
531 };
532
533 /* SPI (1) */
534 static struct resource bfin_spi1_resource[] = {
535         [0] = {
536                 .start = SPI1_REGBASE,
537                 .end   = SPI1_REGBASE + 0xFF,
538                 .flags = IORESOURCE_MEM,
539         },
540         [1] = {
541                 .start = CH_SPI1,
542                 .end   = CH_SPI1,
543                 .flags = IORESOURCE_IRQ,
544         }
545 };
546
547 /* SPI controller data */
548 static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
549         .num_chipselect = 8,
550         .enable_dma = 1,  /* master has the ability to do dma transfer */
551         .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
552 };
553
554 static struct platform_device bf54x_spi_master0 = {
555         .name = "bfin-spi",
556         .id = 0, /* Bus number */
557         .num_resources = ARRAY_SIZE(bfin_spi0_resource),
558         .resource = bfin_spi0_resource,
559         .dev = {
560                 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
561                 },
562 };
563
564 static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
565         .num_chipselect = 8,
566         .enable_dma = 1,  /* master has the ability to do dma transfer */
567         .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
568 };
569
570 static struct platform_device bf54x_spi_master1 = {
571         .name = "bfin-spi",
572         .id = 1, /* Bus number */
573         .num_resources = ARRAY_SIZE(bfin_spi1_resource),
574         .resource = bfin_spi1_resource,
575         .dev = {
576                 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
577                 },
578 };
579 #endif  /* spi master and devices */
580
581 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
582 static struct resource bfin_twi0_resource[] = {
583         [0] = {
584                 .start = TWI0_REGBASE,
585                 .end   = TWI0_REGBASE + 0xFF,
586                 .flags = IORESOURCE_MEM,
587         },
588         [1] = {
589                 .start = IRQ_TWI0,
590                 .end   = IRQ_TWI0,
591                 .flags = IORESOURCE_IRQ,
592         },
593 };
594
595 static struct platform_device i2c_bfin_twi0_device = {
596         .name = "i2c-bfin-twi",
597         .id = 0,
598         .num_resources = ARRAY_SIZE(bfin_twi0_resource),
599         .resource = bfin_twi0_resource,
600 };
601
602 #if !defined(CONFIG_BF542)      /* The BF542 only has 1 TWI */
603 static struct resource bfin_twi1_resource[] = {
604         [0] = {
605                 .start = TWI1_REGBASE,
606                 .end   = TWI1_REGBASE + 0xFF,
607                 .flags = IORESOURCE_MEM,
608         },
609         [1] = {
610                 .start = IRQ_TWI1,
611                 .end   = IRQ_TWI1,
612                 .flags = IORESOURCE_IRQ,
613         },
614 };
615
616 static struct platform_device i2c_bfin_twi1_device = {
617         .name = "i2c-bfin-twi",
618         .id = 1,
619         .num_resources = ARRAY_SIZE(bfin_twi1_resource),
620         .resource = bfin_twi1_resource,
621 };
622 #endif
623 #endif
624
625 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
626 #include <linux/gpio_keys.h>
627
628 static struct gpio_keys_button bfin_gpio_keys_table[] = {
629         {BTN_0, GPIO_PH7, 1, "gpio-keys: BTN0"},
630 };
631
632 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
633         .buttons        = bfin_gpio_keys_table,
634         .nbuttons       = ARRAY_SIZE(bfin_gpio_keys_table),
635 };
636
637 static struct platform_device bfin_device_gpiokeys = {
638         .name      = "gpio-keys",
639         .dev = {
640                 .platform_data = &bfin_gpio_keys_data,
641         },
642 };
643 #endif
644
645 static const unsigned int cclk_vlev_datasheet[] =
646 {
647 /*
648  * Internal VLEV BF54XSBBC1533
649  ****temporarily using these values until data sheet is updated
650  */
651         VRPAIR(VLEV_085, 150000000),
652         VRPAIR(VLEV_090, 250000000),
653         VRPAIR(VLEV_110, 276000000),
654         VRPAIR(VLEV_115, 301000000),
655         VRPAIR(VLEV_120, 525000000),
656         VRPAIR(VLEV_125, 550000000),
657         VRPAIR(VLEV_130, 600000000),
658 };
659
660 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
661         .tuple_tab = cclk_vlev_datasheet,
662         .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
663         .vr_settling_time = 25 /* us */,
664 };
665
666 static struct platform_device bfin_dpmc = {
667         .name = "bfin dpmc",
668         .dev = {
669                 .platform_data = &bfin_dmpc_vreg_data,
670         },
671 };
672
673 static struct platform_device *cm_bf548_devices[] __initdata = {
674
675         &bfin_dpmc,
676
677 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
678         &rtc_device,
679 #endif
680
681 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
682         &bfin_uart_device,
683 #endif
684
685 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
686         &bfin_sir_device,
687 #endif
688
689 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
690         &bf54x_lq043_device,
691 #endif
692
693 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
694         &smsc911x_device,
695 #endif
696
697 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
698         &musb_device,
699 #endif
700
701 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
702         &bfin_atapi_device,
703 #endif
704
705 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
706         &bf5xx_nand_device,
707 #endif
708
709 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
710         &bf54x_sdh_device,
711 #endif
712
713 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
714         &bf54x_spi_master0,
715         &bf54x_spi_master1,
716 #endif
717
718 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
719         &bf54x_kpad_device,
720 #endif
721
722 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
723         &i2c_bfin_twi0_device,
724 #if !defined(CONFIG_BF542)
725         &i2c_bfin_twi1_device,
726 #endif
727 #endif
728
729 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
730         &bfin_device_gpiokeys,
731 #endif
732
733 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
734         &para_flash_device,
735 #endif
736 };
737
738 static int __init cm_bf548_init(void)
739 {
740         printk(KERN_INFO "%s(): registering device resources\n", __func__);
741         platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices));
742
743 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
744         spi_register_board_info(bf54x_spi_board_info,
745                         ARRAY_SIZE(bf54x_spi_board_info));
746 #endif
747
748         return 0;
749 }
750
751 arch_initcall(cm_bf548_init);