omap_hwmod_3xxx_data.c 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138
  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/mmc.h>
  26. #include <plat/smartreflex.h>
  27. #include <plat/mcspi.h>
  28. #include <plat/dmtimer.h>
  29. #include "omap_hwmod_common_data.h"
  30. #include "prm-regbits-34xx.h"
  31. #include "cm-regbits-34xx.h"
  32. #include "wd_timer.h"
  33. #include <mach/am35xx.h>
  34. /*
  35. * OMAP3xxx hardware module integration data
  36. *
  37. * ALl of the data in this section should be autogeneratable from the
  38. * TI hardware database or other technical documentation. Data that
  39. * is driver-specific or driver-kernel integration-specific belongs
  40. * elsewhere.
  41. */
  42. static struct omap_hwmod omap3xxx_mpu_hwmod;
  43. static struct omap_hwmod omap3xxx_iva_hwmod;
  44. static struct omap_hwmod omap3xxx_l3_main_hwmod;
  45. static struct omap_hwmod omap3xxx_l4_core_hwmod;
  46. static struct omap_hwmod omap3xxx_l4_per_hwmod;
  47. static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
  48. static struct omap_hwmod omap3430es1_dss_core_hwmod;
  49. static struct omap_hwmod omap3xxx_dss_core_hwmod;
  50. static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
  51. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
  52. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
  53. static struct omap_hwmod omap3xxx_dss_venc_hwmod;
  54. static struct omap_hwmod omap3xxx_i2c1_hwmod;
  55. static struct omap_hwmod omap3xxx_i2c2_hwmod;
  56. static struct omap_hwmod omap3xxx_i2c3_hwmod;
  57. static struct omap_hwmod omap3xxx_gpio1_hwmod;
  58. static struct omap_hwmod omap3xxx_gpio2_hwmod;
  59. static struct omap_hwmod omap3xxx_gpio3_hwmod;
  60. static struct omap_hwmod omap3xxx_gpio4_hwmod;
  61. static struct omap_hwmod omap3xxx_gpio5_hwmod;
  62. static struct omap_hwmod omap3xxx_gpio6_hwmod;
  63. static struct omap_hwmod omap34xx_sr1_hwmod;
  64. static struct omap_hwmod omap34xx_sr2_hwmod;
  65. static struct omap_hwmod omap34xx_mcspi1;
  66. static struct omap_hwmod omap34xx_mcspi2;
  67. static struct omap_hwmod omap34xx_mcspi3;
  68. static struct omap_hwmod omap34xx_mcspi4;
  69. static struct omap_hwmod omap3xxx_mmc1_hwmod;
  70. static struct omap_hwmod omap3xxx_mmc2_hwmod;
  71. static struct omap_hwmod omap3xxx_mmc3_hwmod;
  72. static struct omap_hwmod am35xx_usbhsotg_hwmod;
  73. static struct omap_hwmod omap3xxx_dma_system_hwmod;
  74. /* L3 -> L4_CORE interface */
  75. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  76. .master = &omap3xxx_l3_main_hwmod,
  77. .slave = &omap3xxx_l4_core_hwmod,
  78. .user = OCP_USER_MPU | OCP_USER_SDMA,
  79. };
  80. /* L3 -> L4_PER interface */
  81. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  82. .master = &omap3xxx_l3_main_hwmod,
  83. .slave = &omap3xxx_l4_per_hwmod,
  84. .user = OCP_USER_MPU | OCP_USER_SDMA,
  85. };
  86. /* MPU -> L3 interface */
  87. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  88. .master = &omap3xxx_mpu_hwmod,
  89. .slave = &omap3xxx_l3_main_hwmod,
  90. .user = OCP_USER_MPU,
  91. };
  92. /* Slave interfaces on the L3 interconnect */
  93. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
  94. &omap3xxx_mpu__l3_main,
  95. };
  96. /* DSS -> l3 */
  97. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  98. .master = &omap3xxx_dss_core_hwmod,
  99. .slave = &omap3xxx_l3_main_hwmod,
  100. .fw = {
  101. .omap2 = {
  102. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  103. .flags = OMAP_FIREWALL_L3,
  104. }
  105. },
  106. .user = OCP_USER_MPU | OCP_USER_SDMA,
  107. };
  108. /* Master interfaces on the L3 interconnect */
  109. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
  110. &omap3xxx_l3_main__l4_core,
  111. &omap3xxx_l3_main__l4_per,
  112. };
  113. /* L3 */
  114. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  115. .name = "l3_main",
  116. .class = &l3_hwmod_class,
  117. .masters = omap3xxx_l3_main_masters,
  118. .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
  119. .slaves = omap3xxx_l3_main_slaves,
  120. .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
  121. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  122. .flags = HWMOD_NO_IDLEST,
  123. };
  124. static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
  125. static struct omap_hwmod omap3xxx_uart1_hwmod;
  126. static struct omap_hwmod omap3xxx_uart2_hwmod;
  127. static struct omap_hwmod omap3xxx_uart3_hwmod;
  128. static struct omap_hwmod omap3xxx_uart4_hwmod;
  129. static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
  130. /* l3_core -> usbhsotg interface */
  131. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  132. .master = &omap3xxx_usbhsotg_hwmod,
  133. .slave = &omap3xxx_l3_main_hwmod,
  134. .clk = "core_l3_ick",
  135. .user = OCP_USER_MPU,
  136. };
  137. /* l3_core -> am35xx_usbhsotg interface */
  138. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  139. .master = &am35xx_usbhsotg_hwmod,
  140. .slave = &omap3xxx_l3_main_hwmod,
  141. .clk = "core_l3_ick",
  142. .user = OCP_USER_MPU,
  143. };
  144. /* L4_CORE -> L4_WKUP interface */
  145. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  146. .master = &omap3xxx_l4_core_hwmod,
  147. .slave = &omap3xxx_l4_wkup_hwmod,
  148. .user = OCP_USER_MPU | OCP_USER_SDMA,
  149. };
  150. /* L4 CORE -> MMC1 interface */
  151. static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = {
  152. {
  153. .pa_start = 0x4809c000,
  154. .pa_end = 0x4809c1ff,
  155. .flags = ADDR_TYPE_RT,
  156. },
  157. };
  158. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
  159. .master = &omap3xxx_l4_core_hwmod,
  160. .slave = &omap3xxx_mmc1_hwmod,
  161. .clk = "mmchs1_ick",
  162. .addr = omap3xxx_mmc1_addr_space,
  163. .addr_cnt = ARRAY_SIZE(omap3xxx_mmc1_addr_space),
  164. .user = OCP_USER_MPU | OCP_USER_SDMA,
  165. .flags = OMAP_FIREWALL_L4
  166. };
  167. /* L4 CORE -> MMC2 interface */
  168. static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = {
  169. {
  170. .pa_start = 0x480b4000,
  171. .pa_end = 0x480b41ff,
  172. .flags = ADDR_TYPE_RT,
  173. },
  174. };
  175. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
  176. .master = &omap3xxx_l4_core_hwmod,
  177. .slave = &omap3xxx_mmc2_hwmod,
  178. .clk = "mmchs2_ick",
  179. .addr = omap3xxx_mmc2_addr_space,
  180. .addr_cnt = ARRAY_SIZE(omap3xxx_mmc2_addr_space),
  181. .user = OCP_USER_MPU | OCP_USER_SDMA,
  182. .flags = OMAP_FIREWALL_L4
  183. };
  184. /* L4 CORE -> MMC3 interface */
  185. static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
  186. {
  187. .pa_start = 0x480ad000,
  188. .pa_end = 0x480ad1ff,
  189. .flags = ADDR_TYPE_RT,
  190. },
  191. };
  192. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
  193. .master = &omap3xxx_l4_core_hwmod,
  194. .slave = &omap3xxx_mmc3_hwmod,
  195. .clk = "mmchs3_ick",
  196. .addr = omap3xxx_mmc3_addr_space,
  197. .addr_cnt = ARRAY_SIZE(omap3xxx_mmc3_addr_space),
  198. .user = OCP_USER_MPU | OCP_USER_SDMA,
  199. .flags = OMAP_FIREWALL_L4
  200. };
  201. /* L4 CORE -> UART1 interface */
  202. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  203. {
  204. .pa_start = OMAP3_UART1_BASE,
  205. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  206. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  207. },
  208. };
  209. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  210. .master = &omap3xxx_l4_core_hwmod,
  211. .slave = &omap3xxx_uart1_hwmod,
  212. .clk = "uart1_ick",
  213. .addr = omap3xxx_uart1_addr_space,
  214. .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
  215. .user = OCP_USER_MPU | OCP_USER_SDMA,
  216. };
  217. /* L4 CORE -> UART2 interface */
  218. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  219. {
  220. .pa_start = OMAP3_UART2_BASE,
  221. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  222. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  223. },
  224. };
  225. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  226. .master = &omap3xxx_l4_core_hwmod,
  227. .slave = &omap3xxx_uart2_hwmod,
  228. .clk = "uart2_ick",
  229. .addr = omap3xxx_uart2_addr_space,
  230. .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
  231. .user = OCP_USER_MPU | OCP_USER_SDMA,
  232. };
  233. /* L4 PER -> UART3 interface */
  234. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  235. {
  236. .pa_start = OMAP3_UART3_BASE,
  237. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  238. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  239. },
  240. };
  241. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  242. .master = &omap3xxx_l4_per_hwmod,
  243. .slave = &omap3xxx_uart3_hwmod,
  244. .clk = "uart3_ick",
  245. .addr = omap3xxx_uart3_addr_space,
  246. .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
  247. .user = OCP_USER_MPU | OCP_USER_SDMA,
  248. };
  249. /* L4 PER -> UART4 interface */
  250. static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
  251. {
  252. .pa_start = OMAP3_UART4_BASE,
  253. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  254. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  255. },
  256. };
  257. static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
  258. .master = &omap3xxx_l4_per_hwmod,
  259. .slave = &omap3xxx_uart4_hwmod,
  260. .clk = "uart4_ick",
  261. .addr = omap3xxx_uart4_addr_space,
  262. .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
  263. .user = OCP_USER_MPU | OCP_USER_SDMA,
  264. };
  265. /* I2C IP block address space length (in bytes) */
  266. #define OMAP2_I2C_AS_LEN 128
  267. /* L4 CORE -> I2C1 interface */
  268. static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
  269. {
  270. .pa_start = 0x48070000,
  271. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  272. .flags = ADDR_TYPE_RT,
  273. },
  274. };
  275. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  276. .master = &omap3xxx_l4_core_hwmod,
  277. .slave = &omap3xxx_i2c1_hwmod,
  278. .clk = "i2c1_ick",
  279. .addr = omap3xxx_i2c1_addr_space,
  280. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
  281. .fw = {
  282. .omap2 = {
  283. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  284. .l4_prot_group = 7,
  285. .flags = OMAP_FIREWALL_L4,
  286. }
  287. },
  288. .user = OCP_USER_MPU | OCP_USER_SDMA,
  289. };
  290. /* L4 CORE -> I2C2 interface */
  291. static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
  292. {
  293. .pa_start = 0x48072000,
  294. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  295. .flags = ADDR_TYPE_RT,
  296. },
  297. };
  298. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  299. .master = &omap3xxx_l4_core_hwmod,
  300. .slave = &omap3xxx_i2c2_hwmod,
  301. .clk = "i2c2_ick",
  302. .addr = omap3xxx_i2c2_addr_space,
  303. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
  304. .fw = {
  305. .omap2 = {
  306. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  307. .l4_prot_group = 7,
  308. .flags = OMAP_FIREWALL_L4,
  309. }
  310. },
  311. .user = OCP_USER_MPU | OCP_USER_SDMA,
  312. };
  313. /* L4 CORE -> I2C3 interface */
  314. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  315. {
  316. .pa_start = 0x48060000,
  317. .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1,
  318. .flags = ADDR_TYPE_RT,
  319. },
  320. };
  321. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  322. .master = &omap3xxx_l4_core_hwmod,
  323. .slave = &omap3xxx_i2c3_hwmod,
  324. .clk = "i2c3_ick",
  325. .addr = omap3xxx_i2c3_addr_space,
  326. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
  327. .fw = {
  328. .omap2 = {
  329. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  330. .l4_prot_group = 7,
  331. .flags = OMAP_FIREWALL_L4,
  332. }
  333. },
  334. .user = OCP_USER_MPU | OCP_USER_SDMA,
  335. };
  336. /* L4 CORE -> SR1 interface */
  337. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  338. {
  339. .pa_start = OMAP34XX_SR1_BASE,
  340. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  341. .flags = ADDR_TYPE_RT,
  342. },
  343. };
  344. static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
  345. .master = &omap3xxx_l4_core_hwmod,
  346. .slave = &omap34xx_sr1_hwmod,
  347. .clk = "sr_l4_ick",
  348. .addr = omap3_sr1_addr_space,
  349. .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space),
  350. .user = OCP_USER_MPU,
  351. };
  352. /* L4 CORE -> SR1 interface */
  353. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  354. {
  355. .pa_start = OMAP34XX_SR2_BASE,
  356. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  357. .flags = ADDR_TYPE_RT,
  358. },
  359. };
  360. static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
  361. .master = &omap3xxx_l4_core_hwmod,
  362. .slave = &omap34xx_sr2_hwmod,
  363. .clk = "sr_l4_ick",
  364. .addr = omap3_sr2_addr_space,
  365. .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space),
  366. .user = OCP_USER_MPU,
  367. };
  368. /*
  369. * usbhsotg interface data
  370. */
  371. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  372. {
  373. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  374. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  375. .flags = ADDR_TYPE_RT
  376. },
  377. };
  378. /* l4_core -> usbhsotg */
  379. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  380. .master = &omap3xxx_l4_core_hwmod,
  381. .slave = &omap3xxx_usbhsotg_hwmod,
  382. .clk = "l4_ick",
  383. .addr = omap3xxx_usbhsotg_addrs,
  384. .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs),
  385. .user = OCP_USER_MPU,
  386. };
  387. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
  388. &omap3xxx_usbhsotg__l3,
  389. };
  390. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
  391. &omap3xxx_l4_core__usbhsotg,
  392. };
  393. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  394. {
  395. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  396. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  397. .flags = ADDR_TYPE_RT
  398. },
  399. };
  400. /* l4_core -> usbhsotg */
  401. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  402. .master = &omap3xxx_l4_core_hwmod,
  403. .slave = &am35xx_usbhsotg_hwmod,
  404. .clk = "l4_ick",
  405. .addr = am35xx_usbhsotg_addrs,
  406. .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs),
  407. .user = OCP_USER_MPU,
  408. };
  409. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
  410. &am35xx_usbhsotg__l3,
  411. };
  412. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
  413. &am35xx_l4_core__usbhsotg,
  414. };
  415. /* Slave interfaces on the L4_CORE interconnect */
  416. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
  417. &omap3xxx_l3_main__l4_core,
  418. &omap3_l4_core__sr1,
  419. &omap3_l4_core__sr2,
  420. };
  421. /* Master interfaces on the L4_CORE interconnect */
  422. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
  423. &omap3xxx_l4_core__l4_wkup,
  424. &omap3_l4_core__uart1,
  425. &omap3_l4_core__uart2,
  426. &omap3_l4_core__i2c1,
  427. &omap3_l4_core__i2c2,
  428. &omap3_l4_core__i2c3,
  429. };
  430. /* L4 CORE */
  431. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  432. .name = "l4_core",
  433. .class = &l4_hwmod_class,
  434. .masters = omap3xxx_l4_core_masters,
  435. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
  436. .slaves = omap3xxx_l4_core_slaves,
  437. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
  438. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  439. .flags = HWMOD_NO_IDLEST,
  440. };
  441. /* Slave interfaces on the L4_PER interconnect */
  442. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
  443. &omap3xxx_l3_main__l4_per,
  444. };
  445. /* Master interfaces on the L4_PER interconnect */
  446. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
  447. &omap3_l4_per__uart3,
  448. &omap3_l4_per__uart4,
  449. };
  450. /* L4 PER */
  451. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  452. .name = "l4_per",
  453. .class = &l4_hwmod_class,
  454. .masters = omap3xxx_l4_per_masters,
  455. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
  456. .slaves = omap3xxx_l4_per_slaves,
  457. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
  458. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  459. .flags = HWMOD_NO_IDLEST,
  460. };
  461. /* Slave interfaces on the L4_WKUP interconnect */
  462. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
  463. &omap3xxx_l4_core__l4_wkup,
  464. };
  465. /* Master interfaces on the L4_WKUP interconnect */
  466. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
  467. };
  468. /* L4 WKUP */
  469. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  470. .name = "l4_wkup",
  471. .class = &l4_hwmod_class,
  472. .masters = omap3xxx_l4_wkup_masters,
  473. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
  474. .slaves = omap3xxx_l4_wkup_slaves,
  475. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
  476. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  477. .flags = HWMOD_NO_IDLEST,
  478. };
  479. /* Master interfaces on the MPU device */
  480. static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
  481. &omap3xxx_mpu__l3_main,
  482. };
  483. /* MPU */
  484. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  485. .name = "mpu",
  486. .class = &mpu_hwmod_class,
  487. .main_clk = "arm_fck",
  488. .masters = omap3xxx_mpu_masters,
  489. .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
  490. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  491. };
  492. /*
  493. * IVA2_2 interface data
  494. */
  495. /* IVA2 <- L3 interface */
  496. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  497. .master = &omap3xxx_l3_main_hwmod,
  498. .slave = &omap3xxx_iva_hwmod,
  499. .clk = "iva2_ck",
  500. .user = OCP_USER_MPU | OCP_USER_SDMA,
  501. };
  502. static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
  503. &omap3xxx_l3__iva,
  504. };
  505. /*
  506. * IVA2 (IVA2)
  507. */
  508. static struct omap_hwmod omap3xxx_iva_hwmod = {
  509. .name = "iva",
  510. .class = &iva_hwmod_class,
  511. .masters = omap3xxx_iva_masters,
  512. .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
  513. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  514. };
  515. /* timer class */
  516. static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
  517. .rev_offs = 0x0000,
  518. .sysc_offs = 0x0010,
  519. .syss_offs = 0x0014,
  520. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  521. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  522. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  523. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  524. .sysc_fields = &omap_hwmod_sysc_type1,
  525. };
  526. static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
  527. .name = "timer",
  528. .sysc = &omap3xxx_timer_1ms_sysc,
  529. .rev = OMAP_TIMER_IP_VERSION_1,
  530. };
  531. static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
  532. .rev_offs = 0x0000,
  533. .sysc_offs = 0x0010,
  534. .syss_offs = 0x0014,
  535. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  536. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  537. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  538. .sysc_fields = &omap_hwmod_sysc_type1,
  539. };
  540. static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
  541. .name = "timer",
  542. .sysc = &omap3xxx_timer_sysc,
  543. .rev = OMAP_TIMER_IP_VERSION_1,
  544. };
  545. /* timer1 */
  546. static struct omap_hwmod omap3xxx_timer1_hwmod;
  547. static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = {
  548. { .irq = 37, },
  549. };
  550. static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
  551. {
  552. .pa_start = 0x48318000,
  553. .pa_end = 0x48318000 + SZ_1K - 1,
  554. .flags = ADDR_TYPE_RT
  555. },
  556. };
  557. /* l4_wkup -> timer1 */
  558. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
  559. .master = &omap3xxx_l4_wkup_hwmod,
  560. .slave = &omap3xxx_timer1_hwmod,
  561. .clk = "gpt1_ick",
  562. .addr = omap3xxx_timer1_addrs,
  563. .addr_cnt = ARRAY_SIZE(omap3xxx_timer1_addrs),
  564. .user = OCP_USER_MPU | OCP_USER_SDMA,
  565. };
  566. /* timer1 slave port */
  567. static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
  568. &omap3xxx_l4_wkup__timer1,
  569. };
  570. /* timer1 hwmod */
  571. static struct omap_hwmod omap3xxx_timer1_hwmod = {
  572. .name = "timer1",
  573. .mpu_irqs = omap3xxx_timer1_mpu_irqs,
  574. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer1_mpu_irqs),
  575. .main_clk = "gpt1_fck",
  576. .prcm = {
  577. .omap2 = {
  578. .prcm_reg_id = 1,
  579. .module_bit = OMAP3430_EN_GPT1_SHIFT,
  580. .module_offs = WKUP_MOD,
  581. .idlest_reg_id = 1,
  582. .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
  583. },
  584. },
  585. .slaves = omap3xxx_timer1_slaves,
  586. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
  587. .class = &omap3xxx_timer_1ms_hwmod_class,
  588. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  589. };
  590. /* timer2 */
  591. static struct omap_hwmod omap3xxx_timer2_hwmod;
  592. static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = {
  593. { .irq = 38, },
  594. };
  595. static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
  596. {
  597. .pa_start = 0x49032000,
  598. .pa_end = 0x49032000 + SZ_1K - 1,
  599. .flags = ADDR_TYPE_RT
  600. },
  601. };
  602. /* l4_per -> timer2 */
  603. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
  604. .master = &omap3xxx_l4_per_hwmod,
  605. .slave = &omap3xxx_timer2_hwmod,
  606. .clk = "gpt2_ick",
  607. .addr = omap3xxx_timer2_addrs,
  608. .addr_cnt = ARRAY_SIZE(omap3xxx_timer2_addrs),
  609. .user = OCP_USER_MPU | OCP_USER_SDMA,
  610. };
  611. /* timer2 slave port */
  612. static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
  613. &omap3xxx_l4_per__timer2,
  614. };
  615. /* timer2 hwmod */
  616. static struct omap_hwmod omap3xxx_timer2_hwmod = {
  617. .name = "timer2",
  618. .mpu_irqs = omap3xxx_timer2_mpu_irqs,
  619. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer2_mpu_irqs),
  620. .main_clk = "gpt2_fck",
  621. .prcm = {
  622. .omap2 = {
  623. .prcm_reg_id = 1,
  624. .module_bit = OMAP3430_EN_GPT2_SHIFT,
  625. .module_offs = OMAP3430_PER_MOD,
  626. .idlest_reg_id = 1,
  627. .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
  628. },
  629. },
  630. .slaves = omap3xxx_timer2_slaves,
  631. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
  632. .class = &omap3xxx_timer_1ms_hwmod_class,
  633. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  634. };
  635. /* timer3 */
  636. static struct omap_hwmod omap3xxx_timer3_hwmod;
  637. static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = {
  638. { .irq = 39, },
  639. };
  640. static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
  641. {
  642. .pa_start = 0x49034000,
  643. .pa_end = 0x49034000 + SZ_1K - 1,
  644. .flags = ADDR_TYPE_RT
  645. },
  646. };
  647. /* l4_per -> timer3 */
  648. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
  649. .master = &omap3xxx_l4_per_hwmod,
  650. .slave = &omap3xxx_timer3_hwmod,
  651. .clk = "gpt3_ick",
  652. .addr = omap3xxx_timer3_addrs,
  653. .addr_cnt = ARRAY_SIZE(omap3xxx_timer3_addrs),
  654. .user = OCP_USER_MPU | OCP_USER_SDMA,
  655. };
  656. /* timer3 slave port */
  657. static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
  658. &omap3xxx_l4_per__timer3,
  659. };
  660. /* timer3 hwmod */
  661. static struct omap_hwmod omap3xxx_timer3_hwmod = {
  662. .name = "timer3",
  663. .mpu_irqs = omap3xxx_timer3_mpu_irqs,
  664. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer3_mpu_irqs),
  665. .main_clk = "gpt3_fck",
  666. .prcm = {
  667. .omap2 = {
  668. .prcm_reg_id = 1,
  669. .module_bit = OMAP3430_EN_GPT3_SHIFT,
  670. .module_offs = OMAP3430_PER_MOD,
  671. .idlest_reg_id = 1,
  672. .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
  673. },
  674. },
  675. .slaves = omap3xxx_timer3_slaves,
  676. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
  677. .class = &omap3xxx_timer_hwmod_class,
  678. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  679. };
  680. /* timer4 */
  681. static struct omap_hwmod omap3xxx_timer4_hwmod;
  682. static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = {
  683. { .irq = 40, },
  684. };
  685. static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
  686. {
  687. .pa_start = 0x49036000,
  688. .pa_end = 0x49036000 + SZ_1K - 1,
  689. .flags = ADDR_TYPE_RT
  690. },
  691. };
  692. /* l4_per -> timer4 */
  693. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
  694. .master = &omap3xxx_l4_per_hwmod,
  695. .slave = &omap3xxx_timer4_hwmod,
  696. .clk = "gpt4_ick",
  697. .addr = omap3xxx_timer4_addrs,
  698. .addr_cnt = ARRAY_SIZE(omap3xxx_timer4_addrs),
  699. .user = OCP_USER_MPU | OCP_USER_SDMA,
  700. };
  701. /* timer4 slave port */
  702. static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
  703. &omap3xxx_l4_per__timer4,
  704. };
  705. /* timer4 hwmod */
  706. static struct omap_hwmod omap3xxx_timer4_hwmod = {
  707. .name = "timer4",
  708. .mpu_irqs = omap3xxx_timer4_mpu_irqs,
  709. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer4_mpu_irqs),
  710. .main_clk = "gpt4_fck",
  711. .prcm = {
  712. .omap2 = {
  713. .prcm_reg_id = 1,
  714. .module_bit = OMAP3430_EN_GPT4_SHIFT,
  715. .module_offs = OMAP3430_PER_MOD,
  716. .idlest_reg_id = 1,
  717. .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
  718. },
  719. },
  720. .slaves = omap3xxx_timer4_slaves,
  721. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
  722. .class = &omap3xxx_timer_hwmod_class,
  723. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  724. };
  725. /* timer5 */
  726. static struct omap_hwmod omap3xxx_timer5_hwmod;
  727. static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = {
  728. { .irq = 41, },
  729. };
  730. static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
  731. {
  732. .pa_start = 0x49038000,
  733. .pa_end = 0x49038000 + SZ_1K - 1,
  734. .flags = ADDR_TYPE_RT
  735. },
  736. };
  737. /* l4_per -> timer5 */
  738. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
  739. .master = &omap3xxx_l4_per_hwmod,
  740. .slave = &omap3xxx_timer5_hwmod,
  741. .clk = "gpt5_ick",
  742. .addr = omap3xxx_timer5_addrs,
  743. .addr_cnt = ARRAY_SIZE(omap3xxx_timer5_addrs),
  744. .user = OCP_USER_MPU | OCP_USER_SDMA,
  745. };
  746. /* timer5 slave port */
  747. static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
  748. &omap3xxx_l4_per__timer5,
  749. };
  750. /* timer5 hwmod */
  751. static struct omap_hwmod omap3xxx_timer5_hwmod = {
  752. .name = "timer5",
  753. .mpu_irqs = omap3xxx_timer5_mpu_irqs,
  754. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer5_mpu_irqs),
  755. .main_clk = "gpt5_fck",
  756. .prcm = {
  757. .omap2 = {
  758. .prcm_reg_id = 1,
  759. .module_bit = OMAP3430_EN_GPT5_SHIFT,
  760. .module_offs = OMAP3430_PER_MOD,
  761. .idlest_reg_id = 1,
  762. .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
  763. },
  764. },
  765. .slaves = omap3xxx_timer5_slaves,
  766. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
  767. .class = &omap3xxx_timer_hwmod_class,
  768. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  769. };
  770. /* timer6 */
  771. static struct omap_hwmod omap3xxx_timer6_hwmod;
  772. static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = {
  773. { .irq = 42, },
  774. };
  775. static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
  776. {
  777. .pa_start = 0x4903A000,
  778. .pa_end = 0x4903A000 + SZ_1K - 1,
  779. .flags = ADDR_TYPE_RT
  780. },
  781. };
  782. /* l4_per -> timer6 */
  783. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
  784. .master = &omap3xxx_l4_per_hwmod,
  785. .slave = &omap3xxx_timer6_hwmod,
  786. .clk = "gpt6_ick",
  787. .addr = omap3xxx_timer6_addrs,
  788. .addr_cnt = ARRAY_SIZE(omap3xxx_timer6_addrs),
  789. .user = OCP_USER_MPU | OCP_USER_SDMA,
  790. };
  791. /* timer6 slave port */
  792. static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
  793. &omap3xxx_l4_per__timer6,
  794. };
  795. /* timer6 hwmod */
  796. static struct omap_hwmod omap3xxx_timer6_hwmod = {
  797. .name = "timer6",
  798. .mpu_irqs = omap3xxx_timer6_mpu_irqs,
  799. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer6_mpu_irqs),
  800. .main_clk = "gpt6_fck",
  801. .prcm = {
  802. .omap2 = {
  803. .prcm_reg_id = 1,
  804. .module_bit = OMAP3430_EN_GPT6_SHIFT,
  805. .module_offs = OMAP3430_PER_MOD,
  806. .idlest_reg_id = 1,
  807. .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
  808. },
  809. },
  810. .slaves = omap3xxx_timer6_slaves,
  811. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
  812. .class = &omap3xxx_timer_hwmod_class,
  813. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  814. };
  815. /* timer7 */
  816. static struct omap_hwmod omap3xxx_timer7_hwmod;
  817. static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = {
  818. { .irq = 43, },
  819. };
  820. static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
  821. {
  822. .pa_start = 0x4903C000,
  823. .pa_end = 0x4903C000 + SZ_1K - 1,
  824. .flags = ADDR_TYPE_RT
  825. },
  826. };
  827. /* l4_per -> timer7 */
  828. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
  829. .master = &omap3xxx_l4_per_hwmod,
  830. .slave = &omap3xxx_timer7_hwmod,
  831. .clk = "gpt7_ick",
  832. .addr = omap3xxx_timer7_addrs,
  833. .addr_cnt = ARRAY_SIZE(omap3xxx_timer7_addrs),
  834. .user = OCP_USER_MPU | OCP_USER_SDMA,
  835. };
  836. /* timer7 slave port */
  837. static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
  838. &omap3xxx_l4_per__timer7,
  839. };
  840. /* timer7 hwmod */
  841. static struct omap_hwmod omap3xxx_timer7_hwmod = {
  842. .name = "timer7",
  843. .mpu_irqs = omap3xxx_timer7_mpu_irqs,
  844. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer7_mpu_irqs),
  845. .main_clk = "gpt7_fck",
  846. .prcm = {
  847. .omap2 = {
  848. .prcm_reg_id = 1,
  849. .module_bit = OMAP3430_EN_GPT7_SHIFT,
  850. .module_offs = OMAP3430_PER_MOD,
  851. .idlest_reg_id = 1,
  852. .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
  853. },
  854. },
  855. .slaves = omap3xxx_timer7_slaves,
  856. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
  857. .class = &omap3xxx_timer_hwmod_class,
  858. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  859. };
  860. /* timer8 */
  861. static struct omap_hwmod omap3xxx_timer8_hwmod;
  862. static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = {
  863. { .irq = 44, },
  864. };
  865. static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
  866. {
  867. .pa_start = 0x4903E000,
  868. .pa_end = 0x4903E000 + SZ_1K - 1,
  869. .flags = ADDR_TYPE_RT
  870. },
  871. };
  872. /* l4_per -> timer8 */
  873. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
  874. .master = &omap3xxx_l4_per_hwmod,
  875. .slave = &omap3xxx_timer8_hwmod,
  876. .clk = "gpt8_ick",
  877. .addr = omap3xxx_timer8_addrs,
  878. .addr_cnt = ARRAY_SIZE(omap3xxx_timer8_addrs),
  879. .user = OCP_USER_MPU | OCP_USER_SDMA,
  880. };
  881. /* timer8 slave port */
  882. static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
  883. &omap3xxx_l4_per__timer8,
  884. };
  885. /* timer8 hwmod */
  886. static struct omap_hwmod omap3xxx_timer8_hwmod = {
  887. .name = "timer8",
  888. .mpu_irqs = omap3xxx_timer8_mpu_irqs,
  889. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer8_mpu_irqs),
  890. .main_clk = "gpt8_fck",
  891. .prcm = {
  892. .omap2 = {
  893. .prcm_reg_id = 1,
  894. .module_bit = OMAP3430_EN_GPT8_SHIFT,
  895. .module_offs = OMAP3430_PER_MOD,
  896. .idlest_reg_id = 1,
  897. .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
  898. },
  899. },
  900. .slaves = omap3xxx_timer8_slaves,
  901. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
  902. .class = &omap3xxx_timer_hwmod_class,
  903. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  904. };
  905. /* timer9 */
  906. static struct omap_hwmod omap3xxx_timer9_hwmod;
  907. static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = {
  908. { .irq = 45, },
  909. };
  910. static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
  911. {
  912. .pa_start = 0x49040000,
  913. .pa_end = 0x49040000 + SZ_1K - 1,
  914. .flags = ADDR_TYPE_RT
  915. },
  916. };
  917. /* l4_per -> timer9 */
  918. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
  919. .master = &omap3xxx_l4_per_hwmod,
  920. .slave = &omap3xxx_timer9_hwmod,
  921. .clk = "gpt9_ick",
  922. .addr = omap3xxx_timer9_addrs,
  923. .addr_cnt = ARRAY_SIZE(omap3xxx_timer9_addrs),
  924. .user = OCP_USER_MPU | OCP_USER_SDMA,
  925. };
  926. /* timer9 slave port */
  927. static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
  928. &omap3xxx_l4_per__timer9,
  929. };
  930. /* timer9 hwmod */
  931. static struct omap_hwmod omap3xxx_timer9_hwmod = {
  932. .name = "timer9",
  933. .mpu_irqs = omap3xxx_timer9_mpu_irqs,
  934. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer9_mpu_irqs),
  935. .main_clk = "gpt9_fck",
  936. .prcm = {
  937. .omap2 = {
  938. .prcm_reg_id = 1,
  939. .module_bit = OMAP3430_EN_GPT9_SHIFT,
  940. .module_offs = OMAP3430_PER_MOD,
  941. .idlest_reg_id = 1,
  942. .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
  943. },
  944. },
  945. .slaves = omap3xxx_timer9_slaves,
  946. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
  947. .class = &omap3xxx_timer_hwmod_class,
  948. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  949. };
  950. /* timer10 */
  951. static struct omap_hwmod omap3xxx_timer10_hwmod;
  952. static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = {
  953. { .irq = 46, },
  954. };
  955. static struct omap_hwmod_addr_space omap3xxx_timer10_addrs[] = {
  956. {
  957. .pa_start = 0x48086000,
  958. .pa_end = 0x48086000 + SZ_1K - 1,
  959. .flags = ADDR_TYPE_RT
  960. },
  961. };
  962. /* l4_core -> timer10 */
  963. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
  964. .master = &omap3xxx_l4_core_hwmod,
  965. .slave = &omap3xxx_timer10_hwmod,
  966. .clk = "gpt10_ick",
  967. .addr = omap3xxx_timer10_addrs,
  968. .addr_cnt = ARRAY_SIZE(omap3xxx_timer10_addrs),
  969. .user = OCP_USER_MPU | OCP_USER_SDMA,
  970. };
  971. /* timer10 slave port */
  972. static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
  973. &omap3xxx_l4_core__timer10,
  974. };
  975. /* timer10 hwmod */
  976. static struct omap_hwmod omap3xxx_timer10_hwmod = {
  977. .name = "timer10",
  978. .mpu_irqs = omap3xxx_timer10_mpu_irqs,
  979. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer10_mpu_irqs),
  980. .main_clk = "gpt10_fck",
  981. .prcm = {
  982. .omap2 = {
  983. .prcm_reg_id = 1,
  984. .module_bit = OMAP3430_EN_GPT10_SHIFT,
  985. .module_offs = CORE_MOD,
  986. .idlest_reg_id = 1,
  987. .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
  988. },
  989. },
  990. .slaves = omap3xxx_timer10_slaves,
  991. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
  992. .class = &omap3xxx_timer_1ms_hwmod_class,
  993. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  994. };
  995. /* timer11 */
  996. static struct omap_hwmod omap3xxx_timer11_hwmod;
  997. static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = {
  998. { .irq = 47, },
  999. };
  1000. static struct omap_hwmod_addr_space omap3xxx_timer11_addrs[] = {
  1001. {
  1002. .pa_start = 0x48088000,
  1003. .pa_end = 0x48088000 + SZ_1K - 1,
  1004. .flags = ADDR_TYPE_RT
  1005. },
  1006. };
  1007. /* l4_core -> timer11 */
  1008. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
  1009. .master = &omap3xxx_l4_core_hwmod,
  1010. .slave = &omap3xxx_timer11_hwmod,
  1011. .clk = "gpt11_ick",
  1012. .addr = omap3xxx_timer11_addrs,
  1013. .addr_cnt = ARRAY_SIZE(omap3xxx_timer11_addrs),
  1014. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1015. };
  1016. /* timer11 slave port */
  1017. static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
  1018. &omap3xxx_l4_core__timer11,
  1019. };
  1020. /* timer11 hwmod */
  1021. static struct omap_hwmod omap3xxx_timer11_hwmod = {
  1022. .name = "timer11",
  1023. .mpu_irqs = omap3xxx_timer11_mpu_irqs,
  1024. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer11_mpu_irqs),
  1025. .main_clk = "gpt11_fck",
  1026. .prcm = {
  1027. .omap2 = {
  1028. .prcm_reg_id = 1,
  1029. .module_bit = OMAP3430_EN_GPT11_SHIFT,
  1030. .module_offs = CORE_MOD,
  1031. .idlest_reg_id = 1,
  1032. .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
  1033. },
  1034. },
  1035. .slaves = omap3xxx_timer11_slaves,
  1036. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
  1037. .class = &omap3xxx_timer_hwmod_class,
  1038. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  1039. };
  1040. /* timer12*/
  1041. static struct omap_hwmod omap3xxx_timer12_hwmod;
  1042. static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
  1043. { .irq = 95, },
  1044. };
  1045. static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
  1046. {
  1047. .pa_start = 0x48304000,
  1048. .pa_end = 0x48304000 + SZ_1K - 1,
  1049. .flags = ADDR_TYPE_RT
  1050. },
  1051. };
  1052. /* l4_core -> timer12 */
  1053. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
  1054. .master = &omap3xxx_l4_core_hwmod,
  1055. .slave = &omap3xxx_timer12_hwmod,
  1056. .clk = "gpt12_ick",
  1057. .addr = omap3xxx_timer12_addrs,
  1058. .addr_cnt = ARRAY_SIZE(omap3xxx_timer12_addrs),
  1059. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1060. };
  1061. /* timer12 slave port */
  1062. static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
  1063. &omap3xxx_l4_core__timer12,
  1064. };
  1065. /* timer12 hwmod */
  1066. static struct omap_hwmod omap3xxx_timer12_hwmod = {
  1067. .name = "timer12",
  1068. .mpu_irqs = omap3xxx_timer12_mpu_irqs,
  1069. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer12_mpu_irqs),
  1070. .main_clk = "gpt12_fck",
  1071. .prcm = {
  1072. .omap2 = {
  1073. .prcm_reg_id = 1,
  1074. .module_bit = OMAP3430_EN_GPT12_SHIFT,
  1075. .module_offs = WKUP_MOD,
  1076. .idlest_reg_id = 1,
  1077. .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
  1078. },
  1079. },
  1080. .slaves = omap3xxx_timer12_slaves,
  1081. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
  1082. .class = &omap3xxx_timer_hwmod_class,
  1083. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  1084. };
  1085. /* l4_wkup -> wd_timer2 */
  1086. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  1087. {
  1088. .pa_start = 0x48314000,
  1089. .pa_end = 0x4831407f,
  1090. .flags = ADDR_TYPE_RT
  1091. },
  1092. };
  1093. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  1094. .master = &omap3xxx_l4_wkup_hwmod,
  1095. .slave = &omap3xxx_wd_timer2_hwmod,
  1096. .clk = "wdt2_ick",
  1097. .addr = omap3xxx_wd_timer2_addrs,
  1098. .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
  1099. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1100. };
  1101. /*
  1102. * 'wd_timer' class
  1103. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  1104. * overflow condition
  1105. */
  1106. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  1107. .rev_offs = 0x0000,
  1108. .sysc_offs = 0x0010,
  1109. .syss_offs = 0x0014,
  1110. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  1111. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1112. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY),
  1113. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1114. .sysc_fields = &omap_hwmod_sysc_type1,
  1115. };
  1116. /* I2C common */
  1117. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1118. .rev_offs = 0x00,
  1119. .sysc_offs = 0x20,
  1120. .syss_offs = 0x10,
  1121. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1122. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1123. SYSC_HAS_AUTOIDLE),
  1124. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1125. .sysc_fields = &omap_hwmod_sysc_type1,
  1126. };
  1127. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  1128. .name = "wd_timer",
  1129. .sysc = &omap3xxx_wd_timer_sysc,
  1130. .pre_shutdown = &omap2_wd_timer_disable
  1131. };
  1132. /* wd_timer2 */
  1133. static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
  1134. &omap3xxx_l4_wkup__wd_timer2,
  1135. };
  1136. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  1137. .name = "wd_timer2",
  1138. .class = &omap3xxx_wd_timer_hwmod_class,
  1139. .main_clk = "wdt2_fck",
  1140. .prcm = {
  1141. .omap2 = {
  1142. .prcm_reg_id = 1,
  1143. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  1144. .module_offs = WKUP_MOD,
  1145. .idlest_reg_id = 1,
  1146. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  1147. },
  1148. },
  1149. .slaves = omap3xxx_wd_timer2_slaves,
  1150. .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
  1151. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1152. };
  1153. /* UART common */
  1154. static struct omap_hwmod_class_sysconfig uart_sysc = {
  1155. .rev_offs = 0x50,
  1156. .sysc_offs = 0x54,
  1157. .syss_offs = 0x58,
  1158. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  1159. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1160. SYSC_HAS_AUTOIDLE),
  1161. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1162. .sysc_fields = &omap_hwmod_sysc_type1,
  1163. };
  1164. static struct omap_hwmod_class uart_class = {
  1165. .name = "uart",
  1166. .sysc = &uart_sysc,
  1167. };
  1168. /* UART1 */
  1169. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  1170. { .irq = INT_24XX_UART1_IRQ, },
  1171. };
  1172. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  1173. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  1174. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  1175. };
  1176. static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
  1177. &omap3_l4_core__uart1,
  1178. };
  1179. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  1180. .name = "uart1",
  1181. .mpu_irqs = uart1_mpu_irqs,
  1182. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  1183. .sdma_reqs = uart1_sdma_reqs,
  1184. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  1185. .main_clk = "uart1_fck",
  1186. .prcm = {
  1187. .omap2 = {
  1188. .module_offs = CORE_MOD,
  1189. .prcm_reg_id = 1,
  1190. .module_bit = OMAP3430_EN_UART1_SHIFT,
  1191. .idlest_reg_id = 1,
  1192. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  1193. },
  1194. },
  1195. .slaves = omap3xxx_uart1_slaves,
  1196. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
  1197. .class = &uart_class,
  1198. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1199. };
  1200. /* UART2 */
  1201. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  1202. { .irq = INT_24XX_UART2_IRQ, },
  1203. };
  1204. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  1205. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  1206. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  1207. };
  1208. static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
  1209. &omap3_l4_core__uart2,
  1210. };
  1211. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  1212. .name = "uart2",
  1213. .mpu_irqs = uart2_mpu_irqs,
  1214. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  1215. .sdma_reqs = uart2_sdma_reqs,
  1216. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  1217. .main_clk = "uart2_fck",
  1218. .prcm = {
  1219. .omap2 = {
  1220. .module_offs = CORE_MOD,
  1221. .prcm_reg_id = 1,
  1222. .module_bit = OMAP3430_EN_UART2_SHIFT,
  1223. .idlest_reg_id = 1,
  1224. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  1225. },
  1226. },
  1227. .slaves = omap3xxx_uart2_slaves,
  1228. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
  1229. .class = &uart_class,
  1230. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1231. };
  1232. /* UART3 */
  1233. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  1234. { .irq = INT_24XX_UART3_IRQ, },
  1235. };
  1236. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  1237. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  1238. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  1239. };
  1240. static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
  1241. &omap3_l4_per__uart3,
  1242. };
  1243. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  1244. .name = "uart3",
  1245. .mpu_irqs = uart3_mpu_irqs,
  1246. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  1247. .sdma_reqs = uart3_sdma_reqs,
  1248. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  1249. .main_clk = "uart3_fck",
  1250. .prcm = {
  1251. .omap2 = {
  1252. .module_offs = OMAP3430_PER_MOD,
  1253. .prcm_reg_id = 1,
  1254. .module_bit = OMAP3430_EN_UART3_SHIFT,
  1255. .idlest_reg_id = 1,
  1256. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  1257. },
  1258. },
  1259. .slaves = omap3xxx_uart3_slaves,
  1260. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
  1261. .class = &uart_class,
  1262. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1263. };
  1264. /* UART4 */
  1265. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  1266. { .irq = INT_36XX_UART4_IRQ, },
  1267. };
  1268. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  1269. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  1270. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  1271. };
  1272. static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
  1273. &omap3_l4_per__uart4,
  1274. };
  1275. static struct omap_hwmod omap3xxx_uart4_hwmod = {
  1276. .name = "uart4",
  1277. .mpu_irqs = uart4_mpu_irqs,
  1278. .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
  1279. .sdma_reqs = uart4_sdma_reqs,
  1280. .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
  1281. .main_clk = "uart4_fck",
  1282. .prcm = {
  1283. .omap2 = {
  1284. .module_offs = OMAP3430_PER_MOD,
  1285. .prcm_reg_id = 1,
  1286. .module_bit = OMAP3630_EN_UART4_SHIFT,
  1287. .idlest_reg_id = 1,
  1288. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  1289. },
  1290. },
  1291. .slaves = omap3xxx_uart4_slaves,
  1292. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
  1293. .class = &uart_class,
  1294. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1295. };
  1296. static struct omap_hwmod_class i2c_class = {
  1297. .name = "i2c",
  1298. .sysc = &i2c_sysc,
  1299. };
  1300. /*
  1301. * 'dss' class
  1302. * display sub-system
  1303. */
  1304. static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = {
  1305. .rev_offs = 0x0000,
  1306. .sysc_offs = 0x0010,
  1307. .syss_offs = 0x0014,
  1308. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1309. .sysc_fields = &omap_hwmod_sysc_type1,
  1310. };
  1311. static struct omap_hwmod_class omap3xxx_dss_hwmod_class = {
  1312. .name = "dss",
  1313. .sysc = &omap3xxx_dss_sysc,
  1314. };
  1315. /* dss */
  1316. static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = {
  1317. { .irq = 25 },
  1318. };
  1319. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  1320. { .name = "dispc", .dma_req = 5 },
  1321. { .name = "dsi1", .dma_req = 74 },
  1322. };
  1323. /* dss */
  1324. /* dss master ports */
  1325. static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
  1326. &omap3xxx_dss__l3,
  1327. };
  1328. static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = {
  1329. {
  1330. .pa_start = 0x48050000,
  1331. .pa_end = 0x480503FF,
  1332. .flags = ADDR_TYPE_RT
  1333. },
  1334. };
  1335. /* l4_core -> dss */
  1336. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  1337. .master = &omap3xxx_l4_core_hwmod,
  1338. .slave = &omap3430es1_dss_core_hwmod,
  1339. .clk = "dss_ick",
  1340. .addr = omap3xxx_dss_addrs,
  1341. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
  1342. .fw = {
  1343. .omap2 = {
  1344. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  1345. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1346. .flags = OMAP_FIREWALL_L4,
  1347. }
  1348. },
  1349. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1350. };
  1351. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  1352. .master = &omap3xxx_l4_core_hwmod,
  1353. .slave = &omap3xxx_dss_core_hwmod,
  1354. .clk = "dss_ick",
  1355. .addr = omap3xxx_dss_addrs,
  1356. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
  1357. .fw = {
  1358. .omap2 = {
  1359. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  1360. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1361. .flags = OMAP_FIREWALL_L4,
  1362. }
  1363. },
  1364. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1365. };
  1366. /* dss slave ports */
  1367. static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
  1368. &omap3430es1_l4_core__dss,
  1369. };
  1370. static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
  1371. &omap3xxx_l4_core__dss,
  1372. };
  1373. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  1374. { .role = "tv_clk", .clk = "dss_tv_fck" },
  1375. { .role = "dssclk", .clk = "dss_96m_fck" },
  1376. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  1377. };
  1378. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  1379. .name = "dss_core",
  1380. .class = &omap3xxx_dss_hwmod_class,
  1381. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  1382. .mpu_irqs = omap3xxx_dss_irqs,
  1383. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
  1384. .sdma_reqs = omap3xxx_dss_sdma_chs,
  1385. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
  1386. .prcm = {
  1387. .omap2 = {
  1388. .prcm_reg_id = 1,
  1389. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1390. .module_offs = OMAP3430_DSS_MOD,
  1391. .idlest_reg_id = 1,
  1392. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  1393. },
  1394. },
  1395. .opt_clks = dss_opt_clks,
  1396. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1397. .slaves = omap3430es1_dss_slaves,
  1398. .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
  1399. .masters = omap3xxx_dss_masters,
  1400. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  1401. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
  1402. .flags = HWMOD_NO_IDLEST,
  1403. };
  1404. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  1405. .name = "dss_core",
  1406. .class = &omap3xxx_dss_hwmod_class,
  1407. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  1408. .mpu_irqs = omap3xxx_dss_irqs,
  1409. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
  1410. .sdma_reqs = omap3xxx_dss_sdma_chs,
  1411. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
  1412. .prcm = {
  1413. .omap2 = {
  1414. .prcm_reg_id = 1,
  1415. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1416. .module_offs = OMAP3430_DSS_MOD,
  1417. .idlest_reg_id = 1,
  1418. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  1419. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  1420. },
  1421. },
  1422. .opt_clks = dss_opt_clks,
  1423. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1424. .slaves = omap3xxx_dss_slaves,
  1425. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
  1426. .masters = omap3xxx_dss_masters,
  1427. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  1428. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 |
  1429. CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
  1430. };
  1431. /*
  1432. * 'dispc' class
  1433. * display controller
  1434. */
  1435. static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = {
  1436. .rev_offs = 0x0000,
  1437. .sysc_offs = 0x0010,
  1438. .syss_offs = 0x0014,
  1439. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1440. SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1441. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1442. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1443. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1444. .sysc_fields = &omap_hwmod_sysc_type1,
  1445. };
  1446. static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = {
  1447. .name = "dispc",
  1448. .sysc = &omap3xxx_dispc_sysc,
  1449. };
  1450. static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = {
  1451. {
  1452. .pa_start = 0x48050400,
  1453. .pa_end = 0x480507FF,
  1454. .flags = ADDR_TYPE_RT
  1455. },
  1456. };
  1457. /* l4_core -> dss_dispc */
  1458. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  1459. .master = &omap3xxx_l4_core_hwmod,
  1460. .slave = &omap3xxx_dss_dispc_hwmod,
  1461. .clk = "dss_ick",
  1462. .addr = omap3xxx_dss_dispc_addrs,
  1463. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs),
  1464. .fw = {
  1465. .omap2 = {
  1466. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  1467. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1468. .flags = OMAP_FIREWALL_L4,
  1469. }
  1470. },
  1471. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1472. };
  1473. /* dss_dispc slave ports */
  1474. static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
  1475. &omap3xxx_l4_core__dss_dispc,
  1476. };
  1477. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  1478. .name = "dss_dispc",
  1479. .class = &omap3xxx_dispc_hwmod_class,
  1480. .main_clk = "dss1_alwon_fck",
  1481. .prcm = {
  1482. .omap2 = {
  1483. .prcm_reg_id = 1,
  1484. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1485. .module_offs = OMAP3430_DSS_MOD,
  1486. },
  1487. },
  1488. .slaves = omap3xxx_dss_dispc_slaves,
  1489. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
  1490. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1491. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1492. CHIP_GE_OMAP3630ES1_1),
  1493. .flags = HWMOD_NO_IDLEST,
  1494. };
  1495. /*
  1496. * 'dsi' class
  1497. * display serial interface controller
  1498. */
  1499. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  1500. .name = "dsi",
  1501. };
  1502. /* dss_dsi1 */
  1503. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  1504. {
  1505. .pa_start = 0x4804FC00,
  1506. .pa_end = 0x4804FFFF,
  1507. .flags = ADDR_TYPE_RT
  1508. },
  1509. };
  1510. /* l4_core -> dss_dsi1 */
  1511. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  1512. .master = &omap3xxx_l4_core_hwmod,
  1513. .slave = &omap3xxx_dss_dsi1_hwmod,
  1514. .addr = omap3xxx_dss_dsi1_addrs,
  1515. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs),
  1516. .fw = {
  1517. .omap2 = {
  1518. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  1519. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1520. .flags = OMAP_FIREWALL_L4,
  1521. }
  1522. },
  1523. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1524. };
  1525. /* dss_dsi1 slave ports */
  1526. static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
  1527. &omap3xxx_l4_core__dss_dsi1,
  1528. };
  1529. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  1530. .name = "dss_dsi1",
  1531. .class = &omap3xxx_dsi_hwmod_class,
  1532. .main_clk = "dss1_alwon_fck",
  1533. .prcm = {
  1534. .omap2 = {
  1535. .prcm_reg_id = 1,
  1536. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1537. .module_offs = OMAP3430_DSS_MOD,
  1538. },
  1539. },
  1540. .slaves = omap3xxx_dss_dsi1_slaves,
  1541. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
  1542. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1543. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1544. CHIP_GE_OMAP3630ES1_1),
  1545. .flags = HWMOD_NO_IDLEST,
  1546. };
  1547. /*
  1548. * 'rfbi' class
  1549. * remote frame buffer interface
  1550. */
  1551. static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = {
  1552. .rev_offs = 0x0000,
  1553. .sysc_offs = 0x0010,
  1554. .syss_offs = 0x0014,
  1555. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1556. SYSC_HAS_AUTOIDLE),
  1557. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1558. .sysc_fields = &omap_hwmod_sysc_type1,
  1559. };
  1560. static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = {
  1561. .name = "rfbi",
  1562. .sysc = &omap3xxx_rfbi_sysc,
  1563. };
  1564. static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = {
  1565. {
  1566. .pa_start = 0x48050800,
  1567. .pa_end = 0x48050BFF,
  1568. .flags = ADDR_TYPE_RT
  1569. },
  1570. };
  1571. /* l4_core -> dss_rfbi */
  1572. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  1573. .master = &omap3xxx_l4_core_hwmod,
  1574. .slave = &omap3xxx_dss_rfbi_hwmod,
  1575. .clk = "dss_ick",
  1576. .addr = omap3xxx_dss_rfbi_addrs,
  1577. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs),
  1578. .fw = {
  1579. .omap2 = {
  1580. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  1581. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  1582. .flags = OMAP_FIREWALL_L4,
  1583. }
  1584. },
  1585. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1586. };
  1587. /* dss_rfbi slave ports */
  1588. static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
  1589. &omap3xxx_l4_core__dss_rfbi,
  1590. };
  1591. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  1592. .name = "dss_rfbi",
  1593. .class = &omap3xxx_rfbi_hwmod_class,
  1594. .main_clk = "dss1_alwon_fck",
  1595. .prcm = {
  1596. .omap2 = {
  1597. .prcm_reg_id = 1,
  1598. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1599. .module_offs = OMAP3430_DSS_MOD,
  1600. },
  1601. },
  1602. .slaves = omap3xxx_dss_rfbi_slaves,
  1603. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
  1604. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1605. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1606. CHIP_GE_OMAP3630ES1_1),
  1607. .flags = HWMOD_NO_IDLEST,
  1608. };
  1609. /*
  1610. * 'venc' class
  1611. * video encoder
  1612. */
  1613. static struct omap_hwmod_class omap3xxx_venc_hwmod_class = {
  1614. .name = "venc",
  1615. };
  1616. /* dss_venc */
  1617. static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = {
  1618. {
  1619. .pa_start = 0x48050C00,
  1620. .pa_end = 0x48050FFF,
  1621. .flags = ADDR_TYPE_RT
  1622. },
  1623. };
  1624. /* l4_core -> dss_venc */
  1625. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  1626. .master = &omap3xxx_l4_core_hwmod,
  1627. .slave = &omap3xxx_dss_venc_hwmod,
  1628. .clk = "dss_tv_fck",
  1629. .addr = omap3xxx_dss_venc_addrs,
  1630. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs),
  1631. .fw = {
  1632. .omap2 = {
  1633. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  1634. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1635. .flags = OMAP_FIREWALL_L4,
  1636. }
  1637. },
  1638. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1639. };
  1640. /* dss_venc slave ports */
  1641. static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
  1642. &omap3xxx_l4_core__dss_venc,
  1643. };
  1644. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  1645. .name = "dss_venc",
  1646. .class = &omap3xxx_venc_hwmod_class,
  1647. .main_clk = "dss1_alwon_fck",
  1648. .prcm = {
  1649. .omap2 = {
  1650. .prcm_reg_id = 1,
  1651. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1652. .module_offs = OMAP3430_DSS_MOD,
  1653. },
  1654. },
  1655. .slaves = omap3xxx_dss_venc_slaves,
  1656. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
  1657. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1658. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1659. CHIP_GE_OMAP3630ES1_1),
  1660. .flags = HWMOD_NO_IDLEST,
  1661. };
  1662. /* I2C1 */
  1663. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  1664. .fifo_depth = 8, /* bytes */
  1665. };
  1666. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1667. { .irq = INT_24XX_I2C1_IRQ, },
  1668. };
  1669. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1670. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1671. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1672. };
  1673. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  1674. &omap3_l4_core__i2c1,
  1675. };
  1676. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  1677. .name = "i2c1",
  1678. .mpu_irqs = i2c1_mpu_irqs,
  1679. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  1680. .sdma_reqs = i2c1_sdma_reqs,
  1681. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  1682. .main_clk = "i2c1_fck",
  1683. .prcm = {
  1684. .omap2 = {
  1685. .module_offs = CORE_MOD,
  1686. .prcm_reg_id = 1,
  1687. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  1688. .idlest_reg_id = 1,
  1689. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  1690. },
  1691. },
  1692. .slaves = omap3xxx_i2c1_slaves,
  1693. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  1694. .class = &i2c_class,
  1695. .dev_attr = &i2c1_dev_attr,
  1696. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1697. };
  1698. /* I2C2 */
  1699. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  1700. .fifo_depth = 8, /* bytes */
  1701. };
  1702. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1703. { .irq = INT_24XX_I2C2_IRQ, },
  1704. };
  1705. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1706. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1707. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1708. };
  1709. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  1710. &omap3_l4_core__i2c2,
  1711. };
  1712. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  1713. .name = "i2c2",
  1714. .mpu_irqs = i2c2_mpu_irqs,
  1715. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  1716. .sdma_reqs = i2c2_sdma_reqs,
  1717. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  1718. .main_clk = "i2c2_fck",
  1719. .prcm = {
  1720. .omap2 = {
  1721. .module_offs = CORE_MOD,
  1722. .prcm_reg_id = 1,
  1723. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  1724. .idlest_reg_id = 1,
  1725. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  1726. },
  1727. },
  1728. .slaves = omap3xxx_i2c2_slaves,
  1729. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  1730. .class = &i2c_class,
  1731. .dev_attr = &i2c2_dev_attr,
  1732. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1733. };
  1734. /* I2C3 */
  1735. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  1736. .fifo_depth = 64, /* bytes */
  1737. };
  1738. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1739. { .irq = INT_34XX_I2C3_IRQ, },
  1740. };
  1741. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  1742. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  1743. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  1744. };
  1745. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  1746. &omap3_l4_core__i2c3,
  1747. };
  1748. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  1749. .name = "i2c3",
  1750. .mpu_irqs = i2c3_mpu_irqs,
  1751. .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs),
  1752. .sdma_reqs = i2c3_sdma_reqs,
  1753. .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
  1754. .main_clk = "i2c3_fck",
  1755. .prcm = {
  1756. .omap2 = {
  1757. .module_offs = CORE_MOD,
  1758. .prcm_reg_id = 1,
  1759. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  1760. .idlest_reg_id = 1,
  1761. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  1762. },
  1763. },
  1764. .slaves = omap3xxx_i2c3_slaves,
  1765. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  1766. .class = &i2c_class,
  1767. .dev_attr = &i2c3_dev_attr,
  1768. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1769. };
  1770. /* l4_wkup -> gpio1 */
  1771. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  1772. {
  1773. .pa_start = 0x48310000,
  1774. .pa_end = 0x483101ff,
  1775. .flags = ADDR_TYPE_RT
  1776. },
  1777. };
  1778. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  1779. .master = &omap3xxx_l4_wkup_hwmod,
  1780. .slave = &omap3xxx_gpio1_hwmod,
  1781. .addr = omap3xxx_gpio1_addrs,
  1782. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
  1783. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1784. };
  1785. /* l4_per -> gpio2 */
  1786. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  1787. {
  1788. .pa_start = 0x49050000,
  1789. .pa_end = 0x490501ff,
  1790. .flags = ADDR_TYPE_RT
  1791. },
  1792. };
  1793. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  1794. .master = &omap3xxx_l4_per_hwmod,
  1795. .slave = &omap3xxx_gpio2_hwmod,
  1796. .addr = omap3xxx_gpio2_addrs,
  1797. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
  1798. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1799. };
  1800. /* l4_per -> gpio3 */
  1801. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  1802. {
  1803. .pa_start = 0x49052000,
  1804. .pa_end = 0x490521ff,
  1805. .flags = ADDR_TYPE_RT
  1806. },
  1807. };
  1808. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  1809. .master = &omap3xxx_l4_per_hwmod,
  1810. .slave = &omap3xxx_gpio3_hwmod,
  1811. .addr = omap3xxx_gpio3_addrs,
  1812. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
  1813. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1814. };
  1815. /* l4_per -> gpio4 */
  1816. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  1817. {
  1818. .pa_start = 0x49054000,
  1819. .pa_end = 0x490541ff,
  1820. .flags = ADDR_TYPE_RT
  1821. },
  1822. };
  1823. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  1824. .master = &omap3xxx_l4_per_hwmod,
  1825. .slave = &omap3xxx_gpio4_hwmod,
  1826. .addr = omap3xxx_gpio4_addrs,
  1827. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
  1828. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1829. };
  1830. /* l4_per -> gpio5 */
  1831. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  1832. {
  1833. .pa_start = 0x49056000,
  1834. .pa_end = 0x490561ff,
  1835. .flags = ADDR_TYPE_RT
  1836. },
  1837. };
  1838. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  1839. .master = &omap3xxx_l4_per_hwmod,
  1840. .slave = &omap3xxx_gpio5_hwmod,
  1841. .addr = omap3xxx_gpio5_addrs,
  1842. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
  1843. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1844. };
  1845. /* l4_per -> gpio6 */
  1846. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  1847. {
  1848. .pa_start = 0x49058000,
  1849. .pa_end = 0x490581ff,
  1850. .flags = ADDR_TYPE_RT
  1851. },
  1852. };
  1853. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  1854. .master = &omap3xxx_l4_per_hwmod,
  1855. .slave = &omap3xxx_gpio6_hwmod,
  1856. .addr = omap3xxx_gpio6_addrs,
  1857. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
  1858. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1859. };
  1860. /*
  1861. * 'gpio' class
  1862. * general purpose io module
  1863. */
  1864. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  1865. .rev_offs = 0x0000,
  1866. .sysc_offs = 0x0010,
  1867. .syss_offs = 0x0014,
  1868. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1869. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1870. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1871. .sysc_fields = &omap_hwmod_sysc_type1,
  1872. };
  1873. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  1874. .name = "gpio",
  1875. .sysc = &omap3xxx_gpio_sysc,
  1876. .rev = 1,
  1877. };
  1878. /* gpio_dev_attr*/
  1879. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1880. .bank_width = 32,
  1881. .dbck_flag = true,
  1882. };
  1883. /* gpio1 */
  1884. static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
  1885. { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
  1886. };
  1887. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  1888. { .role = "dbclk", .clk = "gpio1_dbck", },
  1889. };
  1890. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  1891. &omap3xxx_l4_wkup__gpio1,
  1892. };
  1893. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  1894. .name = "gpio1",
  1895. .mpu_irqs = omap3xxx_gpio1_irqs,
  1896. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
  1897. .main_clk = "gpio1_ick",
  1898. .opt_clks = gpio1_opt_clks,
  1899. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1900. .prcm = {
  1901. .omap2 = {
  1902. .prcm_reg_id = 1,
  1903. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  1904. .module_offs = WKUP_MOD,
  1905. .idlest_reg_id = 1,
  1906. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  1907. },
  1908. },
  1909. .slaves = omap3xxx_gpio1_slaves,
  1910. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  1911. .class = &omap3xxx_gpio_hwmod_class,
  1912. .dev_attr = &gpio_dev_attr,
  1913. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1914. };
  1915. /* gpio2 */
  1916. static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
  1917. { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
  1918. };
  1919. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1920. { .role = "dbclk", .clk = "gpio2_dbck", },
  1921. };
  1922. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  1923. &omap3xxx_l4_per__gpio2,
  1924. };
  1925. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  1926. .name = "gpio2",
  1927. .mpu_irqs = omap3xxx_gpio2_irqs,
  1928. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
  1929. .main_clk = "gpio2_ick",
  1930. .opt_clks = gpio2_opt_clks,
  1931. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1932. .prcm = {
  1933. .omap2 = {
  1934. .prcm_reg_id = 1,
  1935. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  1936. .module_offs = OMAP3430_PER_MOD,
  1937. .idlest_reg_id = 1,
  1938. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  1939. },
  1940. },
  1941. .slaves = omap3xxx_gpio2_slaves,
  1942. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  1943. .class = &omap3xxx_gpio_hwmod_class,
  1944. .dev_attr = &gpio_dev_attr,
  1945. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1946. };
  1947. /* gpio3 */
  1948. static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
  1949. { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
  1950. };
  1951. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1952. { .role = "dbclk", .clk = "gpio3_dbck", },
  1953. };
  1954. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  1955. &omap3xxx_l4_per__gpio3,
  1956. };
  1957. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  1958. .name = "gpio3",
  1959. .mpu_irqs = omap3xxx_gpio3_irqs,
  1960. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
  1961. .main_clk = "gpio3_ick",
  1962. .opt_clks = gpio3_opt_clks,
  1963. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1964. .prcm = {
  1965. .omap2 = {
  1966. .prcm_reg_id = 1,
  1967. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  1968. .module_offs = OMAP3430_PER_MOD,
  1969. .idlest_reg_id = 1,
  1970. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  1971. },
  1972. },
  1973. .slaves = omap3xxx_gpio3_slaves,
  1974. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  1975. .class = &omap3xxx_gpio_hwmod_class,
  1976. .dev_attr = &gpio_dev_attr,
  1977. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1978. };
  1979. /* gpio4 */
  1980. static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
  1981. { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
  1982. };
  1983. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1984. { .role = "dbclk", .clk = "gpio4_dbck", },
  1985. };
  1986. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  1987. &omap3xxx_l4_per__gpio4,
  1988. };
  1989. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  1990. .name = "gpio4",
  1991. .mpu_irqs = omap3xxx_gpio4_irqs,
  1992. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
  1993. .main_clk = "gpio4_ick",
  1994. .opt_clks = gpio4_opt_clks,
  1995. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  1996. .prcm = {
  1997. .omap2 = {
  1998. .prcm_reg_id = 1,
  1999. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  2000. .module_offs = OMAP3430_PER_MOD,
  2001. .idlest_reg_id = 1,
  2002. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  2003. },
  2004. },
  2005. .slaves = omap3xxx_gpio4_slaves,
  2006. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  2007. .class = &omap3xxx_gpio_hwmod_class,
  2008. .dev_attr = &gpio_dev_attr,
  2009. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2010. };
  2011. /* gpio5 */
  2012. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  2013. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  2014. };
  2015. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  2016. { .role = "dbclk", .clk = "gpio5_dbck", },
  2017. };
  2018. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  2019. &omap3xxx_l4_per__gpio5,
  2020. };
  2021. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  2022. .name = "gpio5",
  2023. .mpu_irqs = omap3xxx_gpio5_irqs,
  2024. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
  2025. .main_clk = "gpio5_ick",
  2026. .opt_clks = gpio5_opt_clks,
  2027. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  2028. .prcm = {
  2029. .omap2 = {
  2030. .prcm_reg_id = 1,
  2031. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  2032. .module_offs = OMAP3430_PER_MOD,
  2033. .idlest_reg_id = 1,
  2034. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  2035. },
  2036. },
  2037. .slaves = omap3xxx_gpio5_slaves,
  2038. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  2039. .class = &omap3xxx_gpio_hwmod_class,
  2040. .dev_attr = &gpio_dev_attr,
  2041. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2042. };
  2043. /* gpio6 */
  2044. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  2045. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  2046. };
  2047. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  2048. { .role = "dbclk", .clk = "gpio6_dbck", },
  2049. };
  2050. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  2051. &omap3xxx_l4_per__gpio6,
  2052. };
  2053. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  2054. .name = "gpio6",
  2055. .mpu_irqs = omap3xxx_gpio6_irqs,
  2056. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
  2057. .main_clk = "gpio6_ick",
  2058. .opt_clks = gpio6_opt_clks,
  2059. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  2060. .prcm = {
  2061. .omap2 = {
  2062. .prcm_reg_id = 1,
  2063. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  2064. .module_offs = OMAP3430_PER_MOD,
  2065. .idlest_reg_id = 1,
  2066. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  2067. },
  2068. },
  2069. .slaves = omap3xxx_gpio6_slaves,
  2070. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  2071. .class = &omap3xxx_gpio_hwmod_class,
  2072. .dev_attr = &gpio_dev_attr,
  2073. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2074. };
  2075. /* dma_system -> L3 */
  2076. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  2077. .master = &omap3xxx_dma_system_hwmod,
  2078. .slave = &omap3xxx_l3_main_hwmod,
  2079. .clk = "core_l3_ick",
  2080. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2081. };
  2082. /* dma attributes */
  2083. static struct omap_dma_dev_attr dma_dev_attr = {
  2084. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  2085. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  2086. .lch_count = 32,
  2087. };
  2088. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  2089. .rev_offs = 0x0000,
  2090. .sysc_offs = 0x002c,
  2091. .syss_offs = 0x0028,
  2092. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  2093. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  2094. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  2095. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2096. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2097. .sysc_fields = &omap_hwmod_sysc_type1,
  2098. };
  2099. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  2100. .name = "dma",
  2101. .sysc = &omap3xxx_dma_sysc,
  2102. };
  2103. /* dma_system */
  2104. static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
  2105. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  2106. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  2107. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  2108. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  2109. };
  2110. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  2111. {
  2112. .pa_start = 0x48056000,
  2113. .pa_end = 0x4a0560ff,
  2114. .flags = ADDR_TYPE_RT
  2115. },
  2116. };
  2117. /* dma_system master ports */
  2118. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  2119. &omap3xxx_dma_system__l3,
  2120. };
  2121. /* l4_cfg -> dma_system */
  2122. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  2123. .master = &omap3xxx_l4_core_hwmod,
  2124. .slave = &omap3xxx_dma_system_hwmod,
  2125. .clk = "core_l4_ick",
  2126. .addr = omap3xxx_dma_system_addrs,
  2127. .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
  2128. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2129. };
  2130. /* dma_system slave ports */
  2131. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  2132. &omap3xxx_l4_core__dma_system,
  2133. };
  2134. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  2135. .name = "dma",
  2136. .class = &omap3xxx_dma_hwmod_class,
  2137. .mpu_irqs = omap3xxx_dma_system_irqs,
  2138. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
  2139. .main_clk = "core_l3_ick",
  2140. .prcm = {
  2141. .omap2 = {
  2142. .module_offs = CORE_MOD,
  2143. .prcm_reg_id = 1,
  2144. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  2145. .idlest_reg_id = 1,
  2146. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  2147. },
  2148. },
  2149. .slaves = omap3xxx_dma_system_slaves,
  2150. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  2151. .masters = omap3xxx_dma_system_masters,
  2152. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  2153. .dev_attr = &dma_dev_attr,
  2154. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2155. .flags = HWMOD_NO_IDLEST,
  2156. };
  2157. /* SR common */
  2158. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  2159. .clkact_shift = 20,
  2160. };
  2161. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  2162. .sysc_offs = 0x24,
  2163. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  2164. .clockact = CLOCKACT_TEST_ICLK,
  2165. .sysc_fields = &omap34xx_sr_sysc_fields,
  2166. };
  2167. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  2168. .name = "smartreflex",
  2169. .sysc = &omap34xx_sr_sysc,
  2170. .rev = 1,
  2171. };
  2172. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  2173. .sidle_shift = 24,
  2174. .enwkup_shift = 26
  2175. };
  2176. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  2177. .sysc_offs = 0x38,
  2178. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2179. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  2180. SYSC_NO_CACHE),
  2181. .sysc_fields = &omap36xx_sr_sysc_fields,
  2182. };
  2183. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  2184. .name = "smartreflex",
  2185. .sysc = &omap36xx_sr_sysc,
  2186. .rev = 2,
  2187. };
  2188. /* SR1 */
  2189. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  2190. &omap3_l4_core__sr1,
  2191. };
  2192. static struct omap_hwmod omap34xx_sr1_hwmod = {
  2193. .name = "sr1_hwmod",
  2194. .class = &omap34xx_smartreflex_hwmod_class,
  2195. .main_clk = "sr1_fck",
  2196. .vdd_name = "mpu",
  2197. .prcm = {
  2198. .omap2 = {
  2199. .prcm_reg_id = 1,
  2200. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2201. .module_offs = WKUP_MOD,
  2202. .idlest_reg_id = 1,
  2203. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2204. },
  2205. },
  2206. .slaves = omap3_sr1_slaves,
  2207. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2208. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  2209. CHIP_IS_OMAP3430ES3_0 |
  2210. CHIP_IS_OMAP3430ES3_1),
  2211. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2212. };
  2213. static struct omap_hwmod omap36xx_sr1_hwmod = {
  2214. .name = "sr1_hwmod",
  2215. .class = &omap36xx_smartreflex_hwmod_class,
  2216. .main_clk = "sr1_fck",
  2217. .vdd_name = "mpu",
  2218. .prcm = {
  2219. .omap2 = {
  2220. .prcm_reg_id = 1,
  2221. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2222. .module_offs = WKUP_MOD,
  2223. .idlest_reg_id = 1,
  2224. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2225. },
  2226. },
  2227. .slaves = omap3_sr1_slaves,
  2228. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2229. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  2230. };
  2231. /* SR2 */
  2232. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  2233. &omap3_l4_core__sr2,
  2234. };
  2235. static struct omap_hwmod omap34xx_sr2_hwmod = {
  2236. .name = "sr2_hwmod",
  2237. .class = &omap34xx_smartreflex_hwmod_class,
  2238. .main_clk = "sr2_fck",
  2239. .vdd_name = "core",
  2240. .prcm = {
  2241. .omap2 = {
  2242. .prcm_reg_id = 1,
  2243. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2244. .module_offs = WKUP_MOD,
  2245. .idlest_reg_id = 1,
  2246. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2247. },
  2248. },
  2249. .slaves = omap3_sr2_slaves,
  2250. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2251. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  2252. CHIP_IS_OMAP3430ES3_0 |
  2253. CHIP_IS_OMAP3430ES3_1),
  2254. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2255. };
  2256. static struct omap_hwmod omap36xx_sr2_hwmod = {
  2257. .name = "sr2_hwmod",
  2258. .class = &omap36xx_smartreflex_hwmod_class,
  2259. .main_clk = "sr2_fck",
  2260. .vdd_name = "core",
  2261. .prcm = {
  2262. .omap2 = {
  2263. .prcm_reg_id = 1,
  2264. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2265. .module_offs = WKUP_MOD,
  2266. .idlest_reg_id = 1,
  2267. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2268. },
  2269. },
  2270. .slaves = omap3_sr2_slaves,
  2271. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2272. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  2273. };
  2274. /* l4 core -> mcspi1 interface */
  2275. static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
  2276. {
  2277. .pa_start = 0x48098000,
  2278. .pa_end = 0x480980ff,
  2279. .flags = ADDR_TYPE_RT,
  2280. },
  2281. };
  2282. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2283. .master = &omap3xxx_l4_core_hwmod,
  2284. .slave = &omap34xx_mcspi1,
  2285. .clk = "mcspi1_ick",
  2286. .addr = omap34xx_mcspi1_addr_space,
  2287. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
  2288. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2289. };
  2290. /* l4 core -> mcspi2 interface */
  2291. static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
  2292. {
  2293. .pa_start = 0x4809a000,
  2294. .pa_end = 0x4809a0ff,
  2295. .flags = ADDR_TYPE_RT,
  2296. },
  2297. };
  2298. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2299. .master = &omap3xxx_l4_core_hwmod,
  2300. .slave = &omap34xx_mcspi2,
  2301. .clk = "mcspi2_ick",
  2302. .addr = omap34xx_mcspi2_addr_space,
  2303. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
  2304. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2305. };
  2306. /* l4 core -> mcspi3 interface */
  2307. static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
  2308. {
  2309. .pa_start = 0x480b8000,
  2310. .pa_end = 0x480b80ff,
  2311. .flags = ADDR_TYPE_RT,
  2312. },
  2313. };
  2314. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2315. .master = &omap3xxx_l4_core_hwmod,
  2316. .slave = &omap34xx_mcspi3,
  2317. .clk = "mcspi3_ick",
  2318. .addr = omap34xx_mcspi3_addr_space,
  2319. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
  2320. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2321. };
  2322. /* l4 core -> mcspi4 interface */
  2323. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2324. {
  2325. .pa_start = 0x480ba000,
  2326. .pa_end = 0x480ba0ff,
  2327. .flags = ADDR_TYPE_RT,
  2328. },
  2329. };
  2330. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2331. .master = &omap3xxx_l4_core_hwmod,
  2332. .slave = &omap34xx_mcspi4,
  2333. .clk = "mcspi4_ick",
  2334. .addr = omap34xx_mcspi4_addr_space,
  2335. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
  2336. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2337. };
  2338. /*
  2339. * 'mcspi' class
  2340. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  2341. * bus
  2342. */
  2343. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  2344. .rev_offs = 0x0000,
  2345. .sysc_offs = 0x0010,
  2346. .syss_offs = 0x0014,
  2347. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2348. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2349. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2350. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2351. .sysc_fields = &omap_hwmod_sysc_type1,
  2352. };
  2353. static struct omap_hwmod_class omap34xx_mcspi_class = {
  2354. .name = "mcspi",
  2355. .sysc = &omap34xx_mcspi_sysc,
  2356. .rev = OMAP3_MCSPI_REV,
  2357. };
  2358. /* mcspi1 */
  2359. static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
  2360. { .name = "irq", .irq = 65 },
  2361. };
  2362. static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
  2363. { .name = "tx0", .dma_req = 35 },
  2364. { .name = "rx0", .dma_req = 36 },
  2365. { .name = "tx1", .dma_req = 37 },
  2366. { .name = "rx1", .dma_req = 38 },
  2367. { .name = "tx2", .dma_req = 39 },
  2368. { .name = "rx2", .dma_req = 40 },
  2369. { .name = "tx3", .dma_req = 41 },
  2370. { .name = "rx3", .dma_req = 42 },
  2371. };
  2372. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  2373. &omap34xx_l4_core__mcspi1,
  2374. };
  2375. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  2376. .num_chipselect = 4,
  2377. };
  2378. static struct omap_hwmod omap34xx_mcspi1 = {
  2379. .name = "mcspi1",
  2380. .mpu_irqs = omap34xx_mcspi1_mpu_irqs,
  2381. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs),
  2382. .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
  2383. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
  2384. .main_clk = "mcspi1_fck",
  2385. .prcm = {
  2386. .omap2 = {
  2387. .module_offs = CORE_MOD,
  2388. .prcm_reg_id = 1,
  2389. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  2390. .idlest_reg_id = 1,
  2391. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  2392. },
  2393. },
  2394. .slaves = omap34xx_mcspi1_slaves,
  2395. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  2396. .class = &omap34xx_mcspi_class,
  2397. .dev_attr = &omap_mcspi1_dev_attr,
  2398. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2399. };
  2400. /* mcspi2 */
  2401. static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
  2402. { .name = "irq", .irq = 66 },
  2403. };
  2404. static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
  2405. { .name = "tx0", .dma_req = 43 },
  2406. { .name = "rx0", .dma_req = 44 },
  2407. { .name = "tx1", .dma_req = 45 },
  2408. { .name = "rx1", .dma_req = 46 },
  2409. };
  2410. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  2411. &omap34xx_l4_core__mcspi2,
  2412. };
  2413. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  2414. .num_chipselect = 2,
  2415. };
  2416. static struct omap_hwmod omap34xx_mcspi2 = {
  2417. .name = "mcspi2",
  2418. .mpu_irqs = omap34xx_mcspi2_mpu_irqs,
  2419. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs),
  2420. .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
  2421. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
  2422. .main_clk = "mcspi2_fck",
  2423. .prcm = {
  2424. .omap2 = {
  2425. .module_offs = CORE_MOD,
  2426. .prcm_reg_id = 1,
  2427. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  2428. .idlest_reg_id = 1,
  2429. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  2430. },
  2431. },
  2432. .slaves = omap34xx_mcspi2_slaves,
  2433. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  2434. .class = &omap34xx_mcspi_class,
  2435. .dev_attr = &omap_mcspi2_dev_attr,
  2436. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2437. };
  2438. /* mcspi3 */
  2439. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  2440. { .name = "irq", .irq = 91 }, /* 91 */
  2441. };
  2442. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  2443. { .name = "tx0", .dma_req = 15 },
  2444. { .name = "rx0", .dma_req = 16 },
  2445. { .name = "tx1", .dma_req = 23 },
  2446. { .name = "rx1", .dma_req = 24 },
  2447. };
  2448. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  2449. &omap34xx_l4_core__mcspi3,
  2450. };
  2451. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  2452. .num_chipselect = 2,
  2453. };
  2454. static struct omap_hwmod omap34xx_mcspi3 = {
  2455. .name = "mcspi3",
  2456. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  2457. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
  2458. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  2459. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
  2460. .main_clk = "mcspi3_fck",
  2461. .prcm = {
  2462. .omap2 = {
  2463. .module_offs = CORE_MOD,
  2464. .prcm_reg_id = 1,
  2465. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  2466. .idlest_reg_id = 1,
  2467. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  2468. },
  2469. },
  2470. .slaves = omap34xx_mcspi3_slaves,
  2471. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  2472. .class = &omap34xx_mcspi_class,
  2473. .dev_attr = &omap_mcspi3_dev_attr,
  2474. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2475. };
  2476. /* SPI4 */
  2477. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  2478. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  2479. };
  2480. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  2481. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  2482. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  2483. };
  2484. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  2485. &omap34xx_l4_core__mcspi4,
  2486. };
  2487. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  2488. .num_chipselect = 1,
  2489. };
  2490. static struct omap_hwmod omap34xx_mcspi4 = {
  2491. .name = "mcspi4",
  2492. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  2493. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
  2494. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  2495. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
  2496. .main_clk = "mcspi4_fck",
  2497. .prcm = {
  2498. .omap2 = {
  2499. .module_offs = CORE_MOD,
  2500. .prcm_reg_id = 1,
  2501. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  2502. .idlest_reg_id = 1,
  2503. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  2504. },
  2505. },
  2506. .slaves = omap34xx_mcspi4_slaves,
  2507. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  2508. .class = &omap34xx_mcspi_class,
  2509. .dev_attr = &omap_mcspi4_dev_attr,
  2510. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2511. };
  2512. /*
  2513. * usbhsotg
  2514. */
  2515. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  2516. .rev_offs = 0x0400,
  2517. .sysc_offs = 0x0404,
  2518. .syss_offs = 0x0408,
  2519. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  2520. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2521. SYSC_HAS_AUTOIDLE),
  2522. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2523. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2524. .sysc_fields = &omap_hwmod_sysc_type1,
  2525. };
  2526. static struct omap_hwmod_class usbotg_class = {
  2527. .name = "usbotg",
  2528. .sysc = &omap3xxx_usbhsotg_sysc,
  2529. };
  2530. /* usb_otg_hs */
  2531. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  2532. { .name = "mc", .irq = 92 },
  2533. { .name = "dma", .irq = 93 },
  2534. };
  2535. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  2536. .name = "usb_otg_hs",
  2537. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  2538. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
  2539. .main_clk = "hsotgusb_ick",
  2540. .prcm = {
  2541. .omap2 = {
  2542. .prcm_reg_id = 1,
  2543. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  2544. .module_offs = CORE_MOD,
  2545. .idlest_reg_id = 1,
  2546. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  2547. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  2548. },
  2549. },
  2550. .masters = omap3xxx_usbhsotg_masters,
  2551. .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
  2552. .slaves = omap3xxx_usbhsotg_slaves,
  2553. .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
  2554. .class = &usbotg_class,
  2555. /*
  2556. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  2557. * broken when autoidle is enabled
  2558. * workaround is to disable the autoidle bit at module level.
  2559. */
  2560. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  2561. | HWMOD_SWSUP_MSTANDBY,
  2562. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  2563. };
  2564. /* usb_otg_hs */
  2565. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  2566. { .name = "mc", .irq = 71 },
  2567. };
  2568. static struct omap_hwmod_class am35xx_usbotg_class = {
  2569. .name = "am35xx_usbotg",
  2570. .sysc = NULL,
  2571. };
  2572. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  2573. .name = "am35x_otg_hs",
  2574. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  2575. .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs),
  2576. .main_clk = NULL,
  2577. .prcm = {
  2578. .omap2 = {
  2579. },
  2580. },
  2581. .masters = am35xx_usbhsotg_masters,
  2582. .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
  2583. .slaves = am35xx_usbhsotg_slaves,
  2584. .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
  2585. .class = &am35xx_usbotg_class,
  2586. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
  2587. };
  2588. /* MMC/SD/SDIO common */
  2589. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  2590. .rev_offs = 0x1fc,
  2591. .sysc_offs = 0x10,
  2592. .syss_offs = 0x14,
  2593. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2594. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2595. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2596. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2597. .sysc_fields = &omap_hwmod_sysc_type1,
  2598. };
  2599. static struct omap_hwmod_class omap34xx_mmc_class = {
  2600. .name = "mmc",
  2601. .sysc = &omap34xx_mmc_sysc,
  2602. };
  2603. /* MMC/SD/SDIO1 */
  2604. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  2605. { .irq = 83, },
  2606. };
  2607. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  2608. { .name = "tx", .dma_req = 61, },
  2609. { .name = "rx", .dma_req = 62, },
  2610. };
  2611. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  2612. { .role = "dbck", .clk = "omap_32k_fck", },
  2613. };
  2614. static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
  2615. &omap3xxx_l4_core__mmc1,
  2616. };
  2617. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  2618. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  2619. };
  2620. static struct omap_hwmod omap3xxx_mmc1_hwmod = {
  2621. .name = "mmc1",
  2622. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  2623. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs),
  2624. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  2625. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs),
  2626. .opt_clks = omap34xx_mmc1_opt_clks,
  2627. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  2628. .main_clk = "mmchs1_fck",
  2629. .prcm = {
  2630. .omap2 = {
  2631. .module_offs = CORE_MOD,
  2632. .prcm_reg_id = 1,
  2633. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  2634. .idlest_reg_id = 1,
  2635. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  2636. },
  2637. },
  2638. .dev_attr = &mmc1_dev_attr,
  2639. .slaves = omap3xxx_mmc1_slaves,
  2640. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
  2641. .class = &omap34xx_mmc_class,
  2642. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2643. };
  2644. /* MMC/SD/SDIO2 */
  2645. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  2646. { .irq = INT_24XX_MMC2_IRQ, },
  2647. };
  2648. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  2649. { .name = "tx", .dma_req = 47, },
  2650. { .name = "rx", .dma_req = 48, },
  2651. };
  2652. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  2653. { .role = "dbck", .clk = "omap_32k_fck", },
  2654. };
  2655. static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
  2656. &omap3xxx_l4_core__mmc2,
  2657. };
  2658. static struct omap_hwmod omap3xxx_mmc2_hwmod = {
  2659. .name = "mmc2",
  2660. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  2661. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs),
  2662. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  2663. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs),
  2664. .opt_clks = omap34xx_mmc2_opt_clks,
  2665. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  2666. .main_clk = "mmchs2_fck",
  2667. .prcm = {
  2668. .omap2 = {
  2669. .module_offs = CORE_MOD,
  2670. .prcm_reg_id = 1,
  2671. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  2672. .idlest_reg_id = 1,
  2673. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  2674. },
  2675. },
  2676. .slaves = omap3xxx_mmc2_slaves,
  2677. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
  2678. .class = &omap34xx_mmc_class,
  2679. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2680. };
  2681. /* MMC/SD/SDIO3 */
  2682. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  2683. { .irq = 94, },
  2684. };
  2685. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  2686. { .name = "tx", .dma_req = 77, },
  2687. { .name = "rx", .dma_req = 78, },
  2688. };
  2689. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  2690. { .role = "dbck", .clk = "omap_32k_fck", },
  2691. };
  2692. static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
  2693. &omap3xxx_l4_core__mmc3,
  2694. };
  2695. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  2696. .name = "mmc3",
  2697. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  2698. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs),
  2699. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  2700. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs),
  2701. .opt_clks = omap34xx_mmc3_opt_clks,
  2702. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  2703. .main_clk = "mmchs3_fck",
  2704. .prcm = {
  2705. .omap2 = {
  2706. .prcm_reg_id = 1,
  2707. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  2708. .idlest_reg_id = 1,
  2709. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  2710. },
  2711. },
  2712. .slaves = omap3xxx_mmc3_slaves,
  2713. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
  2714. .class = &omap34xx_mmc_class,
  2715. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2716. };
  2717. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  2718. &omap3xxx_l3_main_hwmod,
  2719. &omap3xxx_l4_core_hwmod,
  2720. &omap3xxx_l4_per_hwmod,
  2721. &omap3xxx_l4_wkup_hwmod,
  2722. &omap3xxx_mmc1_hwmod,
  2723. &omap3xxx_mmc2_hwmod,
  2724. &omap3xxx_mmc3_hwmod,
  2725. &omap3xxx_mpu_hwmod,
  2726. &omap3xxx_iva_hwmod,
  2727. &omap3xxx_timer1_hwmod,
  2728. &omap3xxx_timer2_hwmod,
  2729. &omap3xxx_timer3_hwmod,
  2730. &omap3xxx_timer4_hwmod,
  2731. &omap3xxx_timer5_hwmod,
  2732. &omap3xxx_timer6_hwmod,
  2733. &omap3xxx_timer7_hwmod,
  2734. &omap3xxx_timer8_hwmod,
  2735. &omap3xxx_timer9_hwmod,
  2736. &omap3xxx_timer10_hwmod,
  2737. &omap3xxx_timer11_hwmod,
  2738. &omap3xxx_timer12_hwmod,
  2739. &omap3xxx_wd_timer2_hwmod,
  2740. &omap3xxx_uart1_hwmod,
  2741. &omap3xxx_uart2_hwmod,
  2742. &omap3xxx_uart3_hwmod,
  2743. &omap3xxx_uart4_hwmod,
  2744. /* dss class */
  2745. &omap3430es1_dss_core_hwmod,
  2746. &omap3xxx_dss_core_hwmod,
  2747. &omap3xxx_dss_dispc_hwmod,
  2748. &omap3xxx_dss_dsi1_hwmod,
  2749. &omap3xxx_dss_rfbi_hwmod,
  2750. &omap3xxx_dss_venc_hwmod,
  2751. /* i2c class */
  2752. &omap3xxx_i2c1_hwmod,
  2753. &omap3xxx_i2c2_hwmod,
  2754. &omap3xxx_i2c3_hwmod,
  2755. &omap34xx_sr1_hwmod,
  2756. &omap34xx_sr2_hwmod,
  2757. &omap36xx_sr1_hwmod,
  2758. &omap36xx_sr2_hwmod,
  2759. /* gpio class */
  2760. &omap3xxx_gpio1_hwmod,
  2761. &omap3xxx_gpio2_hwmod,
  2762. &omap3xxx_gpio3_hwmod,
  2763. &omap3xxx_gpio4_hwmod,
  2764. &omap3xxx_gpio5_hwmod,
  2765. &omap3xxx_gpio6_hwmod,
  2766. /* dma_system class*/
  2767. &omap3xxx_dma_system_hwmod,
  2768. /* mcspi class */
  2769. &omap34xx_mcspi1,
  2770. &omap34xx_mcspi2,
  2771. &omap34xx_mcspi3,
  2772. &omap34xx_mcspi4,
  2773. /* usbotg class */
  2774. &omap3xxx_usbhsotg_hwmod,
  2775. /* usbotg for am35x */
  2776. &am35xx_usbhsotg_hwmod,
  2777. NULL,
  2778. };
  2779. int __init omap3xxx_hwmod_init(void)
  2780. {
  2781. return omap_hwmod_register(omap3xxx_hwmods);
  2782. }