omap_hwmod_2420_data.c 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276
  1. /*
  2. * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * XXX handle crossbar/shared link difference for L3?
  13. * XXX these should be marked initdata for multi-OMAP kernels
  14. */
  15. #include <plat/omap_hwmod.h>
  16. #include <mach/irqs.h>
  17. #include <plat/cpu.h>
  18. #include <plat/dma.h>
  19. #include <plat/serial.h>
  20. #include <plat/i2c.h>
  21. #include <plat/gpio.h>
  22. #include <plat/mcspi.h>
  23. #include <plat/dmtimer.h>
  24. #include <plat/l3_2xxx.h>
  25. #include <plat/l4_2xxx.h>
  26. #include "omap_hwmod_common_data.h"
  27. #include "cm-regbits-24xx.h"
  28. #include "prm-regbits-24xx.h"
  29. #include "wd_timer.h"
  30. /*
  31. * OMAP2420 hardware module integration data
  32. *
  33. * ALl of the data in this section should be autogeneratable from the
  34. * TI hardware database or other technical documentation. Data that
  35. * is driver-specific or driver-kernel integration-specific belongs
  36. * elsewhere.
  37. */
  38. static struct omap_hwmod omap2420_mpu_hwmod;
  39. static struct omap_hwmod omap2420_iva_hwmod;
  40. static struct omap_hwmod omap2420_l3_main_hwmod;
  41. static struct omap_hwmod omap2420_l4_core_hwmod;
  42. static struct omap_hwmod omap2420_dss_core_hwmod;
  43. static struct omap_hwmod omap2420_dss_dispc_hwmod;
  44. static struct omap_hwmod omap2420_dss_rfbi_hwmod;
  45. static struct omap_hwmod omap2420_dss_venc_hwmod;
  46. static struct omap_hwmod omap2420_wd_timer2_hwmod;
  47. static struct omap_hwmod omap2420_gpio1_hwmod;
  48. static struct omap_hwmod omap2420_gpio2_hwmod;
  49. static struct omap_hwmod omap2420_gpio3_hwmod;
  50. static struct omap_hwmod omap2420_gpio4_hwmod;
  51. static struct omap_hwmod omap2420_dma_system_hwmod;
  52. static struct omap_hwmod omap2420_mcspi1_hwmod;
  53. static struct omap_hwmod omap2420_mcspi2_hwmod;
  54. /* L3 -> L4_CORE interface */
  55. static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
  56. .master = &omap2420_l3_main_hwmod,
  57. .slave = &omap2420_l4_core_hwmod,
  58. .user = OCP_USER_MPU | OCP_USER_SDMA,
  59. };
  60. /* MPU -> L3 interface */
  61. static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
  62. .master = &omap2420_mpu_hwmod,
  63. .slave = &omap2420_l3_main_hwmod,
  64. .user = OCP_USER_MPU,
  65. };
  66. /* DSS -> l3 */
  67. static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
  68. .master = &omap2420_dss_core_hwmod,
  69. .slave = &omap2420_l3_main_hwmod,
  70. .fw = {
  71. .omap2 = {
  72. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  73. .flags = OMAP_FIREWALL_L3,
  74. }
  75. },
  76. .user = OCP_USER_MPU | OCP_USER_SDMA,
  77. };
  78. /* L3 */
  79. static struct omap_hwmod omap2420_l3_main_hwmod = {
  80. .name = "l3_main",
  81. .class = &l3_hwmod_class,
  82. .flags = HWMOD_NO_IDLEST,
  83. };
  84. static struct omap_hwmod omap2420_l4_wkup_hwmod;
  85. static struct omap_hwmod omap2420_uart1_hwmod;
  86. static struct omap_hwmod omap2420_uart2_hwmod;
  87. static struct omap_hwmod omap2420_uart3_hwmod;
  88. static struct omap_hwmod omap2420_i2c1_hwmod;
  89. static struct omap_hwmod omap2420_i2c2_hwmod;
  90. static struct omap_hwmod omap2420_mcbsp1_hwmod;
  91. static struct omap_hwmod omap2420_mcbsp2_hwmod;
  92. /* l4 core -> mcspi1 interface */
  93. static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
  94. .master = &omap2420_l4_core_hwmod,
  95. .slave = &omap2420_mcspi1_hwmod,
  96. .clk = "mcspi1_ick",
  97. .addr = omap2_mcspi1_addr_space,
  98. .user = OCP_USER_MPU | OCP_USER_SDMA,
  99. };
  100. /* l4 core -> mcspi2 interface */
  101. static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
  102. .master = &omap2420_l4_core_hwmod,
  103. .slave = &omap2420_mcspi2_hwmod,
  104. .clk = "mcspi2_ick",
  105. .addr = omap2_mcspi2_addr_space,
  106. .user = OCP_USER_MPU | OCP_USER_SDMA,
  107. };
  108. /* L4_CORE -> L4_WKUP interface */
  109. static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
  110. .master = &omap2420_l4_core_hwmod,
  111. .slave = &omap2420_l4_wkup_hwmod,
  112. .user = OCP_USER_MPU | OCP_USER_SDMA,
  113. };
  114. /* L4 CORE -> UART1 interface */
  115. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  116. .master = &omap2420_l4_core_hwmod,
  117. .slave = &omap2420_uart1_hwmod,
  118. .clk = "uart1_ick",
  119. .addr = omap2xxx_uart1_addr_space,
  120. .user = OCP_USER_MPU | OCP_USER_SDMA,
  121. };
  122. /* L4 CORE -> UART2 interface */
  123. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  124. .master = &omap2420_l4_core_hwmod,
  125. .slave = &omap2420_uart2_hwmod,
  126. .clk = "uart2_ick",
  127. .addr = omap2xxx_uart2_addr_space,
  128. .user = OCP_USER_MPU | OCP_USER_SDMA,
  129. };
  130. /* L4 PER -> UART3 interface */
  131. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  132. .master = &omap2420_l4_core_hwmod,
  133. .slave = &omap2420_uart3_hwmod,
  134. .clk = "uart3_ick",
  135. .addr = omap2xxx_uart3_addr_space,
  136. .user = OCP_USER_MPU | OCP_USER_SDMA,
  137. };
  138. /* L4 CORE -> I2C1 interface */
  139. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
  140. .master = &omap2420_l4_core_hwmod,
  141. .slave = &omap2420_i2c1_hwmod,
  142. .clk = "i2c1_ick",
  143. .addr = omap2_i2c1_addr_space,
  144. .user = OCP_USER_MPU | OCP_USER_SDMA,
  145. };
  146. /* L4 CORE -> I2C2 interface */
  147. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
  148. .master = &omap2420_l4_core_hwmod,
  149. .slave = &omap2420_i2c2_hwmod,
  150. .clk = "i2c2_ick",
  151. .addr = omap2_i2c2_addr_space,
  152. .user = OCP_USER_MPU | OCP_USER_SDMA,
  153. };
  154. /* L4 CORE */
  155. static struct omap_hwmod omap2420_l4_core_hwmod = {
  156. .name = "l4_core",
  157. .class = &l4_hwmod_class,
  158. .flags = HWMOD_NO_IDLEST,
  159. };
  160. /* L4 WKUP */
  161. static struct omap_hwmod omap2420_l4_wkup_hwmod = {
  162. .name = "l4_wkup",
  163. .class = &l4_hwmod_class,
  164. .flags = HWMOD_NO_IDLEST,
  165. };
  166. /* MPU */
  167. static struct omap_hwmod omap2420_mpu_hwmod = {
  168. .name = "mpu",
  169. .class = &mpu_hwmod_class,
  170. .main_clk = "mpu_ck",
  171. };
  172. /*
  173. * IVA1 interface data
  174. */
  175. /* IVA <- L3 interface */
  176. static struct omap_hwmod_ocp_if omap2420_l3__iva = {
  177. .master = &omap2420_l3_main_hwmod,
  178. .slave = &omap2420_iva_hwmod,
  179. .clk = "iva1_ifck",
  180. .user = OCP_USER_MPU | OCP_USER_SDMA,
  181. };
  182. /*
  183. * IVA2 (IVA2)
  184. */
  185. static struct omap_hwmod omap2420_iva_hwmod = {
  186. .name = "iva",
  187. .class = &iva_hwmod_class,
  188. };
  189. /* always-on timers dev attribute */
  190. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  191. .timer_capability = OMAP_TIMER_ALWON,
  192. };
  193. /* pwm timers dev attribute */
  194. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  195. .timer_capability = OMAP_TIMER_HAS_PWM,
  196. };
  197. /* timer1 */
  198. static struct omap_hwmod omap2420_timer1_hwmod;
  199. static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
  200. {
  201. .pa_start = 0x48028000,
  202. .pa_end = 0x48028000 + SZ_1K - 1,
  203. .flags = ADDR_TYPE_RT
  204. },
  205. { }
  206. };
  207. /* l4_wkup -> timer1 */
  208. static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
  209. .master = &omap2420_l4_wkup_hwmod,
  210. .slave = &omap2420_timer1_hwmod,
  211. .clk = "gpt1_ick",
  212. .addr = omap2420_timer1_addrs,
  213. .user = OCP_USER_MPU | OCP_USER_SDMA,
  214. };
  215. /* timer1 hwmod */
  216. static struct omap_hwmod omap2420_timer1_hwmod = {
  217. .name = "timer1",
  218. .mpu_irqs = omap2_timer1_mpu_irqs,
  219. .main_clk = "gpt1_fck",
  220. .prcm = {
  221. .omap2 = {
  222. .prcm_reg_id = 1,
  223. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  224. .module_offs = WKUP_MOD,
  225. .idlest_reg_id = 1,
  226. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  227. },
  228. },
  229. .dev_attr = &capability_alwon_dev_attr,
  230. .class = &omap2xxx_timer_hwmod_class,
  231. };
  232. /* timer2 */
  233. static struct omap_hwmod omap2420_timer2_hwmod;
  234. /* l4_core -> timer2 */
  235. static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
  236. .master = &omap2420_l4_core_hwmod,
  237. .slave = &omap2420_timer2_hwmod,
  238. .clk = "gpt2_ick",
  239. .addr = omap2xxx_timer2_addrs,
  240. .user = OCP_USER_MPU | OCP_USER_SDMA,
  241. };
  242. /* timer2 hwmod */
  243. static struct omap_hwmod omap2420_timer2_hwmod = {
  244. .name = "timer2",
  245. .mpu_irqs = omap2_timer2_mpu_irqs,
  246. .main_clk = "gpt2_fck",
  247. .prcm = {
  248. .omap2 = {
  249. .prcm_reg_id = 1,
  250. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  251. .module_offs = CORE_MOD,
  252. .idlest_reg_id = 1,
  253. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  254. },
  255. },
  256. .dev_attr = &capability_alwon_dev_attr,
  257. .class = &omap2xxx_timer_hwmod_class,
  258. };
  259. /* timer3 */
  260. static struct omap_hwmod omap2420_timer3_hwmod;
  261. /* l4_core -> timer3 */
  262. static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
  263. .master = &omap2420_l4_core_hwmod,
  264. .slave = &omap2420_timer3_hwmod,
  265. .clk = "gpt3_ick",
  266. .addr = omap2xxx_timer3_addrs,
  267. .user = OCP_USER_MPU | OCP_USER_SDMA,
  268. };
  269. /* timer3 hwmod */
  270. static struct omap_hwmod omap2420_timer3_hwmod = {
  271. .name = "timer3",
  272. .mpu_irqs = omap2_timer3_mpu_irqs,
  273. .main_clk = "gpt3_fck",
  274. .prcm = {
  275. .omap2 = {
  276. .prcm_reg_id = 1,
  277. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  278. .module_offs = CORE_MOD,
  279. .idlest_reg_id = 1,
  280. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  281. },
  282. },
  283. .dev_attr = &capability_alwon_dev_attr,
  284. .class = &omap2xxx_timer_hwmod_class,
  285. };
  286. /* timer4 */
  287. static struct omap_hwmod omap2420_timer4_hwmod;
  288. /* l4_core -> timer4 */
  289. static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
  290. .master = &omap2420_l4_core_hwmod,
  291. .slave = &omap2420_timer4_hwmod,
  292. .clk = "gpt4_ick",
  293. .addr = omap2xxx_timer4_addrs,
  294. .user = OCP_USER_MPU | OCP_USER_SDMA,
  295. };
  296. /* timer4 hwmod */
  297. static struct omap_hwmod omap2420_timer4_hwmod = {
  298. .name = "timer4",
  299. .mpu_irqs = omap2_timer4_mpu_irqs,
  300. .main_clk = "gpt4_fck",
  301. .prcm = {
  302. .omap2 = {
  303. .prcm_reg_id = 1,
  304. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  305. .module_offs = CORE_MOD,
  306. .idlest_reg_id = 1,
  307. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  308. },
  309. },
  310. .dev_attr = &capability_alwon_dev_attr,
  311. .class = &omap2xxx_timer_hwmod_class,
  312. };
  313. /* timer5 */
  314. static struct omap_hwmod omap2420_timer5_hwmod;
  315. /* l4_core -> timer5 */
  316. static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
  317. .master = &omap2420_l4_core_hwmod,
  318. .slave = &omap2420_timer5_hwmod,
  319. .clk = "gpt5_ick",
  320. .addr = omap2xxx_timer5_addrs,
  321. .user = OCP_USER_MPU | OCP_USER_SDMA,
  322. };
  323. /* timer5 hwmod */
  324. static struct omap_hwmod omap2420_timer5_hwmod = {
  325. .name = "timer5",
  326. .mpu_irqs = omap2_timer5_mpu_irqs,
  327. .main_clk = "gpt5_fck",
  328. .prcm = {
  329. .omap2 = {
  330. .prcm_reg_id = 1,
  331. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  332. .module_offs = CORE_MOD,
  333. .idlest_reg_id = 1,
  334. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  335. },
  336. },
  337. .dev_attr = &capability_alwon_dev_attr,
  338. .class = &omap2xxx_timer_hwmod_class,
  339. };
  340. /* timer6 */
  341. static struct omap_hwmod omap2420_timer6_hwmod;
  342. /* l4_core -> timer6 */
  343. static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
  344. .master = &omap2420_l4_core_hwmod,
  345. .slave = &omap2420_timer6_hwmod,
  346. .clk = "gpt6_ick",
  347. .addr = omap2xxx_timer6_addrs,
  348. .user = OCP_USER_MPU | OCP_USER_SDMA,
  349. };
  350. /* timer6 hwmod */
  351. static struct omap_hwmod omap2420_timer6_hwmod = {
  352. .name = "timer6",
  353. .mpu_irqs = omap2_timer6_mpu_irqs,
  354. .main_clk = "gpt6_fck",
  355. .prcm = {
  356. .omap2 = {
  357. .prcm_reg_id = 1,
  358. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  359. .module_offs = CORE_MOD,
  360. .idlest_reg_id = 1,
  361. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  362. },
  363. },
  364. .dev_attr = &capability_alwon_dev_attr,
  365. .class = &omap2xxx_timer_hwmod_class,
  366. };
  367. /* timer7 */
  368. static struct omap_hwmod omap2420_timer7_hwmod;
  369. /* l4_core -> timer7 */
  370. static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
  371. .master = &omap2420_l4_core_hwmod,
  372. .slave = &omap2420_timer7_hwmod,
  373. .clk = "gpt7_ick",
  374. .addr = omap2xxx_timer7_addrs,
  375. .user = OCP_USER_MPU | OCP_USER_SDMA,
  376. };
  377. /* timer7 hwmod */
  378. static struct omap_hwmod omap2420_timer7_hwmod = {
  379. .name = "timer7",
  380. .mpu_irqs = omap2_timer7_mpu_irqs,
  381. .main_clk = "gpt7_fck",
  382. .prcm = {
  383. .omap2 = {
  384. .prcm_reg_id = 1,
  385. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  386. .module_offs = CORE_MOD,
  387. .idlest_reg_id = 1,
  388. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  389. },
  390. },
  391. .dev_attr = &capability_alwon_dev_attr,
  392. .class = &omap2xxx_timer_hwmod_class,
  393. };
  394. /* timer8 */
  395. static struct omap_hwmod omap2420_timer8_hwmod;
  396. /* l4_core -> timer8 */
  397. static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
  398. .master = &omap2420_l4_core_hwmod,
  399. .slave = &omap2420_timer8_hwmod,
  400. .clk = "gpt8_ick",
  401. .addr = omap2xxx_timer8_addrs,
  402. .user = OCP_USER_MPU | OCP_USER_SDMA,
  403. };
  404. /* timer8 hwmod */
  405. static struct omap_hwmod omap2420_timer8_hwmod = {
  406. .name = "timer8",
  407. .mpu_irqs = omap2_timer8_mpu_irqs,
  408. .main_clk = "gpt8_fck",
  409. .prcm = {
  410. .omap2 = {
  411. .prcm_reg_id = 1,
  412. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  413. .module_offs = CORE_MOD,
  414. .idlest_reg_id = 1,
  415. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  416. },
  417. },
  418. .dev_attr = &capability_alwon_dev_attr,
  419. .class = &omap2xxx_timer_hwmod_class,
  420. };
  421. /* timer9 */
  422. static struct omap_hwmod omap2420_timer9_hwmod;
  423. /* l4_core -> timer9 */
  424. static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
  425. .master = &omap2420_l4_core_hwmod,
  426. .slave = &omap2420_timer9_hwmod,
  427. .clk = "gpt9_ick",
  428. .addr = omap2xxx_timer9_addrs,
  429. .user = OCP_USER_MPU | OCP_USER_SDMA,
  430. };
  431. /* timer9 hwmod */
  432. static struct omap_hwmod omap2420_timer9_hwmod = {
  433. .name = "timer9",
  434. .mpu_irqs = omap2_timer9_mpu_irqs,
  435. .main_clk = "gpt9_fck",
  436. .prcm = {
  437. .omap2 = {
  438. .prcm_reg_id = 1,
  439. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  440. .module_offs = CORE_MOD,
  441. .idlest_reg_id = 1,
  442. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  443. },
  444. },
  445. .dev_attr = &capability_pwm_dev_attr,
  446. .class = &omap2xxx_timer_hwmod_class,
  447. };
  448. /* timer10 */
  449. static struct omap_hwmod omap2420_timer10_hwmod;
  450. /* l4_core -> timer10 */
  451. static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
  452. .master = &omap2420_l4_core_hwmod,
  453. .slave = &omap2420_timer10_hwmod,
  454. .clk = "gpt10_ick",
  455. .addr = omap2_timer10_addrs,
  456. .user = OCP_USER_MPU | OCP_USER_SDMA,
  457. };
  458. /* timer10 hwmod */
  459. static struct omap_hwmod omap2420_timer10_hwmod = {
  460. .name = "timer10",
  461. .mpu_irqs = omap2_timer10_mpu_irqs,
  462. .main_clk = "gpt10_fck",
  463. .prcm = {
  464. .omap2 = {
  465. .prcm_reg_id = 1,
  466. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  467. .module_offs = CORE_MOD,
  468. .idlest_reg_id = 1,
  469. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  470. },
  471. },
  472. .dev_attr = &capability_pwm_dev_attr,
  473. .class = &omap2xxx_timer_hwmod_class,
  474. };
  475. /* timer11 */
  476. static struct omap_hwmod omap2420_timer11_hwmod;
  477. /* l4_core -> timer11 */
  478. static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
  479. .master = &omap2420_l4_core_hwmod,
  480. .slave = &omap2420_timer11_hwmod,
  481. .clk = "gpt11_ick",
  482. .addr = omap2_timer11_addrs,
  483. .user = OCP_USER_MPU | OCP_USER_SDMA,
  484. };
  485. /* timer11 hwmod */
  486. static struct omap_hwmod omap2420_timer11_hwmod = {
  487. .name = "timer11",
  488. .mpu_irqs = omap2_timer11_mpu_irqs,
  489. .main_clk = "gpt11_fck",
  490. .prcm = {
  491. .omap2 = {
  492. .prcm_reg_id = 1,
  493. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  494. .module_offs = CORE_MOD,
  495. .idlest_reg_id = 1,
  496. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  497. },
  498. },
  499. .dev_attr = &capability_pwm_dev_attr,
  500. .class = &omap2xxx_timer_hwmod_class,
  501. };
  502. /* timer12 */
  503. static struct omap_hwmod omap2420_timer12_hwmod;
  504. /* l4_core -> timer12 */
  505. static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
  506. .master = &omap2420_l4_core_hwmod,
  507. .slave = &omap2420_timer12_hwmod,
  508. .clk = "gpt12_ick",
  509. .addr = omap2xxx_timer12_addrs,
  510. .user = OCP_USER_MPU | OCP_USER_SDMA,
  511. };
  512. /* timer12 hwmod */
  513. static struct omap_hwmod omap2420_timer12_hwmod = {
  514. .name = "timer12",
  515. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  516. .main_clk = "gpt12_fck",
  517. .prcm = {
  518. .omap2 = {
  519. .prcm_reg_id = 1,
  520. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  521. .module_offs = CORE_MOD,
  522. .idlest_reg_id = 1,
  523. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  524. },
  525. },
  526. .dev_attr = &capability_pwm_dev_attr,
  527. .class = &omap2xxx_timer_hwmod_class,
  528. };
  529. /* l4_wkup -> wd_timer2 */
  530. static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
  531. {
  532. .pa_start = 0x48022000,
  533. .pa_end = 0x4802207f,
  534. .flags = ADDR_TYPE_RT
  535. },
  536. { }
  537. };
  538. static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
  539. .master = &omap2420_l4_wkup_hwmod,
  540. .slave = &omap2420_wd_timer2_hwmod,
  541. .clk = "mpu_wdt_ick",
  542. .addr = omap2420_wd_timer2_addrs,
  543. .user = OCP_USER_MPU | OCP_USER_SDMA,
  544. };
  545. static struct omap_hwmod omap2420_wd_timer2_hwmod = {
  546. .name = "wd_timer2",
  547. .class = &omap2xxx_wd_timer_hwmod_class,
  548. .main_clk = "mpu_wdt_fck",
  549. .prcm = {
  550. .omap2 = {
  551. .prcm_reg_id = 1,
  552. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  553. .module_offs = WKUP_MOD,
  554. .idlest_reg_id = 1,
  555. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  556. },
  557. },
  558. };
  559. /* UART1 */
  560. static struct omap_hwmod omap2420_uart1_hwmod = {
  561. .name = "uart1",
  562. .mpu_irqs = omap2_uart1_mpu_irqs,
  563. .sdma_reqs = omap2_uart1_sdma_reqs,
  564. .main_clk = "uart1_fck",
  565. .prcm = {
  566. .omap2 = {
  567. .module_offs = CORE_MOD,
  568. .prcm_reg_id = 1,
  569. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  570. .idlest_reg_id = 1,
  571. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  572. },
  573. },
  574. .class = &omap2_uart_class,
  575. };
  576. /* UART2 */
  577. static struct omap_hwmod omap2420_uart2_hwmod = {
  578. .name = "uart2",
  579. .mpu_irqs = omap2_uart2_mpu_irqs,
  580. .sdma_reqs = omap2_uart2_sdma_reqs,
  581. .main_clk = "uart2_fck",
  582. .prcm = {
  583. .omap2 = {
  584. .module_offs = CORE_MOD,
  585. .prcm_reg_id = 1,
  586. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  587. .idlest_reg_id = 1,
  588. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  589. },
  590. },
  591. .class = &omap2_uart_class,
  592. };
  593. /* UART3 */
  594. static struct omap_hwmod omap2420_uart3_hwmod = {
  595. .name = "uart3",
  596. .mpu_irqs = omap2_uart3_mpu_irqs,
  597. .sdma_reqs = omap2_uart3_sdma_reqs,
  598. .main_clk = "uart3_fck",
  599. .prcm = {
  600. .omap2 = {
  601. .module_offs = CORE_MOD,
  602. .prcm_reg_id = 2,
  603. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  604. .idlest_reg_id = 2,
  605. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  606. },
  607. },
  608. .class = &omap2_uart_class,
  609. };
  610. /* dss */
  611. /* l4_core -> dss */
  612. static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
  613. .master = &omap2420_l4_core_hwmod,
  614. .slave = &omap2420_dss_core_hwmod,
  615. .clk = "dss_ick",
  616. .addr = omap2_dss_addrs,
  617. .fw = {
  618. .omap2 = {
  619. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
  620. .flags = OMAP_FIREWALL_L4,
  621. }
  622. },
  623. .user = OCP_USER_MPU | OCP_USER_SDMA,
  624. };
  625. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  626. /*
  627. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  628. * driver does not use these clocks.
  629. */
  630. { .role = "tv_clk", .clk = "dss_54m_fck" },
  631. { .role = "sys_clk", .clk = "dss2_fck" },
  632. };
  633. static struct omap_hwmod omap2420_dss_core_hwmod = {
  634. .name = "dss_core",
  635. .class = &omap2_dss_hwmod_class,
  636. .main_clk = "dss1_fck", /* instead of dss_fck */
  637. .sdma_reqs = omap2xxx_dss_sdma_chs,
  638. .prcm = {
  639. .omap2 = {
  640. .prcm_reg_id = 1,
  641. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  642. .module_offs = CORE_MOD,
  643. .idlest_reg_id = 1,
  644. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  645. },
  646. },
  647. .opt_clks = dss_opt_clks,
  648. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  649. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  650. };
  651. /* l4_core -> dss_dispc */
  652. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
  653. .master = &omap2420_l4_core_hwmod,
  654. .slave = &omap2420_dss_dispc_hwmod,
  655. .clk = "dss_ick",
  656. .addr = omap2_dss_dispc_addrs,
  657. .fw = {
  658. .omap2 = {
  659. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
  660. .flags = OMAP_FIREWALL_L4,
  661. }
  662. },
  663. .user = OCP_USER_MPU | OCP_USER_SDMA,
  664. };
  665. static struct omap_hwmod omap2420_dss_dispc_hwmod = {
  666. .name = "dss_dispc",
  667. .class = &omap2_dispc_hwmod_class,
  668. .mpu_irqs = omap2_dispc_irqs,
  669. .main_clk = "dss1_fck",
  670. .prcm = {
  671. .omap2 = {
  672. .prcm_reg_id = 1,
  673. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  674. .module_offs = CORE_MOD,
  675. .idlest_reg_id = 1,
  676. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  677. },
  678. },
  679. .flags = HWMOD_NO_IDLEST,
  680. .dev_attr = &omap2_3_dss_dispc_dev_attr
  681. };
  682. /* l4_core -> dss_rfbi */
  683. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
  684. .master = &omap2420_l4_core_hwmod,
  685. .slave = &omap2420_dss_rfbi_hwmod,
  686. .clk = "dss_ick",
  687. .addr = omap2_dss_rfbi_addrs,
  688. .fw = {
  689. .omap2 = {
  690. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
  691. .flags = OMAP_FIREWALL_L4,
  692. }
  693. },
  694. .user = OCP_USER_MPU | OCP_USER_SDMA,
  695. };
  696. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  697. { .role = "ick", .clk = "dss_ick" },
  698. };
  699. static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
  700. .name = "dss_rfbi",
  701. .class = &omap2_rfbi_hwmod_class,
  702. .main_clk = "dss1_fck",
  703. .prcm = {
  704. .omap2 = {
  705. .prcm_reg_id = 1,
  706. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  707. .module_offs = CORE_MOD,
  708. },
  709. },
  710. .opt_clks = dss_rfbi_opt_clks,
  711. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  712. .flags = HWMOD_NO_IDLEST,
  713. };
  714. /* l4_core -> dss_venc */
  715. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
  716. .master = &omap2420_l4_core_hwmod,
  717. .slave = &omap2420_dss_venc_hwmod,
  718. .clk = "dss_ick",
  719. .addr = omap2_dss_venc_addrs,
  720. .fw = {
  721. .omap2 = {
  722. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
  723. .flags = OMAP_FIREWALL_L4,
  724. }
  725. },
  726. .user = OCP_USER_MPU | OCP_USER_SDMA,
  727. };
  728. static struct omap_hwmod omap2420_dss_venc_hwmod = {
  729. .name = "dss_venc",
  730. .class = &omap2_venc_hwmod_class,
  731. .main_clk = "dss_54m_fck",
  732. .prcm = {
  733. .omap2 = {
  734. .prcm_reg_id = 1,
  735. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  736. .module_offs = CORE_MOD,
  737. },
  738. },
  739. .flags = HWMOD_NO_IDLEST,
  740. };
  741. /* I2C common */
  742. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  743. .rev_offs = 0x00,
  744. .sysc_offs = 0x20,
  745. .syss_offs = 0x10,
  746. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  747. .sysc_fields = &omap_hwmod_sysc_type1,
  748. };
  749. static struct omap_hwmod_class i2c_class = {
  750. .name = "i2c",
  751. .sysc = &i2c_sysc,
  752. .rev = OMAP_I2C_IP_VERSION_1,
  753. .reset = &omap_i2c_reset,
  754. };
  755. static struct omap_i2c_dev_attr i2c_dev_attr = {
  756. .flags = OMAP_I2C_FLAG_NO_FIFO |
  757. OMAP_I2C_FLAG_SIMPLE_CLOCK |
  758. OMAP_I2C_FLAG_16BIT_DATA_REG |
  759. OMAP_I2C_FLAG_BUS_SHIFT_2,
  760. };
  761. /* I2C1 */
  762. static struct omap_hwmod omap2420_i2c1_hwmod = {
  763. .name = "i2c1",
  764. .mpu_irqs = omap2_i2c1_mpu_irqs,
  765. .sdma_reqs = omap2_i2c1_sdma_reqs,
  766. .main_clk = "i2c1_fck",
  767. .prcm = {
  768. .omap2 = {
  769. .module_offs = CORE_MOD,
  770. .prcm_reg_id = 1,
  771. .module_bit = OMAP2420_EN_I2C1_SHIFT,
  772. .idlest_reg_id = 1,
  773. .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
  774. },
  775. },
  776. .class = &i2c_class,
  777. .dev_attr = &i2c_dev_attr,
  778. .flags = HWMOD_16BIT_REG,
  779. };
  780. /* I2C2 */
  781. static struct omap_hwmod omap2420_i2c2_hwmod = {
  782. .name = "i2c2",
  783. .mpu_irqs = omap2_i2c2_mpu_irqs,
  784. .sdma_reqs = omap2_i2c2_sdma_reqs,
  785. .main_clk = "i2c2_fck",
  786. .prcm = {
  787. .omap2 = {
  788. .module_offs = CORE_MOD,
  789. .prcm_reg_id = 1,
  790. .module_bit = OMAP2420_EN_I2C2_SHIFT,
  791. .idlest_reg_id = 1,
  792. .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
  793. },
  794. },
  795. .class = &i2c_class,
  796. .dev_attr = &i2c_dev_attr,
  797. .flags = HWMOD_16BIT_REG,
  798. };
  799. /* l4_wkup -> gpio1 */
  800. static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
  801. {
  802. .pa_start = 0x48018000,
  803. .pa_end = 0x480181ff,
  804. .flags = ADDR_TYPE_RT
  805. },
  806. { }
  807. };
  808. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
  809. .master = &omap2420_l4_wkup_hwmod,
  810. .slave = &omap2420_gpio1_hwmod,
  811. .clk = "gpios_ick",
  812. .addr = omap2420_gpio1_addr_space,
  813. .user = OCP_USER_MPU | OCP_USER_SDMA,
  814. };
  815. /* l4_wkup -> gpio2 */
  816. static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
  817. {
  818. .pa_start = 0x4801a000,
  819. .pa_end = 0x4801a1ff,
  820. .flags = ADDR_TYPE_RT
  821. },
  822. { }
  823. };
  824. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
  825. .master = &omap2420_l4_wkup_hwmod,
  826. .slave = &omap2420_gpio2_hwmod,
  827. .clk = "gpios_ick",
  828. .addr = omap2420_gpio2_addr_space,
  829. .user = OCP_USER_MPU | OCP_USER_SDMA,
  830. };
  831. /* l4_wkup -> gpio3 */
  832. static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
  833. {
  834. .pa_start = 0x4801c000,
  835. .pa_end = 0x4801c1ff,
  836. .flags = ADDR_TYPE_RT
  837. },
  838. { }
  839. };
  840. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
  841. .master = &omap2420_l4_wkup_hwmod,
  842. .slave = &omap2420_gpio3_hwmod,
  843. .clk = "gpios_ick",
  844. .addr = omap2420_gpio3_addr_space,
  845. .user = OCP_USER_MPU | OCP_USER_SDMA,
  846. };
  847. /* l4_wkup -> gpio4 */
  848. static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
  849. {
  850. .pa_start = 0x4801e000,
  851. .pa_end = 0x4801e1ff,
  852. .flags = ADDR_TYPE_RT
  853. },
  854. { }
  855. };
  856. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
  857. .master = &omap2420_l4_wkup_hwmod,
  858. .slave = &omap2420_gpio4_hwmod,
  859. .clk = "gpios_ick",
  860. .addr = omap2420_gpio4_addr_space,
  861. .user = OCP_USER_MPU | OCP_USER_SDMA,
  862. };
  863. /* gpio dev_attr */
  864. static struct omap_gpio_dev_attr gpio_dev_attr = {
  865. .bank_width = 32,
  866. .dbck_flag = false,
  867. };
  868. /* gpio1 */
  869. static struct omap_hwmod omap2420_gpio1_hwmod = {
  870. .name = "gpio1",
  871. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  872. .mpu_irqs = omap2_gpio1_irqs,
  873. .main_clk = "gpios_fck",
  874. .prcm = {
  875. .omap2 = {
  876. .prcm_reg_id = 1,
  877. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  878. .module_offs = WKUP_MOD,
  879. .idlest_reg_id = 1,
  880. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  881. },
  882. },
  883. .class = &omap2xxx_gpio_hwmod_class,
  884. .dev_attr = &gpio_dev_attr,
  885. };
  886. /* gpio2 */
  887. static struct omap_hwmod omap2420_gpio2_hwmod = {
  888. .name = "gpio2",
  889. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  890. .mpu_irqs = omap2_gpio2_irqs,
  891. .main_clk = "gpios_fck",
  892. .prcm = {
  893. .omap2 = {
  894. .prcm_reg_id = 1,
  895. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  896. .module_offs = WKUP_MOD,
  897. .idlest_reg_id = 1,
  898. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  899. },
  900. },
  901. .class = &omap2xxx_gpio_hwmod_class,
  902. .dev_attr = &gpio_dev_attr,
  903. };
  904. /* gpio3 */
  905. static struct omap_hwmod omap2420_gpio3_hwmod = {
  906. .name = "gpio3",
  907. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  908. .mpu_irqs = omap2_gpio3_irqs,
  909. .main_clk = "gpios_fck",
  910. .prcm = {
  911. .omap2 = {
  912. .prcm_reg_id = 1,
  913. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  914. .module_offs = WKUP_MOD,
  915. .idlest_reg_id = 1,
  916. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  917. },
  918. },
  919. .class = &omap2xxx_gpio_hwmod_class,
  920. .dev_attr = &gpio_dev_attr,
  921. };
  922. /* gpio4 */
  923. static struct omap_hwmod omap2420_gpio4_hwmod = {
  924. .name = "gpio4",
  925. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  926. .mpu_irqs = omap2_gpio4_irqs,
  927. .main_clk = "gpios_fck",
  928. .prcm = {
  929. .omap2 = {
  930. .prcm_reg_id = 1,
  931. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  932. .module_offs = WKUP_MOD,
  933. .idlest_reg_id = 1,
  934. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  935. },
  936. },
  937. .class = &omap2xxx_gpio_hwmod_class,
  938. .dev_attr = &gpio_dev_attr,
  939. };
  940. /* dma attributes */
  941. static struct omap_dma_dev_attr dma_dev_attr = {
  942. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  943. IS_CSSA_32 | IS_CDSA_32,
  944. .lch_count = 32,
  945. };
  946. /* dma_system -> L3 */
  947. static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
  948. .master = &omap2420_dma_system_hwmod,
  949. .slave = &omap2420_l3_main_hwmod,
  950. .clk = "core_l3_ck",
  951. .user = OCP_USER_MPU | OCP_USER_SDMA,
  952. };
  953. /* l4_core -> dma_system */
  954. static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
  955. .master = &omap2420_l4_core_hwmod,
  956. .slave = &omap2420_dma_system_hwmod,
  957. .clk = "sdma_ick",
  958. .addr = omap2_dma_system_addrs,
  959. .user = OCP_USER_MPU | OCP_USER_SDMA,
  960. };
  961. static struct omap_hwmod omap2420_dma_system_hwmod = {
  962. .name = "dma",
  963. .class = &omap2xxx_dma_hwmod_class,
  964. .mpu_irqs = omap2_dma_system_irqs,
  965. .main_clk = "core_l3_ck",
  966. .dev_attr = &dma_dev_attr,
  967. .flags = HWMOD_NO_IDLEST,
  968. };
  969. /* mailbox */
  970. static struct omap_hwmod omap2420_mailbox_hwmod;
  971. static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
  972. { .name = "dsp", .irq = 26 },
  973. { .name = "iva", .irq = 34 },
  974. { .irq = -1 }
  975. };
  976. /* l4_core -> mailbox */
  977. static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
  978. .master = &omap2420_l4_core_hwmod,
  979. .slave = &omap2420_mailbox_hwmod,
  980. .addr = omap2_mailbox_addrs,
  981. .user = OCP_USER_MPU | OCP_USER_SDMA,
  982. };
  983. static struct omap_hwmod omap2420_mailbox_hwmod = {
  984. .name = "mailbox",
  985. .class = &omap2xxx_mailbox_hwmod_class,
  986. .mpu_irqs = omap2420_mailbox_irqs,
  987. .main_clk = "mailboxes_ick",
  988. .prcm = {
  989. .omap2 = {
  990. .prcm_reg_id = 1,
  991. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  992. .module_offs = CORE_MOD,
  993. .idlest_reg_id = 1,
  994. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  995. },
  996. },
  997. };
  998. /* mcspi1 */
  999. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1000. .num_chipselect = 4,
  1001. };
  1002. static struct omap_hwmod omap2420_mcspi1_hwmod = {
  1003. .name = "mcspi1",
  1004. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1005. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1006. .main_clk = "mcspi1_fck",
  1007. .prcm = {
  1008. .omap2 = {
  1009. .module_offs = CORE_MOD,
  1010. .prcm_reg_id = 1,
  1011. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1012. .idlest_reg_id = 1,
  1013. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1014. },
  1015. },
  1016. .class = &omap2xxx_mcspi_class,
  1017. .dev_attr = &omap_mcspi1_dev_attr,
  1018. };
  1019. /* mcspi2 */
  1020. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1021. .num_chipselect = 2,
  1022. };
  1023. static struct omap_hwmod omap2420_mcspi2_hwmod = {
  1024. .name = "mcspi2",
  1025. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1026. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1027. .main_clk = "mcspi2_fck",
  1028. .prcm = {
  1029. .omap2 = {
  1030. .module_offs = CORE_MOD,
  1031. .prcm_reg_id = 1,
  1032. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1033. .idlest_reg_id = 1,
  1034. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1035. },
  1036. },
  1037. .class = &omap2xxx_mcspi_class,
  1038. .dev_attr = &omap_mcspi2_dev_attr,
  1039. };
  1040. /*
  1041. * 'mcbsp' class
  1042. * multi channel buffered serial port controller
  1043. */
  1044. static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
  1045. .name = "mcbsp",
  1046. };
  1047. /* mcbsp1 */
  1048. static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
  1049. { .name = "tx", .irq = 59 },
  1050. { .name = "rx", .irq = 60 },
  1051. { .irq = -1 }
  1052. };
  1053. /* l4_core -> mcbsp1 */
  1054. static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
  1055. .master = &omap2420_l4_core_hwmod,
  1056. .slave = &omap2420_mcbsp1_hwmod,
  1057. .clk = "mcbsp1_ick",
  1058. .addr = omap2_mcbsp1_addrs,
  1059. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1060. };
  1061. static struct omap_hwmod omap2420_mcbsp1_hwmod = {
  1062. .name = "mcbsp1",
  1063. .class = &omap2420_mcbsp_hwmod_class,
  1064. .mpu_irqs = omap2420_mcbsp1_irqs,
  1065. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1066. .main_clk = "mcbsp1_fck",
  1067. .prcm = {
  1068. .omap2 = {
  1069. .prcm_reg_id = 1,
  1070. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1071. .module_offs = CORE_MOD,
  1072. .idlest_reg_id = 1,
  1073. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1074. },
  1075. },
  1076. };
  1077. /* mcbsp2 */
  1078. static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
  1079. { .name = "tx", .irq = 62 },
  1080. { .name = "rx", .irq = 63 },
  1081. { .irq = -1 }
  1082. };
  1083. /* l4_core -> mcbsp2 */
  1084. static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
  1085. .master = &omap2420_l4_core_hwmod,
  1086. .slave = &omap2420_mcbsp2_hwmod,
  1087. .clk = "mcbsp2_ick",
  1088. .addr = omap2xxx_mcbsp2_addrs,
  1089. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1090. };
  1091. static struct omap_hwmod omap2420_mcbsp2_hwmod = {
  1092. .name = "mcbsp2",
  1093. .class = &omap2420_mcbsp_hwmod_class,
  1094. .mpu_irqs = omap2420_mcbsp2_irqs,
  1095. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1096. .main_clk = "mcbsp2_fck",
  1097. .prcm = {
  1098. .omap2 = {
  1099. .prcm_reg_id = 1,
  1100. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1101. .module_offs = CORE_MOD,
  1102. .idlest_reg_id = 1,
  1103. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1104. },
  1105. },
  1106. };
  1107. static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
  1108. &omap2420_l3_main__l4_core,
  1109. &omap2420_mpu__l3_main,
  1110. &omap2420_dss__l3,
  1111. &omap2420_l4_core__mcspi1,
  1112. &omap2420_l4_core__mcspi2,
  1113. &omap2420_l4_core__l4_wkup,
  1114. &omap2_l4_core__uart1,
  1115. &omap2_l4_core__uart2,
  1116. &omap2_l4_core__uart3,
  1117. &omap2420_l4_core__i2c1,
  1118. &omap2420_l4_core__i2c2,
  1119. &omap2420_l3__iva,
  1120. &omap2420_l4_wkup__timer1,
  1121. &omap2420_l4_core__timer2,
  1122. &omap2420_l4_core__timer3,
  1123. &omap2420_l4_core__timer4,
  1124. &omap2420_l4_core__timer5,
  1125. &omap2420_l4_core__timer6,
  1126. &omap2420_l4_core__timer7,
  1127. &omap2420_l4_core__timer8,
  1128. &omap2420_l4_core__timer9,
  1129. &omap2420_l4_core__timer10,
  1130. &omap2420_l4_core__timer11,
  1131. &omap2420_l4_core__timer12,
  1132. &omap2420_l4_wkup__wd_timer2,
  1133. &omap2420_l4_core__dss,
  1134. &omap2420_l4_core__dss_dispc,
  1135. &omap2420_l4_core__dss_rfbi,
  1136. &omap2420_l4_core__dss_venc,
  1137. &omap2420_l4_wkup__gpio1,
  1138. &omap2420_l4_wkup__gpio2,
  1139. &omap2420_l4_wkup__gpio3,
  1140. &omap2420_l4_wkup__gpio4,
  1141. &omap2420_dma_system__l3,
  1142. &omap2420_l4_core__dma_system,
  1143. &omap2420_l4_core__mailbox,
  1144. &omap2420_l4_core__mcbsp1,
  1145. &omap2420_l4_core__mcbsp2,
  1146. NULL,
  1147. };
  1148. int __init omap2420_hwmod_init(void)
  1149. {
  1150. return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs);
  1151. }