omap_hwmod_33xx_data.c 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609
  1. /*
  2. * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
  3. *
  4. * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * This file is automatically generated from the AM33XX hardware databases.
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation version 2.
  10. *
  11. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  12. * kind, whether express or implied; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <linux/i2c-omap.h>
  17. #include "omap_hwmod.h"
  18. #include <linux/platform_data/gpio-omap.h>
  19. #include <linux/platform_data/spi-omap2-mcspi.h>
  20. #include "omap_hwmod_common_data.h"
  21. #include "control.h"
  22. #include "cm33xx.h"
  23. #include "prm33xx.h"
  24. #include "prm-regbits-33xx.h"
  25. #include "i2c.h"
  26. #include "mmc.h"
  27. #include "wd_timer.h"
  28. /*
  29. * IP blocks
  30. */
  31. /*
  32. * 'emif_fw' class
  33. * instance(s): emif_fw
  34. */
  35. static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = {
  36. .name = "emif_fw",
  37. };
  38. /* emif_fw */
  39. static struct omap_hwmod am33xx_emif_fw_hwmod = {
  40. .name = "emif_fw",
  41. .class = &am33xx_emif_fw_hwmod_class,
  42. .clkdm_name = "l4fw_clkdm",
  43. .main_clk = "l4fw_gclk",
  44. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  45. .prcm = {
  46. .omap4 = {
  47. .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET,
  48. .modulemode = MODULEMODE_SWCTRL,
  49. },
  50. },
  51. };
  52. /*
  53. * 'emif' class
  54. * instance(s): emif
  55. */
  56. static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = {
  57. .rev_offs = 0x0000,
  58. };
  59. static struct omap_hwmod_class am33xx_emif_hwmod_class = {
  60. .name = "emif",
  61. .sysc = &am33xx_emif_sysc,
  62. };
  63. static struct omap_hwmod_irq_info am33xx_emif_irqs[] = {
  64. { .name = "ddrerr0", .irq = 101 + OMAP_INTC_START, },
  65. { .irq = -1 },
  66. };
  67. /* emif */
  68. static struct omap_hwmod am33xx_emif_hwmod = {
  69. .name = "emif",
  70. .class = &am33xx_emif_hwmod_class,
  71. .clkdm_name = "l3_clkdm",
  72. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  73. .mpu_irqs = am33xx_emif_irqs,
  74. .main_clk = "dpll_ddr_m2_div2_ck",
  75. .prcm = {
  76. .omap4 = {
  77. .clkctrl_offs = AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
  78. .modulemode = MODULEMODE_SWCTRL,
  79. },
  80. },
  81. };
  82. /*
  83. * 'l3' class
  84. * instance(s): l3_main, l3_s, l3_instr
  85. */
  86. static struct omap_hwmod_class am33xx_l3_hwmod_class = {
  87. .name = "l3",
  88. };
  89. /* l3_main (l3_fast) */
  90. static struct omap_hwmod_irq_info am33xx_l3_main_irqs[] = {
  91. { .name = "l3debug", .irq = 9 + OMAP_INTC_START, },
  92. { .name = "l3appint", .irq = 10 + OMAP_INTC_START, },
  93. { .irq = -1 },
  94. };
  95. static struct omap_hwmod am33xx_l3_main_hwmod = {
  96. .name = "l3_main",
  97. .class = &am33xx_l3_hwmod_class,
  98. .clkdm_name = "l3_clkdm",
  99. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  100. .mpu_irqs = am33xx_l3_main_irqs,
  101. .main_clk = "l3_gclk",
  102. .prcm = {
  103. .omap4 = {
  104. .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET,
  105. .modulemode = MODULEMODE_SWCTRL,
  106. },
  107. },
  108. };
  109. /* l3_s */
  110. static struct omap_hwmod am33xx_l3_s_hwmod = {
  111. .name = "l3_s",
  112. .class = &am33xx_l3_hwmod_class,
  113. .clkdm_name = "l3s_clkdm",
  114. };
  115. /* l3_instr */
  116. static struct omap_hwmod am33xx_l3_instr_hwmod = {
  117. .name = "l3_instr",
  118. .class = &am33xx_l3_hwmod_class,
  119. .clkdm_name = "l3_clkdm",
  120. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  121. .main_clk = "l3_gclk",
  122. .prcm = {
  123. .omap4 = {
  124. .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET,
  125. .modulemode = MODULEMODE_SWCTRL,
  126. },
  127. },
  128. };
  129. /*
  130. * 'l4' class
  131. * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
  132. */
  133. static struct omap_hwmod_class am33xx_l4_hwmod_class = {
  134. .name = "l4",
  135. };
  136. /* l4_ls */
  137. static struct omap_hwmod am33xx_l4_ls_hwmod = {
  138. .name = "l4_ls",
  139. .class = &am33xx_l4_hwmod_class,
  140. .clkdm_name = "l4ls_clkdm",
  141. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  142. .main_clk = "l4ls_gclk",
  143. .prcm = {
  144. .omap4 = {
  145. .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET,
  146. .modulemode = MODULEMODE_SWCTRL,
  147. },
  148. },
  149. };
  150. /* l4_hs */
  151. static struct omap_hwmod am33xx_l4_hs_hwmod = {
  152. .name = "l4_hs",
  153. .class = &am33xx_l4_hwmod_class,
  154. .clkdm_name = "l4hs_clkdm",
  155. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  156. .main_clk = "l4hs_gclk",
  157. .prcm = {
  158. .omap4 = {
  159. .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET,
  160. .modulemode = MODULEMODE_SWCTRL,
  161. },
  162. },
  163. };
  164. /* l4_wkup */
  165. static struct omap_hwmod am33xx_l4_wkup_hwmod = {
  166. .name = "l4_wkup",
  167. .class = &am33xx_l4_hwmod_class,
  168. .clkdm_name = "l4_wkup_clkdm",
  169. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  170. .prcm = {
  171. .omap4 = {
  172. .clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
  173. .modulemode = MODULEMODE_SWCTRL,
  174. },
  175. },
  176. };
  177. /* l4_fw */
  178. static struct omap_hwmod am33xx_l4_fw_hwmod = {
  179. .name = "l4_fw",
  180. .class = &am33xx_l4_hwmod_class,
  181. .clkdm_name = "l4fw_clkdm",
  182. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  183. .prcm = {
  184. .omap4 = {
  185. .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET,
  186. .modulemode = MODULEMODE_SWCTRL,
  187. },
  188. },
  189. };
  190. /*
  191. * 'mpu' class
  192. */
  193. static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
  194. .name = "mpu",
  195. };
  196. /* mpu */
  197. static struct omap_hwmod_irq_info am33xx_mpu_irqs[] = {
  198. { .name = "emuint", .irq = 0 + OMAP_INTC_START, },
  199. { .name = "commtx", .irq = 1 + OMAP_INTC_START, },
  200. { .name = "commrx", .irq = 2 + OMAP_INTC_START, },
  201. { .name = "bench", .irq = 3 + OMAP_INTC_START, },
  202. { .irq = -1 },
  203. };
  204. static struct omap_hwmod am33xx_mpu_hwmod = {
  205. .name = "mpu",
  206. .class = &am33xx_mpu_hwmod_class,
  207. .clkdm_name = "mpu_clkdm",
  208. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  209. .mpu_irqs = am33xx_mpu_irqs,
  210. .main_clk = "dpll_mpu_m2_ck",
  211. .prcm = {
  212. .omap4 = {
  213. .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  214. .modulemode = MODULEMODE_SWCTRL,
  215. },
  216. },
  217. };
  218. /*
  219. * 'wakeup m3' class
  220. * Wakeup controller sub-system under wakeup domain
  221. */
  222. static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
  223. .name = "wkup_m3",
  224. };
  225. static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
  226. { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
  227. };
  228. static struct omap_hwmod_irq_info am33xx_wkup_m3_irqs[] = {
  229. { .name = "txev", .irq = 78 + OMAP_INTC_START, },
  230. { .irq = -1 },
  231. };
  232. /* wkup_m3 */
  233. static struct omap_hwmod am33xx_wkup_m3_hwmod = {
  234. .name = "wkup_m3",
  235. .class = &am33xx_wkup_m3_hwmod_class,
  236. .clkdm_name = "l4_wkup_aon_clkdm",
  237. /* Keep hardreset asserted */
  238. .flags = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST,
  239. .mpu_irqs = am33xx_wkup_m3_irqs,
  240. .main_clk = "dpll_core_m4_div2_ck",
  241. .prcm = {
  242. .omap4 = {
  243. .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
  244. .rstctrl_offs = AM33XX_RM_WKUP_RSTCTRL_OFFSET,
  245. .rstst_offs = AM33XX_RM_WKUP_RSTST_OFFSET,
  246. .modulemode = MODULEMODE_SWCTRL,
  247. },
  248. },
  249. .rst_lines = am33xx_wkup_m3_resets,
  250. .rst_lines_cnt = ARRAY_SIZE(am33xx_wkup_m3_resets),
  251. };
  252. /*
  253. * 'pru-icss' class
  254. * Programmable Real-Time Unit and Industrial Communication Subsystem
  255. */
  256. static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
  257. .name = "pruss",
  258. };
  259. static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
  260. { .name = "pruss", .rst_shift = 1 },
  261. };
  262. static struct omap_hwmod_irq_info am33xx_pruss_irqs[] = {
  263. { .name = "evtout0", .irq = 20 + OMAP_INTC_START, },
  264. { .name = "evtout1", .irq = 21 + OMAP_INTC_START, },
  265. { .name = "evtout2", .irq = 22 + OMAP_INTC_START, },
  266. { .name = "evtout3", .irq = 23 + OMAP_INTC_START, },
  267. { .name = "evtout4", .irq = 24 + OMAP_INTC_START, },
  268. { .name = "evtout5", .irq = 25 + OMAP_INTC_START, },
  269. { .name = "evtout6", .irq = 26 + OMAP_INTC_START, },
  270. { .name = "evtout7", .irq = 27 + OMAP_INTC_START, },
  271. { .irq = -1 },
  272. };
  273. /* pru-icss */
  274. /* Pseudo hwmod for reset control purpose only */
  275. static struct omap_hwmod am33xx_pruss_hwmod = {
  276. .name = "pruss",
  277. .class = &am33xx_pruss_hwmod_class,
  278. .clkdm_name = "pruss_ocp_clkdm",
  279. .mpu_irqs = am33xx_pruss_irqs,
  280. .main_clk = "pruss_ocp_gclk",
  281. .prcm = {
  282. .omap4 = {
  283. .clkctrl_offs = AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET,
  284. .rstctrl_offs = AM33XX_RM_PER_RSTCTRL_OFFSET,
  285. .modulemode = MODULEMODE_SWCTRL,
  286. },
  287. },
  288. .rst_lines = am33xx_pruss_resets,
  289. .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets),
  290. };
  291. /* gfx */
  292. /* Pseudo hwmod for reset control purpose only */
  293. static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
  294. .name = "gfx",
  295. };
  296. static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
  297. { .name = "gfx", .rst_shift = 0 },
  298. };
  299. static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
  300. { .name = "gfxint", .irq = 37 + OMAP_INTC_START, },
  301. { .irq = -1 },
  302. };
  303. static struct omap_hwmod am33xx_gfx_hwmod = {
  304. .name = "gfx",
  305. .class = &am33xx_gfx_hwmod_class,
  306. .clkdm_name = "gfx_l3_clkdm",
  307. .mpu_irqs = am33xx_gfx_irqs,
  308. .main_clk = "gfx_fck_div_ck",
  309. .prcm = {
  310. .omap4 = {
  311. .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
  312. .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
  313. .modulemode = MODULEMODE_SWCTRL,
  314. },
  315. },
  316. .rst_lines = am33xx_gfx_resets,
  317. .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets),
  318. };
  319. /*
  320. * 'prcm' class
  321. * power and reset manager (whole prcm infrastructure)
  322. */
  323. static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
  324. .name = "prcm",
  325. };
  326. /* prcm */
  327. static struct omap_hwmod am33xx_prcm_hwmod = {
  328. .name = "prcm",
  329. .class = &am33xx_prcm_hwmod_class,
  330. .clkdm_name = "l4_wkup_clkdm",
  331. };
  332. /*
  333. * 'adc/tsc' class
  334. * TouchScreen Controller (Anolog-To-Digital Converter)
  335. */
  336. static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
  337. .rev_offs = 0x00,
  338. .sysc_offs = 0x10,
  339. .sysc_flags = SYSC_HAS_SIDLEMODE,
  340. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  341. SIDLE_SMART_WKUP),
  342. .sysc_fields = &omap_hwmod_sysc_type2,
  343. };
  344. static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
  345. .name = "adc_tsc",
  346. .sysc = &am33xx_adc_tsc_sysc,
  347. };
  348. static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = {
  349. { .irq = 16 + OMAP_INTC_START, },
  350. { .irq = -1 },
  351. };
  352. static struct omap_hwmod am33xx_adc_tsc_hwmod = {
  353. .name = "adc_tsc",
  354. .class = &am33xx_adc_tsc_hwmod_class,
  355. .clkdm_name = "l4_wkup_clkdm",
  356. .mpu_irqs = am33xx_adc_tsc_irqs,
  357. .main_clk = "adc_tsc_fck",
  358. .prcm = {
  359. .omap4 = {
  360. .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
  361. .modulemode = MODULEMODE_SWCTRL,
  362. },
  363. },
  364. };
  365. /*
  366. * Modules omap_hwmod structures
  367. *
  368. * The following IPs are excluded for the moment because:
  369. * - They do not need an explicit SW control using omap_hwmod API.
  370. * - They still need to be validated with the driver
  371. * properly adapted to omap_hwmod / omap_device
  372. *
  373. * - cEFUSE (doesn't fall under any ocp_if)
  374. * - clkdiv32k
  375. * - debugss
  376. * - ocp watch point
  377. */
  378. #if 0
  379. /*
  380. * 'cefuse' class
  381. */
  382. static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
  383. .name = "cefuse",
  384. };
  385. static struct omap_hwmod am33xx_cefuse_hwmod = {
  386. .name = "cefuse",
  387. .class = &am33xx_cefuse_hwmod_class,
  388. .clkdm_name = "l4_cefuse_clkdm",
  389. .main_clk = "cefuse_fck",
  390. .prcm = {
  391. .omap4 = {
  392. .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
  393. .modulemode = MODULEMODE_SWCTRL,
  394. },
  395. },
  396. };
  397. /*
  398. * 'clkdiv32k' class
  399. */
  400. static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
  401. .name = "clkdiv32k",
  402. };
  403. static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
  404. .name = "clkdiv32k",
  405. .class = &am33xx_clkdiv32k_hwmod_class,
  406. .clkdm_name = "clk_24mhz_clkdm",
  407. .main_clk = "clkdiv32k_ick",
  408. .prcm = {
  409. .omap4 = {
  410. .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
  411. .modulemode = MODULEMODE_SWCTRL,
  412. },
  413. },
  414. };
  415. /*
  416. * 'debugss' class
  417. * debug sub system
  418. */
  419. static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
  420. .name = "debugss",
  421. };
  422. static struct omap_hwmod am33xx_debugss_hwmod = {
  423. .name = "debugss",
  424. .class = &am33xx_debugss_hwmod_class,
  425. .clkdm_name = "l3_aon_clkdm",
  426. .main_clk = "debugss_ick",
  427. .prcm = {
  428. .omap4 = {
  429. .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
  430. .modulemode = MODULEMODE_SWCTRL,
  431. },
  432. },
  433. };
  434. /* ocpwp */
  435. static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
  436. .name = "ocpwp",
  437. };
  438. static struct omap_hwmod am33xx_ocpwp_hwmod = {
  439. .name = "ocpwp",
  440. .class = &am33xx_ocpwp_hwmod_class,
  441. .clkdm_name = "l4ls_clkdm",
  442. .main_clk = "l4ls_gclk",
  443. .prcm = {
  444. .omap4 = {
  445. .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
  446. .modulemode = MODULEMODE_SWCTRL,
  447. },
  448. },
  449. };
  450. #endif
  451. /*
  452. * 'aes0' class
  453. */
  454. static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
  455. .rev_offs = 0x80,
  456. .sysc_offs = 0x84,
  457. .syss_offs = 0x88,
  458. .sysc_flags = SYSS_HAS_RESET_STATUS,
  459. };
  460. static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
  461. .name = "aes0",
  462. .sysc = &am33xx_aes0_sysc,
  463. };
  464. static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
  465. { .irq = 103 + OMAP_INTC_START, },
  466. { .irq = -1 },
  467. };
  468. static struct omap_hwmod_dma_info am33xx_aes0_edma_reqs[] = {
  469. { .name = "tx", .dma_req = 6, },
  470. { .name = "rx", .dma_req = 5, },
  471. { .dma_req = -1 }
  472. };
  473. static struct omap_hwmod am33xx_aes0_hwmod = {
  474. .name = "aes",
  475. .class = &am33xx_aes0_hwmod_class,
  476. .clkdm_name = "l3_clkdm",
  477. .mpu_irqs = am33xx_aes0_irqs,
  478. .sdma_reqs = am33xx_aes0_edma_reqs,
  479. .main_clk = "aes0_fck",
  480. .prcm = {
  481. .omap4 = {
  482. .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
  483. .modulemode = MODULEMODE_SWCTRL,
  484. },
  485. },
  486. };
  487. /* sha0 HIB2 (the 'P' (public) device) */
  488. static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
  489. .rev_offs = 0x100,
  490. .sysc_offs = 0x110,
  491. .syss_offs = 0x114,
  492. .sysc_flags = SYSS_HAS_RESET_STATUS,
  493. };
  494. static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
  495. .name = "sha0",
  496. .sysc = &am33xx_sha0_sysc,
  497. };
  498. static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
  499. { .irq = 109 + OMAP_INTC_START, },
  500. { .irq = -1 },
  501. };
  502. static struct omap_hwmod_dma_info am33xx_sha0_edma_reqs[] = {
  503. { .name = "rx", .dma_req = 36, },
  504. { .dma_req = -1 }
  505. };
  506. static struct omap_hwmod am33xx_sha0_hwmod = {
  507. .name = "sham",
  508. .class = &am33xx_sha0_hwmod_class,
  509. .clkdm_name = "l3_clkdm",
  510. .mpu_irqs = am33xx_sha0_irqs,
  511. .sdma_reqs = am33xx_sha0_edma_reqs,
  512. .main_clk = "l3_gclk",
  513. .prcm = {
  514. .omap4 = {
  515. .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET,
  516. .modulemode = MODULEMODE_SWCTRL,
  517. },
  518. },
  519. };
  520. /* ocmcram */
  521. static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
  522. .name = "ocmcram",
  523. };
  524. static struct omap_hwmod am33xx_ocmcram_hwmod = {
  525. .name = "ocmcram",
  526. .class = &am33xx_ocmcram_hwmod_class,
  527. .clkdm_name = "l3_clkdm",
  528. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  529. .main_clk = "l3_gclk",
  530. .prcm = {
  531. .omap4 = {
  532. .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
  533. .modulemode = MODULEMODE_SWCTRL,
  534. },
  535. },
  536. };
  537. /* 'smartreflex' class */
  538. static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
  539. .name = "smartreflex",
  540. };
  541. /* smartreflex0 */
  542. static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = {
  543. { .irq = 120 + OMAP_INTC_START, },
  544. { .irq = -1 },
  545. };
  546. static struct omap_hwmod am33xx_smartreflex0_hwmod = {
  547. .name = "smartreflex0",
  548. .class = &am33xx_smartreflex_hwmod_class,
  549. .clkdm_name = "l4_wkup_clkdm",
  550. .mpu_irqs = am33xx_smartreflex0_irqs,
  551. .main_clk = "smartreflex0_fck",
  552. .prcm = {
  553. .omap4 = {
  554. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
  555. .modulemode = MODULEMODE_SWCTRL,
  556. },
  557. },
  558. };
  559. /* smartreflex1 */
  560. static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = {
  561. { .irq = 121 + OMAP_INTC_START, },
  562. { .irq = -1 },
  563. };
  564. static struct omap_hwmod am33xx_smartreflex1_hwmod = {
  565. .name = "smartreflex1",
  566. .class = &am33xx_smartreflex_hwmod_class,
  567. .clkdm_name = "l4_wkup_clkdm",
  568. .mpu_irqs = am33xx_smartreflex1_irqs,
  569. .main_clk = "smartreflex1_fck",
  570. .prcm = {
  571. .omap4 = {
  572. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
  573. .modulemode = MODULEMODE_SWCTRL,
  574. },
  575. },
  576. };
  577. /*
  578. * 'control' module class
  579. */
  580. static struct omap_hwmod_class am33xx_control_hwmod_class = {
  581. .name = "control",
  582. };
  583. static struct omap_hwmod_irq_info am33xx_control_irqs[] = {
  584. { .irq = 8 + OMAP_INTC_START, },
  585. { .irq = -1 },
  586. };
  587. static struct omap_hwmod am33xx_control_hwmod = {
  588. .name = "control",
  589. .class = &am33xx_control_hwmod_class,
  590. .clkdm_name = "l4_wkup_clkdm",
  591. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  592. .mpu_irqs = am33xx_control_irqs,
  593. .main_clk = "dpll_core_m4_div2_ck",
  594. .prcm = {
  595. .omap4 = {
  596. .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
  597. .modulemode = MODULEMODE_SWCTRL,
  598. },
  599. },
  600. };
  601. /*
  602. * 'cpgmac' class
  603. * cpsw/cpgmac sub system
  604. */
  605. static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
  606. .rev_offs = 0x0,
  607. .sysc_offs = 0x8,
  608. .syss_offs = 0x4,
  609. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  610. SYSS_HAS_RESET_STATUS),
  611. .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  612. MSTANDBY_NO),
  613. .sysc_fields = &omap_hwmod_sysc_type3,
  614. };
  615. static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
  616. .name = "cpgmac0",
  617. .sysc = &am33xx_cpgmac_sysc,
  618. };
  619. static struct omap_hwmod_irq_info am33xx_cpgmac0_irqs[] = {
  620. { .name = "c0_rx_thresh_pend", .irq = 40 + OMAP_INTC_START, },
  621. { .name = "c0_rx_pend", .irq = 41 + OMAP_INTC_START, },
  622. { .name = "c0_tx_pend", .irq = 42 + OMAP_INTC_START, },
  623. { .name = "c0_misc_pend", .irq = 43 + OMAP_INTC_START, },
  624. { .irq = -1 },
  625. };
  626. static struct omap_hwmod am33xx_cpgmac0_hwmod = {
  627. .name = "cpgmac0",
  628. .class = &am33xx_cpgmac0_hwmod_class,
  629. .clkdm_name = "cpsw_125mhz_clkdm",
  630. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  631. .mpu_irqs = am33xx_cpgmac0_irqs,
  632. .main_clk = "cpsw_125mhz_gclk",
  633. .prcm = {
  634. .omap4 = {
  635. .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
  636. .modulemode = MODULEMODE_SWCTRL,
  637. },
  638. },
  639. };
  640. /*
  641. * mdio class
  642. */
  643. static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
  644. .name = "davinci_mdio",
  645. };
  646. static struct omap_hwmod am33xx_mdio_hwmod = {
  647. .name = "davinci_mdio",
  648. .class = &am33xx_mdio_hwmod_class,
  649. .clkdm_name = "cpsw_125mhz_clkdm",
  650. .main_clk = "cpsw_125mhz_gclk",
  651. };
  652. /*
  653. * dcan class
  654. */
  655. static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
  656. .name = "d_can",
  657. };
  658. /* dcan0 */
  659. static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = {
  660. { .name = "d_can_ms", .irq = 52 + OMAP_INTC_START, },
  661. { .name = "d_can_mo", .irq = 53 + OMAP_INTC_START, },
  662. { .irq = -1 },
  663. };
  664. static struct omap_hwmod am33xx_dcan0_hwmod = {
  665. .name = "d_can0",
  666. .class = &am33xx_dcan_hwmod_class,
  667. .clkdm_name = "l4ls_clkdm",
  668. .mpu_irqs = am33xx_dcan0_irqs,
  669. .main_clk = "dcan0_fck",
  670. .prcm = {
  671. .omap4 = {
  672. .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET,
  673. .modulemode = MODULEMODE_SWCTRL,
  674. },
  675. },
  676. };
  677. /* dcan1 */
  678. static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = {
  679. { .name = "d_can_ms", .irq = 55 + OMAP_INTC_START, },
  680. { .name = "d_can_mo", .irq = 56 + OMAP_INTC_START, },
  681. { .irq = -1 },
  682. };
  683. static struct omap_hwmod am33xx_dcan1_hwmod = {
  684. .name = "d_can1",
  685. .class = &am33xx_dcan_hwmod_class,
  686. .clkdm_name = "l4ls_clkdm",
  687. .mpu_irqs = am33xx_dcan1_irqs,
  688. .main_clk = "dcan1_fck",
  689. .prcm = {
  690. .omap4 = {
  691. .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET,
  692. .modulemode = MODULEMODE_SWCTRL,
  693. },
  694. },
  695. };
  696. /* elm */
  697. static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
  698. .rev_offs = 0x0000,
  699. .sysc_offs = 0x0010,
  700. .syss_offs = 0x0014,
  701. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  702. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  703. SYSS_HAS_RESET_STATUS),
  704. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  705. .sysc_fields = &omap_hwmod_sysc_type1,
  706. };
  707. static struct omap_hwmod_class am33xx_elm_hwmod_class = {
  708. .name = "elm",
  709. .sysc = &am33xx_elm_sysc,
  710. };
  711. static struct omap_hwmod_irq_info am33xx_elm_irqs[] = {
  712. { .irq = 4 + OMAP_INTC_START, },
  713. { .irq = -1 },
  714. };
  715. static struct omap_hwmod am33xx_elm_hwmod = {
  716. .name = "elm",
  717. .class = &am33xx_elm_hwmod_class,
  718. .clkdm_name = "l4ls_clkdm",
  719. .mpu_irqs = am33xx_elm_irqs,
  720. .main_clk = "l4ls_gclk",
  721. .prcm = {
  722. .omap4 = {
  723. .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET,
  724. .modulemode = MODULEMODE_SWCTRL,
  725. },
  726. },
  727. };
  728. /* pwmss */
  729. static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
  730. .rev_offs = 0x0,
  731. .sysc_offs = 0x4,
  732. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  733. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  734. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  735. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  736. .sysc_fields = &omap_hwmod_sysc_type2,
  737. };
  738. static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
  739. .name = "epwmss",
  740. .sysc = &am33xx_epwmss_sysc,
  741. };
  742. static struct omap_hwmod_class am33xx_ecap_hwmod_class = {
  743. .name = "ecap",
  744. };
  745. static struct omap_hwmod_class am33xx_eqep_hwmod_class = {
  746. .name = "eqep",
  747. };
  748. static struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = {
  749. .name = "ehrpwm",
  750. };
  751. /* epwmss0 */
  752. static struct omap_hwmod am33xx_epwmss0_hwmod = {
  753. .name = "epwmss0",
  754. .class = &am33xx_epwmss_hwmod_class,
  755. .clkdm_name = "l4ls_clkdm",
  756. .main_clk = "l4ls_gclk",
  757. .prcm = {
  758. .omap4 = {
  759. .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
  760. .modulemode = MODULEMODE_SWCTRL,
  761. },
  762. },
  763. };
  764. /* ecap0 */
  765. static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
  766. { .irq = 31 + OMAP_INTC_START, },
  767. { .irq = -1 },
  768. };
  769. static struct omap_hwmod am33xx_ecap0_hwmod = {
  770. .name = "ecap0",
  771. .class = &am33xx_ecap_hwmod_class,
  772. .clkdm_name = "l4ls_clkdm",
  773. .mpu_irqs = am33xx_ecap0_irqs,
  774. .main_clk = "l4ls_gclk",
  775. };
  776. /* eqep0 */
  777. static struct omap_hwmod_irq_info am33xx_eqep0_irqs[] = {
  778. { .irq = 79 + OMAP_INTC_START, },
  779. { .irq = -1 },
  780. };
  781. static struct omap_hwmod am33xx_eqep0_hwmod = {
  782. .name = "eqep0",
  783. .class = &am33xx_eqep_hwmod_class,
  784. .clkdm_name = "l4ls_clkdm",
  785. .mpu_irqs = am33xx_eqep0_irqs,
  786. .main_clk = "l4ls_gclk",
  787. };
  788. /* ehrpwm0 */
  789. static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
  790. { .name = "int", .irq = 86 + OMAP_INTC_START, },
  791. { .name = "tzint", .irq = 58 + OMAP_INTC_START, },
  792. { .irq = -1 },
  793. };
  794. static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
  795. .name = "ehrpwm0",
  796. .class = &am33xx_ehrpwm_hwmod_class,
  797. .clkdm_name = "l4ls_clkdm",
  798. .mpu_irqs = am33xx_ehrpwm0_irqs,
  799. .main_clk = "l4ls_gclk",
  800. };
  801. /* epwmss1 */
  802. static struct omap_hwmod am33xx_epwmss1_hwmod = {
  803. .name = "epwmss1",
  804. .class = &am33xx_epwmss_hwmod_class,
  805. .clkdm_name = "l4ls_clkdm",
  806. .main_clk = "l4ls_gclk",
  807. .prcm = {
  808. .omap4 = {
  809. .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
  810. .modulemode = MODULEMODE_SWCTRL,
  811. },
  812. },
  813. };
  814. /* ecap1 */
  815. static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
  816. { .irq = 47 + OMAP_INTC_START, },
  817. { .irq = -1 },
  818. };
  819. static struct omap_hwmod am33xx_ecap1_hwmod = {
  820. .name = "ecap1",
  821. .class = &am33xx_ecap_hwmod_class,
  822. .clkdm_name = "l4ls_clkdm",
  823. .mpu_irqs = am33xx_ecap1_irqs,
  824. .main_clk = "l4ls_gclk",
  825. };
  826. /* eqep1 */
  827. static struct omap_hwmod_irq_info am33xx_eqep1_irqs[] = {
  828. { .irq = 88 + OMAP_INTC_START, },
  829. { .irq = -1 },
  830. };
  831. static struct omap_hwmod am33xx_eqep1_hwmod = {
  832. .name = "eqep1",
  833. .class = &am33xx_eqep_hwmod_class,
  834. .clkdm_name = "l4ls_clkdm",
  835. .mpu_irqs = am33xx_eqep1_irqs,
  836. .main_clk = "l4ls_gclk",
  837. };
  838. /* ehrpwm1 */
  839. static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
  840. { .name = "int", .irq = 87 + OMAP_INTC_START, },
  841. { .name = "tzint", .irq = 59 + OMAP_INTC_START, },
  842. { .irq = -1 },
  843. };
  844. static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
  845. .name = "ehrpwm1",
  846. .class = &am33xx_ehrpwm_hwmod_class,
  847. .clkdm_name = "l4ls_clkdm",
  848. .mpu_irqs = am33xx_ehrpwm1_irqs,
  849. .main_clk = "l4ls_gclk",
  850. };
  851. /* epwmss2 */
  852. static struct omap_hwmod am33xx_epwmss2_hwmod = {
  853. .name = "epwmss2",
  854. .class = &am33xx_epwmss_hwmod_class,
  855. .clkdm_name = "l4ls_clkdm",
  856. .main_clk = "l4ls_gclk",
  857. .prcm = {
  858. .omap4 = {
  859. .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
  860. .modulemode = MODULEMODE_SWCTRL,
  861. },
  862. },
  863. };
  864. /* ecap2 */
  865. static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
  866. { .irq = 61 + OMAP_INTC_START, },
  867. { .irq = -1 },
  868. };
  869. static struct omap_hwmod am33xx_ecap2_hwmod = {
  870. .name = "ecap2",
  871. .class = &am33xx_ecap_hwmod_class,
  872. .clkdm_name = "l4ls_clkdm",
  873. .mpu_irqs = am33xx_ecap2_irqs,
  874. .main_clk = "l4ls_gclk",
  875. };
  876. /* eqep2 */
  877. static struct omap_hwmod_irq_info am33xx_eqep2_irqs[] = {
  878. { .irq = 89 + OMAP_INTC_START, },
  879. { .irq = -1 },
  880. };
  881. static struct omap_hwmod am33xx_eqep2_hwmod = {
  882. .name = "eqep2",
  883. .class = &am33xx_eqep_hwmod_class,
  884. .clkdm_name = "l4ls_clkdm",
  885. .mpu_irqs = am33xx_eqep2_irqs,
  886. .main_clk = "l4ls_gclk",
  887. };
  888. /* ehrpwm2 */
  889. static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
  890. { .name = "int", .irq = 39 + OMAP_INTC_START, },
  891. { .name = "tzint", .irq = 60 + OMAP_INTC_START, },
  892. { .irq = -1 },
  893. };
  894. static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
  895. .name = "ehrpwm2",
  896. .class = &am33xx_ehrpwm_hwmod_class,
  897. .clkdm_name = "l4ls_clkdm",
  898. .mpu_irqs = am33xx_ehrpwm2_irqs,
  899. .main_clk = "l4ls_gclk",
  900. };
  901. /*
  902. * 'gpio' class: for gpio 0,1,2,3
  903. */
  904. static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
  905. .rev_offs = 0x0000,
  906. .sysc_offs = 0x0010,
  907. .syss_offs = 0x0114,
  908. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  909. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  910. SYSS_HAS_RESET_STATUS),
  911. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  912. SIDLE_SMART_WKUP),
  913. .sysc_fields = &omap_hwmod_sysc_type1,
  914. };
  915. static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
  916. .name = "gpio",
  917. .sysc = &am33xx_gpio_sysc,
  918. .rev = 2,
  919. };
  920. static struct omap_gpio_dev_attr gpio_dev_attr = {
  921. .bank_width = 32,
  922. .dbck_flag = true,
  923. };
  924. /* gpio0 */
  925. static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
  926. { .role = "dbclk", .clk = "gpio0_dbclk" },
  927. };
  928. static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = {
  929. { .irq = 96 + OMAP_INTC_START, },
  930. { .irq = -1 },
  931. };
  932. static struct omap_hwmod am33xx_gpio0_hwmod = {
  933. .name = "gpio1",
  934. .class = &am33xx_gpio_hwmod_class,
  935. .clkdm_name = "l4_wkup_clkdm",
  936. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  937. .mpu_irqs = am33xx_gpio0_irqs,
  938. .main_clk = "dpll_core_m4_div2_ck",
  939. .prcm = {
  940. .omap4 = {
  941. .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
  942. .modulemode = MODULEMODE_SWCTRL,
  943. },
  944. },
  945. .opt_clks = gpio0_opt_clks,
  946. .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks),
  947. .dev_attr = &gpio_dev_attr,
  948. };
  949. /* gpio1 */
  950. static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = {
  951. { .irq = 98 + OMAP_INTC_START, },
  952. { .irq = -1 },
  953. };
  954. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  955. { .role = "dbclk", .clk = "gpio1_dbclk" },
  956. };
  957. static struct omap_hwmod am33xx_gpio1_hwmod = {
  958. .name = "gpio2",
  959. .class = &am33xx_gpio_hwmod_class,
  960. .clkdm_name = "l4ls_clkdm",
  961. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  962. .mpu_irqs = am33xx_gpio1_irqs,
  963. .main_clk = "l4ls_gclk",
  964. .prcm = {
  965. .omap4 = {
  966. .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET,
  967. .modulemode = MODULEMODE_SWCTRL,
  968. },
  969. },
  970. .opt_clks = gpio1_opt_clks,
  971. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  972. .dev_attr = &gpio_dev_attr,
  973. };
  974. /* gpio2 */
  975. static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = {
  976. { .irq = 32 + OMAP_INTC_START, },
  977. { .irq = -1 },
  978. };
  979. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  980. { .role = "dbclk", .clk = "gpio2_dbclk" },
  981. };
  982. static struct omap_hwmod am33xx_gpio2_hwmod = {
  983. .name = "gpio3",
  984. .class = &am33xx_gpio_hwmod_class,
  985. .clkdm_name = "l4ls_clkdm",
  986. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  987. .mpu_irqs = am33xx_gpio2_irqs,
  988. .main_clk = "l4ls_gclk",
  989. .prcm = {
  990. .omap4 = {
  991. .clkctrl_offs = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
  992. .modulemode = MODULEMODE_SWCTRL,
  993. },
  994. },
  995. .opt_clks = gpio2_opt_clks,
  996. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  997. .dev_attr = &gpio_dev_attr,
  998. };
  999. /* gpio3 */
  1000. static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = {
  1001. { .irq = 62 + OMAP_INTC_START, },
  1002. { .irq = -1 },
  1003. };
  1004. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1005. { .role = "dbclk", .clk = "gpio3_dbclk" },
  1006. };
  1007. static struct omap_hwmod am33xx_gpio3_hwmod = {
  1008. .name = "gpio4",
  1009. .class = &am33xx_gpio_hwmod_class,
  1010. .clkdm_name = "l4ls_clkdm",
  1011. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1012. .mpu_irqs = am33xx_gpio3_irqs,
  1013. .main_clk = "l4ls_gclk",
  1014. .prcm = {
  1015. .omap4 = {
  1016. .clkctrl_offs = AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET,
  1017. .modulemode = MODULEMODE_SWCTRL,
  1018. },
  1019. },
  1020. .opt_clks = gpio3_opt_clks,
  1021. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1022. .dev_attr = &gpio_dev_attr,
  1023. };
  1024. /* gpmc */
  1025. static struct omap_hwmod_class_sysconfig gpmc_sysc = {
  1026. .rev_offs = 0x0,
  1027. .sysc_offs = 0x10,
  1028. .syss_offs = 0x14,
  1029. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1030. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1031. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1032. .sysc_fields = &omap_hwmod_sysc_type1,
  1033. };
  1034. static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
  1035. .name = "gpmc",
  1036. .sysc = &gpmc_sysc,
  1037. };
  1038. static struct omap_hwmod_irq_info am33xx_gpmc_irqs[] = {
  1039. { .irq = 100 + OMAP_INTC_START, },
  1040. { .irq = -1 },
  1041. };
  1042. static struct omap_hwmod am33xx_gpmc_hwmod = {
  1043. .name = "gpmc",
  1044. .class = &am33xx_gpmc_hwmod_class,
  1045. .clkdm_name = "l3s_clkdm",
  1046. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  1047. .mpu_irqs = am33xx_gpmc_irqs,
  1048. .main_clk = "l3s_gclk",
  1049. .prcm = {
  1050. .omap4 = {
  1051. .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET,
  1052. .modulemode = MODULEMODE_SWCTRL,
  1053. },
  1054. },
  1055. };
  1056. /* 'i2c' class */
  1057. static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
  1058. .sysc_offs = 0x0010,
  1059. .syss_offs = 0x0090,
  1060. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  1061. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1062. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1063. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1064. SIDLE_SMART_WKUP),
  1065. .sysc_fields = &omap_hwmod_sysc_type1,
  1066. };
  1067. static struct omap_hwmod_class i2c_class = {
  1068. .name = "i2c",
  1069. .sysc = &am33xx_i2c_sysc,
  1070. .rev = OMAP_I2C_IP_VERSION_2,
  1071. .reset = &omap_i2c_reset,
  1072. };
  1073. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1074. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  1075. };
  1076. /* i2c1 */
  1077. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1078. { .irq = 70 + OMAP_INTC_START, },
  1079. { .irq = -1 },
  1080. };
  1081. static struct omap_hwmod_dma_info i2c1_edma_reqs[] = {
  1082. { .name = "tx", .dma_req = 0, },
  1083. { .name = "rx", .dma_req = 0, },
  1084. { .dma_req = -1 }
  1085. };
  1086. static struct omap_hwmod am33xx_i2c1_hwmod = {
  1087. .name = "i2c1",
  1088. .class = &i2c_class,
  1089. .clkdm_name = "l4_wkup_clkdm",
  1090. .mpu_irqs = i2c1_mpu_irqs,
  1091. .sdma_reqs = i2c1_edma_reqs,
  1092. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1093. .main_clk = "dpll_per_m2_div4_wkupdm_ck",
  1094. .prcm = {
  1095. .omap4 = {
  1096. .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET,
  1097. .modulemode = MODULEMODE_SWCTRL,
  1098. },
  1099. },
  1100. .dev_attr = &i2c_dev_attr,
  1101. };
  1102. /* i2c1 */
  1103. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1104. { .irq = 71 + OMAP_INTC_START, },
  1105. { .irq = -1 },
  1106. };
  1107. static struct omap_hwmod_dma_info i2c2_edma_reqs[] = {
  1108. { .name = "tx", .dma_req = 0, },
  1109. { .name = "rx", .dma_req = 0, },
  1110. { .dma_req = -1 }
  1111. };
  1112. static struct omap_hwmod am33xx_i2c2_hwmod = {
  1113. .name = "i2c2",
  1114. .class = &i2c_class,
  1115. .clkdm_name = "l4ls_clkdm",
  1116. .mpu_irqs = i2c2_mpu_irqs,
  1117. .sdma_reqs = i2c2_edma_reqs,
  1118. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1119. .main_clk = "dpll_per_m2_div4_ck",
  1120. .prcm = {
  1121. .omap4 = {
  1122. .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET,
  1123. .modulemode = MODULEMODE_SWCTRL,
  1124. },
  1125. },
  1126. .dev_attr = &i2c_dev_attr,
  1127. };
  1128. /* i2c3 */
  1129. static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
  1130. { .name = "tx", .dma_req = 0, },
  1131. { .name = "rx", .dma_req = 0, },
  1132. { .dma_req = -1 }
  1133. };
  1134. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1135. { .irq = 30 + OMAP_INTC_START, },
  1136. { .irq = -1 },
  1137. };
  1138. static struct omap_hwmod am33xx_i2c3_hwmod = {
  1139. .name = "i2c3",
  1140. .class = &i2c_class,
  1141. .clkdm_name = "l4ls_clkdm",
  1142. .mpu_irqs = i2c3_mpu_irqs,
  1143. .sdma_reqs = i2c3_edma_reqs,
  1144. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1145. .main_clk = "dpll_per_m2_div4_ck",
  1146. .prcm = {
  1147. .omap4 = {
  1148. .clkctrl_offs = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
  1149. .modulemode = MODULEMODE_SWCTRL,
  1150. },
  1151. },
  1152. .dev_attr = &i2c_dev_attr,
  1153. };
  1154. /* lcdc */
  1155. static struct omap_hwmod_class_sysconfig lcdc_sysc = {
  1156. .rev_offs = 0x0,
  1157. .sysc_offs = 0x54,
  1158. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  1159. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1160. .sysc_fields = &omap_hwmod_sysc_type2,
  1161. };
  1162. static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
  1163. .name = "lcdc",
  1164. .sysc = &lcdc_sysc,
  1165. };
  1166. static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = {
  1167. { .irq = 36 + OMAP_INTC_START, },
  1168. { .irq = -1 },
  1169. };
  1170. static struct omap_hwmod am33xx_lcdc_hwmod = {
  1171. .name = "lcdc",
  1172. .class = &am33xx_lcdc_hwmod_class,
  1173. .clkdm_name = "lcdc_clkdm",
  1174. .mpu_irqs = am33xx_lcdc_irqs,
  1175. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1176. .main_clk = "lcd_gclk",
  1177. .prcm = {
  1178. .omap4 = {
  1179. .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
  1180. .modulemode = MODULEMODE_SWCTRL,
  1181. },
  1182. },
  1183. };
  1184. /*
  1185. * 'mailbox' class
  1186. * mailbox module allowing communication between the on-chip processors using a
  1187. * queued mailbox-interrupt mechanism.
  1188. */
  1189. static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
  1190. .rev_offs = 0x0000,
  1191. .sysc_offs = 0x0010,
  1192. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1193. SYSC_HAS_SOFTRESET),
  1194. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1195. .sysc_fields = &omap_hwmod_sysc_type2,
  1196. };
  1197. static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
  1198. .name = "mailbox",
  1199. .sysc = &am33xx_mailbox_sysc,
  1200. };
  1201. static struct omap_hwmod_irq_info am33xx_mailbox_irqs[] = {
  1202. { .irq = 77 + OMAP_INTC_START, },
  1203. { .irq = -1 },
  1204. };
  1205. static struct omap_hwmod am33xx_mailbox_hwmod = {
  1206. .name = "mailbox",
  1207. .class = &am33xx_mailbox_hwmod_class,
  1208. .clkdm_name = "l4ls_clkdm",
  1209. .mpu_irqs = am33xx_mailbox_irqs,
  1210. .main_clk = "l4ls_gclk",
  1211. .prcm = {
  1212. .omap4 = {
  1213. .clkctrl_offs = AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET,
  1214. .modulemode = MODULEMODE_SWCTRL,
  1215. },
  1216. },
  1217. };
  1218. /*
  1219. * 'mcasp' class
  1220. */
  1221. static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
  1222. .rev_offs = 0x0,
  1223. .sysc_offs = 0x4,
  1224. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1225. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1226. .sysc_fields = &omap_hwmod_sysc_type3,
  1227. };
  1228. static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
  1229. .name = "mcasp",
  1230. .sysc = &am33xx_mcasp_sysc,
  1231. };
  1232. /* mcasp0 */
  1233. static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = {
  1234. { .name = "ax", .irq = 80 + OMAP_INTC_START, },
  1235. { .name = "ar", .irq = 81 + OMAP_INTC_START, },
  1236. { .irq = -1 },
  1237. };
  1238. static struct omap_hwmod_dma_info am33xx_mcasp0_edma_reqs[] = {
  1239. { .name = "tx", .dma_req = 8, },
  1240. { .name = "rx", .dma_req = 9, },
  1241. { .dma_req = -1 }
  1242. };
  1243. static struct omap_hwmod am33xx_mcasp0_hwmod = {
  1244. .name = "mcasp0",
  1245. .class = &am33xx_mcasp_hwmod_class,
  1246. .clkdm_name = "l3s_clkdm",
  1247. .mpu_irqs = am33xx_mcasp0_irqs,
  1248. .sdma_reqs = am33xx_mcasp0_edma_reqs,
  1249. .main_clk = "mcasp0_fck",
  1250. .prcm = {
  1251. .omap4 = {
  1252. .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET,
  1253. .modulemode = MODULEMODE_SWCTRL,
  1254. },
  1255. },
  1256. };
  1257. /* mcasp1 */
  1258. static struct omap_hwmod_irq_info am33xx_mcasp1_irqs[] = {
  1259. { .name = "ax", .irq = 82 + OMAP_INTC_START, },
  1260. { .name = "ar", .irq = 83 + OMAP_INTC_START, },
  1261. { .irq = -1 },
  1262. };
  1263. static struct omap_hwmod_dma_info am33xx_mcasp1_edma_reqs[] = {
  1264. { .name = "tx", .dma_req = 10, },
  1265. { .name = "rx", .dma_req = 11, },
  1266. { .dma_req = -1 }
  1267. };
  1268. static struct omap_hwmod am33xx_mcasp1_hwmod = {
  1269. .name = "mcasp1",
  1270. .class = &am33xx_mcasp_hwmod_class,
  1271. .clkdm_name = "l3s_clkdm",
  1272. .mpu_irqs = am33xx_mcasp1_irqs,
  1273. .sdma_reqs = am33xx_mcasp1_edma_reqs,
  1274. .main_clk = "mcasp1_fck",
  1275. .prcm = {
  1276. .omap4 = {
  1277. .clkctrl_offs = AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET,
  1278. .modulemode = MODULEMODE_SWCTRL,
  1279. },
  1280. },
  1281. };
  1282. /* 'mmc' class */
  1283. static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
  1284. .rev_offs = 0x1fc,
  1285. .sysc_offs = 0x10,
  1286. .syss_offs = 0x14,
  1287. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1288. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1289. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1290. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1291. .sysc_fields = &omap_hwmod_sysc_type1,
  1292. };
  1293. static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
  1294. .name = "mmc",
  1295. .sysc = &am33xx_mmc_sysc,
  1296. };
  1297. /* mmc0 */
  1298. static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = {
  1299. { .irq = 64 + OMAP_INTC_START, },
  1300. { .irq = -1 },
  1301. };
  1302. static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = {
  1303. { .name = "tx", .dma_req = 24, },
  1304. { .name = "rx", .dma_req = 25, },
  1305. { .dma_req = -1 }
  1306. };
  1307. static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
  1308. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1309. };
  1310. static struct omap_hwmod am33xx_mmc0_hwmod = {
  1311. .name = "mmc1",
  1312. .class = &am33xx_mmc_hwmod_class,
  1313. .clkdm_name = "l4ls_clkdm",
  1314. .mpu_irqs = am33xx_mmc0_irqs,
  1315. .sdma_reqs = am33xx_mmc0_edma_reqs,
  1316. .main_clk = "mmc_clk",
  1317. .prcm = {
  1318. .omap4 = {
  1319. .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET,
  1320. .modulemode = MODULEMODE_SWCTRL,
  1321. },
  1322. },
  1323. .dev_attr = &am33xx_mmc0_dev_attr,
  1324. };
  1325. /* mmc1 */
  1326. static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = {
  1327. { .irq = 28 + OMAP_INTC_START, },
  1328. { .irq = -1 },
  1329. };
  1330. static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = {
  1331. { .name = "tx", .dma_req = 2, },
  1332. { .name = "rx", .dma_req = 3, },
  1333. { .dma_req = -1 }
  1334. };
  1335. static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
  1336. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1337. };
  1338. static struct omap_hwmod am33xx_mmc1_hwmod = {
  1339. .name = "mmc2",
  1340. .class = &am33xx_mmc_hwmod_class,
  1341. .clkdm_name = "l4ls_clkdm",
  1342. .mpu_irqs = am33xx_mmc1_irqs,
  1343. .sdma_reqs = am33xx_mmc1_edma_reqs,
  1344. .main_clk = "mmc_clk",
  1345. .prcm = {
  1346. .omap4 = {
  1347. .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET,
  1348. .modulemode = MODULEMODE_SWCTRL,
  1349. },
  1350. },
  1351. .dev_attr = &am33xx_mmc1_dev_attr,
  1352. };
  1353. /* mmc2 */
  1354. static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = {
  1355. { .irq = 29 + OMAP_INTC_START, },
  1356. { .irq = -1 },
  1357. };
  1358. static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = {
  1359. { .name = "tx", .dma_req = 64, },
  1360. { .name = "rx", .dma_req = 65, },
  1361. { .dma_req = -1 }
  1362. };
  1363. static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
  1364. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1365. };
  1366. static struct omap_hwmod am33xx_mmc2_hwmod = {
  1367. .name = "mmc3",
  1368. .class = &am33xx_mmc_hwmod_class,
  1369. .clkdm_name = "l3s_clkdm",
  1370. .mpu_irqs = am33xx_mmc2_irqs,
  1371. .sdma_reqs = am33xx_mmc2_edma_reqs,
  1372. .main_clk = "mmc_clk",
  1373. .prcm = {
  1374. .omap4 = {
  1375. .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET,
  1376. .modulemode = MODULEMODE_SWCTRL,
  1377. },
  1378. },
  1379. .dev_attr = &am33xx_mmc2_dev_attr,
  1380. };
  1381. /*
  1382. * 'rtc' class
  1383. * rtc subsystem
  1384. */
  1385. static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
  1386. .rev_offs = 0x0074,
  1387. .sysc_offs = 0x0078,
  1388. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1389. .idlemodes = (SIDLE_FORCE | SIDLE_NO |
  1390. SIDLE_SMART | SIDLE_SMART_WKUP),
  1391. .sysc_fields = &omap_hwmod_sysc_type3,
  1392. };
  1393. static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
  1394. .name = "rtc",
  1395. .sysc = &am33xx_rtc_sysc,
  1396. };
  1397. static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = {
  1398. { .name = "rtcint", .irq = 75 + OMAP_INTC_START, },
  1399. { .name = "rtcalarmint", .irq = 76 + OMAP_INTC_START, },
  1400. { .irq = -1 },
  1401. };
  1402. static struct omap_hwmod am33xx_rtc_hwmod = {
  1403. .name = "rtc",
  1404. .class = &am33xx_rtc_hwmod_class,
  1405. .clkdm_name = "l4_rtc_clkdm",
  1406. .mpu_irqs = am33xx_rtc_irqs,
  1407. .main_clk = "clk_32768_ck",
  1408. .prcm = {
  1409. .omap4 = {
  1410. .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET,
  1411. .modulemode = MODULEMODE_SWCTRL,
  1412. },
  1413. },
  1414. };
  1415. /* 'spi' class */
  1416. static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
  1417. .rev_offs = 0x0000,
  1418. .sysc_offs = 0x0110,
  1419. .syss_offs = 0x0114,
  1420. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1421. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1422. SYSS_HAS_RESET_STATUS),
  1423. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1424. .sysc_fields = &omap_hwmod_sysc_type1,
  1425. };
  1426. static struct omap_hwmod_class am33xx_spi_hwmod_class = {
  1427. .name = "mcspi",
  1428. .sysc = &am33xx_mcspi_sysc,
  1429. .rev = OMAP4_MCSPI_REV,
  1430. };
  1431. /* spi0 */
  1432. static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = {
  1433. { .irq = 65 + OMAP_INTC_START, },
  1434. { .irq = -1 },
  1435. };
  1436. static struct omap_hwmod_dma_info am33xx_mcspi0_edma_reqs[] = {
  1437. { .name = "rx0", .dma_req = 17 },
  1438. { .name = "tx0", .dma_req = 16 },
  1439. { .name = "rx1", .dma_req = 19 },
  1440. { .name = "tx1", .dma_req = 18 },
  1441. { .dma_req = -1 }
  1442. };
  1443. static struct omap2_mcspi_dev_attr mcspi_attrib = {
  1444. .num_chipselect = 2,
  1445. };
  1446. static struct omap_hwmod am33xx_spi0_hwmod = {
  1447. .name = "spi0",
  1448. .class = &am33xx_spi_hwmod_class,
  1449. .clkdm_name = "l4ls_clkdm",
  1450. .mpu_irqs = am33xx_spi0_irqs,
  1451. .sdma_reqs = am33xx_mcspi0_edma_reqs,
  1452. .main_clk = "dpll_per_m2_div4_ck",
  1453. .prcm = {
  1454. .omap4 = {
  1455. .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET,
  1456. .modulemode = MODULEMODE_SWCTRL,
  1457. },
  1458. },
  1459. .dev_attr = &mcspi_attrib,
  1460. };
  1461. /* spi1 */
  1462. static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = {
  1463. { .irq = 125 + OMAP_INTC_START, },
  1464. { .irq = -1 },
  1465. };
  1466. static struct omap_hwmod_dma_info am33xx_mcspi1_edma_reqs[] = {
  1467. { .name = "rx0", .dma_req = 43 },
  1468. { .name = "tx0", .dma_req = 42 },
  1469. { .name = "rx1", .dma_req = 45 },
  1470. { .name = "tx1", .dma_req = 44 },
  1471. { .dma_req = -1 }
  1472. };
  1473. static struct omap_hwmod am33xx_spi1_hwmod = {
  1474. .name = "spi1",
  1475. .class = &am33xx_spi_hwmod_class,
  1476. .clkdm_name = "l4ls_clkdm",
  1477. .mpu_irqs = am33xx_spi1_irqs,
  1478. .sdma_reqs = am33xx_mcspi1_edma_reqs,
  1479. .main_clk = "dpll_per_m2_div4_ck",
  1480. .prcm = {
  1481. .omap4 = {
  1482. .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET,
  1483. .modulemode = MODULEMODE_SWCTRL,
  1484. },
  1485. },
  1486. .dev_attr = &mcspi_attrib,
  1487. };
  1488. /*
  1489. * 'spinlock' class
  1490. * spinlock provides hardware assistance for synchronizing the
  1491. * processes running on multiple processors
  1492. */
  1493. static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
  1494. .name = "spinlock",
  1495. };
  1496. static struct omap_hwmod am33xx_spinlock_hwmod = {
  1497. .name = "spinlock",
  1498. .class = &am33xx_spinlock_hwmod_class,
  1499. .clkdm_name = "l4ls_clkdm",
  1500. .main_clk = "l4ls_gclk",
  1501. .prcm = {
  1502. .omap4 = {
  1503. .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET,
  1504. .modulemode = MODULEMODE_SWCTRL,
  1505. },
  1506. },
  1507. };
  1508. /* 'timer 2-7' class */
  1509. static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
  1510. .rev_offs = 0x0000,
  1511. .sysc_offs = 0x0010,
  1512. .syss_offs = 0x0014,
  1513. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1514. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1515. SIDLE_SMART_WKUP),
  1516. .sysc_fields = &omap_hwmod_sysc_type2,
  1517. };
  1518. static struct omap_hwmod_class am33xx_timer_hwmod_class = {
  1519. .name = "timer",
  1520. .sysc = &am33xx_timer_sysc,
  1521. };
  1522. /* timer1 1ms */
  1523. static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
  1524. .rev_offs = 0x0000,
  1525. .sysc_offs = 0x0010,
  1526. .syss_offs = 0x0014,
  1527. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1528. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1529. SYSS_HAS_RESET_STATUS),
  1530. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1531. .sysc_fields = &omap_hwmod_sysc_type1,
  1532. };
  1533. static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
  1534. .name = "timer",
  1535. .sysc = &am33xx_timer1ms_sysc,
  1536. };
  1537. static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = {
  1538. { .irq = 67 + OMAP_INTC_START, },
  1539. { .irq = -1 },
  1540. };
  1541. static struct omap_hwmod am33xx_timer1_hwmod = {
  1542. .name = "timer1",
  1543. .class = &am33xx_timer1ms_hwmod_class,
  1544. .clkdm_name = "l4_wkup_clkdm",
  1545. .mpu_irqs = am33xx_timer1_irqs,
  1546. .main_clk = "timer1_fck",
  1547. .prcm = {
  1548. .omap4 = {
  1549. .clkctrl_offs = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
  1550. .modulemode = MODULEMODE_SWCTRL,
  1551. },
  1552. },
  1553. };
  1554. static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = {
  1555. { .irq = 68 + OMAP_INTC_START, },
  1556. { .irq = -1 },
  1557. };
  1558. static struct omap_hwmod am33xx_timer2_hwmod = {
  1559. .name = "timer2",
  1560. .class = &am33xx_timer_hwmod_class,
  1561. .clkdm_name = "l4ls_clkdm",
  1562. .mpu_irqs = am33xx_timer2_irqs,
  1563. .main_clk = "timer2_fck",
  1564. .prcm = {
  1565. .omap4 = {
  1566. .clkctrl_offs = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET,
  1567. .modulemode = MODULEMODE_SWCTRL,
  1568. },
  1569. },
  1570. };
  1571. static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = {
  1572. { .irq = 69 + OMAP_INTC_START, },
  1573. { .irq = -1 },
  1574. };
  1575. static struct omap_hwmod am33xx_timer3_hwmod = {
  1576. .name = "timer3",
  1577. .class = &am33xx_timer_hwmod_class,
  1578. .clkdm_name = "l4ls_clkdm",
  1579. .mpu_irqs = am33xx_timer3_irqs,
  1580. .main_clk = "timer3_fck",
  1581. .prcm = {
  1582. .omap4 = {
  1583. .clkctrl_offs = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET,
  1584. .modulemode = MODULEMODE_SWCTRL,
  1585. },
  1586. },
  1587. };
  1588. static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = {
  1589. { .irq = 92 + OMAP_INTC_START, },
  1590. { .irq = -1 },
  1591. };
  1592. static struct omap_hwmod am33xx_timer4_hwmod = {
  1593. .name = "timer4",
  1594. .class = &am33xx_timer_hwmod_class,
  1595. .clkdm_name = "l4ls_clkdm",
  1596. .mpu_irqs = am33xx_timer4_irqs,
  1597. .main_clk = "timer4_fck",
  1598. .prcm = {
  1599. .omap4 = {
  1600. .clkctrl_offs = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET,
  1601. .modulemode = MODULEMODE_SWCTRL,
  1602. },
  1603. },
  1604. };
  1605. static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = {
  1606. { .irq = 93 + OMAP_INTC_START, },
  1607. { .irq = -1 },
  1608. };
  1609. static struct omap_hwmod am33xx_timer5_hwmod = {
  1610. .name = "timer5",
  1611. .class = &am33xx_timer_hwmod_class,
  1612. .clkdm_name = "l4ls_clkdm",
  1613. .mpu_irqs = am33xx_timer5_irqs,
  1614. .main_clk = "timer5_fck",
  1615. .prcm = {
  1616. .omap4 = {
  1617. .clkctrl_offs = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET,
  1618. .modulemode = MODULEMODE_SWCTRL,
  1619. },
  1620. },
  1621. };
  1622. static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = {
  1623. { .irq = 94 + OMAP_INTC_START, },
  1624. { .irq = -1 },
  1625. };
  1626. static struct omap_hwmod am33xx_timer6_hwmod = {
  1627. .name = "timer6",
  1628. .class = &am33xx_timer_hwmod_class,
  1629. .clkdm_name = "l4ls_clkdm",
  1630. .mpu_irqs = am33xx_timer6_irqs,
  1631. .main_clk = "timer6_fck",
  1632. .prcm = {
  1633. .omap4 = {
  1634. .clkctrl_offs = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET,
  1635. .modulemode = MODULEMODE_SWCTRL,
  1636. },
  1637. },
  1638. };
  1639. static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = {
  1640. { .irq = 95 + OMAP_INTC_START, },
  1641. { .irq = -1 },
  1642. };
  1643. static struct omap_hwmod am33xx_timer7_hwmod = {
  1644. .name = "timer7",
  1645. .class = &am33xx_timer_hwmod_class,
  1646. .clkdm_name = "l4ls_clkdm",
  1647. .mpu_irqs = am33xx_timer7_irqs,
  1648. .main_clk = "timer7_fck",
  1649. .prcm = {
  1650. .omap4 = {
  1651. .clkctrl_offs = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET,
  1652. .modulemode = MODULEMODE_SWCTRL,
  1653. },
  1654. },
  1655. };
  1656. /* tpcc */
  1657. static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
  1658. .name = "tpcc",
  1659. };
  1660. static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = {
  1661. { .name = "edma0", .irq = 12 + OMAP_INTC_START, },
  1662. { .name = "edma0_mperr", .irq = 13 + OMAP_INTC_START, },
  1663. { .name = "edma0_err", .irq = 14 + OMAP_INTC_START, },
  1664. { .irq = -1 },
  1665. };
  1666. static struct omap_hwmod am33xx_tpcc_hwmod = {
  1667. .name = "tpcc",
  1668. .class = &am33xx_tpcc_hwmod_class,
  1669. .clkdm_name = "l3_clkdm",
  1670. .mpu_irqs = am33xx_tpcc_irqs,
  1671. .main_clk = "l3_gclk",
  1672. .prcm = {
  1673. .omap4 = {
  1674. .clkctrl_offs = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET,
  1675. .modulemode = MODULEMODE_SWCTRL,
  1676. },
  1677. },
  1678. };
  1679. static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
  1680. .rev_offs = 0x0,
  1681. .sysc_offs = 0x10,
  1682. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1683. SYSC_HAS_MIDLEMODE),
  1684. .idlemodes = (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
  1685. .sysc_fields = &omap_hwmod_sysc_type2,
  1686. };
  1687. /* 'tptc' class */
  1688. static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
  1689. .name = "tptc",
  1690. .sysc = &am33xx_tptc_sysc,
  1691. };
  1692. /* tptc0 */
  1693. static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = {
  1694. { .irq = 112 + OMAP_INTC_START, },
  1695. { .irq = -1 },
  1696. };
  1697. static struct omap_hwmod am33xx_tptc0_hwmod = {
  1698. .name = "tptc0",
  1699. .class = &am33xx_tptc_hwmod_class,
  1700. .clkdm_name = "l3_clkdm",
  1701. .mpu_irqs = am33xx_tptc0_irqs,
  1702. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1703. .main_clk = "l3_gclk",
  1704. .prcm = {
  1705. .omap4 = {
  1706. .clkctrl_offs = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET,
  1707. .modulemode = MODULEMODE_SWCTRL,
  1708. },
  1709. },
  1710. };
  1711. /* tptc1 */
  1712. static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = {
  1713. { .irq = 113 + OMAP_INTC_START, },
  1714. { .irq = -1 },
  1715. };
  1716. static struct omap_hwmod am33xx_tptc1_hwmod = {
  1717. .name = "tptc1",
  1718. .class = &am33xx_tptc_hwmod_class,
  1719. .clkdm_name = "l3_clkdm",
  1720. .mpu_irqs = am33xx_tptc1_irqs,
  1721. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  1722. .main_clk = "l3_gclk",
  1723. .prcm = {
  1724. .omap4 = {
  1725. .clkctrl_offs = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET,
  1726. .modulemode = MODULEMODE_SWCTRL,
  1727. },
  1728. },
  1729. };
  1730. /* tptc2 */
  1731. static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = {
  1732. { .irq = 114 + OMAP_INTC_START, },
  1733. { .irq = -1 },
  1734. };
  1735. static struct omap_hwmod am33xx_tptc2_hwmod = {
  1736. .name = "tptc2",
  1737. .class = &am33xx_tptc_hwmod_class,
  1738. .clkdm_name = "l3_clkdm",
  1739. .mpu_irqs = am33xx_tptc2_irqs,
  1740. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  1741. .main_clk = "l3_gclk",
  1742. .prcm = {
  1743. .omap4 = {
  1744. .clkctrl_offs = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET,
  1745. .modulemode = MODULEMODE_SWCTRL,
  1746. },
  1747. },
  1748. };
  1749. /* 'uart' class */
  1750. static struct omap_hwmod_class_sysconfig uart_sysc = {
  1751. .rev_offs = 0x50,
  1752. .sysc_offs = 0x54,
  1753. .syss_offs = 0x58,
  1754. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1755. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1756. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1757. SIDLE_SMART_WKUP),
  1758. .sysc_fields = &omap_hwmod_sysc_type1,
  1759. };
  1760. static struct omap_hwmod_class uart_class = {
  1761. .name = "uart",
  1762. .sysc = &uart_sysc,
  1763. };
  1764. /* uart1 */
  1765. static struct omap_hwmod_dma_info uart1_edma_reqs[] = {
  1766. { .name = "tx", .dma_req = 26, },
  1767. { .name = "rx", .dma_req = 27, },
  1768. { .dma_req = -1 }
  1769. };
  1770. static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = {
  1771. { .irq = 72 + OMAP_INTC_START, },
  1772. { .irq = -1 },
  1773. };
  1774. static struct omap_hwmod am33xx_uart1_hwmod = {
  1775. .name = "uart1",
  1776. .class = &uart_class,
  1777. .clkdm_name = "l4_wkup_clkdm",
  1778. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1779. .mpu_irqs = am33xx_uart1_irqs,
  1780. .sdma_reqs = uart1_edma_reqs,
  1781. .main_clk = "dpll_per_m2_div4_wkupdm_ck",
  1782. .prcm = {
  1783. .omap4 = {
  1784. .clkctrl_offs = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET,
  1785. .modulemode = MODULEMODE_SWCTRL,
  1786. },
  1787. },
  1788. };
  1789. static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
  1790. { .irq = 73 + OMAP_INTC_START, },
  1791. { .irq = -1 },
  1792. };
  1793. static struct omap_hwmod am33xx_uart2_hwmod = {
  1794. .name = "uart2",
  1795. .class = &uart_class,
  1796. .clkdm_name = "l4ls_clkdm",
  1797. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1798. .mpu_irqs = am33xx_uart2_irqs,
  1799. .sdma_reqs = uart1_edma_reqs,
  1800. .main_clk = "dpll_per_m2_div4_ck",
  1801. .prcm = {
  1802. .omap4 = {
  1803. .clkctrl_offs = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET,
  1804. .modulemode = MODULEMODE_SWCTRL,
  1805. },
  1806. },
  1807. };
  1808. /* uart3 */
  1809. static struct omap_hwmod_dma_info uart3_edma_reqs[] = {
  1810. { .name = "tx", .dma_req = 30, },
  1811. { .name = "rx", .dma_req = 31, },
  1812. { .dma_req = -1 }
  1813. };
  1814. static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = {
  1815. { .irq = 74 + OMAP_INTC_START, },
  1816. { .irq = -1 },
  1817. };
  1818. static struct omap_hwmod am33xx_uart3_hwmod = {
  1819. .name = "uart3",
  1820. .class = &uart_class,
  1821. .clkdm_name = "l4ls_clkdm",
  1822. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1823. .mpu_irqs = am33xx_uart3_irqs,
  1824. .sdma_reqs = uart3_edma_reqs,
  1825. .main_clk = "dpll_per_m2_div4_ck",
  1826. .prcm = {
  1827. .omap4 = {
  1828. .clkctrl_offs = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET,
  1829. .modulemode = MODULEMODE_SWCTRL,
  1830. },
  1831. },
  1832. };
  1833. static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = {
  1834. { .irq = 44 + OMAP_INTC_START, },
  1835. { .irq = -1 },
  1836. };
  1837. static struct omap_hwmod am33xx_uart4_hwmod = {
  1838. .name = "uart4",
  1839. .class = &uart_class,
  1840. .clkdm_name = "l4ls_clkdm",
  1841. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1842. .mpu_irqs = am33xx_uart4_irqs,
  1843. .sdma_reqs = uart1_edma_reqs,
  1844. .main_clk = "dpll_per_m2_div4_ck",
  1845. .prcm = {
  1846. .omap4 = {
  1847. .clkctrl_offs = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET,
  1848. .modulemode = MODULEMODE_SWCTRL,
  1849. },
  1850. },
  1851. };
  1852. static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = {
  1853. { .irq = 45 + OMAP_INTC_START, },
  1854. { .irq = -1 },
  1855. };
  1856. static struct omap_hwmod am33xx_uart5_hwmod = {
  1857. .name = "uart5",
  1858. .class = &uart_class,
  1859. .clkdm_name = "l4ls_clkdm",
  1860. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1861. .mpu_irqs = am33xx_uart5_irqs,
  1862. .sdma_reqs = uart1_edma_reqs,
  1863. .main_clk = "dpll_per_m2_div4_ck",
  1864. .prcm = {
  1865. .omap4 = {
  1866. .clkctrl_offs = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET,
  1867. .modulemode = MODULEMODE_SWCTRL,
  1868. },
  1869. },
  1870. };
  1871. static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = {
  1872. { .irq = 46 + OMAP_INTC_START, },
  1873. { .irq = -1 },
  1874. };
  1875. static struct omap_hwmod am33xx_uart6_hwmod = {
  1876. .name = "uart6",
  1877. .class = &uart_class,
  1878. .clkdm_name = "l4ls_clkdm",
  1879. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1880. .mpu_irqs = am33xx_uart6_irqs,
  1881. .sdma_reqs = uart1_edma_reqs,
  1882. .main_clk = "dpll_per_m2_div4_ck",
  1883. .prcm = {
  1884. .omap4 = {
  1885. .clkctrl_offs = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET,
  1886. .modulemode = MODULEMODE_SWCTRL,
  1887. },
  1888. },
  1889. };
  1890. /* 'wd_timer' class */
  1891. static struct omap_hwmod_class_sysconfig wdt_sysc = {
  1892. .rev_offs = 0x0,
  1893. .sysc_offs = 0x10,
  1894. .syss_offs = 0x14,
  1895. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  1896. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1897. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1898. SIDLE_SMART_WKUP),
  1899. .sysc_fields = &omap_hwmod_sysc_type1,
  1900. };
  1901. static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
  1902. .name = "wd_timer",
  1903. .sysc = &wdt_sysc,
  1904. .pre_shutdown = &omap2_wd_timer_disable,
  1905. };
  1906. /*
  1907. * XXX: device.c file uses hardcoded name for watchdog timer
  1908. * driver "wd_timer2, so we are also using same name as of now...
  1909. */
  1910. static struct omap_hwmod am33xx_wd_timer1_hwmod = {
  1911. .name = "wd_timer2",
  1912. .class = &am33xx_wd_timer_hwmod_class,
  1913. .clkdm_name = "l4_wkup_clkdm",
  1914. .flags = HWMOD_SWSUP_SIDLE,
  1915. .main_clk = "wdt1_fck",
  1916. .prcm = {
  1917. .omap4 = {
  1918. .clkctrl_offs = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET,
  1919. .modulemode = MODULEMODE_SWCTRL,
  1920. },
  1921. },
  1922. };
  1923. /*
  1924. * 'usb_otg' class
  1925. * high-speed on-the-go universal serial bus (usb_otg) controller
  1926. */
  1927. static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
  1928. .rev_offs = 0x0,
  1929. .sysc_offs = 0x10,
  1930. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  1931. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1932. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1933. .sysc_fields = &omap_hwmod_sysc_type2,
  1934. };
  1935. static struct omap_hwmod_class am33xx_usbotg_class = {
  1936. .name = "usbotg",
  1937. .sysc = &am33xx_usbhsotg_sysc,
  1938. };
  1939. static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
  1940. { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
  1941. { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
  1942. { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
  1943. { .irq = -1, },
  1944. };
  1945. static struct omap_hwmod am33xx_usbss_hwmod = {
  1946. .name = "usb_otg_hs",
  1947. .class = &am33xx_usbotg_class,
  1948. .clkdm_name = "l3s_clkdm",
  1949. .mpu_irqs = am33xx_usbss_mpu_irqs,
  1950. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1951. .main_clk = "usbotg_fck",
  1952. .prcm = {
  1953. .omap4 = {
  1954. .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
  1955. .modulemode = MODULEMODE_SWCTRL,
  1956. },
  1957. },
  1958. };
  1959. /*
  1960. * Interfaces
  1961. */
  1962. /* l4 fw -> emif fw */
  1963. static struct omap_hwmod_ocp_if am33xx_l4_fw__emif_fw = {
  1964. .master = &am33xx_l4_fw_hwmod,
  1965. .slave = &am33xx_emif_fw_hwmod,
  1966. .clk = "l4fw_gclk",
  1967. .user = OCP_USER_MPU,
  1968. };
  1969. static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
  1970. {
  1971. .pa_start = 0x4c000000,
  1972. .pa_end = 0x4c000fff,
  1973. .flags = ADDR_TYPE_RT
  1974. },
  1975. { }
  1976. };
  1977. /* l3 main -> emif */
  1978. static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
  1979. .master = &am33xx_l3_main_hwmod,
  1980. .slave = &am33xx_emif_hwmod,
  1981. .clk = "dpll_core_m4_ck",
  1982. .addr = am33xx_emif_addrs,
  1983. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1984. };
  1985. /* mpu -> l3 main */
  1986. static struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
  1987. .master = &am33xx_mpu_hwmod,
  1988. .slave = &am33xx_l3_main_hwmod,
  1989. .clk = "dpll_mpu_m2_ck",
  1990. .user = OCP_USER_MPU,
  1991. };
  1992. /* l3 main -> l4 hs */
  1993. static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
  1994. .master = &am33xx_l3_main_hwmod,
  1995. .slave = &am33xx_l4_hs_hwmod,
  1996. .clk = "l3s_gclk",
  1997. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1998. };
  1999. /* l3 main -> l3 s */
  2000. static struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
  2001. .master = &am33xx_l3_main_hwmod,
  2002. .slave = &am33xx_l3_s_hwmod,
  2003. .clk = "l3s_gclk",
  2004. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2005. };
  2006. /* l3 s -> l4 per/ls */
  2007. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
  2008. .master = &am33xx_l3_s_hwmod,
  2009. .slave = &am33xx_l4_ls_hwmod,
  2010. .clk = "l3s_gclk",
  2011. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2012. };
  2013. /* l3 s -> l4 wkup */
  2014. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
  2015. .master = &am33xx_l3_s_hwmod,
  2016. .slave = &am33xx_l4_wkup_hwmod,
  2017. .clk = "l3s_gclk",
  2018. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2019. };
  2020. /* l3 s -> l4 fw */
  2021. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_fw = {
  2022. .master = &am33xx_l3_s_hwmod,
  2023. .slave = &am33xx_l4_fw_hwmod,
  2024. .clk = "l3s_gclk",
  2025. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2026. };
  2027. /* l3 main -> l3 instr */
  2028. static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
  2029. .master = &am33xx_l3_main_hwmod,
  2030. .slave = &am33xx_l3_instr_hwmod,
  2031. .clk = "l3s_gclk",
  2032. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2033. };
  2034. /* mpu -> prcm */
  2035. static struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
  2036. .master = &am33xx_mpu_hwmod,
  2037. .slave = &am33xx_prcm_hwmod,
  2038. .clk = "dpll_mpu_m2_ck",
  2039. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2040. };
  2041. /* l3 s -> l3 main*/
  2042. static struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
  2043. .master = &am33xx_l3_s_hwmod,
  2044. .slave = &am33xx_l3_main_hwmod,
  2045. .clk = "l3s_gclk",
  2046. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2047. };
  2048. /* pru-icss -> l3 main */
  2049. static struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
  2050. .master = &am33xx_pruss_hwmod,
  2051. .slave = &am33xx_l3_main_hwmod,
  2052. .clk = "l3_gclk",
  2053. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2054. };
  2055. /* wkup m3 -> l4 wkup */
  2056. static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
  2057. .master = &am33xx_wkup_m3_hwmod,
  2058. .slave = &am33xx_l4_wkup_hwmod,
  2059. .clk = "dpll_core_m4_div2_ck",
  2060. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2061. };
  2062. /* gfx -> l3 main */
  2063. static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
  2064. .master = &am33xx_gfx_hwmod,
  2065. .slave = &am33xx_l3_main_hwmod,
  2066. .clk = "dpll_core_m4_ck",
  2067. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2068. };
  2069. /* l4 wkup -> wkup m3 */
  2070. static struct omap_hwmod_addr_space am33xx_wkup_m3_addrs[] = {
  2071. {
  2072. .name = "umem",
  2073. .pa_start = 0x44d00000,
  2074. .pa_end = 0x44d00000 + SZ_16K - 1,
  2075. .flags = ADDR_TYPE_RT
  2076. },
  2077. {
  2078. .name = "dmem",
  2079. .pa_start = 0x44d80000,
  2080. .pa_end = 0x44d80000 + SZ_8K - 1,
  2081. .flags = ADDR_TYPE_RT
  2082. },
  2083. { }
  2084. };
  2085. static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
  2086. .master = &am33xx_l4_wkup_hwmod,
  2087. .slave = &am33xx_wkup_m3_hwmod,
  2088. .clk = "dpll_core_m4_div2_ck",
  2089. .addr = am33xx_wkup_m3_addrs,
  2090. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2091. };
  2092. /* l4 hs -> pru-icss */
  2093. static struct omap_hwmod_addr_space am33xx_pruss_addrs[] = {
  2094. {
  2095. .pa_start = 0x4a300000,
  2096. .pa_end = 0x4a300000 + SZ_512K - 1,
  2097. .flags = ADDR_TYPE_RT
  2098. },
  2099. { }
  2100. };
  2101. static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
  2102. .master = &am33xx_l4_hs_hwmod,
  2103. .slave = &am33xx_pruss_hwmod,
  2104. .clk = "dpll_core_m4_ck",
  2105. .addr = am33xx_pruss_addrs,
  2106. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2107. };
  2108. /* l3 main -> gfx */
  2109. static struct omap_hwmod_addr_space am33xx_gfx_addrs[] = {
  2110. {
  2111. .pa_start = 0x56000000,
  2112. .pa_end = 0x56000000 + SZ_16M - 1,
  2113. .flags = ADDR_TYPE_RT
  2114. },
  2115. { }
  2116. };
  2117. static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
  2118. .master = &am33xx_l3_main_hwmod,
  2119. .slave = &am33xx_gfx_hwmod,
  2120. .clk = "dpll_core_m4_ck",
  2121. .addr = am33xx_gfx_addrs,
  2122. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2123. };
  2124. /* l4 wkup -> smartreflex0 */
  2125. static struct omap_hwmod_addr_space am33xx_smartreflex0_addrs[] = {
  2126. {
  2127. .pa_start = 0x44e37000,
  2128. .pa_end = 0x44e37000 + SZ_4K - 1,
  2129. .flags = ADDR_TYPE_RT
  2130. },
  2131. { }
  2132. };
  2133. static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
  2134. .master = &am33xx_l4_wkup_hwmod,
  2135. .slave = &am33xx_smartreflex0_hwmod,
  2136. .clk = "dpll_core_m4_div2_ck",
  2137. .addr = am33xx_smartreflex0_addrs,
  2138. .user = OCP_USER_MPU,
  2139. };
  2140. /* l4 wkup -> smartreflex1 */
  2141. static struct omap_hwmod_addr_space am33xx_smartreflex1_addrs[] = {
  2142. {
  2143. .pa_start = 0x44e39000,
  2144. .pa_end = 0x44e39000 + SZ_4K - 1,
  2145. .flags = ADDR_TYPE_RT
  2146. },
  2147. { }
  2148. };
  2149. static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
  2150. .master = &am33xx_l4_wkup_hwmod,
  2151. .slave = &am33xx_smartreflex1_hwmod,
  2152. .clk = "dpll_core_m4_div2_ck",
  2153. .addr = am33xx_smartreflex1_addrs,
  2154. .user = OCP_USER_MPU,
  2155. };
  2156. /* l4 wkup -> control */
  2157. static struct omap_hwmod_addr_space am33xx_control_addrs[] = {
  2158. {
  2159. .pa_start = 0x44e10000,
  2160. .pa_end = 0x44e10000 + SZ_8K - 1,
  2161. .flags = ADDR_TYPE_RT
  2162. },
  2163. { }
  2164. };
  2165. static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
  2166. .master = &am33xx_l4_wkup_hwmod,
  2167. .slave = &am33xx_control_hwmod,
  2168. .clk = "dpll_core_m4_div2_ck",
  2169. .addr = am33xx_control_addrs,
  2170. .user = OCP_USER_MPU,
  2171. };
  2172. /* l4 wkup -> rtc */
  2173. static struct omap_hwmod_addr_space am33xx_rtc_addrs[] = {
  2174. {
  2175. .pa_start = 0x44e3e000,
  2176. .pa_end = 0x44e3e000 + SZ_4K - 1,
  2177. .flags = ADDR_TYPE_RT
  2178. },
  2179. { }
  2180. };
  2181. static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
  2182. .master = &am33xx_l4_wkup_hwmod,
  2183. .slave = &am33xx_rtc_hwmod,
  2184. .clk = "clkdiv32k_ick",
  2185. .addr = am33xx_rtc_addrs,
  2186. .user = OCP_USER_MPU,
  2187. };
  2188. /* l4 per/ls -> DCAN0 */
  2189. static struct omap_hwmod_addr_space am33xx_dcan0_addrs[] = {
  2190. {
  2191. .pa_start = 0x481CC000,
  2192. .pa_end = 0x481CC000 + SZ_4K - 1,
  2193. .flags = ADDR_TYPE_RT
  2194. },
  2195. { }
  2196. };
  2197. static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
  2198. .master = &am33xx_l4_ls_hwmod,
  2199. .slave = &am33xx_dcan0_hwmod,
  2200. .clk = "l4ls_gclk",
  2201. .addr = am33xx_dcan0_addrs,
  2202. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2203. };
  2204. /* l4 per/ls -> DCAN1 */
  2205. static struct omap_hwmod_addr_space am33xx_dcan1_addrs[] = {
  2206. {
  2207. .pa_start = 0x481D0000,
  2208. .pa_end = 0x481D0000 + SZ_4K - 1,
  2209. .flags = ADDR_TYPE_RT
  2210. },
  2211. { }
  2212. };
  2213. static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
  2214. .master = &am33xx_l4_ls_hwmod,
  2215. .slave = &am33xx_dcan1_hwmod,
  2216. .clk = "l4ls_gclk",
  2217. .addr = am33xx_dcan1_addrs,
  2218. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2219. };
  2220. /* l4 per/ls -> GPIO2 */
  2221. static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = {
  2222. {
  2223. .pa_start = 0x4804C000,
  2224. .pa_end = 0x4804C000 + SZ_4K - 1,
  2225. .flags = ADDR_TYPE_RT,
  2226. },
  2227. { }
  2228. };
  2229. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
  2230. .master = &am33xx_l4_ls_hwmod,
  2231. .slave = &am33xx_gpio1_hwmod,
  2232. .clk = "l4ls_gclk",
  2233. .addr = am33xx_gpio1_addrs,
  2234. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2235. };
  2236. /* l4 per/ls -> gpio3 */
  2237. static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = {
  2238. {
  2239. .pa_start = 0x481AC000,
  2240. .pa_end = 0x481AC000 + SZ_4K - 1,
  2241. .flags = ADDR_TYPE_RT,
  2242. },
  2243. { }
  2244. };
  2245. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
  2246. .master = &am33xx_l4_ls_hwmod,
  2247. .slave = &am33xx_gpio2_hwmod,
  2248. .clk = "l4ls_gclk",
  2249. .addr = am33xx_gpio2_addrs,
  2250. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2251. };
  2252. /* l4 per/ls -> gpio4 */
  2253. static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = {
  2254. {
  2255. .pa_start = 0x481AE000,
  2256. .pa_end = 0x481AE000 + SZ_4K - 1,
  2257. .flags = ADDR_TYPE_RT,
  2258. },
  2259. { }
  2260. };
  2261. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
  2262. .master = &am33xx_l4_ls_hwmod,
  2263. .slave = &am33xx_gpio3_hwmod,
  2264. .clk = "l4ls_gclk",
  2265. .addr = am33xx_gpio3_addrs,
  2266. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2267. };
  2268. /* L4 WKUP -> I2C1 */
  2269. static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = {
  2270. {
  2271. .pa_start = 0x44E0B000,
  2272. .pa_end = 0x44E0B000 + SZ_4K - 1,
  2273. .flags = ADDR_TYPE_RT,
  2274. },
  2275. { }
  2276. };
  2277. static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
  2278. .master = &am33xx_l4_wkup_hwmod,
  2279. .slave = &am33xx_i2c1_hwmod,
  2280. .clk = "dpll_core_m4_div2_ck",
  2281. .addr = am33xx_i2c1_addr_space,
  2282. .user = OCP_USER_MPU,
  2283. };
  2284. /* L4 WKUP -> GPIO1 */
  2285. static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = {
  2286. {
  2287. .pa_start = 0x44E07000,
  2288. .pa_end = 0x44E07000 + SZ_4K - 1,
  2289. .flags = ADDR_TYPE_RT,
  2290. },
  2291. { }
  2292. };
  2293. static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
  2294. .master = &am33xx_l4_wkup_hwmod,
  2295. .slave = &am33xx_gpio0_hwmod,
  2296. .clk = "dpll_core_m4_div2_ck",
  2297. .addr = am33xx_gpio0_addrs,
  2298. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2299. };
  2300. /* L4 WKUP -> ADC_TSC */
  2301. static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
  2302. {
  2303. .pa_start = 0x44E0D000,
  2304. .pa_end = 0x44E0D000 + SZ_8K - 1,
  2305. .flags = ADDR_TYPE_RT
  2306. },
  2307. { }
  2308. };
  2309. static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
  2310. .master = &am33xx_l4_wkup_hwmod,
  2311. .slave = &am33xx_adc_tsc_hwmod,
  2312. .clk = "dpll_core_m4_div2_ck",
  2313. .addr = am33xx_adc_tsc_addrs,
  2314. .user = OCP_USER_MPU,
  2315. };
  2316. static struct omap_hwmod_addr_space am33xx_cpgmac0_addr_space[] = {
  2317. /* cpsw ss */
  2318. {
  2319. .pa_start = 0x4a100000,
  2320. .pa_end = 0x4a100000 + SZ_2K - 1,
  2321. },
  2322. /* cpsw wr */
  2323. {
  2324. .pa_start = 0x4a101200,
  2325. .pa_end = 0x4a101200 + SZ_256 - 1,
  2326. .flags = ADDR_TYPE_RT,
  2327. },
  2328. { }
  2329. };
  2330. static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
  2331. .master = &am33xx_l4_hs_hwmod,
  2332. .slave = &am33xx_cpgmac0_hwmod,
  2333. .clk = "cpsw_125mhz_gclk",
  2334. .addr = am33xx_cpgmac0_addr_space,
  2335. .user = OCP_USER_MPU,
  2336. };
  2337. static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
  2338. {
  2339. .pa_start = 0x4A101000,
  2340. .pa_end = 0x4A101000 + SZ_256 - 1,
  2341. },
  2342. { }
  2343. };
  2344. static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
  2345. .master = &am33xx_cpgmac0_hwmod,
  2346. .slave = &am33xx_mdio_hwmod,
  2347. .addr = am33xx_mdio_addr_space,
  2348. .user = OCP_USER_MPU,
  2349. };
  2350. static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
  2351. {
  2352. .pa_start = 0x48080000,
  2353. .pa_end = 0x48080000 + SZ_8K - 1,
  2354. .flags = ADDR_TYPE_RT
  2355. },
  2356. { }
  2357. };
  2358. static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
  2359. .master = &am33xx_l4_ls_hwmod,
  2360. .slave = &am33xx_elm_hwmod,
  2361. .clk = "l4ls_gclk",
  2362. .addr = am33xx_elm_addr_space,
  2363. .user = OCP_USER_MPU,
  2364. };
  2365. static struct omap_hwmod_addr_space am33xx_epwmss0_addr_space[] = {
  2366. {
  2367. .pa_start = 0x48300000,
  2368. .pa_end = 0x48300000 + SZ_16 - 1,
  2369. .flags = ADDR_TYPE_RT
  2370. },
  2371. { }
  2372. };
  2373. static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
  2374. .master = &am33xx_l4_ls_hwmod,
  2375. .slave = &am33xx_epwmss0_hwmod,
  2376. .clk = "l4ls_gclk",
  2377. .addr = am33xx_epwmss0_addr_space,
  2378. .user = OCP_USER_MPU,
  2379. };
  2380. static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
  2381. {
  2382. .pa_start = 0x48300100,
  2383. .pa_end = 0x48300100 + SZ_128 - 1,
  2384. },
  2385. { }
  2386. };
  2387. static struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
  2388. .master = &am33xx_epwmss0_hwmod,
  2389. .slave = &am33xx_ecap0_hwmod,
  2390. .clk = "l4ls_gclk",
  2391. .addr = am33xx_ecap0_addr_space,
  2392. .user = OCP_USER_MPU,
  2393. };
  2394. static struct omap_hwmod_addr_space am33xx_eqep0_addr_space[] = {
  2395. {
  2396. .pa_start = 0x48300180,
  2397. .pa_end = 0x48300180 + SZ_128 - 1,
  2398. },
  2399. { }
  2400. };
  2401. static struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
  2402. .master = &am33xx_epwmss0_hwmod,
  2403. .slave = &am33xx_eqep0_hwmod,
  2404. .clk = "l4ls_gclk",
  2405. .addr = am33xx_eqep0_addr_space,
  2406. .user = OCP_USER_MPU,
  2407. };
  2408. static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
  2409. {
  2410. .pa_start = 0x48300200,
  2411. .pa_end = 0x48300200 + SZ_128 - 1,
  2412. },
  2413. { }
  2414. };
  2415. static struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
  2416. .master = &am33xx_epwmss0_hwmod,
  2417. .slave = &am33xx_ehrpwm0_hwmod,
  2418. .clk = "l4ls_gclk",
  2419. .addr = am33xx_ehrpwm0_addr_space,
  2420. .user = OCP_USER_MPU,
  2421. };
  2422. static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = {
  2423. {
  2424. .pa_start = 0x48302000,
  2425. .pa_end = 0x48302000 + SZ_16 - 1,
  2426. .flags = ADDR_TYPE_RT
  2427. },
  2428. { }
  2429. };
  2430. static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
  2431. .master = &am33xx_l4_ls_hwmod,
  2432. .slave = &am33xx_epwmss1_hwmod,
  2433. .clk = "l4ls_gclk",
  2434. .addr = am33xx_epwmss1_addr_space,
  2435. .user = OCP_USER_MPU,
  2436. };
  2437. static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
  2438. {
  2439. .pa_start = 0x48302100,
  2440. .pa_end = 0x48302100 + SZ_128 - 1,
  2441. },
  2442. { }
  2443. };
  2444. static struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
  2445. .master = &am33xx_epwmss1_hwmod,
  2446. .slave = &am33xx_ecap1_hwmod,
  2447. .clk = "l4ls_gclk",
  2448. .addr = am33xx_ecap1_addr_space,
  2449. .user = OCP_USER_MPU,
  2450. };
  2451. static struct omap_hwmod_addr_space am33xx_eqep1_addr_space[] = {
  2452. {
  2453. .pa_start = 0x48302180,
  2454. .pa_end = 0x48302180 + SZ_128 - 1,
  2455. },
  2456. { }
  2457. };
  2458. static struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
  2459. .master = &am33xx_epwmss1_hwmod,
  2460. .slave = &am33xx_eqep1_hwmod,
  2461. .clk = "l4ls_gclk",
  2462. .addr = am33xx_eqep1_addr_space,
  2463. .user = OCP_USER_MPU,
  2464. };
  2465. static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
  2466. {
  2467. .pa_start = 0x48302200,
  2468. .pa_end = 0x48302200 + SZ_128 - 1,
  2469. },
  2470. { }
  2471. };
  2472. static struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
  2473. .master = &am33xx_epwmss1_hwmod,
  2474. .slave = &am33xx_ehrpwm1_hwmod,
  2475. .clk = "l4ls_gclk",
  2476. .addr = am33xx_ehrpwm1_addr_space,
  2477. .user = OCP_USER_MPU,
  2478. };
  2479. static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = {
  2480. {
  2481. .pa_start = 0x48304000,
  2482. .pa_end = 0x48304000 + SZ_16 - 1,
  2483. .flags = ADDR_TYPE_RT
  2484. },
  2485. { }
  2486. };
  2487. static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
  2488. .master = &am33xx_l4_ls_hwmod,
  2489. .slave = &am33xx_epwmss2_hwmod,
  2490. .clk = "l4ls_gclk",
  2491. .addr = am33xx_epwmss2_addr_space,
  2492. .user = OCP_USER_MPU,
  2493. };
  2494. static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
  2495. {
  2496. .pa_start = 0x48304100,
  2497. .pa_end = 0x48304100 + SZ_128 - 1,
  2498. },
  2499. { }
  2500. };
  2501. static struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
  2502. .master = &am33xx_epwmss2_hwmod,
  2503. .slave = &am33xx_ecap2_hwmod,
  2504. .clk = "l4ls_gclk",
  2505. .addr = am33xx_ecap2_addr_space,
  2506. .user = OCP_USER_MPU,
  2507. };
  2508. static struct omap_hwmod_addr_space am33xx_eqep2_addr_space[] = {
  2509. {
  2510. .pa_start = 0x48304180,
  2511. .pa_end = 0x48304180 + SZ_128 - 1,
  2512. },
  2513. { }
  2514. };
  2515. static struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
  2516. .master = &am33xx_epwmss2_hwmod,
  2517. .slave = &am33xx_eqep2_hwmod,
  2518. .clk = "l4ls_gclk",
  2519. .addr = am33xx_eqep2_addr_space,
  2520. .user = OCP_USER_MPU,
  2521. };
  2522. static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
  2523. {
  2524. .pa_start = 0x48304200,
  2525. .pa_end = 0x48304200 + SZ_128 - 1,
  2526. },
  2527. { }
  2528. };
  2529. static struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
  2530. .master = &am33xx_epwmss2_hwmod,
  2531. .slave = &am33xx_ehrpwm2_hwmod,
  2532. .clk = "l4ls_gclk",
  2533. .addr = am33xx_ehrpwm2_addr_space,
  2534. .user = OCP_USER_MPU,
  2535. };
  2536. /* l3s cfg -> gpmc */
  2537. static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
  2538. {
  2539. .pa_start = 0x50000000,
  2540. .pa_end = 0x50000000 + SZ_8K - 1,
  2541. .flags = ADDR_TYPE_RT,
  2542. },
  2543. { }
  2544. };
  2545. static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
  2546. .master = &am33xx_l3_s_hwmod,
  2547. .slave = &am33xx_gpmc_hwmod,
  2548. .clk = "l3s_gclk",
  2549. .addr = am33xx_gpmc_addr_space,
  2550. .user = OCP_USER_MPU,
  2551. };
  2552. /* i2c2 */
  2553. static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = {
  2554. {
  2555. .pa_start = 0x4802A000,
  2556. .pa_end = 0x4802A000 + SZ_4K - 1,
  2557. .flags = ADDR_TYPE_RT,
  2558. },
  2559. { }
  2560. };
  2561. static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
  2562. .master = &am33xx_l4_ls_hwmod,
  2563. .slave = &am33xx_i2c2_hwmod,
  2564. .clk = "l4ls_gclk",
  2565. .addr = am33xx_i2c2_addr_space,
  2566. .user = OCP_USER_MPU,
  2567. };
  2568. static struct omap_hwmod_addr_space am33xx_i2c3_addr_space[] = {
  2569. {
  2570. .pa_start = 0x4819C000,
  2571. .pa_end = 0x4819C000 + SZ_4K - 1,
  2572. .flags = ADDR_TYPE_RT
  2573. },
  2574. { }
  2575. };
  2576. static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
  2577. .master = &am33xx_l4_ls_hwmod,
  2578. .slave = &am33xx_i2c3_hwmod,
  2579. .clk = "l4ls_gclk",
  2580. .addr = am33xx_i2c3_addr_space,
  2581. .user = OCP_USER_MPU,
  2582. };
  2583. static struct omap_hwmod_addr_space am33xx_lcdc_addr_space[] = {
  2584. {
  2585. .pa_start = 0x4830E000,
  2586. .pa_end = 0x4830E000 + SZ_8K - 1,
  2587. .flags = ADDR_TYPE_RT,
  2588. },
  2589. { }
  2590. };
  2591. static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
  2592. .master = &am33xx_l3_main_hwmod,
  2593. .slave = &am33xx_lcdc_hwmod,
  2594. .clk = "dpll_core_m4_ck",
  2595. .addr = am33xx_lcdc_addr_space,
  2596. .user = OCP_USER_MPU,
  2597. };
  2598. static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
  2599. {
  2600. .pa_start = 0x480C8000,
  2601. .pa_end = 0x480C8000 + (SZ_4K - 1),
  2602. .flags = ADDR_TYPE_RT
  2603. },
  2604. { }
  2605. };
  2606. /* l4 ls -> mailbox */
  2607. static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
  2608. .master = &am33xx_l4_ls_hwmod,
  2609. .slave = &am33xx_mailbox_hwmod,
  2610. .clk = "l4ls_gclk",
  2611. .addr = am33xx_mailbox_addrs,
  2612. .user = OCP_USER_MPU,
  2613. };
  2614. /* l4 ls -> spinlock */
  2615. static struct omap_hwmod_addr_space am33xx_spinlock_addrs[] = {
  2616. {
  2617. .pa_start = 0x480Ca000,
  2618. .pa_end = 0x480Ca000 + SZ_4K - 1,
  2619. .flags = ADDR_TYPE_RT
  2620. },
  2621. { }
  2622. };
  2623. static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
  2624. .master = &am33xx_l4_ls_hwmod,
  2625. .slave = &am33xx_spinlock_hwmod,
  2626. .clk = "l4ls_gclk",
  2627. .addr = am33xx_spinlock_addrs,
  2628. .user = OCP_USER_MPU,
  2629. };
  2630. /* l4 ls -> mcasp0 */
  2631. static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
  2632. {
  2633. .pa_start = 0x48038000,
  2634. .pa_end = 0x48038000 + SZ_8K - 1,
  2635. .flags = ADDR_TYPE_RT
  2636. },
  2637. { }
  2638. };
  2639. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
  2640. .master = &am33xx_l4_ls_hwmod,
  2641. .slave = &am33xx_mcasp0_hwmod,
  2642. .clk = "l4ls_gclk",
  2643. .addr = am33xx_mcasp0_addr_space,
  2644. .user = OCP_USER_MPU,
  2645. };
  2646. /* l3 s -> mcasp0 data */
  2647. static struct omap_hwmod_addr_space am33xx_mcasp0_data_addr_space[] = {
  2648. {
  2649. .pa_start = 0x46000000,
  2650. .pa_end = 0x46000000 + SZ_4M - 1,
  2651. .flags = ADDR_TYPE_RT
  2652. },
  2653. { }
  2654. };
  2655. static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp0_data = {
  2656. .master = &am33xx_l3_s_hwmod,
  2657. .slave = &am33xx_mcasp0_hwmod,
  2658. .clk = "l3s_gclk",
  2659. .addr = am33xx_mcasp0_data_addr_space,
  2660. .user = OCP_USER_SDMA,
  2661. };
  2662. /* l4 ls -> mcasp1 */
  2663. static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
  2664. {
  2665. .pa_start = 0x4803C000,
  2666. .pa_end = 0x4803C000 + SZ_8K - 1,
  2667. .flags = ADDR_TYPE_RT
  2668. },
  2669. { }
  2670. };
  2671. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
  2672. .master = &am33xx_l4_ls_hwmod,
  2673. .slave = &am33xx_mcasp1_hwmod,
  2674. .clk = "l4ls_gclk",
  2675. .addr = am33xx_mcasp1_addr_space,
  2676. .user = OCP_USER_MPU,
  2677. };
  2678. /* l3 s -> mcasp1 data */
  2679. static struct omap_hwmod_addr_space am33xx_mcasp1_data_addr_space[] = {
  2680. {
  2681. .pa_start = 0x46400000,
  2682. .pa_end = 0x46400000 + SZ_4M - 1,
  2683. .flags = ADDR_TYPE_RT
  2684. },
  2685. { }
  2686. };
  2687. static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp1_data = {
  2688. .master = &am33xx_l3_s_hwmod,
  2689. .slave = &am33xx_mcasp1_hwmod,
  2690. .clk = "l3s_gclk",
  2691. .addr = am33xx_mcasp1_data_addr_space,
  2692. .user = OCP_USER_SDMA,
  2693. };
  2694. /* l4 ls -> mmc0 */
  2695. static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
  2696. {
  2697. .pa_start = 0x48060100,
  2698. .pa_end = 0x48060100 + SZ_4K - 1,
  2699. .flags = ADDR_TYPE_RT,
  2700. },
  2701. { }
  2702. };
  2703. static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
  2704. .master = &am33xx_l4_ls_hwmod,
  2705. .slave = &am33xx_mmc0_hwmod,
  2706. .clk = "l4ls_gclk",
  2707. .addr = am33xx_mmc0_addr_space,
  2708. .user = OCP_USER_MPU,
  2709. };
  2710. /* l4 ls -> mmc1 */
  2711. static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
  2712. {
  2713. .pa_start = 0x481d8100,
  2714. .pa_end = 0x481d8100 + SZ_4K - 1,
  2715. .flags = ADDR_TYPE_RT,
  2716. },
  2717. { }
  2718. };
  2719. static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
  2720. .master = &am33xx_l4_ls_hwmod,
  2721. .slave = &am33xx_mmc1_hwmod,
  2722. .clk = "l4ls_gclk",
  2723. .addr = am33xx_mmc1_addr_space,
  2724. .user = OCP_USER_MPU,
  2725. };
  2726. /* l3 s -> mmc2 */
  2727. static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
  2728. {
  2729. .pa_start = 0x47810100,
  2730. .pa_end = 0x47810100 + SZ_64K - 1,
  2731. .flags = ADDR_TYPE_RT,
  2732. },
  2733. { }
  2734. };
  2735. static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
  2736. .master = &am33xx_l3_s_hwmod,
  2737. .slave = &am33xx_mmc2_hwmod,
  2738. .clk = "l3s_gclk",
  2739. .addr = am33xx_mmc2_addr_space,
  2740. .user = OCP_USER_MPU,
  2741. };
  2742. /* l4 ls -> mcspi0 */
  2743. static struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = {
  2744. {
  2745. .pa_start = 0x48030000,
  2746. .pa_end = 0x48030000 + SZ_1K - 1,
  2747. .flags = ADDR_TYPE_RT,
  2748. },
  2749. { }
  2750. };
  2751. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
  2752. .master = &am33xx_l4_ls_hwmod,
  2753. .slave = &am33xx_spi0_hwmod,
  2754. .clk = "l4ls_gclk",
  2755. .addr = am33xx_mcspi0_addr_space,
  2756. .user = OCP_USER_MPU,
  2757. };
  2758. /* l4 ls -> mcspi1 */
  2759. static struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = {
  2760. {
  2761. .pa_start = 0x481A0000,
  2762. .pa_end = 0x481A0000 + SZ_1K - 1,
  2763. .flags = ADDR_TYPE_RT,
  2764. },
  2765. { }
  2766. };
  2767. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
  2768. .master = &am33xx_l4_ls_hwmod,
  2769. .slave = &am33xx_spi1_hwmod,
  2770. .clk = "l4ls_gclk",
  2771. .addr = am33xx_mcspi1_addr_space,
  2772. .user = OCP_USER_MPU,
  2773. };
  2774. /* l4 wkup -> timer1 */
  2775. static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = {
  2776. {
  2777. .pa_start = 0x44E31000,
  2778. .pa_end = 0x44E31000 + SZ_1K - 1,
  2779. .flags = ADDR_TYPE_RT
  2780. },
  2781. { }
  2782. };
  2783. static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
  2784. .master = &am33xx_l4_wkup_hwmod,
  2785. .slave = &am33xx_timer1_hwmod,
  2786. .clk = "dpll_core_m4_div2_ck",
  2787. .addr = am33xx_timer1_addr_space,
  2788. .user = OCP_USER_MPU,
  2789. };
  2790. /* l4 per -> timer2 */
  2791. static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = {
  2792. {
  2793. .pa_start = 0x48040000,
  2794. .pa_end = 0x48040000 + SZ_1K - 1,
  2795. .flags = ADDR_TYPE_RT
  2796. },
  2797. { }
  2798. };
  2799. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
  2800. .master = &am33xx_l4_ls_hwmod,
  2801. .slave = &am33xx_timer2_hwmod,
  2802. .clk = "l4ls_gclk",
  2803. .addr = am33xx_timer2_addr_space,
  2804. .user = OCP_USER_MPU,
  2805. };
  2806. /* l4 per -> timer3 */
  2807. static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = {
  2808. {
  2809. .pa_start = 0x48042000,
  2810. .pa_end = 0x48042000 + SZ_1K - 1,
  2811. .flags = ADDR_TYPE_RT
  2812. },
  2813. { }
  2814. };
  2815. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
  2816. .master = &am33xx_l4_ls_hwmod,
  2817. .slave = &am33xx_timer3_hwmod,
  2818. .clk = "l4ls_gclk",
  2819. .addr = am33xx_timer3_addr_space,
  2820. .user = OCP_USER_MPU,
  2821. };
  2822. /* l4 per -> timer4 */
  2823. static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = {
  2824. {
  2825. .pa_start = 0x48044000,
  2826. .pa_end = 0x48044000 + SZ_1K - 1,
  2827. .flags = ADDR_TYPE_RT
  2828. },
  2829. { }
  2830. };
  2831. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
  2832. .master = &am33xx_l4_ls_hwmod,
  2833. .slave = &am33xx_timer4_hwmod,
  2834. .clk = "l4ls_gclk",
  2835. .addr = am33xx_timer4_addr_space,
  2836. .user = OCP_USER_MPU,
  2837. };
  2838. /* l4 per -> timer5 */
  2839. static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = {
  2840. {
  2841. .pa_start = 0x48046000,
  2842. .pa_end = 0x48046000 + SZ_1K - 1,
  2843. .flags = ADDR_TYPE_RT
  2844. },
  2845. { }
  2846. };
  2847. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
  2848. .master = &am33xx_l4_ls_hwmod,
  2849. .slave = &am33xx_timer5_hwmod,
  2850. .clk = "l4ls_gclk",
  2851. .addr = am33xx_timer5_addr_space,
  2852. .user = OCP_USER_MPU,
  2853. };
  2854. /* l4 per -> timer6 */
  2855. static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = {
  2856. {
  2857. .pa_start = 0x48048000,
  2858. .pa_end = 0x48048000 + SZ_1K - 1,
  2859. .flags = ADDR_TYPE_RT
  2860. },
  2861. { }
  2862. };
  2863. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
  2864. .master = &am33xx_l4_ls_hwmod,
  2865. .slave = &am33xx_timer6_hwmod,
  2866. .clk = "l4ls_gclk",
  2867. .addr = am33xx_timer6_addr_space,
  2868. .user = OCP_USER_MPU,
  2869. };
  2870. /* l4 per -> timer7 */
  2871. static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = {
  2872. {
  2873. .pa_start = 0x4804A000,
  2874. .pa_end = 0x4804A000 + SZ_1K - 1,
  2875. .flags = ADDR_TYPE_RT
  2876. },
  2877. { }
  2878. };
  2879. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
  2880. .master = &am33xx_l4_ls_hwmod,
  2881. .slave = &am33xx_timer7_hwmod,
  2882. .clk = "l4ls_gclk",
  2883. .addr = am33xx_timer7_addr_space,
  2884. .user = OCP_USER_MPU,
  2885. };
  2886. /* l3 main -> tpcc */
  2887. static struct omap_hwmod_addr_space am33xx_tpcc_addr_space[] = {
  2888. {
  2889. .pa_start = 0x49000000,
  2890. .pa_end = 0x49000000 + SZ_32K - 1,
  2891. .flags = ADDR_TYPE_RT
  2892. },
  2893. { }
  2894. };
  2895. static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
  2896. .master = &am33xx_l3_main_hwmod,
  2897. .slave = &am33xx_tpcc_hwmod,
  2898. .clk = "l3_gclk",
  2899. .addr = am33xx_tpcc_addr_space,
  2900. .user = OCP_USER_MPU,
  2901. };
  2902. /* l3 main -> tpcc0 */
  2903. static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
  2904. {
  2905. .pa_start = 0x49800000,
  2906. .pa_end = 0x49800000 + SZ_8K - 1,
  2907. .flags = ADDR_TYPE_RT,
  2908. },
  2909. { }
  2910. };
  2911. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
  2912. .master = &am33xx_l3_main_hwmod,
  2913. .slave = &am33xx_tptc0_hwmod,
  2914. .clk = "l3_gclk",
  2915. .addr = am33xx_tptc0_addr_space,
  2916. .user = OCP_USER_MPU,
  2917. };
  2918. /* l3 main -> tpcc1 */
  2919. static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
  2920. {
  2921. .pa_start = 0x49900000,
  2922. .pa_end = 0x49900000 + SZ_8K - 1,
  2923. .flags = ADDR_TYPE_RT,
  2924. },
  2925. { }
  2926. };
  2927. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
  2928. .master = &am33xx_l3_main_hwmod,
  2929. .slave = &am33xx_tptc1_hwmod,
  2930. .clk = "l3_gclk",
  2931. .addr = am33xx_tptc1_addr_space,
  2932. .user = OCP_USER_MPU,
  2933. };
  2934. /* l3 main -> tpcc2 */
  2935. static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
  2936. {
  2937. .pa_start = 0x49a00000,
  2938. .pa_end = 0x49a00000 + SZ_8K - 1,
  2939. .flags = ADDR_TYPE_RT,
  2940. },
  2941. { }
  2942. };
  2943. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
  2944. .master = &am33xx_l3_main_hwmod,
  2945. .slave = &am33xx_tptc2_hwmod,
  2946. .clk = "l3_gclk",
  2947. .addr = am33xx_tptc2_addr_space,
  2948. .user = OCP_USER_MPU,
  2949. };
  2950. /* l4 wkup -> uart1 */
  2951. static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = {
  2952. {
  2953. .pa_start = 0x44E09000,
  2954. .pa_end = 0x44E09000 + SZ_8K - 1,
  2955. .flags = ADDR_TYPE_RT,
  2956. },
  2957. { }
  2958. };
  2959. static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
  2960. .master = &am33xx_l4_wkup_hwmod,
  2961. .slave = &am33xx_uart1_hwmod,
  2962. .clk = "dpll_core_m4_div2_ck",
  2963. .addr = am33xx_uart1_addr_space,
  2964. .user = OCP_USER_MPU,
  2965. };
  2966. /* l4 ls -> uart2 */
  2967. static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = {
  2968. {
  2969. .pa_start = 0x48022000,
  2970. .pa_end = 0x48022000 + SZ_8K - 1,
  2971. .flags = ADDR_TYPE_RT,
  2972. },
  2973. { }
  2974. };
  2975. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
  2976. .master = &am33xx_l4_ls_hwmod,
  2977. .slave = &am33xx_uart2_hwmod,
  2978. .clk = "l4ls_gclk",
  2979. .addr = am33xx_uart2_addr_space,
  2980. .user = OCP_USER_MPU,
  2981. };
  2982. /* l4 ls -> uart3 */
  2983. static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = {
  2984. {
  2985. .pa_start = 0x48024000,
  2986. .pa_end = 0x48024000 + SZ_8K - 1,
  2987. .flags = ADDR_TYPE_RT,
  2988. },
  2989. { }
  2990. };
  2991. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
  2992. .master = &am33xx_l4_ls_hwmod,
  2993. .slave = &am33xx_uart3_hwmod,
  2994. .clk = "l4ls_gclk",
  2995. .addr = am33xx_uart3_addr_space,
  2996. .user = OCP_USER_MPU,
  2997. };
  2998. /* l4 ls -> uart4 */
  2999. static struct omap_hwmod_addr_space am33xx_uart4_addr_space[] = {
  3000. {
  3001. .pa_start = 0x481A6000,
  3002. .pa_end = 0x481A6000 + SZ_8K - 1,
  3003. .flags = ADDR_TYPE_RT,
  3004. },
  3005. { }
  3006. };
  3007. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
  3008. .master = &am33xx_l4_ls_hwmod,
  3009. .slave = &am33xx_uart4_hwmod,
  3010. .clk = "l4ls_gclk",
  3011. .addr = am33xx_uart4_addr_space,
  3012. .user = OCP_USER_MPU,
  3013. };
  3014. /* l4 ls -> uart5 */
  3015. static struct omap_hwmod_addr_space am33xx_uart5_addr_space[] = {
  3016. {
  3017. .pa_start = 0x481A8000,
  3018. .pa_end = 0x481A8000 + SZ_8K - 1,
  3019. .flags = ADDR_TYPE_RT,
  3020. },
  3021. { }
  3022. };
  3023. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
  3024. .master = &am33xx_l4_ls_hwmod,
  3025. .slave = &am33xx_uart5_hwmod,
  3026. .clk = "l4ls_gclk",
  3027. .addr = am33xx_uart5_addr_space,
  3028. .user = OCP_USER_MPU,
  3029. };
  3030. /* l4 ls -> uart6 */
  3031. static struct omap_hwmod_addr_space am33xx_uart6_addr_space[] = {
  3032. {
  3033. .pa_start = 0x481aa000,
  3034. .pa_end = 0x481aa000 + SZ_8K - 1,
  3035. .flags = ADDR_TYPE_RT,
  3036. },
  3037. { }
  3038. };
  3039. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
  3040. .master = &am33xx_l4_ls_hwmod,
  3041. .slave = &am33xx_uart6_hwmod,
  3042. .clk = "l4ls_gclk",
  3043. .addr = am33xx_uart6_addr_space,
  3044. .user = OCP_USER_MPU,
  3045. };
  3046. /* l4 wkup -> wd_timer1 */
  3047. static struct omap_hwmod_addr_space am33xx_wd_timer1_addrs[] = {
  3048. {
  3049. .pa_start = 0x44e35000,
  3050. .pa_end = 0x44e35000 + SZ_4K - 1,
  3051. .flags = ADDR_TYPE_RT
  3052. },
  3053. { }
  3054. };
  3055. static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
  3056. .master = &am33xx_l4_wkup_hwmod,
  3057. .slave = &am33xx_wd_timer1_hwmod,
  3058. .clk = "dpll_core_m4_div2_ck",
  3059. .addr = am33xx_wd_timer1_addrs,
  3060. .user = OCP_USER_MPU,
  3061. };
  3062. /* usbss */
  3063. /* l3 s -> USBSS interface */
  3064. static struct omap_hwmod_addr_space am33xx_usbss_addr_space[] = {
  3065. {
  3066. .name = "usbss",
  3067. .pa_start = 0x47400000,
  3068. .pa_end = 0x47400000 + SZ_4K - 1,
  3069. .flags = ADDR_TYPE_RT
  3070. },
  3071. {
  3072. .name = "musb0",
  3073. .pa_start = 0x47401000,
  3074. .pa_end = 0x47401000 + SZ_2K - 1,
  3075. .flags = ADDR_TYPE_RT
  3076. },
  3077. {
  3078. .name = "musb1",
  3079. .pa_start = 0x47401800,
  3080. .pa_end = 0x47401800 + SZ_2K - 1,
  3081. .flags = ADDR_TYPE_RT
  3082. },
  3083. { }
  3084. };
  3085. static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
  3086. .master = &am33xx_l3_s_hwmod,
  3087. .slave = &am33xx_usbss_hwmod,
  3088. .clk = "l3s_gclk",
  3089. .addr = am33xx_usbss_addr_space,
  3090. .user = OCP_USER_MPU,
  3091. .flags = OCPIF_SWSUP_IDLE,
  3092. };
  3093. /* l3 main -> ocmc */
  3094. static struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
  3095. .master = &am33xx_l3_main_hwmod,
  3096. .slave = &am33xx_ocmcram_hwmod,
  3097. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3098. };
  3099. /* l3 main -> sha0 HIB2 */
  3100. static struct omap_hwmod_addr_space am33xx_sha0_addrs[] = {
  3101. {
  3102. .pa_start = 0x53100000,
  3103. .pa_end = 0x53100000 + SZ_512 - 1,
  3104. .flags = ADDR_TYPE_RT
  3105. },
  3106. { }
  3107. };
  3108. static struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
  3109. .master = &am33xx_l3_main_hwmod,
  3110. .slave = &am33xx_sha0_hwmod,
  3111. .clk = "sha0_fck",
  3112. .addr = am33xx_sha0_addrs,
  3113. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3114. };
  3115. /* l3 main -> AES0 HIB2 */
  3116. static struct omap_hwmod_addr_space am33xx_aes0_addrs[] = {
  3117. {
  3118. .pa_start = 0x53500000,
  3119. .pa_end = 0x53500000 + SZ_1M - 1,
  3120. .flags = ADDR_TYPE_RT
  3121. },
  3122. { }
  3123. };
  3124. static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
  3125. .master = &am33xx_l3_main_hwmod,
  3126. .slave = &am33xx_aes0_hwmod,
  3127. .clk = "aes0_fck",
  3128. .addr = am33xx_aes0_addrs,
  3129. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3130. };
  3131. static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
  3132. &am33xx_l4_fw__emif_fw,
  3133. &am33xx_l3_main__emif,
  3134. &am33xx_mpu__l3_main,
  3135. &am33xx_mpu__prcm,
  3136. &am33xx_l3_s__l4_ls,
  3137. &am33xx_l3_s__l4_wkup,
  3138. &am33xx_l3_s__l4_fw,
  3139. &am33xx_l3_main__l4_hs,
  3140. &am33xx_l3_main__l3_s,
  3141. &am33xx_l3_main__l3_instr,
  3142. &am33xx_l3_main__gfx,
  3143. &am33xx_l3_s__l3_main,
  3144. &am33xx_pruss__l3_main,
  3145. &am33xx_wkup_m3__l4_wkup,
  3146. &am33xx_gfx__l3_main,
  3147. &am33xx_l4_wkup__wkup_m3,
  3148. &am33xx_l4_wkup__control,
  3149. &am33xx_l4_wkup__smartreflex0,
  3150. &am33xx_l4_wkup__smartreflex1,
  3151. &am33xx_l4_wkup__uart1,
  3152. &am33xx_l4_wkup__timer1,
  3153. &am33xx_l4_wkup__rtc,
  3154. &am33xx_l4_wkup__i2c1,
  3155. &am33xx_l4_wkup__gpio0,
  3156. &am33xx_l4_wkup__adc_tsc,
  3157. &am33xx_l4_wkup__wd_timer1,
  3158. &am33xx_l4_hs__pruss,
  3159. &am33xx_l4_per__dcan0,
  3160. &am33xx_l4_per__dcan1,
  3161. &am33xx_l4_per__gpio1,
  3162. &am33xx_l4_per__gpio2,
  3163. &am33xx_l4_per__gpio3,
  3164. &am33xx_l4_per__i2c2,
  3165. &am33xx_l4_per__i2c3,
  3166. &am33xx_l4_per__mailbox,
  3167. &am33xx_l4_ls__mcasp0,
  3168. &am33xx_l3_s__mcasp0_data,
  3169. &am33xx_l4_ls__mcasp1,
  3170. &am33xx_l3_s__mcasp1_data,
  3171. &am33xx_l4_ls__mmc0,
  3172. &am33xx_l4_ls__mmc1,
  3173. &am33xx_l3_s__mmc2,
  3174. &am33xx_l4_ls__timer2,
  3175. &am33xx_l4_ls__timer3,
  3176. &am33xx_l4_ls__timer4,
  3177. &am33xx_l4_ls__timer5,
  3178. &am33xx_l4_ls__timer6,
  3179. &am33xx_l4_ls__timer7,
  3180. &am33xx_l3_main__tpcc,
  3181. &am33xx_l4_ls__uart2,
  3182. &am33xx_l4_ls__uart3,
  3183. &am33xx_l4_ls__uart4,
  3184. &am33xx_l4_ls__uart5,
  3185. &am33xx_l4_ls__uart6,
  3186. &am33xx_l4_ls__spinlock,
  3187. &am33xx_l4_ls__elm,
  3188. &am33xx_l4_ls__epwmss0,
  3189. &am33xx_epwmss0__ecap0,
  3190. &am33xx_epwmss0__eqep0,
  3191. &am33xx_epwmss0__ehrpwm0,
  3192. &am33xx_l4_ls__epwmss1,
  3193. &am33xx_epwmss1__ecap1,
  3194. &am33xx_epwmss1__eqep1,
  3195. &am33xx_epwmss1__ehrpwm1,
  3196. &am33xx_l4_ls__epwmss2,
  3197. &am33xx_epwmss2__ecap2,
  3198. &am33xx_epwmss2__eqep2,
  3199. &am33xx_epwmss2__ehrpwm2,
  3200. &am33xx_l3_s__gpmc,
  3201. &am33xx_l3_main__lcdc,
  3202. &am33xx_l4_ls__mcspi0,
  3203. &am33xx_l4_ls__mcspi1,
  3204. &am33xx_l3_main__tptc0,
  3205. &am33xx_l3_main__tptc1,
  3206. &am33xx_l3_main__tptc2,
  3207. &am33xx_l3_main__ocmc,
  3208. &am33xx_l3_s__usbss,
  3209. &am33xx_l4_hs__cpgmac0,
  3210. &am33xx_cpgmac0__mdio,
  3211. &am33xx_l3_main__sha0,
  3212. &am33xx_l3_main__aes0,
  3213. NULL,
  3214. };
  3215. int __init am33xx_hwmod_init(void)
  3216. {
  3217. omap_hwmod_init();
  3218. return omap_hwmod_register_links(am33xx_hwmod_ocp_ifs);
  3219. }