omap_hwmod_2430_data.c 51 KB

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