board-da850-evm.c 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. /*
  2. * TI DA850/OMAP-L138 EVM board
  3. *
  4. * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * Derived from: arch/arm/mach-davinci/board-da830-evm.c
  7. * Original Copyrights follow:
  8. *
  9. * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under
  10. * the terms of the GNU General Public License version 2. This program
  11. * is licensed "as is" without any warranty of any kind, whether express
  12. * or implied.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/init.h>
  16. #include <linux/console.h>
  17. #include <linux/i2c.h>
  18. #include <linux/i2c/at24.h>
  19. #include <linux/i2c/pca953x.h>
  20. #include <linux/input.h>
  21. #include <linux/mfd/tps6507x.h>
  22. #include <linux/gpio.h>
  23. #include <linux/gpio_keys.h>
  24. #include <linux/platform_device.h>
  25. #include <linux/mtd/mtd.h>
  26. #include <linux/mtd/nand.h>
  27. #include <linux/mtd/partitions.h>
  28. #include <linux/mtd/physmap.h>
  29. #include <linux/regulator/machine.h>
  30. #include <linux/regulator/tps6507x.h>
  31. #include <linux/input/tps6507x-ts.h>
  32. #include <asm/mach-types.h>
  33. #include <asm/mach/arch.h>
  34. #include <mach/cp_intc.h>
  35. #include <mach/da8xx.h>
  36. #include <mach/nand.h>
  37. #include <mach/mux.h>
  38. #include <mach/aemif.h>
  39. #define DA850_EVM_PHY_ID "0:00"
  40. #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8)
  41. #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15)
  42. #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0)
  43. #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1)
  44. #define DA850_MII_MDIO_CLKEN_PIN GPIO_TO_PIN(2, 6)
  45. static struct mtd_partition da850_evm_norflash_partition[] = {
  46. {
  47. .name = "bootloaders + env",
  48. .offset = 0,
  49. .size = SZ_512K,
  50. .mask_flags = MTD_WRITEABLE,
  51. },
  52. {
  53. .name = "kernel",
  54. .offset = MTDPART_OFS_APPEND,
  55. .size = SZ_2M,
  56. .mask_flags = 0,
  57. },
  58. {
  59. .name = "filesystem",
  60. .offset = MTDPART_OFS_APPEND,
  61. .size = MTDPART_SIZ_FULL,
  62. .mask_flags = 0,
  63. },
  64. };
  65. static struct physmap_flash_data da850_evm_norflash_data = {
  66. .width = 2,
  67. .parts = da850_evm_norflash_partition,
  68. .nr_parts = ARRAY_SIZE(da850_evm_norflash_partition),
  69. };
  70. static struct resource da850_evm_norflash_resource[] = {
  71. {
  72. .start = DA8XX_AEMIF_CS2_BASE,
  73. .end = DA8XX_AEMIF_CS2_BASE + SZ_32M - 1,
  74. .flags = IORESOURCE_MEM,
  75. },
  76. };
  77. static struct platform_device da850_evm_norflash_device = {
  78. .name = "physmap-flash",
  79. .id = 0,
  80. .dev = {
  81. .platform_data = &da850_evm_norflash_data,
  82. },
  83. .num_resources = 1,
  84. .resource = da850_evm_norflash_resource,
  85. };
  86. static struct davinci_pm_config da850_pm_pdata = {
  87. .sleepcount = 128,
  88. };
  89. static struct platform_device da850_pm_device = {
  90. .name = "pm-davinci",
  91. .dev = {
  92. .platform_data = &da850_pm_pdata,
  93. },
  94. .id = -1,
  95. };
  96. /* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash
  97. * (128K blocks). It may be used instead of the (default) SPI flash
  98. * to boot, using TI's tools to install the secondary boot loader
  99. * (UBL) and U-Boot.
  100. */
  101. static struct mtd_partition da850_evm_nandflash_partition[] = {
  102. {
  103. .name = "u-boot env",
  104. .offset = 0,
  105. .size = SZ_128K,
  106. .mask_flags = MTD_WRITEABLE,
  107. },
  108. {
  109. .name = "UBL",
  110. .offset = MTDPART_OFS_APPEND,
  111. .size = SZ_128K,
  112. .mask_flags = MTD_WRITEABLE,
  113. },
  114. {
  115. .name = "u-boot",
  116. .offset = MTDPART_OFS_APPEND,
  117. .size = 4 * SZ_128K,
  118. .mask_flags = MTD_WRITEABLE,
  119. },
  120. {
  121. .name = "kernel",
  122. .offset = 0x200000,
  123. .size = SZ_2M,
  124. .mask_flags = 0,
  125. },
  126. {
  127. .name = "filesystem",
  128. .offset = MTDPART_OFS_APPEND,
  129. .size = MTDPART_SIZ_FULL,
  130. .mask_flags = 0,
  131. },
  132. };
  133. static struct davinci_aemif_timing da850_evm_nandflash_timing = {
  134. .wsetup = 24,
  135. .wstrobe = 21,
  136. .whold = 14,
  137. .rsetup = 19,
  138. .rstrobe = 50,
  139. .rhold = 0,
  140. .ta = 20,
  141. };
  142. static struct davinci_nand_pdata da850_evm_nandflash_data = {
  143. .parts = da850_evm_nandflash_partition,
  144. .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
  145. .ecc_mode = NAND_ECC_HW,
  146. .ecc_bits = 4,
  147. .options = NAND_USE_FLASH_BBT,
  148. .timing = &da850_evm_nandflash_timing,
  149. };
  150. static struct resource da850_evm_nandflash_resource[] = {
  151. {
  152. .start = DA8XX_AEMIF_CS3_BASE,
  153. .end = DA8XX_AEMIF_CS3_BASE + SZ_512K + 2 * SZ_1K - 1,
  154. .flags = IORESOURCE_MEM,
  155. },
  156. {
  157. .start = DA8XX_AEMIF_CTL_BASE,
  158. .end = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
  159. .flags = IORESOURCE_MEM,
  160. },
  161. };
  162. static struct platform_device da850_evm_nandflash_device = {
  163. .name = "davinci_nand",
  164. .id = 1,
  165. .dev = {
  166. .platform_data = &da850_evm_nandflash_data,
  167. },
  168. .num_resources = ARRAY_SIZE(da850_evm_nandflash_resource),
  169. .resource = da850_evm_nandflash_resource,
  170. };
  171. static struct platform_device *da850_evm_devices[] __initdata = {
  172. &da850_evm_nandflash_device,
  173. &da850_evm_norflash_device,
  174. };
  175. #define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
  176. #define DA8XX_AEMIF_ASIZE_16BIT 0x1
  177. static void __init da850_evm_init_nor(void)
  178. {
  179. void __iomem *aemif_addr;
  180. aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
  181. /* Configure data bus width of CS2 to 16 bit */
  182. writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
  183. DA8XX_AEMIF_ASIZE_16BIT,
  184. aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
  185. iounmap(aemif_addr);
  186. }
  187. static const short da850_evm_nand_pins[] = {
  188. DA850_EMA_D_0, DA850_EMA_D_1, DA850_EMA_D_2, DA850_EMA_D_3,
  189. DA850_EMA_D_4, DA850_EMA_D_5, DA850_EMA_D_6, DA850_EMA_D_7,
  190. DA850_EMA_A_1, DA850_EMA_A_2, DA850_NEMA_CS_3, DA850_NEMA_CS_4,
  191. DA850_NEMA_WE, DA850_NEMA_OE,
  192. -1
  193. };
  194. static const short da850_evm_nor_pins[] = {
  195. DA850_EMA_BA_1, DA850_EMA_CLK, DA850_EMA_WAIT_1, DA850_NEMA_CS_2,
  196. DA850_NEMA_WE, DA850_NEMA_OE, DA850_EMA_D_0, DA850_EMA_D_1,
  197. DA850_EMA_D_2, DA850_EMA_D_3, DA850_EMA_D_4, DA850_EMA_D_5,
  198. DA850_EMA_D_6, DA850_EMA_D_7, DA850_EMA_D_8, DA850_EMA_D_9,
  199. DA850_EMA_D_10, DA850_EMA_D_11, DA850_EMA_D_12, DA850_EMA_D_13,
  200. DA850_EMA_D_14, DA850_EMA_D_15, DA850_EMA_A_0, DA850_EMA_A_1,
  201. DA850_EMA_A_2, DA850_EMA_A_3, DA850_EMA_A_4, DA850_EMA_A_5,
  202. DA850_EMA_A_6, DA850_EMA_A_7, DA850_EMA_A_8, DA850_EMA_A_9,
  203. DA850_EMA_A_10, DA850_EMA_A_11, DA850_EMA_A_12, DA850_EMA_A_13,
  204. DA850_EMA_A_14, DA850_EMA_A_15, DA850_EMA_A_16, DA850_EMA_A_17,
  205. DA850_EMA_A_18, DA850_EMA_A_19, DA850_EMA_A_20, DA850_EMA_A_21,
  206. DA850_EMA_A_22, DA850_EMA_A_23,
  207. -1
  208. };
  209. static u32 ui_card_detected;
  210. #if defined(CONFIG_MMC_DAVINCI) || \
  211. defined(CONFIG_MMC_DAVINCI_MODULE)
  212. #define HAS_MMC 1
  213. #else
  214. #define HAS_MMC 0
  215. #endif
  216. static inline void da850_evm_setup_nor_nand(void)
  217. {
  218. int ret = 0;
  219. if (ui_card_detected & !HAS_MMC) {
  220. ret = davinci_cfg_reg_list(da850_evm_nand_pins);
  221. if (ret)
  222. pr_warning("da850_evm_init: nand mux setup failed: "
  223. "%d\n", ret);
  224. ret = davinci_cfg_reg_list(da850_evm_nor_pins);
  225. if (ret)
  226. pr_warning("da850_evm_init: nor mux setup failed: %d\n",
  227. ret);
  228. da850_evm_init_nor();
  229. platform_add_devices(da850_evm_devices,
  230. ARRAY_SIZE(da850_evm_devices));
  231. }
  232. }
  233. #ifdef CONFIG_DA850_UI_RMII
  234. static inline void da850_evm_setup_emac_rmii(int rmii_sel)
  235. {
  236. struct davinci_soc_info *soc_info = &davinci_soc_info;
  237. soc_info->emac_pdata->rmii_en = 1;
  238. gpio_set_value_cansleep(rmii_sel, 0);
  239. }
  240. #else
  241. static inline void da850_evm_setup_emac_rmii(int rmii_sel) { }
  242. #endif
  243. #define DA850_KEYS_DEBOUNCE_MS 10
  244. /*
  245. * At 200ms polling interval it is possible to miss an
  246. * event by tapping very lightly on the push button but most
  247. * pushes do result in an event; longer intervals require the
  248. * user to hold the button whereas shorter intervals require
  249. * more CPU time for polling.
  250. */
  251. #define DA850_GPIO_KEYS_POLL_MS 200
  252. enum da850_evm_ui_exp_pins {
  253. DA850_EVM_UI_EXP_SEL_C = 5,
  254. DA850_EVM_UI_EXP_SEL_B,
  255. DA850_EVM_UI_EXP_SEL_A,
  256. DA850_EVM_UI_EXP_PB8,
  257. DA850_EVM_UI_EXP_PB7,
  258. DA850_EVM_UI_EXP_PB6,
  259. DA850_EVM_UI_EXP_PB5,
  260. DA850_EVM_UI_EXP_PB4,
  261. DA850_EVM_UI_EXP_PB3,
  262. DA850_EVM_UI_EXP_PB2,
  263. DA850_EVM_UI_EXP_PB1,
  264. };
  265. static const char const *da850_evm_ui_exp[] = {
  266. [DA850_EVM_UI_EXP_SEL_C] = "sel_c",
  267. [DA850_EVM_UI_EXP_SEL_B] = "sel_b",
  268. [DA850_EVM_UI_EXP_SEL_A] = "sel_a",
  269. [DA850_EVM_UI_EXP_PB8] = "pb8",
  270. [DA850_EVM_UI_EXP_PB7] = "pb7",
  271. [DA850_EVM_UI_EXP_PB6] = "pb6",
  272. [DA850_EVM_UI_EXP_PB5] = "pb5",
  273. [DA850_EVM_UI_EXP_PB4] = "pb4",
  274. [DA850_EVM_UI_EXP_PB3] = "pb3",
  275. [DA850_EVM_UI_EXP_PB2] = "pb2",
  276. [DA850_EVM_UI_EXP_PB1] = "pb1",
  277. };
  278. #define DA850_N_UI_PB 8
  279. static struct gpio_keys_button da850_evm_ui_keys[] = {
  280. [0 ... DA850_N_UI_PB - 1] = {
  281. .type = EV_KEY,
  282. .active_low = 1,
  283. .wakeup = 0,
  284. .debounce_interval = DA850_KEYS_DEBOUNCE_MS,
  285. .code = -1, /* assigned at runtime */
  286. .gpio = -1, /* assigned at runtime */
  287. .desc = NULL, /* assigned at runtime */
  288. },
  289. };
  290. static struct gpio_keys_platform_data da850_evm_ui_keys_pdata = {
  291. .buttons = da850_evm_ui_keys,
  292. .nbuttons = ARRAY_SIZE(da850_evm_ui_keys),
  293. .poll_interval = DA850_GPIO_KEYS_POLL_MS,
  294. };
  295. static struct platform_device da850_evm_ui_keys_device = {
  296. .name = "gpio-keys-polled",
  297. .id = 0,
  298. .dev = {
  299. .platform_data = &da850_evm_ui_keys_pdata
  300. },
  301. };
  302. static void da850_evm_ui_keys_init(unsigned gpio)
  303. {
  304. int i;
  305. struct gpio_keys_button *button;
  306. for (i = 0; i < DA850_N_UI_PB; i++) {
  307. button = &da850_evm_ui_keys[i];
  308. button->code = KEY_F8 - i;
  309. button->desc = (char *)
  310. da850_evm_ui_exp[DA850_EVM_UI_EXP_PB8 + i];
  311. button->gpio = gpio + DA850_EVM_UI_EXP_PB8 + i;
  312. }
  313. }
  314. static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
  315. unsigned ngpio, void *c)
  316. {
  317. int sel_a, sel_b, sel_c, ret;
  318. sel_a = gpio + DA850_EVM_UI_EXP_SEL_A;
  319. sel_b = gpio + DA850_EVM_UI_EXP_SEL_B;
  320. sel_c = gpio + DA850_EVM_UI_EXP_SEL_C;
  321. ret = gpio_request(sel_a, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_A]);
  322. if (ret) {
  323. pr_warning("Cannot open UI expander pin %d\n", sel_a);
  324. goto exp_setup_sela_fail;
  325. }
  326. ret = gpio_request(sel_b, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_B]);
  327. if (ret) {
  328. pr_warning("Cannot open UI expander pin %d\n", sel_b);
  329. goto exp_setup_selb_fail;
  330. }
  331. ret = gpio_request(sel_c, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_C]);
  332. if (ret) {
  333. pr_warning("Cannot open UI expander pin %d\n", sel_c);
  334. goto exp_setup_selc_fail;
  335. }
  336. /* deselect all functionalities */
  337. gpio_direction_output(sel_a, 1);
  338. gpio_direction_output(sel_b, 1);
  339. gpio_direction_output(sel_c, 1);
  340. da850_evm_ui_keys_init(gpio);
  341. ret = platform_device_register(&da850_evm_ui_keys_device);
  342. if (ret) {
  343. pr_warning("Could not register UI GPIO expander push-buttons");
  344. goto exp_setup_keys_fail;
  345. }
  346. ui_card_detected = 1;
  347. pr_info("DA850/OMAP-L138 EVM UI card detected\n");
  348. da850_evm_setup_nor_nand();
  349. da850_evm_setup_emac_rmii(sel_a);
  350. return 0;
  351. exp_setup_keys_fail:
  352. gpio_free(sel_c);
  353. exp_setup_selc_fail:
  354. gpio_free(sel_b);
  355. exp_setup_selb_fail:
  356. gpio_free(sel_a);
  357. exp_setup_sela_fail:
  358. return ret;
  359. }
  360. static int da850_evm_ui_expander_teardown(struct i2c_client *client,
  361. unsigned gpio, unsigned ngpio, void *c)
  362. {
  363. platform_device_unregister(&da850_evm_ui_keys_device);
  364. /* deselect all functionalities */
  365. gpio_set_value_cansleep(gpio + DA850_EVM_UI_EXP_SEL_C, 1);
  366. gpio_set_value_cansleep(gpio + DA850_EVM_UI_EXP_SEL_B, 1);
  367. gpio_set_value_cansleep(gpio + DA850_EVM_UI_EXP_SEL_A, 1);
  368. gpio_free(gpio + DA850_EVM_UI_EXP_SEL_C);
  369. gpio_free(gpio + DA850_EVM_UI_EXP_SEL_B);
  370. gpio_free(gpio + DA850_EVM_UI_EXP_SEL_A);
  371. return 0;
  372. }
  373. /* assign the baseboard expander's GPIOs after the UI board's */
  374. #define DA850_UI_EXPANDER_N_GPIOS ARRAY_SIZE(da850_evm_ui_exp)
  375. #define DA850_BB_EXPANDER_GPIO_BASE (DAVINCI_N_GPIO + DA850_UI_EXPANDER_N_GPIOS)
  376. enum da850_evm_bb_exp_pins {
  377. DA850_EVM_BB_EXP_DEEP_SLEEP_EN = 0,
  378. DA850_EVM_BB_EXP_SW_RST,
  379. DA850_EVM_BB_EXP_TP_23,
  380. DA850_EVM_BB_EXP_TP_22,
  381. DA850_EVM_BB_EXP_TP_21,
  382. DA850_EVM_BB_EXP_USER_PB1,
  383. DA850_EVM_BB_EXP_USER_LED2,
  384. DA850_EVM_BB_EXP_USER_LED1,
  385. DA850_EVM_BB_EXP_USER_SW1,
  386. DA850_EVM_BB_EXP_USER_SW2,
  387. DA850_EVM_BB_EXP_USER_SW3,
  388. DA850_EVM_BB_EXP_USER_SW4,
  389. DA850_EVM_BB_EXP_USER_SW5,
  390. DA850_EVM_BB_EXP_USER_SW6,
  391. DA850_EVM_BB_EXP_USER_SW7,
  392. DA850_EVM_BB_EXP_USER_SW8
  393. };
  394. static const char const *da850_evm_bb_exp[] = {
  395. [DA850_EVM_BB_EXP_DEEP_SLEEP_EN] = "deep_sleep_en",
  396. [DA850_EVM_BB_EXP_SW_RST] = "sw_rst",
  397. [DA850_EVM_BB_EXP_TP_23] = "tp_23",
  398. [DA850_EVM_BB_EXP_TP_22] = "tp_22",
  399. [DA850_EVM_BB_EXP_TP_21] = "tp_21",
  400. [DA850_EVM_BB_EXP_USER_PB1] = "user_pb1",
  401. [DA850_EVM_BB_EXP_USER_LED2] = "user_led2",
  402. [DA850_EVM_BB_EXP_USER_LED1] = "user_led1",
  403. [DA850_EVM_BB_EXP_USER_SW1] = "user_sw1",
  404. [DA850_EVM_BB_EXP_USER_SW2] = "user_sw2",
  405. [DA850_EVM_BB_EXP_USER_SW3] = "user_sw3",
  406. [DA850_EVM_BB_EXP_USER_SW4] = "user_sw4",
  407. [DA850_EVM_BB_EXP_USER_SW5] = "user_sw5",
  408. [DA850_EVM_BB_EXP_USER_SW6] = "user_sw6",
  409. [DA850_EVM_BB_EXP_USER_SW7] = "user_sw7",
  410. [DA850_EVM_BB_EXP_USER_SW8] = "user_sw8",
  411. };
  412. #define DA850_N_BB_USER_SW 8
  413. static struct gpio_keys_button da850_evm_bb_keys[] = {
  414. [0] = {
  415. .type = EV_KEY,
  416. .active_low = 1,
  417. .wakeup = 0,
  418. .debounce_interval = DA850_KEYS_DEBOUNCE_MS,
  419. .code = KEY_PROG1,
  420. .desc = NULL, /* assigned at runtime */
  421. .gpio = -1, /* assigned at runtime */
  422. },
  423. [1 ... DA850_N_BB_USER_SW] = {
  424. .type = EV_SW,
  425. .active_low = 1,
  426. .wakeup = 0,
  427. .debounce_interval = DA850_KEYS_DEBOUNCE_MS,
  428. .code = -1, /* assigned at runtime */
  429. .desc = NULL, /* assigned at runtime */
  430. .gpio = -1, /* assigned at runtime */
  431. },
  432. };
  433. static struct gpio_keys_platform_data da850_evm_bb_keys_pdata = {
  434. .buttons = da850_evm_bb_keys,
  435. .nbuttons = ARRAY_SIZE(da850_evm_bb_keys),
  436. .poll_interval = DA850_GPIO_KEYS_POLL_MS,
  437. };
  438. static struct platform_device da850_evm_bb_keys_device = {
  439. .name = "gpio-keys-polled",
  440. .id = 1,
  441. .dev = {
  442. .platform_data = &da850_evm_bb_keys_pdata
  443. },
  444. };
  445. static void da850_evm_bb_keys_init(unsigned gpio)
  446. {
  447. int i;
  448. struct gpio_keys_button *button;
  449. button = &da850_evm_bb_keys[0];
  450. button->desc = (char *)
  451. da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_PB1];
  452. button->gpio = gpio + DA850_EVM_BB_EXP_USER_PB1;
  453. for (i = 0; i < DA850_N_BB_USER_SW; i++) {
  454. button = &da850_evm_bb_keys[i + 1];
  455. button->code = SW_LID + i;
  456. button->desc = (char *)
  457. da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_SW1 + i];
  458. button->gpio = gpio + DA850_EVM_BB_EXP_USER_SW1 + i;
  459. }
  460. }
  461. #define DA850_N_BB_USER_LED 2
  462. static struct gpio_led da850_evm_bb_leds[] = {
  463. [0 ... DA850_N_BB_USER_LED - 1] = {
  464. .active_low = 1,
  465. .gpio = -1, /* assigned at runtime */
  466. .name = NULL, /* assigned at runtime */
  467. },
  468. };
  469. static struct gpio_led_platform_data da850_evm_bb_leds_pdata = {
  470. .leds = da850_evm_bb_leds,
  471. .num_leds = ARRAY_SIZE(da850_evm_bb_leds),
  472. };
  473. static struct platform_device da850_evm_bb_leds_device = {
  474. .name = "leds-gpio",
  475. .id = -1,
  476. .dev = {
  477. .platform_data = &da850_evm_bb_leds_pdata
  478. }
  479. };
  480. static void da850_evm_bb_leds_init(unsigned gpio)
  481. {
  482. int i;
  483. struct gpio_led *led;
  484. for (i = 0; i < DA850_N_BB_USER_LED; i++) {
  485. led = &da850_evm_bb_leds[i];
  486. led->gpio = gpio + DA850_EVM_BB_EXP_USER_LED2 + i;
  487. led->name =
  488. da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_LED2 + i];
  489. }
  490. }
  491. static int da850_evm_bb_expander_setup(struct i2c_client *client,
  492. unsigned gpio, unsigned ngpio,
  493. void *c)
  494. {
  495. int ret;
  496. /*
  497. * Register the switches and pushbutton on the baseboard as a gpio-keys
  498. * device.
  499. */
  500. da850_evm_bb_keys_init(gpio);
  501. ret = platform_device_register(&da850_evm_bb_keys_device);
  502. if (ret) {
  503. pr_warning("Could not register baseboard GPIO expander keys");
  504. goto io_exp_setup_sw_fail;
  505. }
  506. da850_evm_bb_leds_init(gpio);
  507. ret = platform_device_register(&da850_evm_bb_leds_device);
  508. if (ret) {
  509. pr_warning("Could not register baseboard GPIO expander LEDS");
  510. goto io_exp_setup_leds_fail;
  511. }
  512. return 0;
  513. io_exp_setup_leds_fail:
  514. platform_device_unregister(&da850_evm_bb_keys_device);
  515. io_exp_setup_sw_fail:
  516. return ret;
  517. }
  518. static int da850_evm_bb_expander_teardown(struct i2c_client *client,
  519. unsigned gpio, unsigned ngpio, void *c)
  520. {
  521. platform_device_unregister(&da850_evm_bb_leds_device);
  522. platform_device_unregister(&da850_evm_bb_keys_device);
  523. return 0;
  524. }
  525. static struct pca953x_platform_data da850_evm_ui_expander_info = {
  526. .gpio_base = DAVINCI_N_GPIO,
  527. .setup = da850_evm_ui_expander_setup,
  528. .teardown = da850_evm_ui_expander_teardown,
  529. .names = da850_evm_ui_exp,
  530. };
  531. static struct pca953x_platform_data da850_evm_bb_expander_info = {
  532. .gpio_base = DA850_BB_EXPANDER_GPIO_BASE,
  533. .setup = da850_evm_bb_expander_setup,
  534. .teardown = da850_evm_bb_expander_teardown,
  535. .names = da850_evm_bb_exp,
  536. };
  537. static struct i2c_board_info __initdata da850_evm_i2c_devices[] = {
  538. {
  539. I2C_BOARD_INFO("tlv320aic3x", 0x18),
  540. },
  541. {
  542. I2C_BOARD_INFO("tca6416", 0x20),
  543. .platform_data = &da850_evm_ui_expander_info,
  544. },
  545. {
  546. I2C_BOARD_INFO("tca6416", 0x21),
  547. .platform_data = &da850_evm_bb_expander_info,
  548. },
  549. };
  550. static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = {
  551. .bus_freq = 100, /* kHz */
  552. .bus_delay = 0, /* usec */
  553. };
  554. static struct davinci_uart_config da850_evm_uart_config __initdata = {
  555. .enabled_uarts = 0x7,
  556. };
  557. /* davinci da850 evm audio machine driver */
  558. static u8 da850_iis_serializer_direction[] = {
  559. INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
  560. INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
  561. INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, TX_MODE,
  562. RX_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
  563. };
  564. static struct snd_platform_data da850_evm_snd_data = {
  565. .tx_dma_offset = 0x2000,
  566. .rx_dma_offset = 0x2000,
  567. .op_mode = DAVINCI_MCASP_IIS_MODE,
  568. .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction),
  569. .tdm_slots = 2,
  570. .serial_dir = da850_iis_serializer_direction,
  571. .asp_chan_q = EVENTQ_1,
  572. .version = MCASP_VERSION_2,
  573. .txnumevt = 1,
  574. .rxnumevt = 1,
  575. };
  576. static int da850_evm_mmc_get_ro(int index)
  577. {
  578. return gpio_get_value(DA850_MMCSD_WP_PIN);
  579. }
  580. static int da850_evm_mmc_get_cd(int index)
  581. {
  582. return !gpio_get_value(DA850_MMCSD_CD_PIN);
  583. }
  584. static struct davinci_mmc_config da850_mmc_config = {
  585. .get_ro = da850_evm_mmc_get_ro,
  586. .get_cd = da850_evm_mmc_get_cd,
  587. .wires = 4,
  588. .max_freq = 50000000,
  589. .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
  590. .version = MMC_CTLR_VERSION_2,
  591. };
  592. static void da850_panel_power_ctrl(int val)
  593. {
  594. /* lcd backlight */
  595. gpio_set_value(DA850_LCD_BL_PIN, val);
  596. /* lcd power */
  597. gpio_set_value(DA850_LCD_PWR_PIN, val);
  598. }
  599. static int da850_lcd_hw_init(void)
  600. {
  601. int status;
  602. status = gpio_request(DA850_LCD_BL_PIN, "lcd bl\n");
  603. if (status < 0)
  604. return status;
  605. status = gpio_request(DA850_LCD_PWR_PIN, "lcd pwr\n");
  606. if (status < 0) {
  607. gpio_free(DA850_LCD_BL_PIN);
  608. return status;
  609. }
  610. gpio_direction_output(DA850_LCD_BL_PIN, 0);
  611. gpio_direction_output(DA850_LCD_PWR_PIN, 0);
  612. /* Switch off panel power and backlight */
  613. da850_panel_power_ctrl(0);
  614. /* Switch on panel power and backlight */
  615. da850_panel_power_ctrl(1);
  616. return 0;
  617. }
  618. /* TPS65070 voltage regulator support */
  619. /* 3.3V */
  620. static struct regulator_consumer_supply tps65070_dcdc1_consumers[] = {
  621. {
  622. .supply = "usb0_vdda33",
  623. },
  624. {
  625. .supply = "usb1_vdda33",
  626. },
  627. };
  628. /* 3.3V or 1.8V */
  629. static struct regulator_consumer_supply tps65070_dcdc2_consumers[] = {
  630. {
  631. .supply = "dvdd3318_a",
  632. },
  633. {
  634. .supply = "dvdd3318_b",
  635. },
  636. {
  637. .supply = "dvdd3318_c",
  638. },
  639. };
  640. /* 1.2V */
  641. static struct regulator_consumer_supply tps65070_dcdc3_consumers[] = {
  642. {
  643. .supply = "cvdd",
  644. },
  645. };
  646. /* 1.8V LDO */
  647. static struct regulator_consumer_supply tps65070_ldo1_consumers[] = {
  648. {
  649. .supply = "sata_vddr",
  650. },
  651. {
  652. .supply = "usb0_vdda18",
  653. },
  654. {
  655. .supply = "usb1_vdda18",
  656. },
  657. {
  658. .supply = "ddr_dvdd18",
  659. },
  660. };
  661. /* 1.2V LDO */
  662. static struct regulator_consumer_supply tps65070_ldo2_consumers[] = {
  663. {
  664. .supply = "sata_vdd",
  665. },
  666. {
  667. .supply = "pll0_vdda",
  668. },
  669. {
  670. .supply = "pll1_vdda",
  671. },
  672. {
  673. .supply = "usbs_cvdd",
  674. },
  675. {
  676. .supply = "vddarnwa1",
  677. },
  678. };
  679. /* We take advantage of the fact that both defdcdc{2,3} are tied high */
  680. static struct tps6507x_reg_platform_data tps6507x_platform_data = {
  681. .defdcdc_default = true,
  682. };
  683. static struct regulator_init_data tps65070_regulator_data[] = {
  684. /* dcdc1 */
  685. {
  686. .constraints = {
  687. .min_uV = 3150000,
  688. .max_uV = 3450000,
  689. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  690. REGULATOR_CHANGE_STATUS),
  691. .boot_on = 1,
  692. },
  693. .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc1_consumers),
  694. .consumer_supplies = tps65070_dcdc1_consumers,
  695. },
  696. /* dcdc2 */
  697. {
  698. .constraints = {
  699. .min_uV = 1710000,
  700. .max_uV = 3450000,
  701. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  702. REGULATOR_CHANGE_STATUS),
  703. .boot_on = 1,
  704. },
  705. .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers),
  706. .consumer_supplies = tps65070_dcdc2_consumers,
  707. .driver_data = &tps6507x_platform_data,
  708. },
  709. /* dcdc3 */
  710. {
  711. .constraints = {
  712. .min_uV = 950000,
  713. .max_uV = 1350000,
  714. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  715. REGULATOR_CHANGE_STATUS),
  716. .boot_on = 1,
  717. },
  718. .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers),
  719. .consumer_supplies = tps65070_dcdc3_consumers,
  720. .driver_data = &tps6507x_platform_data,
  721. },
  722. /* ldo1 */
  723. {
  724. .constraints = {
  725. .min_uV = 1710000,
  726. .max_uV = 1890000,
  727. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  728. REGULATOR_CHANGE_STATUS),
  729. .boot_on = 1,
  730. },
  731. .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo1_consumers),
  732. .consumer_supplies = tps65070_ldo1_consumers,
  733. },
  734. /* ldo2 */
  735. {
  736. .constraints = {
  737. .min_uV = 1140000,
  738. .max_uV = 1320000,
  739. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  740. REGULATOR_CHANGE_STATUS),
  741. .boot_on = 1,
  742. },
  743. .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo2_consumers),
  744. .consumer_supplies = tps65070_ldo2_consumers,
  745. },
  746. };
  747. static struct touchscreen_init_data tps6507x_touchscreen_data = {
  748. .poll_period = 30, /* ms between touch samples */
  749. .min_pressure = 0x30, /* minimum pressure to trigger touch */
  750. .vref = 0, /* turn off vref when not using A/D */
  751. .vendor = 0, /* /sys/class/input/input?/id/vendor */
  752. .product = 65070, /* /sys/class/input/input?/id/product */
  753. .version = 0x100, /* /sys/class/input/input?/id/version */
  754. };
  755. static struct tps6507x_board tps_board = {
  756. .tps6507x_pmic_init_data = &tps65070_regulator_data[0],
  757. .tps6507x_ts_init_data = &tps6507x_touchscreen_data,
  758. };
  759. static struct i2c_board_info __initdata da850_evm_tps65070_info[] = {
  760. {
  761. I2C_BOARD_INFO("tps6507x", 0x48),
  762. .platform_data = &tps_board,
  763. },
  764. };
  765. static int __init pmic_tps65070_init(void)
  766. {
  767. return i2c_register_board_info(1, da850_evm_tps65070_info,
  768. ARRAY_SIZE(da850_evm_tps65070_info));
  769. }
  770. static const short da850_evm_lcdc_pins[] = {
  771. DA850_GPIO2_8, DA850_GPIO2_15,
  772. -1
  773. };
  774. static const short da850_evm_mii_pins[] = {
  775. DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3,
  776. DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER,
  777. DA850_MII_CRS, DA850_MII_RXCLK, DA850_MII_RXDV, DA850_MII_RXD_3,
  778. DA850_MII_RXD_2, DA850_MII_RXD_1, DA850_MII_RXD_0, DA850_MDIO_CLK,
  779. DA850_MDIO_D,
  780. -1
  781. };
  782. static const short da850_evm_rmii_pins[] = {
  783. DA850_RMII_TXD_0, DA850_RMII_TXD_1, DA850_RMII_TXEN,
  784. DA850_RMII_CRS_DV, DA850_RMII_RXD_0, DA850_RMII_RXD_1,
  785. DA850_RMII_RXER, DA850_RMII_MHZ_50_CLK, DA850_MDIO_CLK,
  786. DA850_MDIO_D,
  787. -1
  788. };
  789. static int __init da850_evm_config_emac(void)
  790. {
  791. void __iomem *cfg_chip3_base;
  792. int ret;
  793. u32 val;
  794. struct davinci_soc_info *soc_info = &davinci_soc_info;
  795. u8 rmii_en = soc_info->emac_pdata->rmii_en;
  796. if (!machine_is_davinci_da850_evm())
  797. return 0;
  798. cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);
  799. val = __raw_readl(cfg_chip3_base);
  800. if (rmii_en) {
  801. val |= BIT(8);
  802. ret = davinci_cfg_reg_list(da850_evm_rmii_pins);
  803. pr_info("EMAC: RMII PHY configured, MII PHY will not be"
  804. " functional\n");
  805. } else {
  806. val &= ~BIT(8);
  807. ret = davinci_cfg_reg_list(da850_evm_mii_pins);
  808. pr_info("EMAC: MII PHY configured, RMII PHY will not be"
  809. " functional\n");
  810. }
  811. if (ret)
  812. pr_warning("da850_evm_init: cpgmac/rmii mux setup failed: %d\n",
  813. ret);
  814. /* configure the CFGCHIP3 register for RMII or MII */
  815. __raw_writel(val, cfg_chip3_base);
  816. ret = davinci_cfg_reg(DA850_GPIO2_6);
  817. if (ret)
  818. pr_warning("da850_evm_init:GPIO(2,6) mux setup "
  819. "failed\n");
  820. ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
  821. if (ret) {
  822. pr_warning("Cannot open GPIO %d\n",
  823. DA850_MII_MDIO_CLKEN_PIN);
  824. return ret;
  825. }
  826. /* Enable/Disable MII MDIO clock */
  827. gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en);
  828. soc_info->emac_pdata->phy_id = DA850_EVM_PHY_ID;
  829. ret = da8xx_register_emac();
  830. if (ret)
  831. pr_warning("da850_evm_init: emac registration failed: %d\n",
  832. ret);
  833. return 0;
  834. }
  835. device_initcall(da850_evm_config_emac);
  836. /*
  837. * The following EDMA channels/slots are not being used by drivers (for
  838. * example: Timer, GPIO, UART events etc) on da850/omap-l138 EVM, hence
  839. * they are being reserved for codecs on the DSP side.
  840. */
  841. static const s16 da850_dma0_rsv_chans[][2] = {
  842. /* (offset, number) */
  843. { 8, 6},
  844. {24, 4},
  845. {30, 2},
  846. {-1, -1}
  847. };
  848. static const s16 da850_dma0_rsv_slots[][2] = {
  849. /* (offset, number) */
  850. { 8, 6},
  851. {24, 4},
  852. {30, 50},
  853. {-1, -1}
  854. };
  855. static const s16 da850_dma1_rsv_chans[][2] = {
  856. /* (offset, number) */
  857. { 0, 28},
  858. {30, 2},
  859. {-1, -1}
  860. };
  861. static const s16 da850_dma1_rsv_slots[][2] = {
  862. /* (offset, number) */
  863. { 0, 28},
  864. {30, 90},
  865. {-1, -1}
  866. };
  867. static struct edma_rsv_info da850_edma_cc0_rsv = {
  868. .rsv_chans = da850_dma0_rsv_chans,
  869. .rsv_slots = da850_dma0_rsv_slots,
  870. };
  871. static struct edma_rsv_info da850_edma_cc1_rsv = {
  872. .rsv_chans = da850_dma1_rsv_chans,
  873. .rsv_slots = da850_dma1_rsv_slots,
  874. };
  875. static struct edma_rsv_info *da850_edma_rsv[2] = {
  876. &da850_edma_cc0_rsv,
  877. &da850_edma_cc1_rsv,
  878. };
  879. #ifdef CONFIG_CPU_FREQ
  880. static __init int da850_evm_init_cpufreq(void)
  881. {
  882. switch (system_rev & 0xF) {
  883. case 3:
  884. da850_max_speed = 456000;
  885. break;
  886. case 2:
  887. da850_max_speed = 408000;
  888. break;
  889. case 1:
  890. da850_max_speed = 372000;
  891. break;
  892. }
  893. return da850_register_cpufreq("pll0_sysclk3");
  894. }
  895. #else
  896. static __init int da850_evm_init_cpufreq(void) { return 0; }
  897. #endif
  898. static __init void da850_evm_init(void)
  899. {
  900. int ret;
  901. ret = pmic_tps65070_init();
  902. if (ret)
  903. pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
  904. ret);
  905. ret = da850_register_edma(da850_edma_rsv);
  906. if (ret)
  907. pr_warning("da850_evm_init: edma registration failed: %d\n",
  908. ret);
  909. ret = davinci_cfg_reg_list(da850_i2c0_pins);
  910. if (ret)
  911. pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
  912. ret);
  913. ret = da8xx_register_i2c(0, &da850_evm_i2c_0_pdata);
  914. if (ret)
  915. pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
  916. ret);
  917. ret = da8xx_register_watchdog();
  918. if (ret)
  919. pr_warning("da830_evm_init: watchdog registration failed: %d\n",
  920. ret);
  921. if (HAS_MMC) {
  922. ret = davinci_cfg_reg_list(da850_mmcsd0_pins);
  923. if (ret)
  924. pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
  925. " %d\n", ret);
  926. ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
  927. if (ret)
  928. pr_warning("da850_evm_init: can not open GPIO %d\n",
  929. DA850_MMCSD_CD_PIN);
  930. gpio_direction_input(DA850_MMCSD_CD_PIN);
  931. ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
  932. if (ret)
  933. pr_warning("da850_evm_init: can not open GPIO %d\n",
  934. DA850_MMCSD_WP_PIN);
  935. gpio_direction_input(DA850_MMCSD_WP_PIN);
  936. ret = da8xx_register_mmcsd0(&da850_mmc_config);
  937. if (ret)
  938. pr_warning("da850_evm_init: mmcsd0 registration failed:"
  939. " %d\n", ret);
  940. }
  941. davinci_serial_init(&da850_evm_uart_config);
  942. i2c_register_board_info(1, da850_evm_i2c_devices,
  943. ARRAY_SIZE(da850_evm_i2c_devices));
  944. /*
  945. * shut down uart 0 and 1; they are not used on the board and
  946. * accessing them causes endless "too much work in irq53" messages
  947. * with arago fs
  948. */
  949. __raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30);
  950. __raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30);
  951. ret = davinci_cfg_reg_list(da850_mcasp_pins);
  952. if (ret)
  953. pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
  954. ret);
  955. da8xx_register_mcasp(0, &da850_evm_snd_data);
  956. ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
  957. if (ret)
  958. pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
  959. ret);
  960. /* Handle board specific muxing for LCD here */
  961. ret = davinci_cfg_reg_list(da850_evm_lcdc_pins);
  962. if (ret)
  963. pr_warning("da850_evm_init: evm specific lcd mux setup "
  964. "failed: %d\n", ret);
  965. ret = da850_lcd_hw_init();
  966. if (ret)
  967. pr_warning("da850_evm_init: lcd initialization failed: %d\n",
  968. ret);
  969. sharp_lk043t1dg01_pdata.panel_power_ctrl = da850_panel_power_ctrl,
  970. ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata);
  971. if (ret)
  972. pr_warning("da850_evm_init: lcdc registration failed: %d\n",
  973. ret);
  974. ret = da8xx_register_rtc();
  975. if (ret)
  976. pr_warning("da850_evm_init: rtc setup failed: %d\n", ret);
  977. ret = da850_evm_init_cpufreq();
  978. if (ret)
  979. pr_warning("da850_evm_init: cpufreq registration failed: %d\n",
  980. ret);
  981. ret = da8xx_register_cpuidle();
  982. if (ret)
  983. pr_warning("da850_evm_init: cpuidle registration failed: %d\n",
  984. ret);
  985. ret = da850_register_pm(&da850_pm_device);
  986. if (ret)
  987. pr_warning("da850_evm_init: suspend registration failed: %d\n",
  988. ret);
  989. }
  990. #ifdef CONFIG_SERIAL_8250_CONSOLE
  991. static int __init da850_evm_console_init(void)
  992. {
  993. if (!machine_is_davinci_da850_evm())
  994. return 0;
  995. return add_preferred_console("ttyS", 2, "115200");
  996. }
  997. console_initcall(da850_evm_console_init);
  998. #endif
  999. static void __init da850_evm_map_io(void)
  1000. {
  1001. da850_init();
  1002. }
  1003. MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
  1004. .boot_params = (DA8XX_DDR_BASE + 0x100),
  1005. .map_io = da850_evm_map_io,
  1006. .init_irq = cp_intc_init,
  1007. .timer = &davinci_timer,
  1008. .init_machine = da850_evm_init,
  1009. MACHINE_END