devices.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. /*
  2. * linux/arch/arm/mach-omap2/devices.c
  3. *
  4. * OMAP2 platform device setup/initialization
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #include <linux/gpio.h>
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/io.h>
  16. #include <linux/clk.h>
  17. #include <linux/err.h>
  18. #include <linux/slab.h>
  19. #include <linux/of.h>
  20. #include <linux/pinctrl/machine.h>
  21. #include <linux/platform_data/omap4-keypad.h>
  22. #include <linux/platform_data/omap_ocp2scp.h>
  23. #include <linux/platform_data/mailbox-omap.h>
  24. #include <linux/usb/omap_control_usb.h>
  25. #include <asm/mach-types.h>
  26. #include <asm/mach/map.h>
  27. #include <linux/omap-dma.h>
  28. #include "iomap.h"
  29. #include "omap_hwmod.h"
  30. #include "omap_device.h"
  31. #include "omap4-keypad.h"
  32. #include "soc.h"
  33. #include "common.h"
  34. #include "mux.h"
  35. #include "control.h"
  36. #include "devices.h"
  37. #include "dma.h"
  38. #define L3_MODULES_MAX_LEN 12
  39. #define L3_MODULES 3
  40. static int __init omap3_l3_init(void)
  41. {
  42. struct omap_hwmod *oh;
  43. struct platform_device *pdev;
  44. char oh_name[L3_MODULES_MAX_LEN];
  45. /*
  46. * To avoid code running on other OMAPs in
  47. * multi-omap builds
  48. */
  49. if (!(cpu_is_omap34xx()))
  50. return -ENODEV;
  51. snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
  52. oh = omap_hwmod_lookup(oh_name);
  53. if (!oh)
  54. pr_err("could not look up %s\n", oh_name);
  55. pdev = omap_device_build("omap_l3_smx", 0, oh, NULL, 0);
  56. WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
  57. return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
  58. }
  59. omap_postcore_initcall(omap3_l3_init);
  60. static int __init omap4_l3_init(void)
  61. {
  62. int i;
  63. struct omap_hwmod *oh[3];
  64. struct platform_device *pdev;
  65. char oh_name[L3_MODULES_MAX_LEN];
  66. /* If dtb is there, the devices will be created dynamically */
  67. if (of_have_populated_dt())
  68. return -ENODEV;
  69. /*
  70. * To avoid code running on other OMAPs in
  71. * multi-omap builds
  72. */
  73. if (!cpu_is_omap44xx() && !soc_is_omap54xx())
  74. return -ENODEV;
  75. for (i = 0; i < L3_MODULES; i++) {
  76. snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1);
  77. oh[i] = omap_hwmod_lookup(oh_name);
  78. if (!(oh[i]))
  79. pr_err("could not look up %s\n", oh_name);
  80. }
  81. pdev = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL, 0);
  82. WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
  83. return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
  84. }
  85. omap_postcore_initcall(omap4_l3_init);
  86. #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
  87. static struct resource omap2cam_resources[] = {
  88. {
  89. .start = OMAP24XX_CAMERA_BASE,
  90. .end = OMAP24XX_CAMERA_BASE + 0xfff,
  91. .flags = IORESOURCE_MEM,
  92. },
  93. {
  94. .start = 24 + OMAP_INTC_START,
  95. .flags = IORESOURCE_IRQ,
  96. }
  97. };
  98. static struct platform_device omap2cam_device = {
  99. .name = "omap24xxcam",
  100. .id = -1,
  101. .num_resources = ARRAY_SIZE(omap2cam_resources),
  102. .resource = omap2cam_resources,
  103. };
  104. #endif
  105. #if defined(CONFIG_IOMMU_API)
  106. #include <linux/platform_data/iommu-omap.h>
  107. static struct resource omap3isp_resources[] = {
  108. {
  109. .start = OMAP3430_ISP_BASE,
  110. .end = OMAP3430_ISP_END,
  111. .flags = IORESOURCE_MEM,
  112. },
  113. {
  114. .start = OMAP3430_ISP_CCP2_BASE,
  115. .end = OMAP3430_ISP_CCP2_END,
  116. .flags = IORESOURCE_MEM,
  117. },
  118. {
  119. .start = OMAP3430_ISP_CCDC_BASE,
  120. .end = OMAP3430_ISP_CCDC_END,
  121. .flags = IORESOURCE_MEM,
  122. },
  123. {
  124. .start = OMAP3430_ISP_HIST_BASE,
  125. .end = OMAP3430_ISP_HIST_END,
  126. .flags = IORESOURCE_MEM,
  127. },
  128. {
  129. .start = OMAP3430_ISP_H3A_BASE,
  130. .end = OMAP3430_ISP_H3A_END,
  131. .flags = IORESOURCE_MEM,
  132. },
  133. {
  134. .start = OMAP3430_ISP_PREV_BASE,
  135. .end = OMAP3430_ISP_PREV_END,
  136. .flags = IORESOURCE_MEM,
  137. },
  138. {
  139. .start = OMAP3430_ISP_RESZ_BASE,
  140. .end = OMAP3430_ISP_RESZ_END,
  141. .flags = IORESOURCE_MEM,
  142. },
  143. {
  144. .start = OMAP3430_ISP_SBL_BASE,
  145. .end = OMAP3430_ISP_SBL_END,
  146. .flags = IORESOURCE_MEM,
  147. },
  148. {
  149. .start = OMAP3430_ISP_CSI2A_REGS1_BASE,
  150. .end = OMAP3430_ISP_CSI2A_REGS1_END,
  151. .flags = IORESOURCE_MEM,
  152. },
  153. {
  154. .start = OMAP3430_ISP_CSIPHY2_BASE,
  155. .end = OMAP3430_ISP_CSIPHY2_END,
  156. .flags = IORESOURCE_MEM,
  157. },
  158. {
  159. .start = OMAP3630_ISP_CSI2A_REGS2_BASE,
  160. .end = OMAP3630_ISP_CSI2A_REGS2_END,
  161. .flags = IORESOURCE_MEM,
  162. },
  163. {
  164. .start = OMAP3630_ISP_CSI2C_REGS1_BASE,
  165. .end = OMAP3630_ISP_CSI2C_REGS1_END,
  166. .flags = IORESOURCE_MEM,
  167. },
  168. {
  169. .start = OMAP3630_ISP_CSIPHY1_BASE,
  170. .end = OMAP3630_ISP_CSIPHY1_END,
  171. .flags = IORESOURCE_MEM,
  172. },
  173. {
  174. .start = OMAP3630_ISP_CSI2C_REGS2_BASE,
  175. .end = OMAP3630_ISP_CSI2C_REGS2_END,
  176. .flags = IORESOURCE_MEM,
  177. },
  178. {
  179. .start = OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE,
  180. .end = OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE + 3,
  181. .flags = IORESOURCE_MEM,
  182. },
  183. {
  184. .start = OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL,
  185. .end = OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL + 3,
  186. .flags = IORESOURCE_MEM,
  187. },
  188. {
  189. .start = 24 + OMAP_INTC_START,
  190. .flags = IORESOURCE_IRQ,
  191. }
  192. };
  193. static struct platform_device omap3isp_device = {
  194. .name = "omap3isp",
  195. .id = -1,
  196. .num_resources = ARRAY_SIZE(omap3isp_resources),
  197. .resource = omap3isp_resources,
  198. };
  199. static struct omap_iommu_arch_data omap3_isp_iommu = {
  200. .name = "mmu_isp",
  201. };
  202. int omap3_init_camera(struct isp_platform_data *pdata)
  203. {
  204. omap3isp_device.dev.platform_data = pdata;
  205. omap3isp_device.dev.archdata.iommu = &omap3_isp_iommu;
  206. return platform_device_register(&omap3isp_device);
  207. }
  208. #else /* !CONFIG_IOMMU_API */
  209. int omap3_init_camera(struct isp_platform_data *pdata)
  210. {
  211. return 0;
  212. }
  213. #endif
  214. static inline void omap_init_camera(void)
  215. {
  216. #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
  217. if (cpu_is_omap24xx())
  218. platform_device_register(&omap2cam_device);
  219. #endif
  220. }
  221. #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
  222. static struct omap_control_usb_platform_data omap4_control_usb_pdata = {
  223. .type = 1,
  224. };
  225. struct resource omap4_control_usb_res[] = {
  226. {
  227. .name = "control_dev_conf",
  228. .start = 0x4a002300,
  229. .end = 0x4a002303,
  230. .flags = IORESOURCE_MEM,
  231. },
  232. {
  233. .name = "otghs_control",
  234. .start = 0x4a00233c,
  235. .end = 0x4a00233f,
  236. .flags = IORESOURCE_MEM,
  237. },
  238. };
  239. static struct platform_device omap4_control_usb = {
  240. .name = "omap-control-usb",
  241. .id = -1,
  242. .dev = {
  243. .platform_data = &omap4_control_usb_pdata,
  244. },
  245. .num_resources = 2,
  246. .resource = omap4_control_usb_res,
  247. };
  248. static inline void __init omap_init_control_usb(void)
  249. {
  250. if (!cpu_is_omap44xx())
  251. return;
  252. if (platform_device_register(&omap4_control_usb))
  253. pr_err("Error registering omap_control_usb device\n");
  254. }
  255. #else
  256. static inline void omap_init_control_usb(void) { }
  257. #endif /* CONFIG_OMAP_CONTROL_USB */
  258. int __init omap4_keyboard_init(struct omap4_keypad_platform_data
  259. *sdp4430_keypad_data, struct omap_board_data *bdata)
  260. {
  261. struct platform_device *pdev;
  262. struct omap_hwmod *oh;
  263. struct omap4_keypad_platform_data *keypad_data;
  264. unsigned int id = -1;
  265. char *oh_name = "kbd";
  266. char *name = "omap4-keypad";
  267. oh = omap_hwmod_lookup(oh_name);
  268. if (!oh) {
  269. pr_err("Could not look up %s\n", oh_name);
  270. return -ENODEV;
  271. }
  272. keypad_data = sdp4430_keypad_data;
  273. pdev = omap_device_build(name, id, oh, keypad_data,
  274. sizeof(struct omap4_keypad_platform_data));
  275. if (IS_ERR(pdev)) {
  276. WARN(1, "Can't build omap_device for %s:%s.\n",
  277. name, oh->name);
  278. return PTR_ERR(pdev);
  279. }
  280. oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
  281. return 0;
  282. }
  283. #if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
  284. static inline void __init omap_init_mbox(void)
  285. {
  286. struct omap_hwmod *oh;
  287. struct platform_device *pdev;
  288. struct omap_mbox_pdata *pdata;
  289. oh = omap_hwmod_lookup("mailbox");
  290. if (!oh) {
  291. pr_err("%s: unable to find hwmod\n", __func__);
  292. return;
  293. }
  294. if (!oh->dev_attr) {
  295. pr_err("%s: hwmod doesn't have valid attrs\n", __func__);
  296. return;
  297. }
  298. pdata = (struct omap_mbox_pdata *)oh->dev_attr;
  299. pdev = omap_device_build("omap-mailbox", -1, oh, pdata, sizeof(*pdata));
  300. WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
  301. __func__, PTR_ERR(pdev));
  302. }
  303. #else
  304. static inline void omap_init_mbox(void) { }
  305. #endif /* CONFIG_OMAP2PLUS_MBOX */
  306. static inline void omap_init_sti(void) {}
  307. #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
  308. static struct platform_device omap_pcm = {
  309. .name = "omap-pcm-audio",
  310. .id = -1,
  311. };
  312. static void omap_init_audio(void)
  313. {
  314. platform_device_register(&omap_pcm);
  315. }
  316. #else
  317. static inline void omap_init_audio(void) {}
  318. #endif
  319. #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
  320. defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
  321. static void __init omap_init_mcpdm(void)
  322. {
  323. struct omap_hwmod *oh;
  324. struct platform_device *pdev;
  325. oh = omap_hwmod_lookup("mcpdm");
  326. if (!oh) {
  327. printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
  328. return;
  329. }
  330. pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0);
  331. WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
  332. }
  333. #else
  334. static inline void omap_init_mcpdm(void) {}
  335. #endif
  336. #if defined(CONFIG_SND_OMAP_SOC_DMIC) || \
  337. defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE)
  338. static void __init omap_init_dmic(void)
  339. {
  340. struct omap_hwmod *oh;
  341. struct platform_device *pdev;
  342. oh = omap_hwmod_lookup("dmic");
  343. if (!oh) {
  344. pr_err("Could not look up dmic hw_mod\n");
  345. return;
  346. }
  347. pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0);
  348. WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n");
  349. }
  350. #else
  351. static inline void omap_init_dmic(void) {}
  352. #endif
  353. #if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
  354. defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
  355. static struct platform_device omap_hdmi_audio = {
  356. .name = "omap-hdmi-audio",
  357. .id = -1,
  358. };
  359. static void __init omap_init_hdmi_audio(void)
  360. {
  361. struct omap_hwmod *oh;
  362. struct platform_device *pdev;
  363. oh = omap_hwmod_lookup("dss_hdmi");
  364. if (!oh) {
  365. printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
  366. return;
  367. }
  368. pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0);
  369. WARN(IS_ERR(pdev),
  370. "Can't build omap_device for omap-hdmi-audio-dai.\n");
  371. platform_device_register(&omap_hdmi_audio);
  372. }
  373. #else
  374. static inline void omap_init_hdmi_audio(void) {}
  375. #endif
  376. #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
  377. #include <linux/platform_data/spi-omap2-mcspi.h>
  378. static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused)
  379. {
  380. struct platform_device *pdev;
  381. char *name = "omap2_mcspi";
  382. struct omap2_mcspi_platform_config *pdata;
  383. static int spi_num;
  384. struct omap2_mcspi_dev_attr *mcspi_attrib = oh->dev_attr;
  385. pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
  386. if (!pdata) {
  387. pr_err("Memory allocation for McSPI device failed\n");
  388. return -ENOMEM;
  389. }
  390. pdata->num_cs = mcspi_attrib->num_chipselect;
  391. switch (oh->class->rev) {
  392. case OMAP2_MCSPI_REV:
  393. case OMAP3_MCSPI_REV:
  394. pdata->regs_offset = 0;
  395. break;
  396. case OMAP4_MCSPI_REV:
  397. pdata->regs_offset = OMAP4_MCSPI_REG_OFFSET;
  398. break;
  399. default:
  400. pr_err("Invalid McSPI Revision value\n");
  401. kfree(pdata);
  402. return -EINVAL;
  403. }
  404. spi_num++;
  405. pdev = omap_device_build(name, spi_num, oh, pdata, sizeof(*pdata));
  406. WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n",
  407. name, oh->name);
  408. kfree(pdata);
  409. return 0;
  410. }
  411. static void omap_init_mcspi(void)
  412. {
  413. omap_hwmod_for_each_by_class("mcspi", omap_mcspi_init, NULL);
  414. }
  415. #else
  416. static inline void omap_init_mcspi(void) {}
  417. #endif
  418. /**
  419. * omap_init_rng - bind the RNG hwmod to the RNG omap_device
  420. *
  421. * Bind the RNG hwmod to the RNG omap_device. No return value.
  422. */
  423. static void omap_init_rng(void)
  424. {
  425. struct omap_hwmod *oh;
  426. struct platform_device *pdev;
  427. oh = omap_hwmod_lookup("rng");
  428. if (!oh)
  429. return;
  430. pdev = omap_device_build("omap_rng", -1, oh, NULL, 0);
  431. WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n");
  432. }
  433. static void __init omap_init_sham(void)
  434. {
  435. struct omap_hwmod *oh;
  436. struct platform_device *pdev;
  437. oh = omap_hwmod_lookup("sham");
  438. if (!oh)
  439. return;
  440. pdev = omap_device_build("omap-sham", -1, oh, NULL, 0);
  441. WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n");
  442. }
  443. static void __init omap_init_aes(void)
  444. {
  445. struct omap_hwmod *oh;
  446. struct platform_device *pdev;
  447. oh = omap_hwmod_lookup("aes");
  448. if (!oh)
  449. return;
  450. pdev = omap_device_build("omap-aes", -1, oh, NULL, 0);
  451. WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n");
  452. }
  453. /*-------------------------------------------------------------------------*/
  454. #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \
  455. defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE)
  456. #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
  457. static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
  458. };
  459. #else
  460. static struct resource omap_vout_resource[2] = {
  461. };
  462. #endif
  463. static struct platform_device omap_vout_device = {
  464. .name = "omap_vout",
  465. .num_resources = ARRAY_SIZE(omap_vout_resource),
  466. .resource = &omap_vout_resource[0],
  467. .id = -1,
  468. };
  469. static void omap_init_vout(void)
  470. {
  471. if (platform_device_register(&omap_vout_device) < 0)
  472. printk(KERN_ERR "Unable to register OMAP-VOUT device\n");
  473. }
  474. #else
  475. static inline void omap_init_vout(void) {}
  476. #endif
  477. #if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE)
  478. static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
  479. {
  480. int cnt = 0;
  481. while (ocp2scp_dev->drv_name != NULL) {
  482. cnt++;
  483. ocp2scp_dev++;
  484. }
  485. return cnt;
  486. }
  487. static void __init omap_init_ocp2scp(void)
  488. {
  489. struct omap_hwmod *oh;
  490. struct platform_device *pdev;
  491. int bus_id = -1, dev_cnt = 0, i;
  492. struct omap_ocp2scp_dev *ocp2scp_dev;
  493. const char *oh_name, *name;
  494. struct omap_ocp2scp_platform_data *pdata;
  495. if (!cpu_is_omap44xx())
  496. return;
  497. oh_name = "ocp2scp_usb_phy";
  498. name = "omap-ocp2scp";
  499. oh = omap_hwmod_lookup(oh_name);
  500. if (!oh) {
  501. pr_err("%s: could not find omap_hwmod for %s\n", __func__,
  502. oh_name);
  503. return;
  504. }
  505. pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
  506. if (!pdata) {
  507. pr_err("%s: No memory for ocp2scp pdata\n", __func__);
  508. return;
  509. }
  510. ocp2scp_dev = oh->dev_attr;
  511. dev_cnt = count_ocp2scp_devices(ocp2scp_dev);
  512. if (!dev_cnt) {
  513. pr_err("%s: No devices connected to ocp2scp\n", __func__);
  514. kfree(pdata);
  515. return;
  516. }
  517. pdata->devices = kzalloc(sizeof(struct omap_ocp2scp_dev *)
  518. * dev_cnt, GFP_KERNEL);
  519. if (!pdata->devices) {
  520. pr_err("%s: No memory for ocp2scp pdata devices\n", __func__);
  521. kfree(pdata);
  522. return;
  523. }
  524. for (i = 0; i < dev_cnt; i++, ocp2scp_dev++)
  525. pdata->devices[i] = ocp2scp_dev;
  526. pdata->dev_cnt = dev_cnt;
  527. pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata));
  528. if (IS_ERR(pdev)) {
  529. pr_err("Could not build omap_device for %s %s\n",
  530. name, oh_name);
  531. kfree(pdata->devices);
  532. kfree(pdata);
  533. return;
  534. }
  535. }
  536. #else
  537. static inline void omap_init_ocp2scp(void) { }
  538. #endif
  539. /*-------------------------------------------------------------------------*/
  540. static int __init omap2_init_devices(void)
  541. {
  542. /* Enable dummy states for those platforms without pinctrl support */
  543. if (!of_have_populated_dt())
  544. pinctrl_provide_dummies();
  545. /*
  546. * please keep these calls, and their implementations above,
  547. * in alphabetical order so they're easier to sort through.
  548. */
  549. omap_init_audio();
  550. omap_init_camera();
  551. omap_init_hdmi_audio();
  552. omap_init_mbox();
  553. /* If dtb is there, the devices will be created dynamically */
  554. if (!of_have_populated_dt()) {
  555. omap_init_control_usb();
  556. omap_init_dmic();
  557. omap_init_mcpdm();
  558. omap_init_mcspi();
  559. omap_init_sham();
  560. omap_init_aes();
  561. }
  562. omap_init_sti();
  563. omap_init_rng();
  564. omap_init_vout();
  565. omap_init_ocp2scp();
  566. return 0;
  567. }
  568. omap_arch_initcall(omap2_init_devices);