omap_hwmod_3xxx_data.c 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274
  1. /*
  2. * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  3. *
  4. * Copyright (C) 2009-2010 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. * The data in this file should be completely autogeneratable from
  12. * the TI hardware database or other technical documentation.
  13. *
  14. * XXX these should be marked initdata for multi-OMAP kernels
  15. */
  16. #include <plat/omap_hwmod.h>
  17. #include <mach/irqs.h>
  18. #include <plat/cpu.h>
  19. #include <plat/dma.h>
  20. #include <plat/serial.h>
  21. #include <plat/l3_3xxx.h>
  22. #include <plat/l4_3xxx.h>
  23. #include <plat/i2c.h>
  24. #include <plat/gpio.h>
  25. #include <plat/smartreflex.h>
  26. #include <plat/mcspi.h>
  27. #include "omap_hwmod_common_data.h"
  28. #include "prm-regbits-34xx.h"
  29. #include "cm-regbits-34xx.h"
  30. #include "wd_timer.h"
  31. #include <mach/am35xx.h>
  32. /*
  33. * OMAP3xxx hardware module integration data
  34. *
  35. * ALl of the data in this section should be autogeneratable from the
  36. * TI hardware database or other technical documentation. Data that
  37. * is driver-specific or driver-kernel integration-specific belongs
  38. * elsewhere.
  39. */
  40. static struct omap_hwmod omap3xxx_mpu_hwmod;
  41. static struct omap_hwmod omap3xxx_iva_hwmod;
  42. static struct omap_hwmod omap3xxx_l3_main_hwmod;
  43. static struct omap_hwmod omap3xxx_l4_core_hwmod;
  44. static struct omap_hwmod omap3xxx_l4_per_hwmod;
  45. static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
  46. static struct omap_hwmod omap3430es1_dss_core_hwmod;
  47. static struct omap_hwmod omap3xxx_dss_core_hwmod;
  48. static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
  49. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
  50. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
  51. static struct omap_hwmod omap3xxx_dss_venc_hwmod;
  52. static struct omap_hwmod omap3xxx_i2c1_hwmod;
  53. static struct omap_hwmod omap3xxx_i2c2_hwmod;
  54. static struct omap_hwmod omap3xxx_i2c3_hwmod;
  55. static struct omap_hwmod omap3xxx_gpio1_hwmod;
  56. static struct omap_hwmod omap3xxx_gpio2_hwmod;
  57. static struct omap_hwmod omap3xxx_gpio3_hwmod;
  58. static struct omap_hwmod omap3xxx_gpio4_hwmod;
  59. static struct omap_hwmod omap3xxx_gpio5_hwmod;
  60. static struct omap_hwmod omap3xxx_gpio6_hwmod;
  61. static struct omap_hwmod omap34xx_sr1_hwmod;
  62. static struct omap_hwmod omap34xx_sr2_hwmod;
  63. static struct omap_hwmod omap34xx_mcspi1;
  64. static struct omap_hwmod omap34xx_mcspi2;
  65. static struct omap_hwmod omap34xx_mcspi3;
  66. static struct omap_hwmod omap34xx_mcspi4;
  67. static struct omap_hwmod am35xx_usbhsotg_hwmod;
  68. static struct omap_hwmod omap3xxx_dma_system_hwmod;
  69. /* L3 -> L4_CORE interface */
  70. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  71. .master = &omap3xxx_l3_main_hwmod,
  72. .slave = &omap3xxx_l4_core_hwmod,
  73. .user = OCP_USER_MPU | OCP_USER_SDMA,
  74. };
  75. /* L3 -> L4_PER interface */
  76. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  77. .master = &omap3xxx_l3_main_hwmod,
  78. .slave = &omap3xxx_l4_per_hwmod,
  79. .user = OCP_USER_MPU | OCP_USER_SDMA,
  80. };
  81. /* MPU -> L3 interface */
  82. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  83. .master = &omap3xxx_mpu_hwmod,
  84. .slave = &omap3xxx_l3_main_hwmod,
  85. .user = OCP_USER_MPU,
  86. };
  87. /* Slave interfaces on the L3 interconnect */
  88. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
  89. &omap3xxx_mpu__l3_main,
  90. };
  91. /* DSS -> l3 */
  92. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  93. .master = &omap3xxx_dss_core_hwmod,
  94. .slave = &omap3xxx_l3_main_hwmod,
  95. .fw = {
  96. .omap2 = {
  97. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  98. .flags = OMAP_FIREWALL_L3,
  99. }
  100. },
  101. .user = OCP_USER_MPU | OCP_USER_SDMA,
  102. };
  103. /* Master interfaces on the L3 interconnect */
  104. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
  105. &omap3xxx_l3_main__l4_core,
  106. &omap3xxx_l3_main__l4_per,
  107. };
  108. /* L3 */
  109. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  110. .name = "l3_main",
  111. .class = &l3_hwmod_class,
  112. .masters = omap3xxx_l3_main_masters,
  113. .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
  114. .slaves = omap3xxx_l3_main_slaves,
  115. .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
  116. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  117. .flags = HWMOD_NO_IDLEST,
  118. };
  119. static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
  120. static struct omap_hwmod omap3xxx_uart1_hwmod;
  121. static struct omap_hwmod omap3xxx_uart2_hwmod;
  122. static struct omap_hwmod omap3xxx_uart3_hwmod;
  123. static struct omap_hwmod omap3xxx_uart4_hwmod;
  124. static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
  125. /* l3_core -> usbhsotg interface */
  126. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  127. .master = &omap3xxx_usbhsotg_hwmod,
  128. .slave = &omap3xxx_l3_main_hwmod,
  129. .clk = "core_l3_ick",
  130. .user = OCP_USER_MPU,
  131. };
  132. /* l3_core -> am35xx_usbhsotg interface */
  133. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  134. .master = &am35xx_usbhsotg_hwmod,
  135. .slave = &omap3xxx_l3_main_hwmod,
  136. .clk = "core_l3_ick",
  137. .user = OCP_USER_MPU,
  138. };
  139. /* L4_CORE -> L4_WKUP interface */
  140. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  141. .master = &omap3xxx_l4_core_hwmod,
  142. .slave = &omap3xxx_l4_wkup_hwmod,
  143. .user = OCP_USER_MPU | OCP_USER_SDMA,
  144. };
  145. /* L4 CORE -> UART1 interface */
  146. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  147. {
  148. .pa_start = OMAP3_UART1_BASE,
  149. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  150. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  151. },
  152. };
  153. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  154. .master = &omap3xxx_l4_core_hwmod,
  155. .slave = &omap3xxx_uart1_hwmod,
  156. .clk = "uart1_ick",
  157. .addr = omap3xxx_uart1_addr_space,
  158. .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
  159. .user = OCP_USER_MPU | OCP_USER_SDMA,
  160. };
  161. /* L4 CORE -> UART2 interface */
  162. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  163. {
  164. .pa_start = OMAP3_UART2_BASE,
  165. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  166. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  167. },
  168. };
  169. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  170. .master = &omap3xxx_l4_core_hwmod,
  171. .slave = &omap3xxx_uart2_hwmod,
  172. .clk = "uart2_ick",
  173. .addr = omap3xxx_uart2_addr_space,
  174. .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
  175. .user = OCP_USER_MPU | OCP_USER_SDMA,
  176. };
  177. /* L4 PER -> UART3 interface */
  178. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  179. {
  180. .pa_start = OMAP3_UART3_BASE,
  181. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  182. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  183. },
  184. };
  185. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  186. .master = &omap3xxx_l4_per_hwmod,
  187. .slave = &omap3xxx_uart3_hwmod,
  188. .clk = "uart3_ick",
  189. .addr = omap3xxx_uart3_addr_space,
  190. .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
  191. .user = OCP_USER_MPU | OCP_USER_SDMA,
  192. };
  193. /* L4 PER -> UART4 interface */
  194. static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
  195. {
  196. .pa_start = OMAP3_UART4_BASE,
  197. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  198. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  199. },
  200. };
  201. static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
  202. .master = &omap3xxx_l4_per_hwmod,
  203. .slave = &omap3xxx_uart4_hwmod,
  204. .clk = "uart4_ick",
  205. .addr = omap3xxx_uart4_addr_space,
  206. .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
  207. .user = OCP_USER_MPU | OCP_USER_SDMA,
  208. };
  209. /* I2C IP block address space length (in bytes) */
  210. #define OMAP2_I2C_AS_LEN 128
  211. /* L4 CORE -> I2C1 interface */
  212. static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
  213. {
  214. .pa_start = 0x48070000,
  215. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  216. .flags = ADDR_TYPE_RT,
  217. },
  218. };
  219. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  220. .master = &omap3xxx_l4_core_hwmod,
  221. .slave = &omap3xxx_i2c1_hwmod,
  222. .clk = "i2c1_ick",
  223. .addr = omap3xxx_i2c1_addr_space,
  224. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
  225. .fw = {
  226. .omap2 = {
  227. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  228. .l4_prot_group = 7,
  229. .flags = OMAP_FIREWALL_L4,
  230. }
  231. },
  232. .user = OCP_USER_MPU | OCP_USER_SDMA,
  233. };
  234. /* L4 CORE -> I2C2 interface */
  235. static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
  236. {
  237. .pa_start = 0x48072000,
  238. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  239. .flags = ADDR_TYPE_RT,
  240. },
  241. };
  242. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  243. .master = &omap3xxx_l4_core_hwmod,
  244. .slave = &omap3xxx_i2c2_hwmod,
  245. .clk = "i2c2_ick",
  246. .addr = omap3xxx_i2c2_addr_space,
  247. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
  248. .fw = {
  249. .omap2 = {
  250. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  251. .l4_prot_group = 7,
  252. .flags = OMAP_FIREWALL_L4,
  253. }
  254. },
  255. .user = OCP_USER_MPU | OCP_USER_SDMA,
  256. };
  257. /* L4 CORE -> I2C3 interface */
  258. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  259. {
  260. .pa_start = 0x48060000,
  261. .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1,
  262. .flags = ADDR_TYPE_RT,
  263. },
  264. };
  265. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  266. .master = &omap3xxx_l4_core_hwmod,
  267. .slave = &omap3xxx_i2c3_hwmod,
  268. .clk = "i2c3_ick",
  269. .addr = omap3xxx_i2c3_addr_space,
  270. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
  271. .fw = {
  272. .omap2 = {
  273. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  274. .l4_prot_group = 7,
  275. .flags = OMAP_FIREWALL_L4,
  276. }
  277. },
  278. .user = OCP_USER_MPU | OCP_USER_SDMA,
  279. };
  280. /* L4 CORE -> SR1 interface */
  281. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  282. {
  283. .pa_start = OMAP34XX_SR1_BASE,
  284. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  285. .flags = ADDR_TYPE_RT,
  286. },
  287. };
  288. static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
  289. .master = &omap3xxx_l4_core_hwmod,
  290. .slave = &omap34xx_sr1_hwmod,
  291. .clk = "sr_l4_ick",
  292. .addr = omap3_sr1_addr_space,
  293. .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space),
  294. .user = OCP_USER_MPU,
  295. };
  296. /* L4 CORE -> SR1 interface */
  297. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  298. {
  299. .pa_start = OMAP34XX_SR2_BASE,
  300. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  301. .flags = ADDR_TYPE_RT,
  302. },
  303. };
  304. static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
  305. .master = &omap3xxx_l4_core_hwmod,
  306. .slave = &omap34xx_sr2_hwmod,
  307. .clk = "sr_l4_ick",
  308. .addr = omap3_sr2_addr_space,
  309. .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space),
  310. .user = OCP_USER_MPU,
  311. };
  312. /*
  313. * usbhsotg interface data
  314. */
  315. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  316. {
  317. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  318. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  319. .flags = ADDR_TYPE_RT
  320. },
  321. };
  322. /* l4_core -> usbhsotg */
  323. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  324. .master = &omap3xxx_l4_core_hwmod,
  325. .slave = &omap3xxx_usbhsotg_hwmod,
  326. .clk = "l4_ick",
  327. .addr = omap3xxx_usbhsotg_addrs,
  328. .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs),
  329. .user = OCP_USER_MPU,
  330. };
  331. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
  332. &omap3xxx_usbhsotg__l3,
  333. };
  334. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
  335. &omap3xxx_l4_core__usbhsotg,
  336. };
  337. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  338. {
  339. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  340. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  341. .flags = ADDR_TYPE_RT
  342. },
  343. };
  344. /* l4_core -> usbhsotg */
  345. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  346. .master = &omap3xxx_l4_core_hwmod,
  347. .slave = &am35xx_usbhsotg_hwmod,
  348. .clk = "l4_ick",
  349. .addr = am35xx_usbhsotg_addrs,
  350. .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs),
  351. .user = OCP_USER_MPU,
  352. };
  353. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
  354. &am35xx_usbhsotg__l3,
  355. };
  356. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
  357. &am35xx_l4_core__usbhsotg,
  358. };
  359. /* Slave interfaces on the L4_CORE interconnect */
  360. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
  361. &omap3xxx_l3_main__l4_core,
  362. &omap3_l4_core__sr1,
  363. &omap3_l4_core__sr2,
  364. };
  365. /* Master interfaces on the L4_CORE interconnect */
  366. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
  367. &omap3xxx_l4_core__l4_wkup,
  368. &omap3_l4_core__uart1,
  369. &omap3_l4_core__uart2,
  370. &omap3_l4_core__i2c1,
  371. &omap3_l4_core__i2c2,
  372. &omap3_l4_core__i2c3,
  373. };
  374. /* L4 CORE */
  375. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  376. .name = "l4_core",
  377. .class = &l4_hwmod_class,
  378. .masters = omap3xxx_l4_core_masters,
  379. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
  380. .slaves = omap3xxx_l4_core_slaves,
  381. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
  382. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  383. .flags = HWMOD_NO_IDLEST,
  384. };
  385. /* Slave interfaces on the L4_PER interconnect */
  386. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
  387. &omap3xxx_l3_main__l4_per,
  388. };
  389. /* Master interfaces on the L4_PER interconnect */
  390. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
  391. &omap3_l4_per__uart3,
  392. &omap3_l4_per__uart4,
  393. };
  394. /* L4 PER */
  395. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  396. .name = "l4_per",
  397. .class = &l4_hwmod_class,
  398. .masters = omap3xxx_l4_per_masters,
  399. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
  400. .slaves = omap3xxx_l4_per_slaves,
  401. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
  402. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  403. .flags = HWMOD_NO_IDLEST,
  404. };
  405. /* Slave interfaces on the L4_WKUP interconnect */
  406. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
  407. &omap3xxx_l4_core__l4_wkup,
  408. };
  409. /* Master interfaces on the L4_WKUP interconnect */
  410. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
  411. };
  412. /* L4 WKUP */
  413. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  414. .name = "l4_wkup",
  415. .class = &l4_hwmod_class,
  416. .masters = omap3xxx_l4_wkup_masters,
  417. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
  418. .slaves = omap3xxx_l4_wkup_slaves,
  419. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
  420. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  421. .flags = HWMOD_NO_IDLEST,
  422. };
  423. /* Master interfaces on the MPU device */
  424. static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
  425. &omap3xxx_mpu__l3_main,
  426. };
  427. /* MPU */
  428. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  429. .name = "mpu",
  430. .class = &mpu_hwmod_class,
  431. .main_clk = "arm_fck",
  432. .masters = omap3xxx_mpu_masters,
  433. .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
  434. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  435. };
  436. /*
  437. * IVA2_2 interface data
  438. */
  439. /* IVA2 <- L3 interface */
  440. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  441. .master = &omap3xxx_l3_main_hwmod,
  442. .slave = &omap3xxx_iva_hwmod,
  443. .clk = "iva2_ck",
  444. .user = OCP_USER_MPU | OCP_USER_SDMA,
  445. };
  446. static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
  447. &omap3xxx_l3__iva,
  448. };
  449. /*
  450. * IVA2 (IVA2)
  451. */
  452. static struct omap_hwmod omap3xxx_iva_hwmod = {
  453. .name = "iva",
  454. .class = &iva_hwmod_class,
  455. .masters = omap3xxx_iva_masters,
  456. .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
  457. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  458. };
  459. /* l4_wkup -> wd_timer2 */
  460. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  461. {
  462. .pa_start = 0x48314000,
  463. .pa_end = 0x4831407f,
  464. .flags = ADDR_TYPE_RT
  465. },
  466. };
  467. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  468. .master = &omap3xxx_l4_wkup_hwmod,
  469. .slave = &omap3xxx_wd_timer2_hwmod,
  470. .clk = "wdt2_ick",
  471. .addr = omap3xxx_wd_timer2_addrs,
  472. .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
  473. .user = OCP_USER_MPU | OCP_USER_SDMA,
  474. };
  475. /*
  476. * 'wd_timer' class
  477. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  478. * overflow condition
  479. */
  480. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  481. .rev_offs = 0x0000,
  482. .sysc_offs = 0x0010,
  483. .syss_offs = 0x0014,
  484. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  485. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  486. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY),
  487. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  488. .sysc_fields = &omap_hwmod_sysc_type1,
  489. };
  490. /* I2C common */
  491. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  492. .rev_offs = 0x00,
  493. .sysc_offs = 0x20,
  494. .syss_offs = 0x10,
  495. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  496. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  497. SYSC_HAS_AUTOIDLE),
  498. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  499. .sysc_fields = &omap_hwmod_sysc_type1,
  500. };
  501. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  502. .name = "wd_timer",
  503. .sysc = &omap3xxx_wd_timer_sysc,
  504. .pre_shutdown = &omap2_wd_timer_disable
  505. };
  506. /* wd_timer2 */
  507. static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
  508. &omap3xxx_l4_wkup__wd_timer2,
  509. };
  510. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  511. .name = "wd_timer2",
  512. .class = &omap3xxx_wd_timer_hwmod_class,
  513. .main_clk = "wdt2_fck",
  514. .prcm = {
  515. .omap2 = {
  516. .prcm_reg_id = 1,
  517. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  518. .module_offs = WKUP_MOD,
  519. .idlest_reg_id = 1,
  520. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  521. },
  522. },
  523. .slaves = omap3xxx_wd_timer2_slaves,
  524. .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
  525. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  526. };
  527. /* UART common */
  528. static struct omap_hwmod_class_sysconfig uart_sysc = {
  529. .rev_offs = 0x50,
  530. .sysc_offs = 0x54,
  531. .syss_offs = 0x58,
  532. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  533. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  534. SYSC_HAS_AUTOIDLE),
  535. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  536. .sysc_fields = &omap_hwmod_sysc_type1,
  537. };
  538. static struct omap_hwmod_class uart_class = {
  539. .name = "uart",
  540. .sysc = &uart_sysc,
  541. };
  542. /* UART1 */
  543. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  544. { .irq = INT_24XX_UART1_IRQ, },
  545. };
  546. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  547. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  548. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  549. };
  550. static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
  551. &omap3_l4_core__uart1,
  552. };
  553. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  554. .name = "uart1",
  555. .mpu_irqs = uart1_mpu_irqs,
  556. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  557. .sdma_reqs = uart1_sdma_reqs,
  558. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  559. .main_clk = "uart1_fck",
  560. .prcm = {
  561. .omap2 = {
  562. .module_offs = CORE_MOD,
  563. .prcm_reg_id = 1,
  564. .module_bit = OMAP3430_EN_UART1_SHIFT,
  565. .idlest_reg_id = 1,
  566. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  567. },
  568. },
  569. .slaves = omap3xxx_uart1_slaves,
  570. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
  571. .class = &uart_class,
  572. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  573. };
  574. /* UART2 */
  575. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  576. { .irq = INT_24XX_UART2_IRQ, },
  577. };
  578. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  579. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  580. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  581. };
  582. static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
  583. &omap3_l4_core__uart2,
  584. };
  585. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  586. .name = "uart2",
  587. .mpu_irqs = uart2_mpu_irqs,
  588. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  589. .sdma_reqs = uart2_sdma_reqs,
  590. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  591. .main_clk = "uart2_fck",
  592. .prcm = {
  593. .omap2 = {
  594. .module_offs = CORE_MOD,
  595. .prcm_reg_id = 1,
  596. .module_bit = OMAP3430_EN_UART2_SHIFT,
  597. .idlest_reg_id = 1,
  598. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  599. },
  600. },
  601. .slaves = omap3xxx_uart2_slaves,
  602. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
  603. .class = &uart_class,
  604. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  605. };
  606. /* UART3 */
  607. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  608. { .irq = INT_24XX_UART3_IRQ, },
  609. };
  610. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  611. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  612. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  613. };
  614. static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
  615. &omap3_l4_per__uart3,
  616. };
  617. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  618. .name = "uart3",
  619. .mpu_irqs = uart3_mpu_irqs,
  620. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  621. .sdma_reqs = uart3_sdma_reqs,
  622. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  623. .main_clk = "uart3_fck",
  624. .prcm = {
  625. .omap2 = {
  626. .module_offs = OMAP3430_PER_MOD,
  627. .prcm_reg_id = 1,
  628. .module_bit = OMAP3430_EN_UART3_SHIFT,
  629. .idlest_reg_id = 1,
  630. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  631. },
  632. },
  633. .slaves = omap3xxx_uart3_slaves,
  634. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
  635. .class = &uart_class,
  636. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  637. };
  638. /* UART4 */
  639. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  640. { .irq = INT_36XX_UART4_IRQ, },
  641. };
  642. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  643. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  644. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  645. };
  646. static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
  647. &omap3_l4_per__uart4,
  648. };
  649. static struct omap_hwmod omap3xxx_uart4_hwmod = {
  650. .name = "uart4",
  651. .mpu_irqs = uart4_mpu_irqs,
  652. .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
  653. .sdma_reqs = uart4_sdma_reqs,
  654. .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
  655. .main_clk = "uart4_fck",
  656. .prcm = {
  657. .omap2 = {
  658. .module_offs = OMAP3430_PER_MOD,
  659. .prcm_reg_id = 1,
  660. .module_bit = OMAP3630_EN_UART4_SHIFT,
  661. .idlest_reg_id = 1,
  662. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  663. },
  664. },
  665. .slaves = omap3xxx_uart4_slaves,
  666. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
  667. .class = &uart_class,
  668. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  669. };
  670. static struct omap_hwmod_class i2c_class = {
  671. .name = "i2c",
  672. .sysc = &i2c_sysc,
  673. };
  674. /*
  675. * 'dss' class
  676. * display sub-system
  677. */
  678. static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = {
  679. .rev_offs = 0x0000,
  680. .sysc_offs = 0x0010,
  681. .syss_offs = 0x0014,
  682. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  683. .sysc_fields = &omap_hwmod_sysc_type1,
  684. };
  685. static struct omap_hwmod_class omap3xxx_dss_hwmod_class = {
  686. .name = "dss",
  687. .sysc = &omap3xxx_dss_sysc,
  688. };
  689. /* dss */
  690. static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = {
  691. { .irq = 25 },
  692. };
  693. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  694. { .name = "dispc", .dma_req = 5 },
  695. { .name = "dsi1", .dma_req = 74 },
  696. };
  697. /* dss */
  698. /* dss master ports */
  699. static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
  700. &omap3xxx_dss__l3,
  701. };
  702. static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = {
  703. {
  704. .pa_start = 0x48050000,
  705. .pa_end = 0x480503FF,
  706. .flags = ADDR_TYPE_RT
  707. },
  708. };
  709. /* l4_core -> dss */
  710. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  711. .master = &omap3xxx_l4_core_hwmod,
  712. .slave = &omap3430es1_dss_core_hwmod,
  713. .clk = "dss_ick",
  714. .addr = omap3xxx_dss_addrs,
  715. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
  716. .fw = {
  717. .omap2 = {
  718. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  719. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  720. .flags = OMAP_FIREWALL_L4,
  721. }
  722. },
  723. .user = OCP_USER_MPU | OCP_USER_SDMA,
  724. };
  725. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  726. .master = &omap3xxx_l4_core_hwmod,
  727. .slave = &omap3xxx_dss_core_hwmod,
  728. .clk = "dss_ick",
  729. .addr = omap3xxx_dss_addrs,
  730. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
  731. .fw = {
  732. .omap2 = {
  733. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  734. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  735. .flags = OMAP_FIREWALL_L4,
  736. }
  737. },
  738. .user = OCP_USER_MPU | OCP_USER_SDMA,
  739. };
  740. /* dss slave ports */
  741. static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
  742. &omap3430es1_l4_core__dss,
  743. };
  744. static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
  745. &omap3xxx_l4_core__dss,
  746. };
  747. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  748. { .role = "tv_clk", .clk = "dss_tv_fck" },
  749. { .role = "dssclk", .clk = "dss_96m_fck" },
  750. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  751. };
  752. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  753. .name = "dss_core",
  754. .class = &omap3xxx_dss_hwmod_class,
  755. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  756. .mpu_irqs = omap3xxx_dss_irqs,
  757. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
  758. .sdma_reqs = omap3xxx_dss_sdma_chs,
  759. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
  760. .prcm = {
  761. .omap2 = {
  762. .prcm_reg_id = 1,
  763. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  764. .module_offs = OMAP3430_DSS_MOD,
  765. .idlest_reg_id = 1,
  766. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  767. },
  768. },
  769. .opt_clks = dss_opt_clks,
  770. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  771. .slaves = omap3430es1_dss_slaves,
  772. .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
  773. .masters = omap3xxx_dss_masters,
  774. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  775. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
  776. .flags = HWMOD_NO_IDLEST,
  777. };
  778. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  779. .name = "dss_core",
  780. .class = &omap3xxx_dss_hwmod_class,
  781. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  782. .mpu_irqs = omap3xxx_dss_irqs,
  783. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
  784. .sdma_reqs = omap3xxx_dss_sdma_chs,
  785. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
  786. .prcm = {
  787. .omap2 = {
  788. .prcm_reg_id = 1,
  789. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  790. .module_offs = OMAP3430_DSS_MOD,
  791. .idlest_reg_id = 1,
  792. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  793. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  794. },
  795. },
  796. .opt_clks = dss_opt_clks,
  797. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  798. .slaves = omap3xxx_dss_slaves,
  799. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
  800. .masters = omap3xxx_dss_masters,
  801. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  802. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 |
  803. CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
  804. };
  805. /*
  806. * 'dispc' class
  807. * display controller
  808. */
  809. static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = {
  810. .rev_offs = 0x0000,
  811. .sysc_offs = 0x0010,
  812. .syss_offs = 0x0014,
  813. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  814. SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP |
  815. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  816. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  817. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  818. .sysc_fields = &omap_hwmod_sysc_type1,
  819. };
  820. static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = {
  821. .name = "dispc",
  822. .sysc = &omap3xxx_dispc_sysc,
  823. };
  824. static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = {
  825. {
  826. .pa_start = 0x48050400,
  827. .pa_end = 0x480507FF,
  828. .flags = ADDR_TYPE_RT
  829. },
  830. };
  831. /* l4_core -> dss_dispc */
  832. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  833. .master = &omap3xxx_l4_core_hwmod,
  834. .slave = &omap3xxx_dss_dispc_hwmod,
  835. .clk = "dss_ick",
  836. .addr = omap3xxx_dss_dispc_addrs,
  837. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs),
  838. .fw = {
  839. .omap2 = {
  840. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  841. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  842. .flags = OMAP_FIREWALL_L4,
  843. }
  844. },
  845. .user = OCP_USER_MPU | OCP_USER_SDMA,
  846. };
  847. /* dss_dispc slave ports */
  848. static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
  849. &omap3xxx_l4_core__dss_dispc,
  850. };
  851. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  852. .name = "dss_dispc",
  853. .class = &omap3xxx_dispc_hwmod_class,
  854. .main_clk = "dss1_alwon_fck",
  855. .prcm = {
  856. .omap2 = {
  857. .prcm_reg_id = 1,
  858. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  859. .module_offs = OMAP3430_DSS_MOD,
  860. },
  861. },
  862. .slaves = omap3xxx_dss_dispc_slaves,
  863. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
  864. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  865. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  866. CHIP_GE_OMAP3630ES1_1),
  867. .flags = HWMOD_NO_IDLEST,
  868. };
  869. /*
  870. * 'dsi' class
  871. * display serial interface controller
  872. */
  873. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  874. .name = "dsi",
  875. };
  876. /* dss_dsi1 */
  877. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  878. {
  879. .pa_start = 0x4804FC00,
  880. .pa_end = 0x4804FFFF,
  881. .flags = ADDR_TYPE_RT
  882. },
  883. };
  884. /* l4_core -> dss_dsi1 */
  885. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  886. .master = &omap3xxx_l4_core_hwmod,
  887. .slave = &omap3xxx_dss_dsi1_hwmod,
  888. .addr = omap3xxx_dss_dsi1_addrs,
  889. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs),
  890. .fw = {
  891. .omap2 = {
  892. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  893. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  894. .flags = OMAP_FIREWALL_L4,
  895. }
  896. },
  897. .user = OCP_USER_MPU | OCP_USER_SDMA,
  898. };
  899. /* dss_dsi1 slave ports */
  900. static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
  901. &omap3xxx_l4_core__dss_dsi1,
  902. };
  903. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  904. .name = "dss_dsi1",
  905. .class = &omap3xxx_dsi_hwmod_class,
  906. .main_clk = "dss1_alwon_fck",
  907. .prcm = {
  908. .omap2 = {
  909. .prcm_reg_id = 1,
  910. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  911. .module_offs = OMAP3430_DSS_MOD,
  912. },
  913. },
  914. .slaves = omap3xxx_dss_dsi1_slaves,
  915. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
  916. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  917. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  918. CHIP_GE_OMAP3630ES1_1),
  919. .flags = HWMOD_NO_IDLEST,
  920. };
  921. /*
  922. * 'rfbi' class
  923. * remote frame buffer interface
  924. */
  925. static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = {
  926. .rev_offs = 0x0000,
  927. .sysc_offs = 0x0010,
  928. .syss_offs = 0x0014,
  929. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  930. SYSC_HAS_AUTOIDLE),
  931. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  932. .sysc_fields = &omap_hwmod_sysc_type1,
  933. };
  934. static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = {
  935. .name = "rfbi",
  936. .sysc = &omap3xxx_rfbi_sysc,
  937. };
  938. static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = {
  939. {
  940. .pa_start = 0x48050800,
  941. .pa_end = 0x48050BFF,
  942. .flags = ADDR_TYPE_RT
  943. },
  944. };
  945. /* l4_core -> dss_rfbi */
  946. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  947. .master = &omap3xxx_l4_core_hwmod,
  948. .slave = &omap3xxx_dss_rfbi_hwmod,
  949. .clk = "dss_ick",
  950. .addr = omap3xxx_dss_rfbi_addrs,
  951. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs),
  952. .fw = {
  953. .omap2 = {
  954. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  955. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  956. .flags = OMAP_FIREWALL_L4,
  957. }
  958. },
  959. .user = OCP_USER_MPU | OCP_USER_SDMA,
  960. };
  961. /* dss_rfbi slave ports */
  962. static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
  963. &omap3xxx_l4_core__dss_rfbi,
  964. };
  965. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  966. .name = "dss_rfbi",
  967. .class = &omap3xxx_rfbi_hwmod_class,
  968. .main_clk = "dss1_alwon_fck",
  969. .prcm = {
  970. .omap2 = {
  971. .prcm_reg_id = 1,
  972. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  973. .module_offs = OMAP3430_DSS_MOD,
  974. },
  975. },
  976. .slaves = omap3xxx_dss_rfbi_slaves,
  977. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
  978. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  979. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  980. CHIP_GE_OMAP3630ES1_1),
  981. .flags = HWMOD_NO_IDLEST,
  982. };
  983. /*
  984. * 'venc' class
  985. * video encoder
  986. */
  987. static struct omap_hwmod_class omap3xxx_venc_hwmod_class = {
  988. .name = "venc",
  989. };
  990. /* dss_venc */
  991. static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = {
  992. {
  993. .pa_start = 0x48050C00,
  994. .pa_end = 0x48050FFF,
  995. .flags = ADDR_TYPE_RT
  996. },
  997. };
  998. /* l4_core -> dss_venc */
  999. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  1000. .master = &omap3xxx_l4_core_hwmod,
  1001. .slave = &omap3xxx_dss_venc_hwmod,
  1002. .clk = "dss_tv_fck",
  1003. .addr = omap3xxx_dss_venc_addrs,
  1004. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs),
  1005. .fw = {
  1006. .omap2 = {
  1007. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  1008. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1009. .flags = OMAP_FIREWALL_L4,
  1010. }
  1011. },
  1012. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1013. };
  1014. /* dss_venc slave ports */
  1015. static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
  1016. &omap3xxx_l4_core__dss_venc,
  1017. };
  1018. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  1019. .name = "dss_venc",
  1020. .class = &omap3xxx_venc_hwmod_class,
  1021. .main_clk = "dss1_alwon_fck",
  1022. .prcm = {
  1023. .omap2 = {
  1024. .prcm_reg_id = 1,
  1025. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1026. .module_offs = OMAP3430_DSS_MOD,
  1027. },
  1028. },
  1029. .slaves = omap3xxx_dss_venc_slaves,
  1030. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
  1031. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1032. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1033. CHIP_GE_OMAP3630ES1_1),
  1034. .flags = HWMOD_NO_IDLEST,
  1035. };
  1036. /* I2C1 */
  1037. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  1038. .fifo_depth = 8, /* bytes */
  1039. };
  1040. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1041. { .irq = INT_24XX_I2C1_IRQ, },
  1042. };
  1043. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1044. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1045. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1046. };
  1047. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  1048. &omap3_l4_core__i2c1,
  1049. };
  1050. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  1051. .name = "i2c1",
  1052. .mpu_irqs = i2c1_mpu_irqs,
  1053. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  1054. .sdma_reqs = i2c1_sdma_reqs,
  1055. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  1056. .main_clk = "i2c1_fck",
  1057. .prcm = {
  1058. .omap2 = {
  1059. .module_offs = CORE_MOD,
  1060. .prcm_reg_id = 1,
  1061. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  1062. .idlest_reg_id = 1,
  1063. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  1064. },
  1065. },
  1066. .slaves = omap3xxx_i2c1_slaves,
  1067. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  1068. .class = &i2c_class,
  1069. .dev_attr = &i2c1_dev_attr,
  1070. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1071. };
  1072. /* I2C2 */
  1073. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  1074. .fifo_depth = 8, /* bytes */
  1075. };
  1076. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1077. { .irq = INT_24XX_I2C2_IRQ, },
  1078. };
  1079. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1080. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1081. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1082. };
  1083. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  1084. &omap3_l4_core__i2c2,
  1085. };
  1086. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  1087. .name = "i2c2",
  1088. .mpu_irqs = i2c2_mpu_irqs,
  1089. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  1090. .sdma_reqs = i2c2_sdma_reqs,
  1091. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  1092. .main_clk = "i2c2_fck",
  1093. .prcm = {
  1094. .omap2 = {
  1095. .module_offs = CORE_MOD,
  1096. .prcm_reg_id = 1,
  1097. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  1098. .idlest_reg_id = 1,
  1099. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  1100. },
  1101. },
  1102. .slaves = omap3xxx_i2c2_slaves,
  1103. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  1104. .class = &i2c_class,
  1105. .dev_attr = &i2c2_dev_attr,
  1106. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1107. };
  1108. /* I2C3 */
  1109. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  1110. .fifo_depth = 64, /* bytes */
  1111. };
  1112. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1113. { .irq = INT_34XX_I2C3_IRQ, },
  1114. };
  1115. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  1116. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  1117. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  1118. };
  1119. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  1120. &omap3_l4_core__i2c3,
  1121. };
  1122. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  1123. .name = "i2c3",
  1124. .mpu_irqs = i2c3_mpu_irqs,
  1125. .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs),
  1126. .sdma_reqs = i2c3_sdma_reqs,
  1127. .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
  1128. .main_clk = "i2c3_fck",
  1129. .prcm = {
  1130. .omap2 = {
  1131. .module_offs = CORE_MOD,
  1132. .prcm_reg_id = 1,
  1133. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  1134. .idlest_reg_id = 1,
  1135. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  1136. },
  1137. },
  1138. .slaves = omap3xxx_i2c3_slaves,
  1139. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  1140. .class = &i2c_class,
  1141. .dev_attr = &i2c3_dev_attr,
  1142. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1143. };
  1144. /* l4_wkup -> gpio1 */
  1145. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  1146. {
  1147. .pa_start = 0x48310000,
  1148. .pa_end = 0x483101ff,
  1149. .flags = ADDR_TYPE_RT
  1150. },
  1151. };
  1152. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  1153. .master = &omap3xxx_l4_wkup_hwmod,
  1154. .slave = &omap3xxx_gpio1_hwmod,
  1155. .addr = omap3xxx_gpio1_addrs,
  1156. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
  1157. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1158. };
  1159. /* l4_per -> gpio2 */
  1160. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  1161. {
  1162. .pa_start = 0x49050000,
  1163. .pa_end = 0x490501ff,
  1164. .flags = ADDR_TYPE_RT
  1165. },
  1166. };
  1167. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  1168. .master = &omap3xxx_l4_per_hwmod,
  1169. .slave = &omap3xxx_gpio2_hwmod,
  1170. .addr = omap3xxx_gpio2_addrs,
  1171. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
  1172. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1173. };
  1174. /* l4_per -> gpio3 */
  1175. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  1176. {
  1177. .pa_start = 0x49052000,
  1178. .pa_end = 0x490521ff,
  1179. .flags = ADDR_TYPE_RT
  1180. },
  1181. };
  1182. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  1183. .master = &omap3xxx_l4_per_hwmod,
  1184. .slave = &omap3xxx_gpio3_hwmod,
  1185. .addr = omap3xxx_gpio3_addrs,
  1186. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
  1187. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1188. };
  1189. /* l4_per -> gpio4 */
  1190. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  1191. {
  1192. .pa_start = 0x49054000,
  1193. .pa_end = 0x490541ff,
  1194. .flags = ADDR_TYPE_RT
  1195. },
  1196. };
  1197. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  1198. .master = &omap3xxx_l4_per_hwmod,
  1199. .slave = &omap3xxx_gpio4_hwmod,
  1200. .addr = omap3xxx_gpio4_addrs,
  1201. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
  1202. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1203. };
  1204. /* l4_per -> gpio5 */
  1205. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  1206. {
  1207. .pa_start = 0x49056000,
  1208. .pa_end = 0x490561ff,
  1209. .flags = ADDR_TYPE_RT
  1210. },
  1211. };
  1212. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  1213. .master = &omap3xxx_l4_per_hwmod,
  1214. .slave = &omap3xxx_gpio5_hwmod,
  1215. .addr = omap3xxx_gpio5_addrs,
  1216. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
  1217. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1218. };
  1219. /* l4_per -> gpio6 */
  1220. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  1221. {
  1222. .pa_start = 0x49058000,
  1223. .pa_end = 0x490581ff,
  1224. .flags = ADDR_TYPE_RT
  1225. },
  1226. };
  1227. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  1228. .master = &omap3xxx_l4_per_hwmod,
  1229. .slave = &omap3xxx_gpio6_hwmod,
  1230. .addr = omap3xxx_gpio6_addrs,
  1231. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
  1232. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1233. };
  1234. /*
  1235. * 'gpio' class
  1236. * general purpose io module
  1237. */
  1238. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  1239. .rev_offs = 0x0000,
  1240. .sysc_offs = 0x0010,
  1241. .syss_offs = 0x0014,
  1242. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1243. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1244. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1245. .sysc_fields = &omap_hwmod_sysc_type1,
  1246. };
  1247. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  1248. .name = "gpio",
  1249. .sysc = &omap3xxx_gpio_sysc,
  1250. .rev = 1,
  1251. };
  1252. /* gpio_dev_attr*/
  1253. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1254. .bank_width = 32,
  1255. .dbck_flag = true,
  1256. };
  1257. /* gpio1 */
  1258. static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
  1259. { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
  1260. };
  1261. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  1262. { .role = "dbclk", .clk = "gpio1_dbck", },
  1263. };
  1264. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  1265. &omap3xxx_l4_wkup__gpio1,
  1266. };
  1267. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  1268. .name = "gpio1",
  1269. .mpu_irqs = omap3xxx_gpio1_irqs,
  1270. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
  1271. .main_clk = "gpio1_ick",
  1272. .opt_clks = gpio1_opt_clks,
  1273. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1274. .prcm = {
  1275. .omap2 = {
  1276. .prcm_reg_id = 1,
  1277. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  1278. .module_offs = WKUP_MOD,
  1279. .idlest_reg_id = 1,
  1280. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  1281. },
  1282. },
  1283. .slaves = omap3xxx_gpio1_slaves,
  1284. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  1285. .class = &omap3xxx_gpio_hwmod_class,
  1286. .dev_attr = &gpio_dev_attr,
  1287. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1288. };
  1289. /* gpio2 */
  1290. static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
  1291. { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
  1292. };
  1293. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1294. { .role = "dbclk", .clk = "gpio2_dbck", },
  1295. };
  1296. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  1297. &omap3xxx_l4_per__gpio2,
  1298. };
  1299. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  1300. .name = "gpio2",
  1301. .mpu_irqs = omap3xxx_gpio2_irqs,
  1302. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
  1303. .main_clk = "gpio2_ick",
  1304. .opt_clks = gpio2_opt_clks,
  1305. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1306. .prcm = {
  1307. .omap2 = {
  1308. .prcm_reg_id = 1,
  1309. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  1310. .module_offs = OMAP3430_PER_MOD,
  1311. .idlest_reg_id = 1,
  1312. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  1313. },
  1314. },
  1315. .slaves = omap3xxx_gpio2_slaves,
  1316. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  1317. .class = &omap3xxx_gpio_hwmod_class,
  1318. .dev_attr = &gpio_dev_attr,
  1319. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1320. };
  1321. /* gpio3 */
  1322. static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
  1323. { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
  1324. };
  1325. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1326. { .role = "dbclk", .clk = "gpio3_dbck", },
  1327. };
  1328. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  1329. &omap3xxx_l4_per__gpio3,
  1330. };
  1331. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  1332. .name = "gpio3",
  1333. .mpu_irqs = omap3xxx_gpio3_irqs,
  1334. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
  1335. .main_clk = "gpio3_ick",
  1336. .opt_clks = gpio3_opt_clks,
  1337. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1338. .prcm = {
  1339. .omap2 = {
  1340. .prcm_reg_id = 1,
  1341. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  1342. .module_offs = OMAP3430_PER_MOD,
  1343. .idlest_reg_id = 1,
  1344. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  1345. },
  1346. },
  1347. .slaves = omap3xxx_gpio3_slaves,
  1348. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  1349. .class = &omap3xxx_gpio_hwmod_class,
  1350. .dev_attr = &gpio_dev_attr,
  1351. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1352. };
  1353. /* gpio4 */
  1354. static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
  1355. { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
  1356. };
  1357. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1358. { .role = "dbclk", .clk = "gpio4_dbck", },
  1359. };
  1360. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  1361. &omap3xxx_l4_per__gpio4,
  1362. };
  1363. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  1364. .name = "gpio4",
  1365. .mpu_irqs = omap3xxx_gpio4_irqs,
  1366. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
  1367. .main_clk = "gpio4_ick",
  1368. .opt_clks = gpio4_opt_clks,
  1369. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  1370. .prcm = {
  1371. .omap2 = {
  1372. .prcm_reg_id = 1,
  1373. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  1374. .module_offs = OMAP3430_PER_MOD,
  1375. .idlest_reg_id = 1,
  1376. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  1377. },
  1378. },
  1379. .slaves = omap3xxx_gpio4_slaves,
  1380. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  1381. .class = &omap3xxx_gpio_hwmod_class,
  1382. .dev_attr = &gpio_dev_attr,
  1383. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1384. };
  1385. /* gpio5 */
  1386. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  1387. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  1388. };
  1389. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  1390. { .role = "dbclk", .clk = "gpio5_dbck", },
  1391. };
  1392. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  1393. &omap3xxx_l4_per__gpio5,
  1394. };
  1395. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  1396. .name = "gpio5",
  1397. .mpu_irqs = omap3xxx_gpio5_irqs,
  1398. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
  1399. .main_clk = "gpio5_ick",
  1400. .opt_clks = gpio5_opt_clks,
  1401. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  1402. .prcm = {
  1403. .omap2 = {
  1404. .prcm_reg_id = 1,
  1405. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  1406. .module_offs = OMAP3430_PER_MOD,
  1407. .idlest_reg_id = 1,
  1408. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  1409. },
  1410. },
  1411. .slaves = omap3xxx_gpio5_slaves,
  1412. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  1413. .class = &omap3xxx_gpio_hwmod_class,
  1414. .dev_attr = &gpio_dev_attr,
  1415. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1416. };
  1417. /* gpio6 */
  1418. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  1419. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  1420. };
  1421. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  1422. { .role = "dbclk", .clk = "gpio6_dbck", },
  1423. };
  1424. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  1425. &omap3xxx_l4_per__gpio6,
  1426. };
  1427. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  1428. .name = "gpio6",
  1429. .mpu_irqs = omap3xxx_gpio6_irqs,
  1430. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
  1431. .main_clk = "gpio6_ick",
  1432. .opt_clks = gpio6_opt_clks,
  1433. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  1434. .prcm = {
  1435. .omap2 = {
  1436. .prcm_reg_id = 1,
  1437. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  1438. .module_offs = OMAP3430_PER_MOD,
  1439. .idlest_reg_id = 1,
  1440. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  1441. },
  1442. },
  1443. .slaves = omap3xxx_gpio6_slaves,
  1444. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  1445. .class = &omap3xxx_gpio_hwmod_class,
  1446. .dev_attr = &gpio_dev_attr,
  1447. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1448. };
  1449. /* dma_system -> L3 */
  1450. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  1451. .master = &omap3xxx_dma_system_hwmod,
  1452. .slave = &omap3xxx_l3_main_hwmod,
  1453. .clk = "core_l3_ick",
  1454. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1455. };
  1456. /* dma attributes */
  1457. static struct omap_dma_dev_attr dma_dev_attr = {
  1458. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1459. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1460. .lch_count = 32,
  1461. };
  1462. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  1463. .rev_offs = 0x0000,
  1464. .sysc_offs = 0x002c,
  1465. .syss_offs = 0x0028,
  1466. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1467. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1468. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  1469. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1470. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1471. .sysc_fields = &omap_hwmod_sysc_type1,
  1472. };
  1473. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  1474. .name = "dma",
  1475. .sysc = &omap3xxx_dma_sysc,
  1476. };
  1477. /* dma_system */
  1478. static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
  1479. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1480. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1481. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1482. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1483. };
  1484. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  1485. {
  1486. .pa_start = 0x48056000,
  1487. .pa_end = 0x4a0560ff,
  1488. .flags = ADDR_TYPE_RT
  1489. },
  1490. };
  1491. /* dma_system master ports */
  1492. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  1493. &omap3xxx_dma_system__l3,
  1494. };
  1495. /* l4_cfg -> dma_system */
  1496. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  1497. .master = &omap3xxx_l4_core_hwmod,
  1498. .slave = &omap3xxx_dma_system_hwmod,
  1499. .clk = "core_l4_ick",
  1500. .addr = omap3xxx_dma_system_addrs,
  1501. .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
  1502. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1503. };
  1504. /* dma_system slave ports */
  1505. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  1506. &omap3xxx_l4_core__dma_system,
  1507. };
  1508. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  1509. .name = "dma",
  1510. .class = &omap3xxx_dma_hwmod_class,
  1511. .mpu_irqs = omap3xxx_dma_system_irqs,
  1512. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
  1513. .main_clk = "core_l3_ick",
  1514. .prcm = {
  1515. .omap2 = {
  1516. .module_offs = CORE_MOD,
  1517. .prcm_reg_id = 1,
  1518. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1519. .idlest_reg_id = 1,
  1520. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1521. },
  1522. },
  1523. .slaves = omap3xxx_dma_system_slaves,
  1524. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  1525. .masters = omap3xxx_dma_system_masters,
  1526. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  1527. .dev_attr = &dma_dev_attr,
  1528. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1529. .flags = HWMOD_NO_IDLEST,
  1530. };
  1531. /* SR common */
  1532. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  1533. .clkact_shift = 20,
  1534. };
  1535. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  1536. .sysc_offs = 0x24,
  1537. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  1538. .clockact = CLOCKACT_TEST_ICLK,
  1539. .sysc_fields = &omap34xx_sr_sysc_fields,
  1540. };
  1541. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  1542. .name = "smartreflex",
  1543. .sysc = &omap34xx_sr_sysc,
  1544. .rev = 1,
  1545. };
  1546. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  1547. .sidle_shift = 24,
  1548. .enwkup_shift = 26
  1549. };
  1550. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  1551. .sysc_offs = 0x38,
  1552. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1553. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1554. SYSC_NO_CACHE),
  1555. .sysc_fields = &omap36xx_sr_sysc_fields,
  1556. };
  1557. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  1558. .name = "smartreflex",
  1559. .sysc = &omap36xx_sr_sysc,
  1560. .rev = 2,
  1561. };
  1562. /* SR1 */
  1563. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  1564. &omap3_l4_core__sr1,
  1565. };
  1566. static struct omap_hwmod omap34xx_sr1_hwmod = {
  1567. .name = "sr1_hwmod",
  1568. .class = &omap34xx_smartreflex_hwmod_class,
  1569. .main_clk = "sr1_fck",
  1570. .vdd_name = "mpu",
  1571. .prcm = {
  1572. .omap2 = {
  1573. .prcm_reg_id = 1,
  1574. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1575. .module_offs = WKUP_MOD,
  1576. .idlest_reg_id = 1,
  1577. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1578. },
  1579. },
  1580. .slaves = omap3_sr1_slaves,
  1581. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  1582. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  1583. CHIP_IS_OMAP3430ES3_0 |
  1584. CHIP_IS_OMAP3430ES3_1),
  1585. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1586. };
  1587. static struct omap_hwmod omap36xx_sr1_hwmod = {
  1588. .name = "sr1_hwmod",
  1589. .class = &omap36xx_smartreflex_hwmod_class,
  1590. .main_clk = "sr1_fck",
  1591. .vdd_name = "mpu",
  1592. .prcm = {
  1593. .omap2 = {
  1594. .prcm_reg_id = 1,
  1595. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1596. .module_offs = WKUP_MOD,
  1597. .idlest_reg_id = 1,
  1598. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1599. },
  1600. },
  1601. .slaves = omap3_sr1_slaves,
  1602. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  1603. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1604. };
  1605. /* SR2 */
  1606. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  1607. &omap3_l4_core__sr2,
  1608. };
  1609. static struct omap_hwmod omap34xx_sr2_hwmod = {
  1610. .name = "sr2_hwmod",
  1611. .class = &omap34xx_smartreflex_hwmod_class,
  1612. .main_clk = "sr2_fck",
  1613. .vdd_name = "core",
  1614. .prcm = {
  1615. .omap2 = {
  1616. .prcm_reg_id = 1,
  1617. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1618. .module_offs = WKUP_MOD,
  1619. .idlest_reg_id = 1,
  1620. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1621. },
  1622. },
  1623. .slaves = omap3_sr2_slaves,
  1624. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  1625. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  1626. CHIP_IS_OMAP3430ES3_0 |
  1627. CHIP_IS_OMAP3430ES3_1),
  1628. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1629. };
  1630. static struct omap_hwmod omap36xx_sr2_hwmod = {
  1631. .name = "sr2_hwmod",
  1632. .class = &omap36xx_smartreflex_hwmod_class,
  1633. .main_clk = "sr2_fck",
  1634. .vdd_name = "core",
  1635. .prcm = {
  1636. .omap2 = {
  1637. .prcm_reg_id = 1,
  1638. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1639. .module_offs = WKUP_MOD,
  1640. .idlest_reg_id = 1,
  1641. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1642. },
  1643. },
  1644. .slaves = omap3_sr2_slaves,
  1645. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  1646. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1647. };
  1648. /* l4 core -> mcspi1 interface */
  1649. static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
  1650. {
  1651. .pa_start = 0x48098000,
  1652. .pa_end = 0x480980ff,
  1653. .flags = ADDR_TYPE_RT,
  1654. },
  1655. };
  1656. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  1657. .master = &omap3xxx_l4_core_hwmod,
  1658. .slave = &omap34xx_mcspi1,
  1659. .clk = "mcspi1_ick",
  1660. .addr = omap34xx_mcspi1_addr_space,
  1661. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
  1662. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1663. };
  1664. /* l4 core -> mcspi2 interface */
  1665. static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
  1666. {
  1667. .pa_start = 0x4809a000,
  1668. .pa_end = 0x4809a0ff,
  1669. .flags = ADDR_TYPE_RT,
  1670. },
  1671. };
  1672. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  1673. .master = &omap3xxx_l4_core_hwmod,
  1674. .slave = &omap34xx_mcspi2,
  1675. .clk = "mcspi2_ick",
  1676. .addr = omap34xx_mcspi2_addr_space,
  1677. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
  1678. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1679. };
  1680. /* l4 core -> mcspi3 interface */
  1681. static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
  1682. {
  1683. .pa_start = 0x480b8000,
  1684. .pa_end = 0x480b80ff,
  1685. .flags = ADDR_TYPE_RT,
  1686. },
  1687. };
  1688. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  1689. .master = &omap3xxx_l4_core_hwmod,
  1690. .slave = &omap34xx_mcspi3,
  1691. .clk = "mcspi3_ick",
  1692. .addr = omap34xx_mcspi3_addr_space,
  1693. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
  1694. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1695. };
  1696. /* l4 core -> mcspi4 interface */
  1697. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  1698. {
  1699. .pa_start = 0x480ba000,
  1700. .pa_end = 0x480ba0ff,
  1701. .flags = ADDR_TYPE_RT,
  1702. },
  1703. };
  1704. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  1705. .master = &omap3xxx_l4_core_hwmod,
  1706. .slave = &omap34xx_mcspi4,
  1707. .clk = "mcspi4_ick",
  1708. .addr = omap34xx_mcspi4_addr_space,
  1709. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
  1710. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1711. };
  1712. /*
  1713. * 'mcspi' class
  1714. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1715. * bus
  1716. */
  1717. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  1718. .rev_offs = 0x0000,
  1719. .sysc_offs = 0x0010,
  1720. .syss_offs = 0x0014,
  1721. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1722. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1723. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1724. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1725. .sysc_fields = &omap_hwmod_sysc_type1,
  1726. };
  1727. static struct omap_hwmod_class omap34xx_mcspi_class = {
  1728. .name = "mcspi",
  1729. .sysc = &omap34xx_mcspi_sysc,
  1730. .rev = OMAP3_MCSPI_REV,
  1731. };
  1732. /* mcspi1 */
  1733. static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
  1734. { .name = "irq", .irq = 65 },
  1735. };
  1736. static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
  1737. { .name = "tx0", .dma_req = 35 },
  1738. { .name = "rx0", .dma_req = 36 },
  1739. { .name = "tx1", .dma_req = 37 },
  1740. { .name = "rx1", .dma_req = 38 },
  1741. { .name = "tx2", .dma_req = 39 },
  1742. { .name = "rx2", .dma_req = 40 },
  1743. { .name = "tx3", .dma_req = 41 },
  1744. { .name = "rx3", .dma_req = 42 },
  1745. };
  1746. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  1747. &omap34xx_l4_core__mcspi1,
  1748. };
  1749. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1750. .num_chipselect = 4,
  1751. };
  1752. static struct omap_hwmod omap34xx_mcspi1 = {
  1753. .name = "mcspi1",
  1754. .mpu_irqs = omap34xx_mcspi1_mpu_irqs,
  1755. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs),
  1756. .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
  1757. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
  1758. .main_clk = "mcspi1_fck",
  1759. .prcm = {
  1760. .omap2 = {
  1761. .module_offs = CORE_MOD,
  1762. .prcm_reg_id = 1,
  1763. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  1764. .idlest_reg_id = 1,
  1765. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  1766. },
  1767. },
  1768. .slaves = omap34xx_mcspi1_slaves,
  1769. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  1770. .class = &omap34xx_mcspi_class,
  1771. .dev_attr = &omap_mcspi1_dev_attr,
  1772. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1773. };
  1774. /* mcspi2 */
  1775. static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
  1776. { .name = "irq", .irq = 66 },
  1777. };
  1778. static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
  1779. { .name = "tx0", .dma_req = 43 },
  1780. { .name = "rx0", .dma_req = 44 },
  1781. { .name = "tx1", .dma_req = 45 },
  1782. { .name = "rx1", .dma_req = 46 },
  1783. };
  1784. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  1785. &omap34xx_l4_core__mcspi2,
  1786. };
  1787. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1788. .num_chipselect = 2,
  1789. };
  1790. static struct omap_hwmod omap34xx_mcspi2 = {
  1791. .name = "mcspi2",
  1792. .mpu_irqs = omap34xx_mcspi2_mpu_irqs,
  1793. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs),
  1794. .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
  1795. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
  1796. .main_clk = "mcspi2_fck",
  1797. .prcm = {
  1798. .omap2 = {
  1799. .module_offs = CORE_MOD,
  1800. .prcm_reg_id = 1,
  1801. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  1802. .idlest_reg_id = 1,
  1803. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  1804. },
  1805. },
  1806. .slaves = omap34xx_mcspi2_slaves,
  1807. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  1808. .class = &omap34xx_mcspi_class,
  1809. .dev_attr = &omap_mcspi2_dev_attr,
  1810. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1811. };
  1812. /* mcspi3 */
  1813. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  1814. { .name = "irq", .irq = 91 }, /* 91 */
  1815. };
  1816. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  1817. { .name = "tx0", .dma_req = 15 },
  1818. { .name = "rx0", .dma_req = 16 },
  1819. { .name = "tx1", .dma_req = 23 },
  1820. { .name = "rx1", .dma_req = 24 },
  1821. };
  1822. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  1823. &omap34xx_l4_core__mcspi3,
  1824. };
  1825. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1826. .num_chipselect = 2,
  1827. };
  1828. static struct omap_hwmod omap34xx_mcspi3 = {
  1829. .name = "mcspi3",
  1830. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  1831. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
  1832. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  1833. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
  1834. .main_clk = "mcspi3_fck",
  1835. .prcm = {
  1836. .omap2 = {
  1837. .module_offs = CORE_MOD,
  1838. .prcm_reg_id = 1,
  1839. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  1840. .idlest_reg_id = 1,
  1841. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  1842. },
  1843. },
  1844. .slaves = omap34xx_mcspi3_slaves,
  1845. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  1846. .class = &omap34xx_mcspi_class,
  1847. .dev_attr = &omap_mcspi3_dev_attr,
  1848. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1849. };
  1850. /* SPI4 */
  1851. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  1852. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  1853. };
  1854. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  1855. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  1856. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  1857. };
  1858. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  1859. &omap34xx_l4_core__mcspi4,
  1860. };
  1861. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  1862. .num_chipselect = 1,
  1863. };
  1864. static struct omap_hwmod omap34xx_mcspi4 = {
  1865. .name = "mcspi4",
  1866. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  1867. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
  1868. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  1869. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
  1870. .main_clk = "mcspi4_fck",
  1871. .prcm = {
  1872. .omap2 = {
  1873. .module_offs = CORE_MOD,
  1874. .prcm_reg_id = 1,
  1875. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  1876. .idlest_reg_id = 1,
  1877. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  1878. },
  1879. },
  1880. .slaves = omap34xx_mcspi4_slaves,
  1881. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  1882. .class = &omap34xx_mcspi_class,
  1883. .dev_attr = &omap_mcspi4_dev_attr,
  1884. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1885. };
  1886. /*
  1887. * usbhsotg
  1888. */
  1889. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  1890. .rev_offs = 0x0400,
  1891. .sysc_offs = 0x0404,
  1892. .syss_offs = 0x0408,
  1893. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1894. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1895. SYSC_HAS_AUTOIDLE),
  1896. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1897. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1898. .sysc_fields = &omap_hwmod_sysc_type1,
  1899. };
  1900. static struct omap_hwmod_class usbotg_class = {
  1901. .name = "usbotg",
  1902. .sysc = &omap3xxx_usbhsotg_sysc,
  1903. };
  1904. /* usb_otg_hs */
  1905. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  1906. { .name = "mc", .irq = 92 },
  1907. { .name = "dma", .irq = 93 },
  1908. };
  1909. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  1910. .name = "usb_otg_hs",
  1911. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  1912. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
  1913. .main_clk = "hsotgusb_ick",
  1914. .prcm = {
  1915. .omap2 = {
  1916. .prcm_reg_id = 1,
  1917. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  1918. .module_offs = CORE_MOD,
  1919. .idlest_reg_id = 1,
  1920. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  1921. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  1922. },
  1923. },
  1924. .masters = omap3xxx_usbhsotg_masters,
  1925. .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
  1926. .slaves = omap3xxx_usbhsotg_slaves,
  1927. .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
  1928. .class = &usbotg_class,
  1929. /*
  1930. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1931. * broken when autoidle is enabled
  1932. * workaround is to disable the autoidle bit at module level.
  1933. */
  1934. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1935. | HWMOD_SWSUP_MSTANDBY,
  1936. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  1937. };
  1938. /* usb_otg_hs */
  1939. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  1940. { .name = "mc", .irq = 71 },
  1941. };
  1942. static struct omap_hwmod_class am35xx_usbotg_class = {
  1943. .name = "am35xx_usbotg",
  1944. .sysc = NULL,
  1945. };
  1946. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  1947. .name = "am35x_otg_hs",
  1948. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  1949. .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs),
  1950. .main_clk = NULL,
  1951. .prcm = {
  1952. .omap2 = {
  1953. },
  1954. },
  1955. .masters = am35xx_usbhsotg_masters,
  1956. .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
  1957. .slaves = am35xx_usbhsotg_slaves,
  1958. .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
  1959. .class = &am35xx_usbotg_class,
  1960. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
  1961. };
  1962. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  1963. &omap3xxx_l3_main_hwmod,
  1964. &omap3xxx_l4_core_hwmod,
  1965. &omap3xxx_l4_per_hwmod,
  1966. &omap3xxx_l4_wkup_hwmod,
  1967. &omap3xxx_mpu_hwmod,
  1968. &omap3xxx_iva_hwmod,
  1969. &omap3xxx_wd_timer2_hwmod,
  1970. &omap3xxx_uart1_hwmod,
  1971. &omap3xxx_uart2_hwmod,
  1972. &omap3xxx_uart3_hwmod,
  1973. &omap3xxx_uart4_hwmod,
  1974. /* dss class */
  1975. &omap3430es1_dss_core_hwmod,
  1976. &omap3xxx_dss_core_hwmod,
  1977. &omap3xxx_dss_dispc_hwmod,
  1978. &omap3xxx_dss_dsi1_hwmod,
  1979. &omap3xxx_dss_rfbi_hwmod,
  1980. &omap3xxx_dss_venc_hwmod,
  1981. /* i2c class */
  1982. &omap3xxx_i2c1_hwmod,
  1983. &omap3xxx_i2c2_hwmod,
  1984. &omap3xxx_i2c3_hwmod,
  1985. &omap34xx_sr1_hwmod,
  1986. &omap34xx_sr2_hwmod,
  1987. &omap36xx_sr1_hwmod,
  1988. &omap36xx_sr2_hwmod,
  1989. /* gpio class */
  1990. &omap3xxx_gpio1_hwmod,
  1991. &omap3xxx_gpio2_hwmod,
  1992. &omap3xxx_gpio3_hwmod,
  1993. &omap3xxx_gpio4_hwmod,
  1994. &omap3xxx_gpio5_hwmod,
  1995. &omap3xxx_gpio6_hwmod,
  1996. /* dma_system class*/
  1997. &omap3xxx_dma_system_hwmod,
  1998. /* mcspi class */
  1999. &omap34xx_mcspi1,
  2000. &omap34xx_mcspi2,
  2001. &omap34xx_mcspi3,
  2002. &omap34xx_mcspi4,
  2003. /* usbotg class */
  2004. &omap3xxx_usbhsotg_hwmod,
  2005. /* usbotg for am35x */
  2006. &am35xx_usbhsotg_hwmod,
  2007. NULL,
  2008. };
  2009. int __init omap3xxx_hwmod_init(void)
  2010. {
  2011. return omap_hwmod_init(omap3xxx_hwmods);
  2012. }