Blackfin arch: get oprofile work for user space
[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 static struct resource bfin_gpios_resources = {
307         .start = 0,
308         .end   = MAX_BLACKFIN_GPIOS - 1,
309         .flags = IORESOURCE_IRQ,
310 };
311
312 static struct platform_device bfin_gpios_device = {
313         .name = "simple-gpio",
314         .id = -1,
315         .num_resources = 1,
316         .resource = &bfin_gpios_resources,
317 };
318
319 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
320 static struct resource bfin_atapi_resources[] = {
321         {
322                 .start = 0xFFC03800,
323                 .end = 0xFFC0386F,
324                 .flags = IORESOURCE_MEM,
325         },
326         {
327                 .start = IRQ_ATAPI_ERR,
328                 .end = IRQ_ATAPI_ERR,
329                 .flags = IORESOURCE_IRQ,
330         },
331 };
332
333 static struct platform_device bfin_atapi_device = {
334         .name = "pata-bf54x",
335         .id = -1,
336         .num_resources = ARRAY_SIZE(bfin_atapi_resources),
337         .resource = bfin_atapi_resources,
338 };
339 #endif
340
341 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
342 static struct mtd_partition partition_info[] = {
343         {
344                 .name = "linux kernel(nand)",
345                 .offset = 0,
346                 .size = 4 * 1024 * 1024,
347         },
348         {
349                 .name = "file system(nand)",
350                 .offset = 4 * 1024 * 1024,
351                 .size = (256 - 4) * 1024 * 1024,
352         },
353 };
354
355 static struct bf5xx_nand_platform bf5xx_nand_platform = {
356         .page_size = NFC_PG_SIZE_256,
357         .data_width = NFC_NWIDTH_8,
358         .partitions = partition_info,
359         .nr_partitions = ARRAY_SIZE(partition_info),
360         .rd_dly = 3,
361         .wr_dly = 3,
362 };
363
364 static struct resource bf5xx_nand_resources[] = {
365         {
366                 .start = 0xFFC03B00,
367                 .end = 0xFFC03B4F,
368                 .flags = IORESOURCE_MEM,
369         },
370         {
371                 .start = CH_NFC,
372                 .end = CH_NFC,
373                 .flags = IORESOURCE_IRQ,
374         },
375 };
376
377 static struct platform_device bf5xx_nand_device = {
378         .name = "bf5xx-nand",
379         .id = 0,
380         .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
381         .resource = bf5xx_nand_resources,
382         .dev = {
383                 .platform_data = &bf5xx_nand_platform,
384         },
385 };
386 #endif
387
388 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
389 static struct platform_device bf54x_sdh_device = {
390         .name = "bfin-sdh",
391         .id = 0,
392 };
393 #endif
394
395 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
396 static struct mtd_partition para_partitions[] = {
397         {
398                 .name       = "bootloader(nor)",
399                 .size       = 0x40000,
400                 .offset     = 0,
401         }, {
402                 .name       = "linux kernel(nor)",
403                 .size       = 0x400000,
404                 .offset     = MTDPART_OFS_APPEND,
405         }, {
406                 .name       = "file system(nor)",
407                 .size       = MTDPART_SIZ_FULL,
408                 .offset     = MTDPART_OFS_APPEND,
409         }
410 };
411
412 static struct physmap_flash_data para_flash_data = {
413         .width      = 2,
414         .parts      = para_partitions,
415         .nr_parts   = ARRAY_SIZE(para_partitions),
416 };
417
418 static struct resource para_flash_resource = {
419         .start = 0x20000000,
420         .end   = 0x207fffff,
421         .flags = IORESOURCE_MEM,
422 };
423
424 static struct platform_device para_flash_device = {
425         .name          = "physmap-flash",
426         .id            = 0,
427         .dev = {
428                 .platform_data = &para_flash_data,
429         },
430         .num_resources = 1,
431         .resource      = &para_flash_resource,
432 };
433 #endif
434
435 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
436 /* all SPI peripherals info goes here */
437 #if defined(CONFIG_MTD_M25P80) \
438         || defined(CONFIG_MTD_M25P80_MODULE)
439 /* SPI flash chip (m25p16) */
440 static struct mtd_partition bfin_spi_flash_partitions[] = {
441         {
442                 .name = "bootloader(spi)",
443                 .size = 0x00040000,
444                 .offset = 0,
445                 .mask_flags = MTD_CAP_ROM
446         }, {
447                 .name = "linux kernel(spi)",
448                 .size = 0x1c0000,
449                 .offset = 0x40000
450         }
451 };
452
453 static struct flash_platform_data bfin_spi_flash_data = {
454         .name = "m25p80",
455         .parts = bfin_spi_flash_partitions,
456         .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
457         .type = "m25p16",
458 };
459
460 static struct bfin5xx_spi_chip spi_flash_chip_info = {
461         .enable_dma = 0,         /* use dma transfer with this chip*/
462         .bits_per_word = 8,
463         .cs_change_per_word = 0,
464 };
465 #endif
466
467 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
468 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
469         .cs_change_per_word = 0,
470         .enable_dma = 0,
471         .bits_per_word = 16,
472 };
473
474 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
475         .model                  = 7877,
476         .vref_delay_usecs       = 50,   /* internal, no capacitor */
477         .x_plate_ohms           = 419,
478         .y_plate_ohms           = 486,
479         .pressure_max           = 1000,
480         .pressure_min           = 0,
481         .stopacq_polarity       = 1,
482         .first_conversion_delay = 3,
483         .acquisition_time       = 1,
484         .averaging              = 1,
485         .pen_down_acc_interval  = 1,
486 };
487 #endif
488
489 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
490 static struct bfin5xx_spi_chip spidev_chip_info = {
491         .enable_dma = 0,
492         .bits_per_word = 8,
493 };
494 #endif
495
496 static struct spi_board_info bf54x_spi_board_info[] __initdata = {
497 #if defined(CONFIG_MTD_M25P80) \
498         || defined(CONFIG_MTD_M25P80_MODULE)
499         {
500                 /* the modalias must be the same as spi device driver name */
501                 .modalias = "m25p80", /* Name of spi_driver for this device */
502                 .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
503                 .bus_num = 0, /* Framework bus number */
504                 .chip_select = 1, /* SPI_SSEL1*/
505                 .platform_data = &bfin_spi_flash_data,
506                 .controller_data = &spi_flash_chip_info,
507                 .mode = SPI_MODE_3,
508         },
509 #endif
510 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
511 {
512         .modalias               = "ad7877",
513         .platform_data          = &bfin_ad7877_ts_info,
514         .irq                    = IRQ_PJ11,
515         .max_speed_hz           = 12500000,     /* max spi clock (SCK) speed in HZ */
516         .bus_num                = 0,
517         .chip_select            = 2,
518         .controller_data = &spi_ad7877_chip_info,
519 },
520 #endif
521 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
522         {
523                 .modalias = "spidev",
524                 .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
525                 .bus_num = 0,
526                 .chip_select = 1,
527                 .controller_data = &spidev_chip_info,
528         },
529 #endif
530 };
531
532 /* SPI (0) */
533 static struct resource bfin_spi0_resource[] = {
534         [0] = {
535                 .start = SPI0_REGBASE,
536                 .end   = SPI0_REGBASE + 0xFF,
537                 .flags = IORESOURCE_MEM,
538         },
539         [1] = {
540                 .start = CH_SPI0,
541                 .end   = CH_SPI0,
542                 .flags = IORESOURCE_IRQ,
543         }
544 };
545
546 /* SPI (1) */
547 static struct resource bfin_spi1_resource[] = {
548         [0] = {
549                 .start = SPI1_REGBASE,
550                 .end   = SPI1_REGBASE + 0xFF,
551                 .flags = IORESOURCE_MEM,
552         },
553         [1] = {
554                 .start = CH_SPI1,
555                 .end   = CH_SPI1,
556                 .flags = IORESOURCE_IRQ,
557         }
558 };
559
560 /* SPI controller data */
561 static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
562         .num_chipselect = 8,
563         .enable_dma = 1,  /* master has the ability to do dma transfer */
564         .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
565 };
566
567 static struct platform_device bf54x_spi_master0 = {
568         .name = "bfin-spi",
569         .id = 0, /* Bus number */
570         .num_resources = ARRAY_SIZE(bfin_spi0_resource),
571         .resource = bfin_spi0_resource,
572         .dev = {
573                 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
574                 },
575 };
576
577 static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
578         .num_chipselect = 8,
579         .enable_dma = 1,  /* master has the ability to do dma transfer */
580         .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
581 };
582
583 static struct platform_device bf54x_spi_master1 = {
584         .name = "bfin-spi",
585         .id = 1, /* Bus number */
586         .num_resources = ARRAY_SIZE(bfin_spi1_resource),
587         .resource = bfin_spi1_resource,
588         .dev = {
589                 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
590                 },
591 };
592 #endif  /* spi master and devices */
593
594 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
595 static struct resource bfin_twi0_resource[] = {
596         [0] = {
597                 .start = TWI0_REGBASE,
598                 .end   = TWI0_REGBASE + 0xFF,
599                 .flags = IORESOURCE_MEM,
600         },
601         [1] = {
602                 .start = IRQ_TWI0,
603                 .end   = IRQ_TWI0,
604                 .flags = IORESOURCE_IRQ,
605         },
606 };
607
608 static struct platform_device i2c_bfin_twi0_device = {
609         .name = "i2c-bfin-twi",
610         .id = 0,
611         .num_resources = ARRAY_SIZE(bfin_twi0_resource),
612         .resource = bfin_twi0_resource,
613 };
614
615 #if !defined(CONFIG_BF542)      /* The BF542 only has 1 TWI */
616 static struct resource bfin_twi1_resource[] = {
617         [0] = {
618                 .start = TWI1_REGBASE,
619                 .end   = TWI1_REGBASE + 0xFF,
620                 .flags = IORESOURCE_MEM,
621         },
622         [1] = {
623                 .start = IRQ_TWI1,
624                 .end   = IRQ_TWI1,
625                 .flags = IORESOURCE_IRQ,
626         },
627 };
628
629 static struct platform_device i2c_bfin_twi1_device = {
630         .name = "i2c-bfin-twi",
631         .id = 1,
632         .num_resources = ARRAY_SIZE(bfin_twi1_resource),
633         .resource = bfin_twi1_resource,
634 };
635 #endif
636 #endif
637
638 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
639 #include <linux/gpio_keys.h>
640
641 static struct gpio_keys_button bfin_gpio_keys_table[] = {
642         {BTN_0, GPIO_PH7, 1, "gpio-keys: BTN0"},
643 };
644
645 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
646         .buttons        = bfin_gpio_keys_table,
647         .nbuttons       = ARRAY_SIZE(bfin_gpio_keys_table),
648 };
649
650 static struct platform_device bfin_device_gpiokeys = {
651         .name      = "gpio-keys",
652         .dev = {
653                 .platform_data = &bfin_gpio_keys_data,
654         },
655 };
656 #endif
657
658 static const unsigned int cclk_vlev_datasheet[] =
659 {
660 /*
661  * Internal VLEV BF54XSBBC1533
662  ****temporarily using these values until data sheet is updated
663  */
664         VRPAIR(VLEV_085, 150000000),
665         VRPAIR(VLEV_090, 250000000),
666         VRPAIR(VLEV_110, 276000000),
667         VRPAIR(VLEV_115, 301000000),
668         VRPAIR(VLEV_120, 525000000),
669         VRPAIR(VLEV_125, 550000000),
670         VRPAIR(VLEV_130, 600000000),
671 };
672
673 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
674         .tuple_tab = cclk_vlev_datasheet,
675         .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
676         .vr_settling_time = 25 /* us */,
677 };
678
679 static struct platform_device bfin_dpmc = {
680         .name = "bfin dpmc",
681         .dev = {
682                 .platform_data = &bfin_dmpc_vreg_data,
683         },
684 };
685
686 static struct platform_device *cm_bf548_devices[] __initdata = {
687
688         &bfin_dpmc,
689
690 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
691         &rtc_device,
692 #endif
693
694 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
695         &bfin_uart_device,
696 #endif
697
698 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
699         &bfin_sir_device,
700 #endif
701
702 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
703         &bf54x_lq043_device,
704 #endif
705
706 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
707         &smsc911x_device,
708 #endif
709
710 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
711         &musb_device,
712 #endif
713
714 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
715         &bfin_atapi_device,
716 #endif
717
718 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
719         &bf5xx_nand_device,
720 #endif
721
722 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
723         &bf54x_sdh_device,
724 #endif
725
726 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
727         &bf54x_spi_master0,
728         &bf54x_spi_master1,
729 #endif
730
731 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
732         &bf54x_kpad_device,
733 #endif
734
735 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
736         &i2c_bfin_twi0_device,
737 #if !defined(CONFIG_BF542)
738         &i2c_bfin_twi1_device,
739 #endif
740 #endif
741
742 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
743         &bfin_device_gpiokeys,
744 #endif
745
746 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
747         &para_flash_device,
748 #endif
749
750         &bfin_gpios_device,
751 };
752
753 static int __init cm_bf548_init(void)
754 {
755         printk(KERN_INFO "%s(): registering device resources\n", __func__);
756         platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices));
757
758 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
759         spi_register_board_info(bf54x_spi_board_info,
760                         ARRAY_SIZE(bf54x_spi_board_info));
761 #endif
762
763         return 0;
764 }
765
766 arch_initcall(cm_bf548_init);