cm_bf548.c 16 KB

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