omap_hwmod_2430_data.c 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include <plat/serial.h>
  19. #include <plat/i2c.h>
  20. #include <plat/gpio.h>
  21. #include <plat/mcbsp.h>
  22. #include <plat/mcspi.h>
  23. #include <plat/dmtimer.h>
  24. #include <plat/mmc.h>
  25. #include <plat/l3_2xxx.h>
  26. #include "omap_hwmod_common_data.h"
  27. #include "prm-regbits-24xx.h"
  28. #include "cm-regbits-24xx.h"
  29. #include "wd_timer.h"
  30. /*
  31. * OMAP2430 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 omap2430_mpu_hwmod;
  39. static struct omap_hwmod omap2430_iva_hwmod;
  40. static struct omap_hwmod omap2430_l3_main_hwmod;
  41. static struct omap_hwmod omap2430_l4_core_hwmod;
  42. static struct omap_hwmod omap2430_dss_core_hwmod;
  43. static struct omap_hwmod omap2430_dss_dispc_hwmod;
  44. static struct omap_hwmod omap2430_dss_rfbi_hwmod;
  45. static struct omap_hwmod omap2430_dss_venc_hwmod;
  46. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  47. static struct omap_hwmod omap2430_gpio1_hwmod;
  48. static struct omap_hwmod omap2430_gpio2_hwmod;
  49. static struct omap_hwmod omap2430_gpio3_hwmod;
  50. static struct omap_hwmod omap2430_gpio4_hwmod;
  51. static struct omap_hwmod omap2430_gpio5_hwmod;
  52. static struct omap_hwmod omap2430_dma_system_hwmod;
  53. static struct omap_hwmod omap2430_mcbsp1_hwmod;
  54. static struct omap_hwmod omap2430_mcbsp2_hwmod;
  55. static struct omap_hwmod omap2430_mcbsp3_hwmod;
  56. static struct omap_hwmod omap2430_mcbsp4_hwmod;
  57. static struct omap_hwmod omap2430_mcbsp5_hwmod;
  58. static struct omap_hwmod omap2430_mcspi1_hwmod;
  59. static struct omap_hwmod omap2430_mcspi2_hwmod;
  60. static struct omap_hwmod omap2430_mcspi3_hwmod;
  61. static struct omap_hwmod omap2430_mmc1_hwmod;
  62. static struct omap_hwmod omap2430_mmc2_hwmod;
  63. /* L3 -> L4_CORE interface */
  64. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  65. .master = &omap2430_l3_main_hwmod,
  66. .slave = &omap2430_l4_core_hwmod,
  67. .user = OCP_USER_MPU | OCP_USER_SDMA,
  68. };
  69. /* MPU -> L3 interface */
  70. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  71. .master = &omap2430_mpu_hwmod,
  72. .slave = &omap2430_l3_main_hwmod,
  73. .user = OCP_USER_MPU,
  74. };
  75. /* Slave interfaces on the L3 interconnect */
  76. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  77. &omap2430_mpu__l3_main,
  78. };
  79. /* DSS -> l3 */
  80. static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
  81. .master = &omap2430_dss_core_hwmod,
  82. .slave = &omap2430_l3_main_hwmod,
  83. .fw = {
  84. .omap2 = {
  85. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  86. .flags = OMAP_FIREWALL_L3,
  87. }
  88. },
  89. .user = OCP_USER_MPU | OCP_USER_SDMA,
  90. };
  91. /* Master interfaces on the L3 interconnect */
  92. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  93. &omap2430_l3_main__l4_core,
  94. };
  95. /* L3 */
  96. static struct omap_hwmod omap2430_l3_main_hwmod = {
  97. .name = "l3_main",
  98. .class = &l3_hwmod_class,
  99. .masters = omap2430_l3_main_masters,
  100. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  101. .slaves = omap2430_l3_main_slaves,
  102. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  103. .flags = HWMOD_NO_IDLEST,
  104. };
  105. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  106. static struct omap_hwmod omap2430_uart1_hwmod;
  107. static struct omap_hwmod omap2430_uart2_hwmod;
  108. static struct omap_hwmod omap2430_uart3_hwmod;
  109. static struct omap_hwmod omap2430_i2c1_hwmod;
  110. static struct omap_hwmod omap2430_i2c2_hwmod;
  111. static struct omap_hwmod omap2430_usbhsotg_hwmod;
  112. /* l3_core -> usbhsotg interface */
  113. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  114. .master = &omap2430_usbhsotg_hwmod,
  115. .slave = &omap2430_l3_main_hwmod,
  116. .clk = "core_l3_ck",
  117. .user = OCP_USER_MPU,
  118. };
  119. /* L4 CORE -> I2C1 interface */
  120. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  121. .master = &omap2430_l4_core_hwmod,
  122. .slave = &omap2430_i2c1_hwmod,
  123. .clk = "i2c1_ick",
  124. .addr = omap2_i2c1_addr_space,
  125. .user = OCP_USER_MPU | OCP_USER_SDMA,
  126. };
  127. /* L4 CORE -> I2C2 interface */
  128. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  129. .master = &omap2430_l4_core_hwmod,
  130. .slave = &omap2430_i2c2_hwmod,
  131. .clk = "i2c2_ick",
  132. .addr = omap2_i2c2_addr_space,
  133. .user = OCP_USER_MPU | OCP_USER_SDMA,
  134. };
  135. /* L4_CORE -> L4_WKUP interface */
  136. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  137. .master = &omap2430_l4_core_hwmod,
  138. .slave = &omap2430_l4_wkup_hwmod,
  139. .user = OCP_USER_MPU | OCP_USER_SDMA,
  140. };
  141. /* L4 CORE -> UART1 interface */
  142. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  143. .master = &omap2430_l4_core_hwmod,
  144. .slave = &omap2430_uart1_hwmod,
  145. .clk = "uart1_ick",
  146. .addr = omap2xxx_uart1_addr_space,
  147. .user = OCP_USER_MPU | OCP_USER_SDMA,
  148. };
  149. /* L4 CORE -> UART2 interface */
  150. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  151. .master = &omap2430_l4_core_hwmod,
  152. .slave = &omap2430_uart2_hwmod,
  153. .clk = "uart2_ick",
  154. .addr = omap2xxx_uart2_addr_space,
  155. .user = OCP_USER_MPU | OCP_USER_SDMA,
  156. };
  157. /* L4 PER -> UART3 interface */
  158. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  159. .master = &omap2430_l4_core_hwmod,
  160. .slave = &omap2430_uart3_hwmod,
  161. .clk = "uart3_ick",
  162. .addr = omap2xxx_uart3_addr_space,
  163. .user = OCP_USER_MPU | OCP_USER_SDMA,
  164. };
  165. /*
  166. * usbhsotg interface data
  167. */
  168. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  169. {
  170. .pa_start = OMAP243X_HS_BASE,
  171. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  172. .flags = ADDR_TYPE_RT
  173. },
  174. { }
  175. };
  176. /* l4_core ->usbhsotg interface */
  177. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  178. .master = &omap2430_l4_core_hwmod,
  179. .slave = &omap2430_usbhsotg_hwmod,
  180. .clk = "usb_l4_ick",
  181. .addr = omap2430_usbhsotg_addrs,
  182. .user = OCP_USER_MPU,
  183. };
  184. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
  185. &omap2430_usbhsotg__l3,
  186. };
  187. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
  188. &omap2430_l4_core__usbhsotg,
  189. };
  190. /* L4 CORE -> MMC1 interface */
  191. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
  192. .master = &omap2430_l4_core_hwmod,
  193. .slave = &omap2430_mmc1_hwmod,
  194. .clk = "mmchs1_ick",
  195. .addr = omap2430_mmc1_addr_space,
  196. .user = OCP_USER_MPU | OCP_USER_SDMA,
  197. };
  198. /* L4 CORE -> MMC2 interface */
  199. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
  200. .master = &omap2430_l4_core_hwmod,
  201. .slave = &omap2430_mmc2_hwmod,
  202. .clk = "mmchs2_ick",
  203. .addr = omap2430_mmc2_addr_space,
  204. .user = OCP_USER_MPU | OCP_USER_SDMA,
  205. };
  206. /* Slave interfaces on the L4_CORE interconnect */
  207. static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
  208. &omap2430_l3_main__l4_core,
  209. };
  210. /* Master interfaces on the L4_CORE interconnect */
  211. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  212. &omap2430_l4_core__l4_wkup,
  213. &omap2430_l4_core__mmc1,
  214. &omap2430_l4_core__mmc2,
  215. };
  216. /* L4 CORE */
  217. static struct omap_hwmod omap2430_l4_core_hwmod = {
  218. .name = "l4_core",
  219. .class = &l4_hwmod_class,
  220. .masters = omap2430_l4_core_masters,
  221. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  222. .slaves = omap2430_l4_core_slaves,
  223. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  224. .flags = HWMOD_NO_IDLEST,
  225. };
  226. /* Slave interfaces on the L4_WKUP interconnect */
  227. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  228. &omap2430_l4_core__l4_wkup,
  229. &omap2_l4_core__uart1,
  230. &omap2_l4_core__uart2,
  231. &omap2_l4_core__uart3,
  232. };
  233. /* Master interfaces on the L4_WKUP interconnect */
  234. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  235. };
  236. /* l4 core -> mcspi1 interface */
  237. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
  238. .master = &omap2430_l4_core_hwmod,
  239. .slave = &omap2430_mcspi1_hwmod,
  240. .clk = "mcspi1_ick",
  241. .addr = omap2_mcspi1_addr_space,
  242. .user = OCP_USER_MPU | OCP_USER_SDMA,
  243. };
  244. /* l4 core -> mcspi2 interface */
  245. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
  246. .master = &omap2430_l4_core_hwmod,
  247. .slave = &omap2430_mcspi2_hwmod,
  248. .clk = "mcspi2_ick",
  249. .addr = omap2_mcspi2_addr_space,
  250. .user = OCP_USER_MPU | OCP_USER_SDMA,
  251. };
  252. /* l4 core -> mcspi3 interface */
  253. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  254. .master = &omap2430_l4_core_hwmod,
  255. .slave = &omap2430_mcspi3_hwmod,
  256. .clk = "mcspi3_ick",
  257. .addr = omap2430_mcspi3_addr_space,
  258. .user = OCP_USER_MPU | OCP_USER_SDMA,
  259. };
  260. /* L4 WKUP */
  261. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  262. .name = "l4_wkup",
  263. .class = &l4_hwmod_class,
  264. .masters = omap2430_l4_wkup_masters,
  265. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  266. .slaves = omap2430_l4_wkup_slaves,
  267. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  268. .flags = HWMOD_NO_IDLEST,
  269. };
  270. /* Master interfaces on the MPU device */
  271. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  272. &omap2430_mpu__l3_main,
  273. };
  274. /* MPU */
  275. static struct omap_hwmod omap2430_mpu_hwmod = {
  276. .name = "mpu",
  277. .class = &mpu_hwmod_class,
  278. .main_clk = "mpu_ck",
  279. .masters = omap2430_mpu_masters,
  280. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  281. };
  282. /*
  283. * IVA2_1 interface data
  284. */
  285. /* IVA2 <- L3 interface */
  286. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  287. .master = &omap2430_l3_main_hwmod,
  288. .slave = &omap2430_iva_hwmod,
  289. .clk = "dsp_fck",
  290. .user = OCP_USER_MPU | OCP_USER_SDMA,
  291. };
  292. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  293. &omap2430_l3__iva,
  294. };
  295. /*
  296. * IVA2 (IVA2)
  297. */
  298. static struct omap_hwmod omap2430_iva_hwmod = {
  299. .name = "iva",
  300. .class = &iva_hwmod_class,
  301. .masters = omap2430_iva_masters,
  302. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  303. };
  304. /* always-on timers dev attribute */
  305. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  306. .timer_capability = OMAP_TIMER_ALWON,
  307. };
  308. /* pwm timers dev attribute */
  309. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  310. .timer_capability = OMAP_TIMER_HAS_PWM,
  311. };
  312. /* timer1 */
  313. static struct omap_hwmod omap2430_timer1_hwmod;
  314. static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
  315. {
  316. .pa_start = 0x49018000,
  317. .pa_end = 0x49018000 + SZ_1K - 1,
  318. .flags = ADDR_TYPE_RT
  319. },
  320. { }
  321. };
  322. /* l4_wkup -> timer1 */
  323. static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
  324. .master = &omap2430_l4_wkup_hwmod,
  325. .slave = &omap2430_timer1_hwmod,
  326. .clk = "gpt1_ick",
  327. .addr = omap2430_timer1_addrs,
  328. .user = OCP_USER_MPU | OCP_USER_SDMA,
  329. };
  330. /* timer1 slave port */
  331. static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
  332. &omap2430_l4_wkup__timer1,
  333. };
  334. /* timer1 hwmod */
  335. static struct omap_hwmod omap2430_timer1_hwmod = {
  336. .name = "timer1",
  337. .mpu_irqs = omap2_timer1_mpu_irqs,
  338. .main_clk = "gpt1_fck",
  339. .prcm = {
  340. .omap2 = {
  341. .prcm_reg_id = 1,
  342. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  343. .module_offs = WKUP_MOD,
  344. .idlest_reg_id = 1,
  345. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  346. },
  347. },
  348. .dev_attr = &capability_alwon_dev_attr,
  349. .slaves = omap2430_timer1_slaves,
  350. .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
  351. .class = &omap2xxx_timer_hwmod_class,
  352. };
  353. /* timer2 */
  354. static struct omap_hwmod omap2430_timer2_hwmod;
  355. /* l4_core -> timer2 */
  356. static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
  357. .master = &omap2430_l4_core_hwmod,
  358. .slave = &omap2430_timer2_hwmod,
  359. .clk = "gpt2_ick",
  360. .addr = omap2xxx_timer2_addrs,
  361. .user = OCP_USER_MPU | OCP_USER_SDMA,
  362. };
  363. /* timer2 slave port */
  364. static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
  365. &omap2430_l4_core__timer2,
  366. };
  367. /* timer2 hwmod */
  368. static struct omap_hwmod omap2430_timer2_hwmod = {
  369. .name = "timer2",
  370. .mpu_irqs = omap2_timer2_mpu_irqs,
  371. .main_clk = "gpt2_fck",
  372. .prcm = {
  373. .omap2 = {
  374. .prcm_reg_id = 1,
  375. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  376. .module_offs = CORE_MOD,
  377. .idlest_reg_id = 1,
  378. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  379. },
  380. },
  381. .dev_attr = &capability_alwon_dev_attr,
  382. .slaves = omap2430_timer2_slaves,
  383. .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
  384. .class = &omap2xxx_timer_hwmod_class,
  385. };
  386. /* timer3 */
  387. static struct omap_hwmod omap2430_timer3_hwmod;
  388. /* l4_core -> timer3 */
  389. static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
  390. .master = &omap2430_l4_core_hwmod,
  391. .slave = &omap2430_timer3_hwmod,
  392. .clk = "gpt3_ick",
  393. .addr = omap2xxx_timer3_addrs,
  394. .user = OCP_USER_MPU | OCP_USER_SDMA,
  395. };
  396. /* timer3 slave port */
  397. static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
  398. &omap2430_l4_core__timer3,
  399. };
  400. /* timer3 hwmod */
  401. static struct omap_hwmod omap2430_timer3_hwmod = {
  402. .name = "timer3",
  403. .mpu_irqs = omap2_timer3_mpu_irqs,
  404. .main_clk = "gpt3_fck",
  405. .prcm = {
  406. .omap2 = {
  407. .prcm_reg_id = 1,
  408. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  409. .module_offs = CORE_MOD,
  410. .idlest_reg_id = 1,
  411. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  412. },
  413. },
  414. .dev_attr = &capability_alwon_dev_attr,
  415. .slaves = omap2430_timer3_slaves,
  416. .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
  417. .class = &omap2xxx_timer_hwmod_class,
  418. };
  419. /* timer4 */
  420. static struct omap_hwmod omap2430_timer4_hwmod;
  421. /* l4_core -> timer4 */
  422. static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
  423. .master = &omap2430_l4_core_hwmod,
  424. .slave = &omap2430_timer4_hwmod,
  425. .clk = "gpt4_ick",
  426. .addr = omap2xxx_timer4_addrs,
  427. .user = OCP_USER_MPU | OCP_USER_SDMA,
  428. };
  429. /* timer4 slave port */
  430. static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
  431. &omap2430_l4_core__timer4,
  432. };
  433. /* timer4 hwmod */
  434. static struct omap_hwmod omap2430_timer4_hwmod = {
  435. .name = "timer4",
  436. .mpu_irqs = omap2_timer4_mpu_irqs,
  437. .main_clk = "gpt4_fck",
  438. .prcm = {
  439. .omap2 = {
  440. .prcm_reg_id = 1,
  441. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  442. .module_offs = CORE_MOD,
  443. .idlest_reg_id = 1,
  444. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  445. },
  446. },
  447. .dev_attr = &capability_alwon_dev_attr,
  448. .slaves = omap2430_timer4_slaves,
  449. .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
  450. .class = &omap2xxx_timer_hwmod_class,
  451. };
  452. /* timer5 */
  453. static struct omap_hwmod omap2430_timer5_hwmod;
  454. /* l4_core -> timer5 */
  455. static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
  456. .master = &omap2430_l4_core_hwmod,
  457. .slave = &omap2430_timer5_hwmod,
  458. .clk = "gpt5_ick",
  459. .addr = omap2xxx_timer5_addrs,
  460. .user = OCP_USER_MPU | OCP_USER_SDMA,
  461. };
  462. /* timer5 slave port */
  463. static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
  464. &omap2430_l4_core__timer5,
  465. };
  466. /* timer5 hwmod */
  467. static struct omap_hwmod omap2430_timer5_hwmod = {
  468. .name = "timer5",
  469. .mpu_irqs = omap2_timer5_mpu_irqs,
  470. .main_clk = "gpt5_fck",
  471. .prcm = {
  472. .omap2 = {
  473. .prcm_reg_id = 1,
  474. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  475. .module_offs = CORE_MOD,
  476. .idlest_reg_id = 1,
  477. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  478. },
  479. },
  480. .dev_attr = &capability_alwon_dev_attr,
  481. .slaves = omap2430_timer5_slaves,
  482. .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
  483. .class = &omap2xxx_timer_hwmod_class,
  484. };
  485. /* timer6 */
  486. static struct omap_hwmod omap2430_timer6_hwmod;
  487. /* l4_core -> timer6 */
  488. static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
  489. .master = &omap2430_l4_core_hwmod,
  490. .slave = &omap2430_timer6_hwmod,
  491. .clk = "gpt6_ick",
  492. .addr = omap2xxx_timer6_addrs,
  493. .user = OCP_USER_MPU | OCP_USER_SDMA,
  494. };
  495. /* timer6 slave port */
  496. static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
  497. &omap2430_l4_core__timer6,
  498. };
  499. /* timer6 hwmod */
  500. static struct omap_hwmod omap2430_timer6_hwmod = {
  501. .name = "timer6",
  502. .mpu_irqs = omap2_timer6_mpu_irqs,
  503. .main_clk = "gpt6_fck",
  504. .prcm = {
  505. .omap2 = {
  506. .prcm_reg_id = 1,
  507. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  508. .module_offs = CORE_MOD,
  509. .idlest_reg_id = 1,
  510. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  511. },
  512. },
  513. .dev_attr = &capability_alwon_dev_attr,
  514. .slaves = omap2430_timer6_slaves,
  515. .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
  516. .class = &omap2xxx_timer_hwmod_class,
  517. };
  518. /* timer7 */
  519. static struct omap_hwmod omap2430_timer7_hwmod;
  520. /* l4_core -> timer7 */
  521. static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
  522. .master = &omap2430_l4_core_hwmod,
  523. .slave = &omap2430_timer7_hwmod,
  524. .clk = "gpt7_ick",
  525. .addr = omap2xxx_timer7_addrs,
  526. .user = OCP_USER_MPU | OCP_USER_SDMA,
  527. };
  528. /* timer7 slave port */
  529. static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
  530. &omap2430_l4_core__timer7,
  531. };
  532. /* timer7 hwmod */
  533. static struct omap_hwmod omap2430_timer7_hwmod = {
  534. .name = "timer7",
  535. .mpu_irqs = omap2_timer7_mpu_irqs,
  536. .main_clk = "gpt7_fck",
  537. .prcm = {
  538. .omap2 = {
  539. .prcm_reg_id = 1,
  540. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  541. .module_offs = CORE_MOD,
  542. .idlest_reg_id = 1,
  543. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  544. },
  545. },
  546. .dev_attr = &capability_alwon_dev_attr,
  547. .slaves = omap2430_timer7_slaves,
  548. .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
  549. .class = &omap2xxx_timer_hwmod_class,
  550. };
  551. /* timer8 */
  552. static struct omap_hwmod omap2430_timer8_hwmod;
  553. /* l4_core -> timer8 */
  554. static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
  555. .master = &omap2430_l4_core_hwmod,
  556. .slave = &omap2430_timer8_hwmod,
  557. .clk = "gpt8_ick",
  558. .addr = omap2xxx_timer8_addrs,
  559. .user = OCP_USER_MPU | OCP_USER_SDMA,
  560. };
  561. /* timer8 slave port */
  562. static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
  563. &omap2430_l4_core__timer8,
  564. };
  565. /* timer8 hwmod */
  566. static struct omap_hwmod omap2430_timer8_hwmod = {
  567. .name = "timer8",
  568. .mpu_irqs = omap2_timer8_mpu_irqs,
  569. .main_clk = "gpt8_fck",
  570. .prcm = {
  571. .omap2 = {
  572. .prcm_reg_id = 1,
  573. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  574. .module_offs = CORE_MOD,
  575. .idlest_reg_id = 1,
  576. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  577. },
  578. },
  579. .dev_attr = &capability_alwon_dev_attr,
  580. .slaves = omap2430_timer8_slaves,
  581. .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
  582. .class = &omap2xxx_timer_hwmod_class,
  583. };
  584. /* timer9 */
  585. static struct omap_hwmod omap2430_timer9_hwmod;
  586. /* l4_core -> timer9 */
  587. static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
  588. .master = &omap2430_l4_core_hwmod,
  589. .slave = &omap2430_timer9_hwmod,
  590. .clk = "gpt9_ick",
  591. .addr = omap2xxx_timer9_addrs,
  592. .user = OCP_USER_MPU | OCP_USER_SDMA,
  593. };
  594. /* timer9 slave port */
  595. static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
  596. &omap2430_l4_core__timer9,
  597. };
  598. /* timer9 hwmod */
  599. static struct omap_hwmod omap2430_timer9_hwmod = {
  600. .name = "timer9",
  601. .mpu_irqs = omap2_timer9_mpu_irqs,
  602. .main_clk = "gpt9_fck",
  603. .prcm = {
  604. .omap2 = {
  605. .prcm_reg_id = 1,
  606. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  607. .module_offs = CORE_MOD,
  608. .idlest_reg_id = 1,
  609. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  610. },
  611. },
  612. .dev_attr = &capability_pwm_dev_attr,
  613. .slaves = omap2430_timer9_slaves,
  614. .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
  615. .class = &omap2xxx_timer_hwmod_class,
  616. };
  617. /* timer10 */
  618. static struct omap_hwmod omap2430_timer10_hwmod;
  619. /* l4_core -> timer10 */
  620. static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
  621. .master = &omap2430_l4_core_hwmod,
  622. .slave = &omap2430_timer10_hwmod,
  623. .clk = "gpt10_ick",
  624. .addr = omap2_timer10_addrs,
  625. .user = OCP_USER_MPU | OCP_USER_SDMA,
  626. };
  627. /* timer10 slave port */
  628. static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
  629. &omap2430_l4_core__timer10,
  630. };
  631. /* timer10 hwmod */
  632. static struct omap_hwmod omap2430_timer10_hwmod = {
  633. .name = "timer10",
  634. .mpu_irqs = omap2_timer10_mpu_irqs,
  635. .main_clk = "gpt10_fck",
  636. .prcm = {
  637. .omap2 = {
  638. .prcm_reg_id = 1,
  639. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  640. .module_offs = CORE_MOD,
  641. .idlest_reg_id = 1,
  642. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  643. },
  644. },
  645. .dev_attr = &capability_pwm_dev_attr,
  646. .slaves = omap2430_timer10_slaves,
  647. .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
  648. .class = &omap2xxx_timer_hwmod_class,
  649. };
  650. /* timer11 */
  651. static struct omap_hwmod omap2430_timer11_hwmod;
  652. /* l4_core -> timer11 */
  653. static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
  654. .master = &omap2430_l4_core_hwmod,
  655. .slave = &omap2430_timer11_hwmod,
  656. .clk = "gpt11_ick",
  657. .addr = omap2_timer11_addrs,
  658. .user = OCP_USER_MPU | OCP_USER_SDMA,
  659. };
  660. /* timer11 slave port */
  661. static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
  662. &omap2430_l4_core__timer11,
  663. };
  664. /* timer11 hwmod */
  665. static struct omap_hwmod omap2430_timer11_hwmod = {
  666. .name = "timer11",
  667. .mpu_irqs = omap2_timer11_mpu_irqs,
  668. .main_clk = "gpt11_fck",
  669. .prcm = {
  670. .omap2 = {
  671. .prcm_reg_id = 1,
  672. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  673. .module_offs = CORE_MOD,
  674. .idlest_reg_id = 1,
  675. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  676. },
  677. },
  678. .dev_attr = &capability_pwm_dev_attr,
  679. .slaves = omap2430_timer11_slaves,
  680. .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
  681. .class = &omap2xxx_timer_hwmod_class,
  682. };
  683. /* timer12 */
  684. static struct omap_hwmod omap2430_timer12_hwmod;
  685. /* l4_core -> timer12 */
  686. static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
  687. .master = &omap2430_l4_core_hwmod,
  688. .slave = &omap2430_timer12_hwmod,
  689. .clk = "gpt12_ick",
  690. .addr = omap2xxx_timer12_addrs,
  691. .user = OCP_USER_MPU | OCP_USER_SDMA,
  692. };
  693. /* timer12 slave port */
  694. static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
  695. &omap2430_l4_core__timer12,
  696. };
  697. /* timer12 hwmod */
  698. static struct omap_hwmod omap2430_timer12_hwmod = {
  699. .name = "timer12",
  700. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  701. .main_clk = "gpt12_fck",
  702. .prcm = {
  703. .omap2 = {
  704. .prcm_reg_id = 1,
  705. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  706. .module_offs = CORE_MOD,
  707. .idlest_reg_id = 1,
  708. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  709. },
  710. },
  711. .dev_attr = &capability_pwm_dev_attr,
  712. .slaves = omap2430_timer12_slaves,
  713. .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
  714. .class = &omap2xxx_timer_hwmod_class,
  715. };
  716. /* l4_wkup -> wd_timer2 */
  717. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  718. {
  719. .pa_start = 0x49016000,
  720. .pa_end = 0x4901607f,
  721. .flags = ADDR_TYPE_RT
  722. },
  723. { }
  724. };
  725. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  726. .master = &omap2430_l4_wkup_hwmod,
  727. .slave = &omap2430_wd_timer2_hwmod,
  728. .clk = "mpu_wdt_ick",
  729. .addr = omap2430_wd_timer2_addrs,
  730. .user = OCP_USER_MPU | OCP_USER_SDMA,
  731. };
  732. /* wd_timer2 */
  733. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  734. &omap2430_l4_wkup__wd_timer2,
  735. };
  736. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  737. .name = "wd_timer2",
  738. .class = &omap2xxx_wd_timer_hwmod_class,
  739. .main_clk = "mpu_wdt_fck",
  740. .prcm = {
  741. .omap2 = {
  742. .prcm_reg_id = 1,
  743. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  744. .module_offs = WKUP_MOD,
  745. .idlest_reg_id = 1,
  746. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  747. },
  748. },
  749. .slaves = omap2430_wd_timer2_slaves,
  750. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  751. };
  752. /* UART1 */
  753. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  754. &omap2_l4_core__uart1,
  755. };
  756. static struct omap_hwmod omap2430_uart1_hwmod = {
  757. .name = "uart1",
  758. .mpu_irqs = omap2_uart1_mpu_irqs,
  759. .sdma_reqs = omap2_uart1_sdma_reqs,
  760. .main_clk = "uart1_fck",
  761. .prcm = {
  762. .omap2 = {
  763. .module_offs = CORE_MOD,
  764. .prcm_reg_id = 1,
  765. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  766. .idlest_reg_id = 1,
  767. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  768. },
  769. },
  770. .slaves = omap2430_uart1_slaves,
  771. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  772. .class = &omap2_uart_class,
  773. };
  774. /* UART2 */
  775. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  776. &omap2_l4_core__uart2,
  777. };
  778. static struct omap_hwmod omap2430_uart2_hwmod = {
  779. .name = "uart2",
  780. .mpu_irqs = omap2_uart2_mpu_irqs,
  781. .sdma_reqs = omap2_uart2_sdma_reqs,
  782. .main_clk = "uart2_fck",
  783. .prcm = {
  784. .omap2 = {
  785. .module_offs = CORE_MOD,
  786. .prcm_reg_id = 1,
  787. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  788. .idlest_reg_id = 1,
  789. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  790. },
  791. },
  792. .slaves = omap2430_uart2_slaves,
  793. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  794. .class = &omap2_uart_class,
  795. };
  796. /* UART3 */
  797. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  798. &omap2_l4_core__uart3,
  799. };
  800. static struct omap_hwmod omap2430_uart3_hwmod = {
  801. .name = "uart3",
  802. .mpu_irqs = omap2_uart3_mpu_irqs,
  803. .sdma_reqs = omap2_uart3_sdma_reqs,
  804. .main_clk = "uart3_fck",
  805. .prcm = {
  806. .omap2 = {
  807. .module_offs = CORE_MOD,
  808. .prcm_reg_id = 2,
  809. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  810. .idlest_reg_id = 2,
  811. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  812. },
  813. },
  814. .slaves = omap2430_uart3_slaves,
  815. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  816. .class = &omap2_uart_class,
  817. };
  818. /* dss */
  819. /* dss master ports */
  820. static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
  821. &omap2430_dss__l3,
  822. };
  823. /* l4_core -> dss */
  824. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  825. .master = &omap2430_l4_core_hwmod,
  826. .slave = &omap2430_dss_core_hwmod,
  827. .clk = "dss_ick",
  828. .addr = omap2_dss_addrs,
  829. .user = OCP_USER_MPU | OCP_USER_SDMA,
  830. };
  831. /* dss slave ports */
  832. static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
  833. &omap2430_l4_core__dss,
  834. };
  835. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  836. { .role = "tv_clk", .clk = "dss_54m_fck" },
  837. { .role = "sys_clk", .clk = "dss2_fck" },
  838. };
  839. static struct omap_hwmod omap2430_dss_core_hwmod = {
  840. .name = "dss_core",
  841. .class = &omap2_dss_hwmod_class,
  842. .main_clk = "dss1_fck", /* instead of dss_fck */
  843. .sdma_reqs = omap2xxx_dss_sdma_chs,
  844. .prcm = {
  845. .omap2 = {
  846. .prcm_reg_id = 1,
  847. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  848. .module_offs = CORE_MOD,
  849. .idlest_reg_id = 1,
  850. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  851. },
  852. },
  853. .opt_clks = dss_opt_clks,
  854. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  855. .slaves = omap2430_dss_slaves,
  856. .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
  857. .masters = omap2430_dss_masters,
  858. .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
  859. .flags = HWMOD_NO_IDLEST,
  860. };
  861. /* l4_core -> dss_dispc */
  862. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  863. .master = &omap2430_l4_core_hwmod,
  864. .slave = &omap2430_dss_dispc_hwmod,
  865. .clk = "dss_ick",
  866. .addr = omap2_dss_dispc_addrs,
  867. .user = OCP_USER_MPU | OCP_USER_SDMA,
  868. };
  869. /* dss_dispc slave ports */
  870. static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
  871. &omap2430_l4_core__dss_dispc,
  872. };
  873. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  874. .name = "dss_dispc",
  875. .class = &omap2_dispc_hwmod_class,
  876. .mpu_irqs = omap2_dispc_irqs,
  877. .main_clk = "dss1_fck",
  878. .prcm = {
  879. .omap2 = {
  880. .prcm_reg_id = 1,
  881. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  882. .module_offs = CORE_MOD,
  883. .idlest_reg_id = 1,
  884. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  885. },
  886. },
  887. .slaves = omap2430_dss_dispc_slaves,
  888. .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
  889. .flags = HWMOD_NO_IDLEST,
  890. };
  891. /* l4_core -> dss_rfbi */
  892. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  893. .master = &omap2430_l4_core_hwmod,
  894. .slave = &omap2430_dss_rfbi_hwmod,
  895. .clk = "dss_ick",
  896. .addr = omap2_dss_rfbi_addrs,
  897. .user = OCP_USER_MPU | OCP_USER_SDMA,
  898. };
  899. /* dss_rfbi slave ports */
  900. static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
  901. &omap2430_l4_core__dss_rfbi,
  902. };
  903. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  904. .name = "dss_rfbi",
  905. .class = &omap2_rfbi_hwmod_class,
  906. .main_clk = "dss1_fck",
  907. .prcm = {
  908. .omap2 = {
  909. .prcm_reg_id = 1,
  910. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  911. .module_offs = CORE_MOD,
  912. },
  913. },
  914. .slaves = omap2430_dss_rfbi_slaves,
  915. .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
  916. .flags = HWMOD_NO_IDLEST,
  917. };
  918. /* l4_core -> dss_venc */
  919. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  920. .master = &omap2430_l4_core_hwmod,
  921. .slave = &omap2430_dss_venc_hwmod,
  922. .clk = "dss_54m_fck",
  923. .addr = omap2_dss_venc_addrs,
  924. .flags = OCPIF_SWSUP_IDLE,
  925. .user = OCP_USER_MPU | OCP_USER_SDMA,
  926. };
  927. /* dss_venc slave ports */
  928. static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
  929. &omap2430_l4_core__dss_venc,
  930. };
  931. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  932. .name = "dss_venc",
  933. .class = &omap2_venc_hwmod_class,
  934. .main_clk = "dss1_fck",
  935. .prcm = {
  936. .omap2 = {
  937. .prcm_reg_id = 1,
  938. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  939. .module_offs = CORE_MOD,
  940. },
  941. },
  942. .slaves = omap2430_dss_venc_slaves,
  943. .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
  944. .flags = HWMOD_NO_IDLEST,
  945. };
  946. /* I2C common */
  947. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  948. .rev_offs = 0x00,
  949. .sysc_offs = 0x20,
  950. .syss_offs = 0x10,
  951. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  952. SYSS_HAS_RESET_STATUS),
  953. .sysc_fields = &omap_hwmod_sysc_type1,
  954. };
  955. static struct omap_hwmod_class i2c_class = {
  956. .name = "i2c",
  957. .sysc = &i2c_sysc,
  958. .rev = OMAP_I2C_IP_VERSION_1,
  959. .reset = &omap_i2c_reset,
  960. };
  961. static struct omap_i2c_dev_attr i2c_dev_attr = {
  962. .fifo_depth = 8, /* bytes */
  963. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  964. OMAP_I2C_FLAG_BUS_SHIFT_2 |
  965. OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
  966. };
  967. /* I2C1 */
  968. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  969. &omap2430_l4_core__i2c1,
  970. };
  971. static struct omap_hwmod omap2430_i2c1_hwmod = {
  972. .name = "i2c1",
  973. .flags = HWMOD_16BIT_REG,
  974. .mpu_irqs = omap2_i2c1_mpu_irqs,
  975. .sdma_reqs = omap2_i2c1_sdma_reqs,
  976. .main_clk = "i2chs1_fck",
  977. .prcm = {
  978. .omap2 = {
  979. /*
  980. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  981. * I2CHS IP's do not follow the usual pattern.
  982. * prcm_reg_id alone cannot be used to program
  983. * the iclk and fclk. Needs to be handled using
  984. * additional flags when clk handling is moved
  985. * to hwmod framework.
  986. */
  987. .module_offs = CORE_MOD,
  988. .prcm_reg_id = 1,
  989. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  990. .idlest_reg_id = 1,
  991. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  992. },
  993. },
  994. .slaves = omap2430_i2c1_slaves,
  995. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  996. .class = &i2c_class,
  997. .dev_attr = &i2c_dev_attr,
  998. };
  999. /* I2C2 */
  1000. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  1001. &omap2430_l4_core__i2c2,
  1002. };
  1003. static struct omap_hwmod omap2430_i2c2_hwmod = {
  1004. .name = "i2c2",
  1005. .flags = HWMOD_16BIT_REG,
  1006. .mpu_irqs = omap2_i2c2_mpu_irqs,
  1007. .sdma_reqs = omap2_i2c2_sdma_reqs,
  1008. .main_clk = "i2chs2_fck",
  1009. .prcm = {
  1010. .omap2 = {
  1011. .module_offs = CORE_MOD,
  1012. .prcm_reg_id = 1,
  1013. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  1014. .idlest_reg_id = 1,
  1015. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  1016. },
  1017. },
  1018. .slaves = omap2430_i2c2_slaves,
  1019. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  1020. .class = &i2c_class,
  1021. .dev_attr = &i2c_dev_attr,
  1022. };
  1023. /* l4_wkup -> gpio1 */
  1024. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  1025. {
  1026. .pa_start = 0x4900C000,
  1027. .pa_end = 0x4900C1ff,
  1028. .flags = ADDR_TYPE_RT
  1029. },
  1030. { }
  1031. };
  1032. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  1033. .master = &omap2430_l4_wkup_hwmod,
  1034. .slave = &omap2430_gpio1_hwmod,
  1035. .clk = "gpios_ick",
  1036. .addr = omap2430_gpio1_addr_space,
  1037. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1038. };
  1039. /* l4_wkup -> gpio2 */
  1040. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  1041. {
  1042. .pa_start = 0x4900E000,
  1043. .pa_end = 0x4900E1ff,
  1044. .flags = ADDR_TYPE_RT
  1045. },
  1046. { }
  1047. };
  1048. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  1049. .master = &omap2430_l4_wkup_hwmod,
  1050. .slave = &omap2430_gpio2_hwmod,
  1051. .clk = "gpios_ick",
  1052. .addr = omap2430_gpio2_addr_space,
  1053. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1054. };
  1055. /* l4_wkup -> gpio3 */
  1056. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  1057. {
  1058. .pa_start = 0x49010000,
  1059. .pa_end = 0x490101ff,
  1060. .flags = ADDR_TYPE_RT
  1061. },
  1062. { }
  1063. };
  1064. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  1065. .master = &omap2430_l4_wkup_hwmod,
  1066. .slave = &omap2430_gpio3_hwmod,
  1067. .clk = "gpios_ick",
  1068. .addr = omap2430_gpio3_addr_space,
  1069. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1070. };
  1071. /* l4_wkup -> gpio4 */
  1072. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  1073. {
  1074. .pa_start = 0x49012000,
  1075. .pa_end = 0x490121ff,
  1076. .flags = ADDR_TYPE_RT
  1077. },
  1078. { }
  1079. };
  1080. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  1081. .master = &omap2430_l4_wkup_hwmod,
  1082. .slave = &omap2430_gpio4_hwmod,
  1083. .clk = "gpios_ick",
  1084. .addr = omap2430_gpio4_addr_space,
  1085. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1086. };
  1087. /* l4_core -> gpio5 */
  1088. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  1089. {
  1090. .pa_start = 0x480B6000,
  1091. .pa_end = 0x480B61ff,
  1092. .flags = ADDR_TYPE_RT
  1093. },
  1094. { }
  1095. };
  1096. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  1097. .master = &omap2430_l4_core_hwmod,
  1098. .slave = &omap2430_gpio5_hwmod,
  1099. .clk = "gpio5_ick",
  1100. .addr = omap2430_gpio5_addr_space,
  1101. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1102. };
  1103. /* gpio dev_attr */
  1104. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1105. .bank_width = 32,
  1106. .dbck_flag = false,
  1107. };
  1108. /* gpio1 */
  1109. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  1110. &omap2430_l4_wkup__gpio1,
  1111. };
  1112. static struct omap_hwmod omap2430_gpio1_hwmod = {
  1113. .name = "gpio1",
  1114. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1115. .mpu_irqs = omap2_gpio1_irqs,
  1116. .main_clk = "gpios_fck",
  1117. .prcm = {
  1118. .omap2 = {
  1119. .prcm_reg_id = 1,
  1120. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1121. .module_offs = WKUP_MOD,
  1122. .idlest_reg_id = 1,
  1123. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1124. },
  1125. },
  1126. .slaves = omap2430_gpio1_slaves,
  1127. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  1128. .class = &omap2xxx_gpio_hwmod_class,
  1129. .dev_attr = &gpio_dev_attr,
  1130. };
  1131. /* gpio2 */
  1132. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  1133. &omap2430_l4_wkup__gpio2,
  1134. };
  1135. static struct omap_hwmod omap2430_gpio2_hwmod = {
  1136. .name = "gpio2",
  1137. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1138. .mpu_irqs = omap2_gpio2_irqs,
  1139. .main_clk = "gpios_fck",
  1140. .prcm = {
  1141. .omap2 = {
  1142. .prcm_reg_id = 1,
  1143. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1144. .module_offs = WKUP_MOD,
  1145. .idlest_reg_id = 1,
  1146. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1147. },
  1148. },
  1149. .slaves = omap2430_gpio2_slaves,
  1150. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  1151. .class = &omap2xxx_gpio_hwmod_class,
  1152. .dev_attr = &gpio_dev_attr,
  1153. };
  1154. /* gpio3 */
  1155. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  1156. &omap2430_l4_wkup__gpio3,
  1157. };
  1158. static struct omap_hwmod omap2430_gpio3_hwmod = {
  1159. .name = "gpio3",
  1160. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1161. .mpu_irqs = omap2_gpio3_irqs,
  1162. .main_clk = "gpios_fck",
  1163. .prcm = {
  1164. .omap2 = {
  1165. .prcm_reg_id = 1,
  1166. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1167. .module_offs = WKUP_MOD,
  1168. .idlest_reg_id = 1,
  1169. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1170. },
  1171. },
  1172. .slaves = omap2430_gpio3_slaves,
  1173. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1174. .class = &omap2xxx_gpio_hwmod_class,
  1175. .dev_attr = &gpio_dev_attr,
  1176. };
  1177. /* gpio4 */
  1178. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1179. &omap2430_l4_wkup__gpio4,
  1180. };
  1181. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1182. .name = "gpio4",
  1183. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1184. .mpu_irqs = omap2_gpio4_irqs,
  1185. .main_clk = "gpios_fck",
  1186. .prcm = {
  1187. .omap2 = {
  1188. .prcm_reg_id = 1,
  1189. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1190. .module_offs = WKUP_MOD,
  1191. .idlest_reg_id = 1,
  1192. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1193. },
  1194. },
  1195. .slaves = omap2430_gpio4_slaves,
  1196. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1197. .class = &omap2xxx_gpio_hwmod_class,
  1198. .dev_attr = &gpio_dev_attr,
  1199. };
  1200. /* gpio5 */
  1201. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1202. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1203. { .irq = -1 }
  1204. };
  1205. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1206. &omap2430_l4_core__gpio5,
  1207. };
  1208. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1209. .name = "gpio5",
  1210. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1211. .mpu_irqs = omap243x_gpio5_irqs,
  1212. .main_clk = "gpio5_fck",
  1213. .prcm = {
  1214. .omap2 = {
  1215. .prcm_reg_id = 2,
  1216. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1217. .module_offs = CORE_MOD,
  1218. .idlest_reg_id = 2,
  1219. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1220. },
  1221. },
  1222. .slaves = omap2430_gpio5_slaves,
  1223. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1224. .class = &omap2xxx_gpio_hwmod_class,
  1225. .dev_attr = &gpio_dev_attr,
  1226. };
  1227. /* dma attributes */
  1228. static struct omap_dma_dev_attr dma_dev_attr = {
  1229. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1230. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1231. .lch_count = 32,
  1232. };
  1233. /* dma_system -> L3 */
  1234. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1235. .master = &omap2430_dma_system_hwmod,
  1236. .slave = &omap2430_l3_main_hwmod,
  1237. .clk = "core_l3_ck",
  1238. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1239. };
  1240. /* dma_system master ports */
  1241. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1242. &omap2430_dma_system__l3,
  1243. };
  1244. /* l4_core -> dma_system */
  1245. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1246. .master = &omap2430_l4_core_hwmod,
  1247. .slave = &omap2430_dma_system_hwmod,
  1248. .clk = "sdma_ick",
  1249. .addr = omap2_dma_system_addrs,
  1250. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1251. };
  1252. /* dma_system slave ports */
  1253. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1254. &omap2430_l4_core__dma_system,
  1255. };
  1256. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1257. .name = "dma",
  1258. .class = &omap2xxx_dma_hwmod_class,
  1259. .mpu_irqs = omap2_dma_system_irqs,
  1260. .main_clk = "core_l3_ck",
  1261. .slaves = omap2430_dma_system_slaves,
  1262. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1263. .masters = omap2430_dma_system_masters,
  1264. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1265. .dev_attr = &dma_dev_attr,
  1266. .flags = HWMOD_NO_IDLEST,
  1267. };
  1268. /* mailbox */
  1269. static struct omap_hwmod omap2430_mailbox_hwmod;
  1270. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1271. { .irq = 26 },
  1272. { .irq = -1 }
  1273. };
  1274. /* l4_core -> mailbox */
  1275. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1276. .master = &omap2430_l4_core_hwmod,
  1277. .slave = &omap2430_mailbox_hwmod,
  1278. .addr = omap2_mailbox_addrs,
  1279. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1280. };
  1281. /* mailbox slave ports */
  1282. static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
  1283. &omap2430_l4_core__mailbox,
  1284. };
  1285. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1286. .name = "mailbox",
  1287. .class = &omap2xxx_mailbox_hwmod_class,
  1288. .mpu_irqs = omap2430_mailbox_irqs,
  1289. .main_clk = "mailboxes_ick",
  1290. .prcm = {
  1291. .omap2 = {
  1292. .prcm_reg_id = 1,
  1293. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1294. .module_offs = CORE_MOD,
  1295. .idlest_reg_id = 1,
  1296. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1297. },
  1298. },
  1299. .slaves = omap2430_mailbox_slaves,
  1300. .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
  1301. };
  1302. /* mcspi1 */
  1303. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1304. &omap2430_l4_core__mcspi1,
  1305. };
  1306. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1307. .num_chipselect = 4,
  1308. };
  1309. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1310. .name = "mcspi1_hwmod",
  1311. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1312. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1313. .main_clk = "mcspi1_fck",
  1314. .prcm = {
  1315. .omap2 = {
  1316. .module_offs = CORE_MOD,
  1317. .prcm_reg_id = 1,
  1318. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1319. .idlest_reg_id = 1,
  1320. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1321. },
  1322. },
  1323. .slaves = omap2430_mcspi1_slaves,
  1324. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1325. .class = &omap2xxx_mcspi_class,
  1326. .dev_attr = &omap_mcspi1_dev_attr,
  1327. };
  1328. /* mcspi2 */
  1329. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1330. &omap2430_l4_core__mcspi2,
  1331. };
  1332. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1333. .num_chipselect = 2,
  1334. };
  1335. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1336. .name = "mcspi2_hwmod",
  1337. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1338. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1339. .main_clk = "mcspi2_fck",
  1340. .prcm = {
  1341. .omap2 = {
  1342. .module_offs = CORE_MOD,
  1343. .prcm_reg_id = 1,
  1344. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1345. .idlest_reg_id = 1,
  1346. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1347. },
  1348. },
  1349. .slaves = omap2430_mcspi2_slaves,
  1350. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1351. .class = &omap2xxx_mcspi_class,
  1352. .dev_attr = &omap_mcspi2_dev_attr,
  1353. };
  1354. /* mcspi3 */
  1355. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1356. { .irq = 91 },
  1357. { .irq = -1 }
  1358. };
  1359. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1360. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1361. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1362. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1363. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1364. { .dma_req = -1 }
  1365. };
  1366. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1367. &omap2430_l4_core__mcspi3,
  1368. };
  1369. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1370. .num_chipselect = 2,
  1371. };
  1372. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1373. .name = "mcspi3_hwmod",
  1374. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1375. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1376. .main_clk = "mcspi3_fck",
  1377. .prcm = {
  1378. .omap2 = {
  1379. .module_offs = CORE_MOD,
  1380. .prcm_reg_id = 2,
  1381. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1382. .idlest_reg_id = 2,
  1383. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1384. },
  1385. },
  1386. .slaves = omap2430_mcspi3_slaves,
  1387. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1388. .class = &omap2xxx_mcspi_class,
  1389. .dev_attr = &omap_mcspi3_dev_attr,
  1390. };
  1391. /*
  1392. * usbhsotg
  1393. */
  1394. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1395. .rev_offs = 0x0400,
  1396. .sysc_offs = 0x0404,
  1397. .syss_offs = 0x0408,
  1398. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1399. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1400. SYSC_HAS_AUTOIDLE),
  1401. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1402. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1403. .sysc_fields = &omap_hwmod_sysc_type1,
  1404. };
  1405. static struct omap_hwmod_class usbotg_class = {
  1406. .name = "usbotg",
  1407. .sysc = &omap2430_usbhsotg_sysc,
  1408. };
  1409. /* usb_otg_hs */
  1410. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1411. { .name = "mc", .irq = 92 },
  1412. { .name = "dma", .irq = 93 },
  1413. { .irq = -1 }
  1414. };
  1415. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1416. .name = "usb_otg_hs",
  1417. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1418. .main_clk = "usbhs_ick",
  1419. .prcm = {
  1420. .omap2 = {
  1421. .prcm_reg_id = 1,
  1422. .module_bit = OMAP2430_EN_USBHS_MASK,
  1423. .module_offs = CORE_MOD,
  1424. .idlest_reg_id = 1,
  1425. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1426. },
  1427. },
  1428. .masters = omap2430_usbhsotg_masters,
  1429. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1430. .slaves = omap2430_usbhsotg_slaves,
  1431. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1432. .class = &usbotg_class,
  1433. /*
  1434. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1435. * broken when autoidle is enabled
  1436. * workaround is to disable the autoidle bit at module level.
  1437. */
  1438. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1439. | HWMOD_SWSUP_MSTANDBY,
  1440. };
  1441. /*
  1442. * 'mcbsp' class
  1443. * multi channel buffered serial port controller
  1444. */
  1445. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  1446. .rev_offs = 0x007C,
  1447. .sysc_offs = 0x008C,
  1448. .sysc_flags = (SYSC_HAS_SOFTRESET),
  1449. .sysc_fields = &omap_hwmod_sysc_type1,
  1450. };
  1451. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  1452. .name = "mcbsp",
  1453. .sysc = &omap2430_mcbsp_sysc,
  1454. .rev = MCBSP_CONFIG_TYPE2,
  1455. };
  1456. /* mcbsp1 */
  1457. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  1458. { .name = "tx", .irq = 59 },
  1459. { .name = "rx", .irq = 60 },
  1460. { .name = "ovr", .irq = 61 },
  1461. { .name = "common", .irq = 64 },
  1462. { .irq = -1 }
  1463. };
  1464. /* l4_core -> mcbsp1 */
  1465. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  1466. .master = &omap2430_l4_core_hwmod,
  1467. .slave = &omap2430_mcbsp1_hwmod,
  1468. .clk = "mcbsp1_ick",
  1469. .addr = omap2_mcbsp1_addrs,
  1470. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1471. };
  1472. /* mcbsp1 slave ports */
  1473. static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
  1474. &omap2430_l4_core__mcbsp1,
  1475. };
  1476. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  1477. .name = "mcbsp1",
  1478. .class = &omap2430_mcbsp_hwmod_class,
  1479. .mpu_irqs = omap2430_mcbsp1_irqs,
  1480. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1481. .main_clk = "mcbsp1_fck",
  1482. .prcm = {
  1483. .omap2 = {
  1484. .prcm_reg_id = 1,
  1485. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1486. .module_offs = CORE_MOD,
  1487. .idlest_reg_id = 1,
  1488. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1489. },
  1490. },
  1491. .slaves = omap2430_mcbsp1_slaves,
  1492. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
  1493. };
  1494. /* mcbsp2 */
  1495. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  1496. { .name = "tx", .irq = 62 },
  1497. { .name = "rx", .irq = 63 },
  1498. { .name = "common", .irq = 16 },
  1499. { .irq = -1 }
  1500. };
  1501. /* l4_core -> mcbsp2 */
  1502. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  1503. .master = &omap2430_l4_core_hwmod,
  1504. .slave = &omap2430_mcbsp2_hwmod,
  1505. .clk = "mcbsp2_ick",
  1506. .addr = omap2xxx_mcbsp2_addrs,
  1507. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1508. };
  1509. /* mcbsp2 slave ports */
  1510. static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
  1511. &omap2430_l4_core__mcbsp2,
  1512. };
  1513. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  1514. .name = "mcbsp2",
  1515. .class = &omap2430_mcbsp_hwmod_class,
  1516. .mpu_irqs = omap2430_mcbsp2_irqs,
  1517. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1518. .main_clk = "mcbsp2_fck",
  1519. .prcm = {
  1520. .omap2 = {
  1521. .prcm_reg_id = 1,
  1522. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1523. .module_offs = CORE_MOD,
  1524. .idlest_reg_id = 1,
  1525. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1526. },
  1527. },
  1528. .slaves = omap2430_mcbsp2_slaves,
  1529. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
  1530. };
  1531. /* mcbsp3 */
  1532. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  1533. { .name = "tx", .irq = 89 },
  1534. { .name = "rx", .irq = 90 },
  1535. { .name = "common", .irq = 17 },
  1536. { .irq = -1 }
  1537. };
  1538. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  1539. {
  1540. .name = "mpu",
  1541. .pa_start = 0x4808C000,
  1542. .pa_end = 0x4808C0ff,
  1543. .flags = ADDR_TYPE_RT
  1544. },
  1545. { }
  1546. };
  1547. /* l4_core -> mcbsp3 */
  1548. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  1549. .master = &omap2430_l4_core_hwmod,
  1550. .slave = &omap2430_mcbsp3_hwmod,
  1551. .clk = "mcbsp3_ick",
  1552. .addr = omap2430_mcbsp3_addrs,
  1553. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1554. };
  1555. /* mcbsp3 slave ports */
  1556. static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
  1557. &omap2430_l4_core__mcbsp3,
  1558. };
  1559. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  1560. .name = "mcbsp3",
  1561. .class = &omap2430_mcbsp_hwmod_class,
  1562. .mpu_irqs = omap2430_mcbsp3_irqs,
  1563. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  1564. .main_clk = "mcbsp3_fck",
  1565. .prcm = {
  1566. .omap2 = {
  1567. .prcm_reg_id = 1,
  1568. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  1569. .module_offs = CORE_MOD,
  1570. .idlest_reg_id = 2,
  1571. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  1572. },
  1573. },
  1574. .slaves = omap2430_mcbsp3_slaves,
  1575. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
  1576. };
  1577. /* mcbsp4 */
  1578. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  1579. { .name = "tx", .irq = 54 },
  1580. { .name = "rx", .irq = 55 },
  1581. { .name = "common", .irq = 18 },
  1582. { .irq = -1 }
  1583. };
  1584. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  1585. { .name = "rx", .dma_req = 20 },
  1586. { .name = "tx", .dma_req = 19 },
  1587. { .dma_req = -1 }
  1588. };
  1589. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  1590. {
  1591. .name = "mpu",
  1592. .pa_start = 0x4808E000,
  1593. .pa_end = 0x4808E0ff,
  1594. .flags = ADDR_TYPE_RT
  1595. },
  1596. { }
  1597. };
  1598. /* l4_core -> mcbsp4 */
  1599. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  1600. .master = &omap2430_l4_core_hwmod,
  1601. .slave = &omap2430_mcbsp4_hwmod,
  1602. .clk = "mcbsp4_ick",
  1603. .addr = omap2430_mcbsp4_addrs,
  1604. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1605. };
  1606. /* mcbsp4 slave ports */
  1607. static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
  1608. &omap2430_l4_core__mcbsp4,
  1609. };
  1610. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  1611. .name = "mcbsp4",
  1612. .class = &omap2430_mcbsp_hwmod_class,
  1613. .mpu_irqs = omap2430_mcbsp4_irqs,
  1614. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  1615. .main_clk = "mcbsp4_fck",
  1616. .prcm = {
  1617. .omap2 = {
  1618. .prcm_reg_id = 1,
  1619. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  1620. .module_offs = CORE_MOD,
  1621. .idlest_reg_id = 2,
  1622. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  1623. },
  1624. },
  1625. .slaves = omap2430_mcbsp4_slaves,
  1626. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
  1627. };
  1628. /* mcbsp5 */
  1629. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  1630. { .name = "tx", .irq = 81 },
  1631. { .name = "rx", .irq = 82 },
  1632. { .name = "common", .irq = 19 },
  1633. { .irq = -1 }
  1634. };
  1635. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  1636. { .name = "rx", .dma_req = 22 },
  1637. { .name = "tx", .dma_req = 21 },
  1638. { .dma_req = -1 }
  1639. };
  1640. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  1641. {
  1642. .name = "mpu",
  1643. .pa_start = 0x48096000,
  1644. .pa_end = 0x480960ff,
  1645. .flags = ADDR_TYPE_RT
  1646. },
  1647. { }
  1648. };
  1649. /* l4_core -> mcbsp5 */
  1650. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  1651. .master = &omap2430_l4_core_hwmod,
  1652. .slave = &omap2430_mcbsp5_hwmod,
  1653. .clk = "mcbsp5_ick",
  1654. .addr = omap2430_mcbsp5_addrs,
  1655. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1656. };
  1657. /* mcbsp5 slave ports */
  1658. static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
  1659. &omap2430_l4_core__mcbsp5,
  1660. };
  1661. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  1662. .name = "mcbsp5",
  1663. .class = &omap2430_mcbsp_hwmod_class,
  1664. .mpu_irqs = omap2430_mcbsp5_irqs,
  1665. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  1666. .main_clk = "mcbsp5_fck",
  1667. .prcm = {
  1668. .omap2 = {
  1669. .prcm_reg_id = 1,
  1670. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  1671. .module_offs = CORE_MOD,
  1672. .idlest_reg_id = 2,
  1673. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  1674. },
  1675. },
  1676. .slaves = omap2430_mcbsp5_slaves,
  1677. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
  1678. };
  1679. /* MMC/SD/SDIO common */
  1680. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  1681. .rev_offs = 0x1fc,
  1682. .sysc_offs = 0x10,
  1683. .syss_offs = 0x14,
  1684. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1685. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1686. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1687. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1688. .sysc_fields = &omap_hwmod_sysc_type1,
  1689. };
  1690. static struct omap_hwmod_class omap2430_mmc_class = {
  1691. .name = "mmc",
  1692. .sysc = &omap2430_mmc_sysc,
  1693. };
  1694. /* MMC/SD/SDIO1 */
  1695. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  1696. { .irq = 83 },
  1697. { .irq = -1 }
  1698. };
  1699. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  1700. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  1701. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  1702. { .dma_req = -1 }
  1703. };
  1704. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  1705. { .role = "dbck", .clk = "mmchsdb1_fck" },
  1706. };
  1707. static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
  1708. &omap2430_l4_core__mmc1,
  1709. };
  1710. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  1711. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1712. };
  1713. static struct omap_hwmod omap2430_mmc1_hwmod = {
  1714. .name = "mmc1",
  1715. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1716. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  1717. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  1718. .opt_clks = omap2430_mmc1_opt_clks,
  1719. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  1720. .main_clk = "mmchs1_fck",
  1721. .prcm = {
  1722. .omap2 = {
  1723. .module_offs = CORE_MOD,
  1724. .prcm_reg_id = 2,
  1725. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  1726. .idlest_reg_id = 2,
  1727. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  1728. },
  1729. },
  1730. .dev_attr = &mmc1_dev_attr,
  1731. .slaves = omap2430_mmc1_slaves,
  1732. .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
  1733. .class = &omap2430_mmc_class,
  1734. };
  1735. /* MMC/SD/SDIO2 */
  1736. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  1737. { .irq = 86 },
  1738. { .irq = -1 }
  1739. };
  1740. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  1741. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  1742. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  1743. { .dma_req = -1 }
  1744. };
  1745. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  1746. { .role = "dbck", .clk = "mmchsdb2_fck" },
  1747. };
  1748. static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
  1749. &omap2430_l4_core__mmc2,
  1750. };
  1751. static struct omap_hwmod omap2430_mmc2_hwmod = {
  1752. .name = "mmc2",
  1753. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1754. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  1755. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  1756. .opt_clks = omap2430_mmc2_opt_clks,
  1757. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  1758. .main_clk = "mmchs2_fck",
  1759. .prcm = {
  1760. .omap2 = {
  1761. .module_offs = CORE_MOD,
  1762. .prcm_reg_id = 2,
  1763. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  1764. .idlest_reg_id = 2,
  1765. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  1766. },
  1767. },
  1768. .slaves = omap2430_mmc2_slaves,
  1769. .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
  1770. .class = &omap2430_mmc_class,
  1771. };
  1772. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  1773. &omap2430_l3_main_hwmod,
  1774. &omap2430_l4_core_hwmod,
  1775. &omap2430_l4_wkup_hwmod,
  1776. &omap2430_mpu_hwmod,
  1777. &omap2430_iva_hwmod,
  1778. &omap2430_timer1_hwmod,
  1779. &omap2430_timer2_hwmod,
  1780. &omap2430_timer3_hwmod,
  1781. &omap2430_timer4_hwmod,
  1782. &omap2430_timer5_hwmod,
  1783. &omap2430_timer6_hwmod,
  1784. &omap2430_timer7_hwmod,
  1785. &omap2430_timer8_hwmod,
  1786. &omap2430_timer9_hwmod,
  1787. &omap2430_timer10_hwmod,
  1788. &omap2430_timer11_hwmod,
  1789. &omap2430_timer12_hwmod,
  1790. &omap2430_wd_timer2_hwmod,
  1791. &omap2430_uart1_hwmod,
  1792. &omap2430_uart2_hwmod,
  1793. &omap2430_uart3_hwmod,
  1794. /* dss class */
  1795. &omap2430_dss_core_hwmod,
  1796. &omap2430_dss_dispc_hwmod,
  1797. &omap2430_dss_rfbi_hwmod,
  1798. &omap2430_dss_venc_hwmod,
  1799. /* i2c class */
  1800. &omap2430_i2c1_hwmod,
  1801. &omap2430_i2c2_hwmod,
  1802. &omap2430_mmc1_hwmod,
  1803. &omap2430_mmc2_hwmod,
  1804. /* gpio class */
  1805. &omap2430_gpio1_hwmod,
  1806. &omap2430_gpio2_hwmod,
  1807. &omap2430_gpio3_hwmod,
  1808. &omap2430_gpio4_hwmod,
  1809. &omap2430_gpio5_hwmod,
  1810. /* dma_system class*/
  1811. &omap2430_dma_system_hwmod,
  1812. /* mcbsp class */
  1813. &omap2430_mcbsp1_hwmod,
  1814. &omap2430_mcbsp2_hwmod,
  1815. &omap2430_mcbsp3_hwmod,
  1816. &omap2430_mcbsp4_hwmod,
  1817. &omap2430_mcbsp5_hwmod,
  1818. /* mailbox class */
  1819. &omap2430_mailbox_hwmod,
  1820. /* mcspi class */
  1821. &omap2430_mcspi1_hwmod,
  1822. &omap2430_mcspi2_hwmod,
  1823. &omap2430_mcspi3_hwmod,
  1824. /* usbotg class*/
  1825. &omap2430_usbhsotg_hwmod,
  1826. NULL,
  1827. };
  1828. int __init omap2430_hwmod_init(void)
  1829. {
  1830. return omap_hwmod_register(omap2430_hwmods);
  1831. }