omap_hwmod_3xxx_data.c 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393
  1. /*
  2. * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * The data in this file should be completely autogeneratable from
  13. * the TI hardware database or other technical documentation.
  14. *
  15. * XXX these should be marked initdata for multi-OMAP kernels
  16. */
  17. #include <plat/omap_hwmod.h>
  18. #include <mach/irqs.h>
  19. #include <plat/cpu.h>
  20. #include <plat/dma.h>
  21. #include <plat/serial.h>
  22. #include <plat/l3_3xxx.h>
  23. #include <plat/l4_3xxx.h>
  24. #include <plat/i2c.h>
  25. #include <plat/gpio.h>
  26. #include <plat/mmc.h>
  27. #include <plat/mcbsp.h>
  28. #include <plat/mcspi.h>
  29. #include <plat/dmtimer.h>
  30. #include "omap_hwmod_common_data.h"
  31. #include "smartreflex.h"
  32. #include "prm-regbits-34xx.h"
  33. #include "cm-regbits-34xx.h"
  34. #include "wd_timer.h"
  35. #include <mach/am35xx.h>
  36. /*
  37. * OMAP3xxx hardware module integration data
  38. *
  39. * All of the data in this section should be autogeneratable from the
  40. * TI hardware database or other technical documentation. Data that
  41. * is driver-specific or driver-kernel integration-specific belongs
  42. * elsewhere.
  43. */
  44. /*
  45. * IP blocks
  46. */
  47. /* L3 */
  48. static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
  49. { .irq = INT_34XX_L3_DBG_IRQ },
  50. { .irq = INT_34XX_L3_APP_IRQ },
  51. { .irq = -1 }
  52. };
  53. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  54. .name = "l3_main",
  55. .class = &l3_hwmod_class,
  56. .mpu_irqs = omap3xxx_l3_main_irqs,
  57. .flags = HWMOD_NO_IDLEST,
  58. };
  59. /* L4 CORE */
  60. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  61. .name = "l4_core",
  62. .class = &l4_hwmod_class,
  63. .flags = HWMOD_NO_IDLEST,
  64. };
  65. /* L4 PER */
  66. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  67. .name = "l4_per",
  68. .class = &l4_hwmod_class,
  69. .flags = HWMOD_NO_IDLEST,
  70. };
  71. /* L4 WKUP */
  72. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  73. .name = "l4_wkup",
  74. .class = &l4_hwmod_class,
  75. .flags = HWMOD_NO_IDLEST,
  76. };
  77. /* L4 SEC */
  78. static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
  79. .name = "l4_sec",
  80. .class = &l4_hwmod_class,
  81. .flags = HWMOD_NO_IDLEST,
  82. };
  83. /* MPU */
  84. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  85. .name = "mpu",
  86. .class = &mpu_hwmod_class,
  87. .main_clk = "arm_fck",
  88. };
  89. /* IVA2 (IVA2) */
  90. static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
  91. { .name = "logic", .rst_shift = 0 },
  92. { .name = "seq0", .rst_shift = 1 },
  93. { .name = "seq1", .rst_shift = 2 },
  94. };
  95. static struct omap_hwmod omap3xxx_iva_hwmod = {
  96. .name = "iva",
  97. .class = &iva_hwmod_class,
  98. .clkdm_name = "iva2_clkdm",
  99. .rst_lines = omap3xxx_iva_resets,
  100. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
  101. .main_clk = "iva2_ck",
  102. };
  103. /* timer class */
  104. static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
  105. .rev_offs = 0x0000,
  106. .sysc_offs = 0x0010,
  107. .syss_offs = 0x0014,
  108. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  109. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  110. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  111. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  112. .sysc_fields = &omap_hwmod_sysc_type1,
  113. };
  114. static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
  115. .name = "timer",
  116. .sysc = &omap3xxx_timer_1ms_sysc,
  117. .rev = OMAP_TIMER_IP_VERSION_1,
  118. };
  119. static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
  120. .rev_offs = 0x0000,
  121. .sysc_offs = 0x0010,
  122. .syss_offs = 0x0014,
  123. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  124. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  125. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  126. .sysc_fields = &omap_hwmod_sysc_type1,
  127. };
  128. static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
  129. .name = "timer",
  130. .sysc = &omap3xxx_timer_sysc,
  131. .rev = OMAP_TIMER_IP_VERSION_1,
  132. };
  133. /* secure timers dev attribute */
  134. static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
  135. .timer_capability = OMAP_TIMER_SECURE,
  136. };
  137. /* always-on timers dev attribute */
  138. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  139. .timer_capability = OMAP_TIMER_ALWON,
  140. };
  141. /* pwm timers dev attribute */
  142. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  143. .timer_capability = OMAP_TIMER_HAS_PWM,
  144. };
  145. /* timer1 */
  146. static struct omap_hwmod omap3xxx_timer1_hwmod = {
  147. .name = "timer1",
  148. .mpu_irqs = omap2_timer1_mpu_irqs,
  149. .main_clk = "gpt1_fck",
  150. .prcm = {
  151. .omap2 = {
  152. .prcm_reg_id = 1,
  153. .module_bit = OMAP3430_EN_GPT1_SHIFT,
  154. .module_offs = WKUP_MOD,
  155. .idlest_reg_id = 1,
  156. .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
  157. },
  158. },
  159. .dev_attr = &capability_alwon_dev_attr,
  160. .class = &omap3xxx_timer_1ms_hwmod_class,
  161. };
  162. /* timer2 */
  163. static struct omap_hwmod omap3xxx_timer2_hwmod = {
  164. .name = "timer2",
  165. .mpu_irqs = omap2_timer2_mpu_irqs,
  166. .main_clk = "gpt2_fck",
  167. .prcm = {
  168. .omap2 = {
  169. .prcm_reg_id = 1,
  170. .module_bit = OMAP3430_EN_GPT2_SHIFT,
  171. .module_offs = OMAP3430_PER_MOD,
  172. .idlest_reg_id = 1,
  173. .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
  174. },
  175. },
  176. .dev_attr = &capability_alwon_dev_attr,
  177. .class = &omap3xxx_timer_1ms_hwmod_class,
  178. };
  179. /* timer3 */
  180. static struct omap_hwmod omap3xxx_timer3_hwmod = {
  181. .name = "timer3",
  182. .mpu_irqs = omap2_timer3_mpu_irqs,
  183. .main_clk = "gpt3_fck",
  184. .prcm = {
  185. .omap2 = {
  186. .prcm_reg_id = 1,
  187. .module_bit = OMAP3430_EN_GPT3_SHIFT,
  188. .module_offs = OMAP3430_PER_MOD,
  189. .idlest_reg_id = 1,
  190. .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
  191. },
  192. },
  193. .dev_attr = &capability_alwon_dev_attr,
  194. .class = &omap3xxx_timer_hwmod_class,
  195. };
  196. /* timer4 */
  197. static struct omap_hwmod omap3xxx_timer4_hwmod = {
  198. .name = "timer4",
  199. .mpu_irqs = omap2_timer4_mpu_irqs,
  200. .main_clk = "gpt4_fck",
  201. .prcm = {
  202. .omap2 = {
  203. .prcm_reg_id = 1,
  204. .module_bit = OMAP3430_EN_GPT4_SHIFT,
  205. .module_offs = OMAP3430_PER_MOD,
  206. .idlest_reg_id = 1,
  207. .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
  208. },
  209. },
  210. .dev_attr = &capability_alwon_dev_attr,
  211. .class = &omap3xxx_timer_hwmod_class,
  212. };
  213. /* timer5 */
  214. static struct omap_hwmod omap3xxx_timer5_hwmod = {
  215. .name = "timer5",
  216. .mpu_irqs = omap2_timer5_mpu_irqs,
  217. .main_clk = "gpt5_fck",
  218. .prcm = {
  219. .omap2 = {
  220. .prcm_reg_id = 1,
  221. .module_bit = OMAP3430_EN_GPT5_SHIFT,
  222. .module_offs = OMAP3430_PER_MOD,
  223. .idlest_reg_id = 1,
  224. .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
  225. },
  226. },
  227. .dev_attr = &capability_alwon_dev_attr,
  228. .class = &omap3xxx_timer_hwmod_class,
  229. };
  230. /* timer6 */
  231. static struct omap_hwmod omap3xxx_timer6_hwmod = {
  232. .name = "timer6",
  233. .mpu_irqs = omap2_timer6_mpu_irqs,
  234. .main_clk = "gpt6_fck",
  235. .prcm = {
  236. .omap2 = {
  237. .prcm_reg_id = 1,
  238. .module_bit = OMAP3430_EN_GPT6_SHIFT,
  239. .module_offs = OMAP3430_PER_MOD,
  240. .idlest_reg_id = 1,
  241. .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
  242. },
  243. },
  244. .dev_attr = &capability_alwon_dev_attr,
  245. .class = &omap3xxx_timer_hwmod_class,
  246. };
  247. /* timer7 */
  248. static struct omap_hwmod omap3xxx_timer7_hwmod = {
  249. .name = "timer7",
  250. .mpu_irqs = omap2_timer7_mpu_irqs,
  251. .main_clk = "gpt7_fck",
  252. .prcm = {
  253. .omap2 = {
  254. .prcm_reg_id = 1,
  255. .module_bit = OMAP3430_EN_GPT7_SHIFT,
  256. .module_offs = OMAP3430_PER_MOD,
  257. .idlest_reg_id = 1,
  258. .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
  259. },
  260. },
  261. .dev_attr = &capability_alwon_dev_attr,
  262. .class = &omap3xxx_timer_hwmod_class,
  263. };
  264. /* timer8 */
  265. static struct omap_hwmod omap3xxx_timer8_hwmod = {
  266. .name = "timer8",
  267. .mpu_irqs = omap2_timer8_mpu_irqs,
  268. .main_clk = "gpt8_fck",
  269. .prcm = {
  270. .omap2 = {
  271. .prcm_reg_id = 1,
  272. .module_bit = OMAP3430_EN_GPT8_SHIFT,
  273. .module_offs = OMAP3430_PER_MOD,
  274. .idlest_reg_id = 1,
  275. .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
  276. },
  277. },
  278. .dev_attr = &capability_pwm_dev_attr,
  279. .class = &omap3xxx_timer_hwmod_class,
  280. };
  281. /* timer9 */
  282. static struct omap_hwmod omap3xxx_timer9_hwmod = {
  283. .name = "timer9",
  284. .mpu_irqs = omap2_timer9_mpu_irqs,
  285. .main_clk = "gpt9_fck",
  286. .prcm = {
  287. .omap2 = {
  288. .prcm_reg_id = 1,
  289. .module_bit = OMAP3430_EN_GPT9_SHIFT,
  290. .module_offs = OMAP3430_PER_MOD,
  291. .idlest_reg_id = 1,
  292. .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
  293. },
  294. },
  295. .dev_attr = &capability_pwm_dev_attr,
  296. .class = &omap3xxx_timer_hwmod_class,
  297. };
  298. /* timer10 */
  299. static struct omap_hwmod omap3xxx_timer10_hwmod = {
  300. .name = "timer10",
  301. .mpu_irqs = omap2_timer10_mpu_irqs,
  302. .main_clk = "gpt10_fck",
  303. .prcm = {
  304. .omap2 = {
  305. .prcm_reg_id = 1,
  306. .module_bit = OMAP3430_EN_GPT10_SHIFT,
  307. .module_offs = CORE_MOD,
  308. .idlest_reg_id = 1,
  309. .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
  310. },
  311. },
  312. .dev_attr = &capability_pwm_dev_attr,
  313. .class = &omap3xxx_timer_1ms_hwmod_class,
  314. };
  315. /* timer11 */
  316. static struct omap_hwmod omap3xxx_timer11_hwmod = {
  317. .name = "timer11",
  318. .mpu_irqs = omap2_timer11_mpu_irqs,
  319. .main_clk = "gpt11_fck",
  320. .prcm = {
  321. .omap2 = {
  322. .prcm_reg_id = 1,
  323. .module_bit = OMAP3430_EN_GPT11_SHIFT,
  324. .module_offs = CORE_MOD,
  325. .idlest_reg_id = 1,
  326. .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
  327. },
  328. },
  329. .dev_attr = &capability_pwm_dev_attr,
  330. .class = &omap3xxx_timer_hwmod_class,
  331. };
  332. /* timer12 */
  333. static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
  334. { .irq = 95, },
  335. { .irq = -1 }
  336. };
  337. static struct omap_hwmod omap3xxx_timer12_hwmod = {
  338. .name = "timer12",
  339. .mpu_irqs = omap3xxx_timer12_mpu_irqs,
  340. .main_clk = "gpt12_fck",
  341. .prcm = {
  342. .omap2 = {
  343. .prcm_reg_id = 1,
  344. .module_bit = OMAP3430_EN_GPT12_SHIFT,
  345. .module_offs = WKUP_MOD,
  346. .idlest_reg_id = 1,
  347. .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
  348. },
  349. },
  350. .dev_attr = &capability_secure_dev_attr,
  351. .class = &omap3xxx_timer_hwmod_class,
  352. };
  353. /*
  354. * 'wd_timer' class
  355. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  356. * overflow condition
  357. */
  358. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  359. .rev_offs = 0x0000,
  360. .sysc_offs = 0x0010,
  361. .syss_offs = 0x0014,
  362. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  363. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  364. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  365. SYSS_HAS_RESET_STATUS),
  366. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  367. .sysc_fields = &omap_hwmod_sysc_type1,
  368. };
  369. /* I2C common */
  370. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  371. .rev_offs = 0x00,
  372. .sysc_offs = 0x20,
  373. .syss_offs = 0x10,
  374. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  375. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  376. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  377. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  378. .clockact = CLOCKACT_TEST_ICLK,
  379. .sysc_fields = &omap_hwmod_sysc_type1,
  380. };
  381. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  382. .name = "wd_timer",
  383. .sysc = &omap3xxx_wd_timer_sysc,
  384. .pre_shutdown = &omap2_wd_timer_disable,
  385. .reset = &omap2_wd_timer_reset,
  386. };
  387. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  388. .name = "wd_timer2",
  389. .class = &omap3xxx_wd_timer_hwmod_class,
  390. .main_clk = "wdt2_fck",
  391. .prcm = {
  392. .omap2 = {
  393. .prcm_reg_id = 1,
  394. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  395. .module_offs = WKUP_MOD,
  396. .idlest_reg_id = 1,
  397. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  398. },
  399. },
  400. /*
  401. * XXX: Use software supervised mode, HW supervised smartidle seems to
  402. * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
  403. */
  404. .flags = HWMOD_SWSUP_SIDLE,
  405. };
  406. /* UART1 */
  407. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  408. .name = "uart1",
  409. .mpu_irqs = omap2_uart1_mpu_irqs,
  410. .sdma_reqs = omap2_uart1_sdma_reqs,
  411. .main_clk = "uart1_fck",
  412. .prcm = {
  413. .omap2 = {
  414. .module_offs = CORE_MOD,
  415. .prcm_reg_id = 1,
  416. .module_bit = OMAP3430_EN_UART1_SHIFT,
  417. .idlest_reg_id = 1,
  418. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  419. },
  420. },
  421. .class = &omap2_uart_class,
  422. };
  423. /* UART2 */
  424. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  425. .name = "uart2",
  426. .mpu_irqs = omap2_uart2_mpu_irqs,
  427. .sdma_reqs = omap2_uart2_sdma_reqs,
  428. .main_clk = "uart2_fck",
  429. .prcm = {
  430. .omap2 = {
  431. .module_offs = CORE_MOD,
  432. .prcm_reg_id = 1,
  433. .module_bit = OMAP3430_EN_UART2_SHIFT,
  434. .idlest_reg_id = 1,
  435. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  436. },
  437. },
  438. .class = &omap2_uart_class,
  439. };
  440. /* UART3 */
  441. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  442. .name = "uart3",
  443. .mpu_irqs = omap2_uart3_mpu_irqs,
  444. .sdma_reqs = omap2_uart3_sdma_reqs,
  445. .main_clk = "uart3_fck",
  446. .prcm = {
  447. .omap2 = {
  448. .module_offs = OMAP3430_PER_MOD,
  449. .prcm_reg_id = 1,
  450. .module_bit = OMAP3430_EN_UART3_SHIFT,
  451. .idlest_reg_id = 1,
  452. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  453. },
  454. },
  455. .class = &omap2_uart_class,
  456. };
  457. /* UART4 */
  458. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  459. { .irq = INT_36XX_UART4_IRQ, },
  460. { .irq = -1 }
  461. };
  462. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  463. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  464. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  465. { .dma_req = -1 }
  466. };
  467. static struct omap_hwmod omap36xx_uart4_hwmod = {
  468. .name = "uart4",
  469. .mpu_irqs = uart4_mpu_irqs,
  470. .sdma_reqs = uart4_sdma_reqs,
  471. .main_clk = "uart4_fck",
  472. .prcm = {
  473. .omap2 = {
  474. .module_offs = OMAP3430_PER_MOD,
  475. .prcm_reg_id = 1,
  476. .module_bit = OMAP3630_EN_UART4_SHIFT,
  477. .idlest_reg_id = 1,
  478. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  479. },
  480. },
  481. .class = &omap2_uart_class,
  482. };
  483. static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
  484. { .irq = INT_35XX_UART4_IRQ, },
  485. };
  486. static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
  487. { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
  488. { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
  489. };
  490. static struct omap_hwmod am35xx_uart4_hwmod = {
  491. .name = "uart4",
  492. .mpu_irqs = am35xx_uart4_mpu_irqs,
  493. .sdma_reqs = am35xx_uart4_sdma_reqs,
  494. .main_clk = "uart4_fck",
  495. .prcm = {
  496. .omap2 = {
  497. .module_offs = CORE_MOD,
  498. .prcm_reg_id = 1,
  499. .module_bit = OMAP3430_EN_UART4_SHIFT,
  500. .idlest_reg_id = 1,
  501. .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
  502. },
  503. },
  504. .class = &omap2_uart_class,
  505. };
  506. static struct omap_hwmod_class i2c_class = {
  507. .name = "i2c",
  508. .sysc = &i2c_sysc,
  509. .rev = OMAP_I2C_IP_VERSION_1,
  510. .reset = &omap_i2c_reset,
  511. };
  512. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  513. { .name = "dispc", .dma_req = 5 },
  514. { .name = "dsi1", .dma_req = 74 },
  515. { .dma_req = -1 }
  516. };
  517. /* dss */
  518. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  519. /*
  520. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  521. * driver does not use these clocks.
  522. */
  523. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  524. { .role = "tv_clk", .clk = "dss_tv_fck" },
  525. /* required only on OMAP3430 */
  526. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  527. };
  528. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  529. .name = "dss_core",
  530. .class = &omap2_dss_hwmod_class,
  531. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  532. .sdma_reqs = omap3xxx_dss_sdma_chs,
  533. .prcm = {
  534. .omap2 = {
  535. .prcm_reg_id = 1,
  536. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  537. .module_offs = OMAP3430_DSS_MOD,
  538. .idlest_reg_id = 1,
  539. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  540. },
  541. },
  542. .opt_clks = dss_opt_clks,
  543. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  544. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  545. };
  546. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  547. .name = "dss_core",
  548. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  549. .class = &omap2_dss_hwmod_class,
  550. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  551. .sdma_reqs = omap3xxx_dss_sdma_chs,
  552. .prcm = {
  553. .omap2 = {
  554. .prcm_reg_id = 1,
  555. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  556. .module_offs = OMAP3430_DSS_MOD,
  557. .idlest_reg_id = 1,
  558. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  559. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  560. },
  561. },
  562. .opt_clks = dss_opt_clks,
  563. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  564. };
  565. /*
  566. * 'dispc' class
  567. * display controller
  568. */
  569. static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
  570. .rev_offs = 0x0000,
  571. .sysc_offs = 0x0010,
  572. .syss_offs = 0x0014,
  573. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  574. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  575. SYSC_HAS_ENAWAKEUP),
  576. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  577. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  578. .sysc_fields = &omap_hwmod_sysc_type1,
  579. };
  580. static struct omap_hwmod_class omap3_dispc_hwmod_class = {
  581. .name = "dispc",
  582. .sysc = &omap3_dispc_sysc,
  583. };
  584. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  585. .name = "dss_dispc",
  586. .class = &omap3_dispc_hwmod_class,
  587. .mpu_irqs = omap2_dispc_irqs,
  588. .main_clk = "dss1_alwon_fck",
  589. .prcm = {
  590. .omap2 = {
  591. .prcm_reg_id = 1,
  592. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  593. .module_offs = OMAP3430_DSS_MOD,
  594. },
  595. },
  596. .flags = HWMOD_NO_IDLEST,
  597. .dev_attr = &omap2_3_dss_dispc_dev_attr
  598. };
  599. /*
  600. * 'dsi' class
  601. * display serial interface controller
  602. */
  603. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  604. .name = "dsi",
  605. };
  606. static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
  607. { .irq = 25 },
  608. { .irq = -1 }
  609. };
  610. /* dss_dsi1 */
  611. static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
  612. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  613. };
  614. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  615. .name = "dss_dsi1",
  616. .class = &omap3xxx_dsi_hwmod_class,
  617. .mpu_irqs = omap3xxx_dsi1_irqs,
  618. .main_clk = "dss1_alwon_fck",
  619. .prcm = {
  620. .omap2 = {
  621. .prcm_reg_id = 1,
  622. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  623. .module_offs = OMAP3430_DSS_MOD,
  624. },
  625. },
  626. .opt_clks = dss_dsi1_opt_clks,
  627. .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
  628. .flags = HWMOD_NO_IDLEST,
  629. };
  630. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  631. { .role = "ick", .clk = "dss_ick" },
  632. };
  633. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  634. .name = "dss_rfbi",
  635. .class = &omap2_rfbi_hwmod_class,
  636. .main_clk = "dss1_alwon_fck",
  637. .prcm = {
  638. .omap2 = {
  639. .prcm_reg_id = 1,
  640. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  641. .module_offs = OMAP3430_DSS_MOD,
  642. },
  643. },
  644. .opt_clks = dss_rfbi_opt_clks,
  645. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  646. .flags = HWMOD_NO_IDLEST,
  647. };
  648. static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
  649. /* required only on OMAP3430 */
  650. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  651. };
  652. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  653. .name = "dss_venc",
  654. .class = &omap2_venc_hwmod_class,
  655. .main_clk = "dss_tv_fck",
  656. .prcm = {
  657. .omap2 = {
  658. .prcm_reg_id = 1,
  659. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  660. .module_offs = OMAP3430_DSS_MOD,
  661. },
  662. },
  663. .opt_clks = dss_venc_opt_clks,
  664. .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
  665. .flags = HWMOD_NO_IDLEST,
  666. };
  667. /* I2C1 */
  668. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  669. .fifo_depth = 8, /* bytes */
  670. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  671. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  672. OMAP_I2C_FLAG_BUS_SHIFT_2,
  673. };
  674. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  675. .name = "i2c1",
  676. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  677. .mpu_irqs = omap2_i2c1_mpu_irqs,
  678. .sdma_reqs = omap2_i2c1_sdma_reqs,
  679. .main_clk = "i2c1_fck",
  680. .prcm = {
  681. .omap2 = {
  682. .module_offs = CORE_MOD,
  683. .prcm_reg_id = 1,
  684. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  685. .idlest_reg_id = 1,
  686. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  687. },
  688. },
  689. .class = &i2c_class,
  690. .dev_attr = &i2c1_dev_attr,
  691. };
  692. /* I2C2 */
  693. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  694. .fifo_depth = 8, /* bytes */
  695. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  696. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  697. OMAP_I2C_FLAG_BUS_SHIFT_2,
  698. };
  699. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  700. .name = "i2c2",
  701. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  702. .mpu_irqs = omap2_i2c2_mpu_irqs,
  703. .sdma_reqs = omap2_i2c2_sdma_reqs,
  704. .main_clk = "i2c2_fck",
  705. .prcm = {
  706. .omap2 = {
  707. .module_offs = CORE_MOD,
  708. .prcm_reg_id = 1,
  709. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  710. .idlest_reg_id = 1,
  711. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  712. },
  713. },
  714. .class = &i2c_class,
  715. .dev_attr = &i2c2_dev_attr,
  716. };
  717. /* I2C3 */
  718. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  719. .fifo_depth = 64, /* bytes */
  720. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  721. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  722. OMAP_I2C_FLAG_BUS_SHIFT_2,
  723. };
  724. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  725. { .irq = INT_34XX_I2C3_IRQ, },
  726. { .irq = -1 }
  727. };
  728. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  729. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  730. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  731. { .dma_req = -1 }
  732. };
  733. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  734. .name = "i2c3",
  735. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  736. .mpu_irqs = i2c3_mpu_irqs,
  737. .sdma_reqs = i2c3_sdma_reqs,
  738. .main_clk = "i2c3_fck",
  739. .prcm = {
  740. .omap2 = {
  741. .module_offs = CORE_MOD,
  742. .prcm_reg_id = 1,
  743. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  744. .idlest_reg_id = 1,
  745. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  746. },
  747. },
  748. .class = &i2c_class,
  749. .dev_attr = &i2c3_dev_attr,
  750. };
  751. /*
  752. * 'gpio' class
  753. * general purpose io module
  754. */
  755. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  756. .rev_offs = 0x0000,
  757. .sysc_offs = 0x0010,
  758. .syss_offs = 0x0014,
  759. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  760. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  761. SYSS_HAS_RESET_STATUS),
  762. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  763. .sysc_fields = &omap_hwmod_sysc_type1,
  764. };
  765. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  766. .name = "gpio",
  767. .sysc = &omap3xxx_gpio_sysc,
  768. .rev = 1,
  769. };
  770. /* gpio_dev_attr */
  771. static struct omap_gpio_dev_attr gpio_dev_attr = {
  772. .bank_width = 32,
  773. .dbck_flag = true,
  774. };
  775. /* gpio1 */
  776. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  777. { .role = "dbclk", .clk = "gpio1_dbck", },
  778. };
  779. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  780. .name = "gpio1",
  781. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  782. .mpu_irqs = omap2_gpio1_irqs,
  783. .main_clk = "gpio1_ick",
  784. .opt_clks = gpio1_opt_clks,
  785. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  786. .prcm = {
  787. .omap2 = {
  788. .prcm_reg_id = 1,
  789. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  790. .module_offs = WKUP_MOD,
  791. .idlest_reg_id = 1,
  792. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  793. },
  794. },
  795. .class = &omap3xxx_gpio_hwmod_class,
  796. .dev_attr = &gpio_dev_attr,
  797. };
  798. /* gpio2 */
  799. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  800. { .role = "dbclk", .clk = "gpio2_dbck", },
  801. };
  802. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  803. .name = "gpio2",
  804. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  805. .mpu_irqs = omap2_gpio2_irqs,
  806. .main_clk = "gpio2_ick",
  807. .opt_clks = gpio2_opt_clks,
  808. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  809. .prcm = {
  810. .omap2 = {
  811. .prcm_reg_id = 1,
  812. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  813. .module_offs = OMAP3430_PER_MOD,
  814. .idlest_reg_id = 1,
  815. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  816. },
  817. },
  818. .class = &omap3xxx_gpio_hwmod_class,
  819. .dev_attr = &gpio_dev_attr,
  820. };
  821. /* gpio3 */
  822. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  823. { .role = "dbclk", .clk = "gpio3_dbck", },
  824. };
  825. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  826. .name = "gpio3",
  827. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  828. .mpu_irqs = omap2_gpio3_irqs,
  829. .main_clk = "gpio3_ick",
  830. .opt_clks = gpio3_opt_clks,
  831. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  832. .prcm = {
  833. .omap2 = {
  834. .prcm_reg_id = 1,
  835. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  836. .module_offs = OMAP3430_PER_MOD,
  837. .idlest_reg_id = 1,
  838. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  839. },
  840. },
  841. .class = &omap3xxx_gpio_hwmod_class,
  842. .dev_attr = &gpio_dev_attr,
  843. };
  844. /* gpio4 */
  845. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  846. { .role = "dbclk", .clk = "gpio4_dbck", },
  847. };
  848. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  849. .name = "gpio4",
  850. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  851. .mpu_irqs = omap2_gpio4_irqs,
  852. .main_clk = "gpio4_ick",
  853. .opt_clks = gpio4_opt_clks,
  854. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  855. .prcm = {
  856. .omap2 = {
  857. .prcm_reg_id = 1,
  858. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  859. .module_offs = OMAP3430_PER_MOD,
  860. .idlest_reg_id = 1,
  861. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  862. },
  863. },
  864. .class = &omap3xxx_gpio_hwmod_class,
  865. .dev_attr = &gpio_dev_attr,
  866. };
  867. /* gpio5 */
  868. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  869. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  870. { .irq = -1 }
  871. };
  872. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  873. { .role = "dbclk", .clk = "gpio5_dbck", },
  874. };
  875. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  876. .name = "gpio5",
  877. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  878. .mpu_irqs = omap3xxx_gpio5_irqs,
  879. .main_clk = "gpio5_ick",
  880. .opt_clks = gpio5_opt_clks,
  881. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  882. .prcm = {
  883. .omap2 = {
  884. .prcm_reg_id = 1,
  885. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  886. .module_offs = OMAP3430_PER_MOD,
  887. .idlest_reg_id = 1,
  888. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  889. },
  890. },
  891. .class = &omap3xxx_gpio_hwmod_class,
  892. .dev_attr = &gpio_dev_attr,
  893. };
  894. /* gpio6 */
  895. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  896. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  897. { .irq = -1 }
  898. };
  899. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  900. { .role = "dbclk", .clk = "gpio6_dbck", },
  901. };
  902. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  903. .name = "gpio6",
  904. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  905. .mpu_irqs = omap3xxx_gpio6_irqs,
  906. .main_clk = "gpio6_ick",
  907. .opt_clks = gpio6_opt_clks,
  908. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  909. .prcm = {
  910. .omap2 = {
  911. .prcm_reg_id = 1,
  912. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  913. .module_offs = OMAP3430_PER_MOD,
  914. .idlest_reg_id = 1,
  915. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  916. },
  917. },
  918. .class = &omap3xxx_gpio_hwmod_class,
  919. .dev_attr = &gpio_dev_attr,
  920. };
  921. /* dma attributes */
  922. static struct omap_dma_dev_attr dma_dev_attr = {
  923. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  924. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  925. .lch_count = 32,
  926. };
  927. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  928. .rev_offs = 0x0000,
  929. .sysc_offs = 0x002c,
  930. .syss_offs = 0x0028,
  931. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  932. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  933. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  934. SYSS_HAS_RESET_STATUS),
  935. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  936. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  937. .sysc_fields = &omap_hwmod_sysc_type1,
  938. };
  939. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  940. .name = "dma",
  941. .sysc = &omap3xxx_dma_sysc,
  942. };
  943. /* dma_system */
  944. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  945. .name = "dma",
  946. .class = &omap3xxx_dma_hwmod_class,
  947. .mpu_irqs = omap2_dma_system_irqs,
  948. .main_clk = "core_l3_ick",
  949. .prcm = {
  950. .omap2 = {
  951. .module_offs = CORE_MOD,
  952. .prcm_reg_id = 1,
  953. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  954. .idlest_reg_id = 1,
  955. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  956. },
  957. },
  958. .dev_attr = &dma_dev_attr,
  959. .flags = HWMOD_NO_IDLEST,
  960. };
  961. /*
  962. * 'mcbsp' class
  963. * multi channel buffered serial port controller
  964. */
  965. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
  966. .sysc_offs = 0x008c,
  967. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
  968. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  969. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  970. .sysc_fields = &omap_hwmod_sysc_type1,
  971. .clockact = 0x2,
  972. };
  973. static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
  974. .name = "mcbsp",
  975. .sysc = &omap3xxx_mcbsp_sysc,
  976. .rev = MCBSP_CONFIG_TYPE3,
  977. };
  978. /* McBSP functional clock mapping */
  979. static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
  980. { .role = "pad_fck", .clk = "mcbsp_clks" },
  981. { .role = "prcm_fck", .clk = "core_96m_fck" },
  982. };
  983. static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
  984. { .role = "pad_fck", .clk = "mcbsp_clks" },
  985. { .role = "prcm_fck", .clk = "per_96m_fck" },
  986. };
  987. /* mcbsp1 */
  988. static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
  989. { .name = "common", .irq = 16 },
  990. { .name = "tx", .irq = 59 },
  991. { .name = "rx", .irq = 60 },
  992. { .irq = -1 }
  993. };
  994. static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  995. .name = "mcbsp1",
  996. .class = &omap3xxx_mcbsp_hwmod_class,
  997. .mpu_irqs = omap3xxx_mcbsp1_irqs,
  998. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  999. .main_clk = "mcbsp1_fck",
  1000. .prcm = {
  1001. .omap2 = {
  1002. .prcm_reg_id = 1,
  1003. .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
  1004. .module_offs = CORE_MOD,
  1005. .idlest_reg_id = 1,
  1006. .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
  1007. },
  1008. },
  1009. .opt_clks = mcbsp15_opt_clks,
  1010. .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
  1011. };
  1012. /* mcbsp2 */
  1013. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
  1014. { .name = "common", .irq = 17 },
  1015. { .name = "tx", .irq = 62 },
  1016. { .name = "rx", .irq = 63 },
  1017. { .irq = -1 }
  1018. };
  1019. static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
  1020. .sidetone = "mcbsp2_sidetone",
  1021. };
  1022. static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
  1023. .name = "mcbsp2",
  1024. .class = &omap3xxx_mcbsp_hwmod_class,
  1025. .mpu_irqs = omap3xxx_mcbsp2_irqs,
  1026. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1027. .main_clk = "mcbsp2_fck",
  1028. .prcm = {
  1029. .omap2 = {
  1030. .prcm_reg_id = 1,
  1031. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  1032. .module_offs = OMAP3430_PER_MOD,
  1033. .idlest_reg_id = 1,
  1034. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  1035. },
  1036. },
  1037. .opt_clks = mcbsp234_opt_clks,
  1038. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1039. .dev_attr = &omap34xx_mcbsp2_dev_attr,
  1040. };
  1041. /* mcbsp3 */
  1042. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
  1043. { .name = "common", .irq = 22 },
  1044. { .name = "tx", .irq = 89 },
  1045. { .name = "rx", .irq = 90 },
  1046. { .irq = -1 }
  1047. };
  1048. static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
  1049. .sidetone = "mcbsp3_sidetone",
  1050. };
  1051. static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
  1052. .name = "mcbsp3",
  1053. .class = &omap3xxx_mcbsp_hwmod_class,
  1054. .mpu_irqs = omap3xxx_mcbsp3_irqs,
  1055. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  1056. .main_clk = "mcbsp3_fck",
  1057. .prcm = {
  1058. .omap2 = {
  1059. .prcm_reg_id = 1,
  1060. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  1061. .module_offs = OMAP3430_PER_MOD,
  1062. .idlest_reg_id = 1,
  1063. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  1064. },
  1065. },
  1066. .opt_clks = mcbsp234_opt_clks,
  1067. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1068. .dev_attr = &omap34xx_mcbsp3_dev_attr,
  1069. };
  1070. /* mcbsp4 */
  1071. static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
  1072. { .name = "common", .irq = 23 },
  1073. { .name = "tx", .irq = 54 },
  1074. { .name = "rx", .irq = 55 },
  1075. { .irq = -1 }
  1076. };
  1077. static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
  1078. { .name = "rx", .dma_req = 20 },
  1079. { .name = "tx", .dma_req = 19 },
  1080. { .dma_req = -1 }
  1081. };
  1082. static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
  1083. .name = "mcbsp4",
  1084. .class = &omap3xxx_mcbsp_hwmod_class,
  1085. .mpu_irqs = omap3xxx_mcbsp4_irqs,
  1086. .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
  1087. .main_clk = "mcbsp4_fck",
  1088. .prcm = {
  1089. .omap2 = {
  1090. .prcm_reg_id = 1,
  1091. .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
  1092. .module_offs = OMAP3430_PER_MOD,
  1093. .idlest_reg_id = 1,
  1094. .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
  1095. },
  1096. },
  1097. .opt_clks = mcbsp234_opt_clks,
  1098. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1099. };
  1100. /* mcbsp5 */
  1101. static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
  1102. { .name = "common", .irq = 27 },
  1103. { .name = "tx", .irq = 81 },
  1104. { .name = "rx", .irq = 82 },
  1105. { .irq = -1 }
  1106. };
  1107. static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
  1108. { .name = "rx", .dma_req = 22 },
  1109. { .name = "tx", .dma_req = 21 },
  1110. { .dma_req = -1 }
  1111. };
  1112. static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
  1113. .name = "mcbsp5",
  1114. .class = &omap3xxx_mcbsp_hwmod_class,
  1115. .mpu_irqs = omap3xxx_mcbsp5_irqs,
  1116. .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
  1117. .main_clk = "mcbsp5_fck",
  1118. .prcm = {
  1119. .omap2 = {
  1120. .prcm_reg_id = 1,
  1121. .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
  1122. .module_offs = CORE_MOD,
  1123. .idlest_reg_id = 1,
  1124. .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
  1125. },
  1126. },
  1127. .opt_clks = mcbsp15_opt_clks,
  1128. .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
  1129. };
  1130. /* 'mcbsp sidetone' class */
  1131. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
  1132. .sysc_offs = 0x0010,
  1133. .sysc_flags = SYSC_HAS_AUTOIDLE,
  1134. .sysc_fields = &omap_hwmod_sysc_type1,
  1135. };
  1136. static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
  1137. .name = "mcbsp_sidetone",
  1138. .sysc = &omap3xxx_mcbsp_sidetone_sysc,
  1139. };
  1140. /* mcbsp2_sidetone */
  1141. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
  1142. { .name = "irq", .irq = 4 },
  1143. { .irq = -1 }
  1144. };
  1145. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  1146. .name = "mcbsp2_sidetone",
  1147. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  1148. .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
  1149. .main_clk = "mcbsp2_fck",
  1150. .prcm = {
  1151. .omap2 = {
  1152. .prcm_reg_id = 1,
  1153. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  1154. .module_offs = OMAP3430_PER_MOD,
  1155. .idlest_reg_id = 1,
  1156. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  1157. },
  1158. },
  1159. };
  1160. /* mcbsp3_sidetone */
  1161. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
  1162. { .name = "irq", .irq = 5 },
  1163. { .irq = -1 }
  1164. };
  1165. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
  1166. .name = "mcbsp3_sidetone",
  1167. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  1168. .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
  1169. .main_clk = "mcbsp3_fck",
  1170. .prcm = {
  1171. .omap2 = {
  1172. .prcm_reg_id = 1,
  1173. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  1174. .module_offs = OMAP3430_PER_MOD,
  1175. .idlest_reg_id = 1,
  1176. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  1177. },
  1178. },
  1179. };
  1180. /* SR common */
  1181. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  1182. .clkact_shift = 20,
  1183. };
  1184. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  1185. .sysc_offs = 0x24,
  1186. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  1187. .clockact = CLOCKACT_TEST_ICLK,
  1188. .sysc_fields = &omap34xx_sr_sysc_fields,
  1189. };
  1190. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  1191. .name = "smartreflex",
  1192. .sysc = &omap34xx_sr_sysc,
  1193. .rev = 1,
  1194. };
  1195. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  1196. .sidle_shift = 24,
  1197. .enwkup_shift = 26,
  1198. };
  1199. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  1200. .sysc_offs = 0x38,
  1201. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1202. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1203. SYSC_NO_CACHE),
  1204. .sysc_fields = &omap36xx_sr_sysc_fields,
  1205. };
  1206. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  1207. .name = "smartreflex",
  1208. .sysc = &omap36xx_sr_sysc,
  1209. .rev = 2,
  1210. };
  1211. /* SR1 */
  1212. static struct omap_smartreflex_dev_attr sr1_dev_attr = {
  1213. .sensor_voltdm_name = "mpu_iva",
  1214. };
  1215. static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
  1216. { .irq = 18 },
  1217. { .irq = -1 }
  1218. };
  1219. static struct omap_hwmod omap34xx_sr1_hwmod = {
  1220. .name = "sr1",
  1221. .class = &omap34xx_smartreflex_hwmod_class,
  1222. .main_clk = "sr1_fck",
  1223. .prcm = {
  1224. .omap2 = {
  1225. .prcm_reg_id = 1,
  1226. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1227. .module_offs = WKUP_MOD,
  1228. .idlest_reg_id = 1,
  1229. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1230. },
  1231. },
  1232. .dev_attr = &sr1_dev_attr,
  1233. .mpu_irqs = omap3_smartreflex_mpu_irqs,
  1234. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1235. };
  1236. static struct omap_hwmod omap36xx_sr1_hwmod = {
  1237. .name = "sr1",
  1238. .class = &omap36xx_smartreflex_hwmod_class,
  1239. .main_clk = "sr1_fck",
  1240. .prcm = {
  1241. .omap2 = {
  1242. .prcm_reg_id = 1,
  1243. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1244. .module_offs = WKUP_MOD,
  1245. .idlest_reg_id = 1,
  1246. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1247. },
  1248. },
  1249. .dev_attr = &sr1_dev_attr,
  1250. .mpu_irqs = omap3_smartreflex_mpu_irqs,
  1251. };
  1252. /* SR2 */
  1253. static struct omap_smartreflex_dev_attr sr2_dev_attr = {
  1254. .sensor_voltdm_name = "core",
  1255. };
  1256. static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
  1257. { .irq = 19 },
  1258. { .irq = -1 }
  1259. };
  1260. static struct omap_hwmod omap34xx_sr2_hwmod = {
  1261. .name = "sr2",
  1262. .class = &omap34xx_smartreflex_hwmod_class,
  1263. .main_clk = "sr2_fck",
  1264. .prcm = {
  1265. .omap2 = {
  1266. .prcm_reg_id = 1,
  1267. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1268. .module_offs = WKUP_MOD,
  1269. .idlest_reg_id = 1,
  1270. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1271. },
  1272. },
  1273. .dev_attr = &sr2_dev_attr,
  1274. .mpu_irqs = omap3_smartreflex_core_irqs,
  1275. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1276. };
  1277. static struct omap_hwmod omap36xx_sr2_hwmod = {
  1278. .name = "sr2",
  1279. .class = &omap36xx_smartreflex_hwmod_class,
  1280. .main_clk = "sr2_fck",
  1281. .prcm = {
  1282. .omap2 = {
  1283. .prcm_reg_id = 1,
  1284. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1285. .module_offs = WKUP_MOD,
  1286. .idlest_reg_id = 1,
  1287. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1288. },
  1289. },
  1290. .dev_attr = &sr2_dev_attr,
  1291. .mpu_irqs = omap3_smartreflex_core_irqs,
  1292. };
  1293. /*
  1294. * 'mailbox' class
  1295. * mailbox module allowing communication between the on-chip processors
  1296. * using a queued mailbox-interrupt mechanism.
  1297. */
  1298. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  1299. .rev_offs = 0x000,
  1300. .sysc_offs = 0x010,
  1301. .syss_offs = 0x014,
  1302. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1303. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1304. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1305. .sysc_fields = &omap_hwmod_sysc_type1,
  1306. };
  1307. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  1308. .name = "mailbox",
  1309. .sysc = &omap3xxx_mailbox_sysc,
  1310. };
  1311. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  1312. { .irq = 26 },
  1313. { .irq = -1 }
  1314. };
  1315. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  1316. .name = "mailbox",
  1317. .class = &omap3xxx_mailbox_hwmod_class,
  1318. .mpu_irqs = omap3xxx_mailbox_irqs,
  1319. .main_clk = "mailboxes_ick",
  1320. .prcm = {
  1321. .omap2 = {
  1322. .prcm_reg_id = 1,
  1323. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  1324. .module_offs = CORE_MOD,
  1325. .idlest_reg_id = 1,
  1326. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  1327. },
  1328. },
  1329. };
  1330. /*
  1331. * 'mcspi' class
  1332. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1333. * bus
  1334. */
  1335. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  1336. .rev_offs = 0x0000,
  1337. .sysc_offs = 0x0010,
  1338. .syss_offs = 0x0014,
  1339. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1340. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1341. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1342. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1343. .sysc_fields = &omap_hwmod_sysc_type1,
  1344. };
  1345. static struct omap_hwmod_class omap34xx_mcspi_class = {
  1346. .name = "mcspi",
  1347. .sysc = &omap34xx_mcspi_sysc,
  1348. .rev = OMAP3_MCSPI_REV,
  1349. };
  1350. /* mcspi1 */
  1351. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1352. .num_chipselect = 4,
  1353. };
  1354. static struct omap_hwmod omap34xx_mcspi1 = {
  1355. .name = "mcspi1",
  1356. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1357. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1358. .main_clk = "mcspi1_fck",
  1359. .prcm = {
  1360. .omap2 = {
  1361. .module_offs = CORE_MOD,
  1362. .prcm_reg_id = 1,
  1363. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  1364. .idlest_reg_id = 1,
  1365. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  1366. },
  1367. },
  1368. .class = &omap34xx_mcspi_class,
  1369. .dev_attr = &omap_mcspi1_dev_attr,
  1370. };
  1371. /* mcspi2 */
  1372. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1373. .num_chipselect = 2,
  1374. };
  1375. static struct omap_hwmod omap34xx_mcspi2 = {
  1376. .name = "mcspi2",
  1377. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1378. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1379. .main_clk = "mcspi2_fck",
  1380. .prcm = {
  1381. .omap2 = {
  1382. .module_offs = CORE_MOD,
  1383. .prcm_reg_id = 1,
  1384. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  1385. .idlest_reg_id = 1,
  1386. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  1387. },
  1388. },
  1389. .class = &omap34xx_mcspi_class,
  1390. .dev_attr = &omap_mcspi2_dev_attr,
  1391. };
  1392. /* mcspi3 */
  1393. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  1394. { .name = "irq", .irq = 91 }, /* 91 */
  1395. { .irq = -1 }
  1396. };
  1397. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  1398. { .name = "tx0", .dma_req = 15 },
  1399. { .name = "rx0", .dma_req = 16 },
  1400. { .name = "tx1", .dma_req = 23 },
  1401. { .name = "rx1", .dma_req = 24 },
  1402. { .dma_req = -1 }
  1403. };
  1404. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1405. .num_chipselect = 2,
  1406. };
  1407. static struct omap_hwmod omap34xx_mcspi3 = {
  1408. .name = "mcspi3",
  1409. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  1410. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  1411. .main_clk = "mcspi3_fck",
  1412. .prcm = {
  1413. .omap2 = {
  1414. .module_offs = CORE_MOD,
  1415. .prcm_reg_id = 1,
  1416. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  1417. .idlest_reg_id = 1,
  1418. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  1419. },
  1420. },
  1421. .class = &omap34xx_mcspi_class,
  1422. .dev_attr = &omap_mcspi3_dev_attr,
  1423. };
  1424. /* mcspi4 */
  1425. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  1426. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  1427. { .irq = -1 }
  1428. };
  1429. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  1430. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  1431. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  1432. { .dma_req = -1 }
  1433. };
  1434. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  1435. .num_chipselect = 1,
  1436. };
  1437. static struct omap_hwmod omap34xx_mcspi4 = {
  1438. .name = "mcspi4",
  1439. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  1440. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  1441. .main_clk = "mcspi4_fck",
  1442. .prcm = {
  1443. .omap2 = {
  1444. .module_offs = CORE_MOD,
  1445. .prcm_reg_id = 1,
  1446. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  1447. .idlest_reg_id = 1,
  1448. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  1449. },
  1450. },
  1451. .class = &omap34xx_mcspi_class,
  1452. .dev_attr = &omap_mcspi4_dev_attr,
  1453. };
  1454. /* usbhsotg */
  1455. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  1456. .rev_offs = 0x0400,
  1457. .sysc_offs = 0x0404,
  1458. .syss_offs = 0x0408,
  1459. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1460. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1461. SYSC_HAS_AUTOIDLE),
  1462. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1463. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1464. .sysc_fields = &omap_hwmod_sysc_type1,
  1465. };
  1466. static struct omap_hwmod_class usbotg_class = {
  1467. .name = "usbotg",
  1468. .sysc = &omap3xxx_usbhsotg_sysc,
  1469. };
  1470. /* usb_otg_hs */
  1471. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  1472. { .name = "mc", .irq = 92 },
  1473. { .name = "dma", .irq = 93 },
  1474. { .irq = -1 }
  1475. };
  1476. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  1477. .name = "usb_otg_hs",
  1478. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  1479. .main_clk = "hsotgusb_ick",
  1480. .prcm = {
  1481. .omap2 = {
  1482. .prcm_reg_id = 1,
  1483. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  1484. .module_offs = CORE_MOD,
  1485. .idlest_reg_id = 1,
  1486. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  1487. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  1488. },
  1489. },
  1490. .class = &usbotg_class,
  1491. /*
  1492. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1493. * broken when autoidle is enabled
  1494. * workaround is to disable the autoidle bit at module level.
  1495. */
  1496. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1497. | HWMOD_SWSUP_MSTANDBY,
  1498. };
  1499. /* usb_otg_hs */
  1500. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  1501. { .name = "mc", .irq = 71 },
  1502. { .irq = -1 }
  1503. };
  1504. static struct omap_hwmod_class am35xx_usbotg_class = {
  1505. .name = "am35xx_usbotg",
  1506. .sysc = NULL,
  1507. };
  1508. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  1509. .name = "am35x_otg_hs",
  1510. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  1511. .main_clk = NULL,
  1512. .prcm = {
  1513. .omap2 = {
  1514. },
  1515. },
  1516. .class = &am35xx_usbotg_class,
  1517. };
  1518. /* MMC/SD/SDIO common */
  1519. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  1520. .rev_offs = 0x1fc,
  1521. .sysc_offs = 0x10,
  1522. .syss_offs = 0x14,
  1523. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1524. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1525. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1526. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1527. .sysc_fields = &omap_hwmod_sysc_type1,
  1528. };
  1529. static struct omap_hwmod_class omap34xx_mmc_class = {
  1530. .name = "mmc",
  1531. .sysc = &omap34xx_mmc_sysc,
  1532. };
  1533. /* MMC/SD/SDIO1 */
  1534. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  1535. { .irq = 83, },
  1536. { .irq = -1 }
  1537. };
  1538. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  1539. { .name = "tx", .dma_req = 61, },
  1540. { .name = "rx", .dma_req = 62, },
  1541. { .dma_req = -1 }
  1542. };
  1543. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  1544. { .role = "dbck", .clk = "omap_32k_fck", },
  1545. };
  1546. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  1547. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1548. };
  1549. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  1550. static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
  1551. .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
  1552. OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
  1553. };
  1554. static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
  1555. .name = "mmc1",
  1556. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  1557. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  1558. .opt_clks = omap34xx_mmc1_opt_clks,
  1559. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  1560. .main_clk = "mmchs1_fck",
  1561. .prcm = {
  1562. .omap2 = {
  1563. .module_offs = CORE_MOD,
  1564. .prcm_reg_id = 1,
  1565. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  1566. .idlest_reg_id = 1,
  1567. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  1568. },
  1569. },
  1570. .dev_attr = &mmc1_pre_es3_dev_attr,
  1571. .class = &omap34xx_mmc_class,
  1572. };
  1573. static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
  1574. .name = "mmc1",
  1575. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  1576. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  1577. .opt_clks = omap34xx_mmc1_opt_clks,
  1578. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  1579. .main_clk = "mmchs1_fck",
  1580. .prcm = {
  1581. .omap2 = {
  1582. .module_offs = CORE_MOD,
  1583. .prcm_reg_id = 1,
  1584. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  1585. .idlest_reg_id = 1,
  1586. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  1587. },
  1588. },
  1589. .dev_attr = &mmc1_dev_attr,
  1590. .class = &omap34xx_mmc_class,
  1591. };
  1592. /* MMC/SD/SDIO2 */
  1593. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  1594. { .irq = INT_24XX_MMC2_IRQ, },
  1595. { .irq = -1 }
  1596. };
  1597. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  1598. { .name = "tx", .dma_req = 47, },
  1599. { .name = "rx", .dma_req = 48, },
  1600. { .dma_req = -1 }
  1601. };
  1602. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  1603. { .role = "dbck", .clk = "omap_32k_fck", },
  1604. };
  1605. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  1606. static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
  1607. .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
  1608. };
  1609. static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
  1610. .name = "mmc2",
  1611. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  1612. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  1613. .opt_clks = omap34xx_mmc2_opt_clks,
  1614. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  1615. .main_clk = "mmchs2_fck",
  1616. .prcm = {
  1617. .omap2 = {
  1618. .module_offs = CORE_MOD,
  1619. .prcm_reg_id = 1,
  1620. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  1621. .idlest_reg_id = 1,
  1622. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  1623. },
  1624. },
  1625. .dev_attr = &mmc2_pre_es3_dev_attr,
  1626. .class = &omap34xx_mmc_class,
  1627. };
  1628. static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
  1629. .name = "mmc2",
  1630. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  1631. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  1632. .opt_clks = omap34xx_mmc2_opt_clks,
  1633. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  1634. .main_clk = "mmchs2_fck",
  1635. .prcm = {
  1636. .omap2 = {
  1637. .module_offs = CORE_MOD,
  1638. .prcm_reg_id = 1,
  1639. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  1640. .idlest_reg_id = 1,
  1641. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  1642. },
  1643. },
  1644. .class = &omap34xx_mmc_class,
  1645. };
  1646. /* MMC/SD/SDIO3 */
  1647. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  1648. { .irq = 94, },
  1649. { .irq = -1 }
  1650. };
  1651. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  1652. { .name = "tx", .dma_req = 77, },
  1653. { .name = "rx", .dma_req = 78, },
  1654. { .dma_req = -1 }
  1655. };
  1656. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  1657. { .role = "dbck", .clk = "omap_32k_fck", },
  1658. };
  1659. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  1660. .name = "mmc3",
  1661. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  1662. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  1663. .opt_clks = omap34xx_mmc3_opt_clks,
  1664. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  1665. .main_clk = "mmchs3_fck",
  1666. .prcm = {
  1667. .omap2 = {
  1668. .prcm_reg_id = 1,
  1669. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  1670. .idlest_reg_id = 1,
  1671. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  1672. },
  1673. },
  1674. .class = &omap34xx_mmc_class,
  1675. };
  1676. /*
  1677. * 'usb_host_hs' class
  1678. * high-speed multi-port usb host controller
  1679. */
  1680. static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
  1681. .rev_offs = 0x0000,
  1682. .sysc_offs = 0x0010,
  1683. .syss_offs = 0x0014,
  1684. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1685. SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1686. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1687. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1688. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1689. .sysc_fields = &omap_hwmod_sysc_type1,
  1690. };
  1691. static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
  1692. .name = "usb_host_hs",
  1693. .sysc = &omap3xxx_usb_host_hs_sysc,
  1694. };
  1695. static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
  1696. { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
  1697. };
  1698. static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
  1699. { .name = "ohci-irq", .irq = 76 },
  1700. { .name = "ehci-irq", .irq = 77 },
  1701. { .irq = -1 }
  1702. };
  1703. static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
  1704. .name = "usb_host_hs",
  1705. .class = &omap3xxx_usb_host_hs_hwmod_class,
  1706. .clkdm_name = "l3_init_clkdm",
  1707. .mpu_irqs = omap3xxx_usb_host_hs_irqs,
  1708. .main_clk = "usbhost_48m_fck",
  1709. .prcm = {
  1710. .omap2 = {
  1711. .module_offs = OMAP3430ES2_USBHOST_MOD,
  1712. .prcm_reg_id = 1,
  1713. .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
  1714. .idlest_reg_id = 1,
  1715. .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
  1716. .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
  1717. },
  1718. },
  1719. .opt_clks = omap3xxx_usb_host_hs_opt_clks,
  1720. .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
  1721. /*
  1722. * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
  1723. * id: i660
  1724. *
  1725. * Description:
  1726. * In the following configuration :
  1727. * - USBHOST module is set to smart-idle mode
  1728. * - PRCM asserts idle_req to the USBHOST module ( This typically
  1729. * happens when the system is going to a low power mode : all ports
  1730. * have been suspended, the master part of the USBHOST module has
  1731. * entered the standby state, and SW has cut the functional clocks)
  1732. * - an USBHOST interrupt occurs before the module is able to answer
  1733. * idle_ack, typically a remote wakeup IRQ.
  1734. * Then the USB HOST module will enter a deadlock situation where it
  1735. * is no more accessible nor functional.
  1736. *
  1737. * Workaround:
  1738. * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
  1739. */
  1740. /*
  1741. * Errata: USB host EHCI may stall when entering smart-standby mode
  1742. * Id: i571
  1743. *
  1744. * Description:
  1745. * When the USBHOST module is set to smart-standby mode, and when it is
  1746. * ready to enter the standby state (i.e. all ports are suspended and
  1747. * all attached devices are in suspend mode), then it can wrongly assert
  1748. * the Mstandby signal too early while there are still some residual OCP
  1749. * transactions ongoing. If this condition occurs, the internal state
  1750. * machine may go to an undefined state and the USB link may be stuck
  1751. * upon the next resume.
  1752. *
  1753. * Workaround:
  1754. * Don't use smart standby; use only force standby,
  1755. * hence HWMOD_SWSUP_MSTANDBY
  1756. */
  1757. /*
  1758. * During system boot; If the hwmod framework resets the module
  1759. * the module will have smart idle settings; which can lead to deadlock
  1760. * (above Errata Id:i660); so, dont reset the module during boot;
  1761. * Use HWMOD_INIT_NO_RESET.
  1762. */
  1763. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  1764. HWMOD_INIT_NO_RESET,
  1765. };
  1766. /*
  1767. * 'usb_tll_hs' class
  1768. * usb_tll_hs module is the adapter on the usb_host_hs ports
  1769. */
  1770. static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
  1771. .rev_offs = 0x0000,
  1772. .sysc_offs = 0x0010,
  1773. .syss_offs = 0x0014,
  1774. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1775. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1776. SYSC_HAS_AUTOIDLE),
  1777. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1778. .sysc_fields = &omap_hwmod_sysc_type1,
  1779. };
  1780. static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
  1781. .name = "usb_tll_hs",
  1782. .sysc = &omap3xxx_usb_tll_hs_sysc,
  1783. };
  1784. static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
  1785. { .name = "tll-irq", .irq = 78 },
  1786. { .irq = -1 }
  1787. };
  1788. static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
  1789. .name = "usb_tll_hs",
  1790. .class = &omap3xxx_usb_tll_hs_hwmod_class,
  1791. .clkdm_name = "l3_init_clkdm",
  1792. .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
  1793. .main_clk = "usbtll_fck",
  1794. .prcm = {
  1795. .omap2 = {
  1796. .module_offs = CORE_MOD,
  1797. .prcm_reg_id = 3,
  1798. .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
  1799. .idlest_reg_id = 3,
  1800. .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
  1801. },
  1802. },
  1803. };
  1804. static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
  1805. .name = "hdq1w",
  1806. .mpu_irqs = omap2_hdq1w_mpu_irqs,
  1807. .main_clk = "hdq_fck",
  1808. .prcm = {
  1809. .omap2 = {
  1810. .module_offs = CORE_MOD,
  1811. .prcm_reg_id = 1,
  1812. .module_bit = OMAP3430_EN_HDQ_SHIFT,
  1813. .idlest_reg_id = 1,
  1814. .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
  1815. },
  1816. },
  1817. .class = &omap2_hdq1w_class,
  1818. };
  1819. /*
  1820. * '32K sync counter' class
  1821. * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
  1822. */
  1823. static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
  1824. .rev_offs = 0x0000,
  1825. .sysc_offs = 0x0004,
  1826. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1827. .idlemodes = (SIDLE_FORCE | SIDLE_NO),
  1828. .sysc_fields = &omap_hwmod_sysc_type1,
  1829. };
  1830. static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
  1831. .name = "counter",
  1832. .sysc = &omap3xxx_counter_sysc,
  1833. };
  1834. static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
  1835. .name = "counter_32k",
  1836. .class = &omap3xxx_counter_hwmod_class,
  1837. .clkdm_name = "wkup_clkdm",
  1838. .flags = HWMOD_SWSUP_SIDLE,
  1839. .main_clk = "wkup_32k_fck",
  1840. .prcm = {
  1841. .omap2 = {
  1842. .module_offs = WKUP_MOD,
  1843. .prcm_reg_id = 1,
  1844. .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1845. .idlest_reg_id = 1,
  1846. .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1847. },
  1848. },
  1849. };
  1850. /*
  1851. * interfaces
  1852. */
  1853. /* L3 -> L4_CORE interface */
  1854. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  1855. .master = &omap3xxx_l3_main_hwmod,
  1856. .slave = &omap3xxx_l4_core_hwmod,
  1857. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1858. };
  1859. /* L3 -> L4_PER interface */
  1860. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  1861. .master = &omap3xxx_l3_main_hwmod,
  1862. .slave = &omap3xxx_l4_per_hwmod,
  1863. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1864. };
  1865. static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
  1866. {
  1867. .pa_start = 0x68000000,
  1868. .pa_end = 0x6800ffff,
  1869. .flags = ADDR_TYPE_RT,
  1870. },
  1871. { }
  1872. };
  1873. /* MPU -> L3 interface */
  1874. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  1875. .master = &omap3xxx_mpu_hwmod,
  1876. .slave = &omap3xxx_l3_main_hwmod,
  1877. .addr = omap3xxx_l3_main_addrs,
  1878. .user = OCP_USER_MPU,
  1879. };
  1880. /* DSS -> l3 */
  1881. static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
  1882. .master = &omap3430es1_dss_core_hwmod,
  1883. .slave = &omap3xxx_l3_main_hwmod,
  1884. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1885. };
  1886. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  1887. .master = &omap3xxx_dss_core_hwmod,
  1888. .slave = &omap3xxx_l3_main_hwmod,
  1889. .fw = {
  1890. .omap2 = {
  1891. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  1892. .flags = OMAP_FIREWALL_L3,
  1893. }
  1894. },
  1895. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1896. };
  1897. /* l3_core -> usbhsotg interface */
  1898. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  1899. .master = &omap3xxx_usbhsotg_hwmod,
  1900. .slave = &omap3xxx_l3_main_hwmod,
  1901. .clk = "core_l3_ick",
  1902. .user = OCP_USER_MPU,
  1903. };
  1904. /* l3_core -> am35xx_usbhsotg interface */
  1905. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  1906. .master = &am35xx_usbhsotg_hwmod,
  1907. .slave = &omap3xxx_l3_main_hwmod,
  1908. .clk = "core_l3_ick",
  1909. .user = OCP_USER_MPU,
  1910. };
  1911. /* L4_CORE -> L4_WKUP interface */
  1912. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  1913. .master = &omap3xxx_l4_core_hwmod,
  1914. .slave = &omap3xxx_l4_wkup_hwmod,
  1915. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1916. };
  1917. /* L4 CORE -> MMC1 interface */
  1918. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
  1919. .master = &omap3xxx_l4_core_hwmod,
  1920. .slave = &omap3xxx_pre_es3_mmc1_hwmod,
  1921. .clk = "mmchs1_ick",
  1922. .addr = omap2430_mmc1_addr_space,
  1923. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1924. .flags = OMAP_FIREWALL_L4
  1925. };
  1926. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
  1927. .master = &omap3xxx_l4_core_hwmod,
  1928. .slave = &omap3xxx_es3plus_mmc1_hwmod,
  1929. .clk = "mmchs1_ick",
  1930. .addr = omap2430_mmc1_addr_space,
  1931. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1932. .flags = OMAP_FIREWALL_L4
  1933. };
  1934. /* L4 CORE -> MMC2 interface */
  1935. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
  1936. .master = &omap3xxx_l4_core_hwmod,
  1937. .slave = &omap3xxx_pre_es3_mmc2_hwmod,
  1938. .clk = "mmchs2_ick",
  1939. .addr = omap2430_mmc2_addr_space,
  1940. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1941. .flags = OMAP_FIREWALL_L4
  1942. };
  1943. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
  1944. .master = &omap3xxx_l4_core_hwmod,
  1945. .slave = &omap3xxx_es3plus_mmc2_hwmod,
  1946. .clk = "mmchs2_ick",
  1947. .addr = omap2430_mmc2_addr_space,
  1948. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1949. .flags = OMAP_FIREWALL_L4
  1950. };
  1951. /* L4 CORE -> MMC3 interface */
  1952. static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
  1953. {
  1954. .pa_start = 0x480ad000,
  1955. .pa_end = 0x480ad1ff,
  1956. .flags = ADDR_TYPE_RT,
  1957. },
  1958. { }
  1959. };
  1960. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
  1961. .master = &omap3xxx_l4_core_hwmod,
  1962. .slave = &omap3xxx_mmc3_hwmod,
  1963. .clk = "mmchs3_ick",
  1964. .addr = omap3xxx_mmc3_addr_space,
  1965. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1966. .flags = OMAP_FIREWALL_L4
  1967. };
  1968. /* L4 CORE -> UART1 interface */
  1969. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  1970. {
  1971. .pa_start = OMAP3_UART1_BASE,
  1972. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  1973. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  1974. },
  1975. { }
  1976. };
  1977. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  1978. .master = &omap3xxx_l4_core_hwmod,
  1979. .slave = &omap3xxx_uart1_hwmod,
  1980. .clk = "uart1_ick",
  1981. .addr = omap3xxx_uart1_addr_space,
  1982. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1983. };
  1984. /* L4 CORE -> UART2 interface */
  1985. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  1986. {
  1987. .pa_start = OMAP3_UART2_BASE,
  1988. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  1989. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  1990. },
  1991. { }
  1992. };
  1993. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  1994. .master = &omap3xxx_l4_core_hwmod,
  1995. .slave = &omap3xxx_uart2_hwmod,
  1996. .clk = "uart2_ick",
  1997. .addr = omap3xxx_uart2_addr_space,
  1998. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1999. };
  2000. /* L4 PER -> UART3 interface */
  2001. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  2002. {
  2003. .pa_start = OMAP3_UART3_BASE,
  2004. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  2005. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2006. },
  2007. { }
  2008. };
  2009. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  2010. .master = &omap3xxx_l4_per_hwmod,
  2011. .slave = &omap3xxx_uart3_hwmod,
  2012. .clk = "uart3_ick",
  2013. .addr = omap3xxx_uart3_addr_space,
  2014. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2015. };
  2016. /* L4 PER -> UART4 interface */
  2017. static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
  2018. {
  2019. .pa_start = OMAP3_UART4_BASE,
  2020. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  2021. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2022. },
  2023. { }
  2024. };
  2025. static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
  2026. .master = &omap3xxx_l4_per_hwmod,
  2027. .slave = &omap36xx_uart4_hwmod,
  2028. .clk = "uart4_ick",
  2029. .addr = omap36xx_uart4_addr_space,
  2030. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2031. };
  2032. /* AM35xx: L4 CORE -> UART4 interface */
  2033. static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
  2034. {
  2035. .pa_start = OMAP3_UART4_AM35XX_BASE,
  2036. .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
  2037. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2038. },
  2039. };
  2040. static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
  2041. .master = &omap3xxx_l4_core_hwmod,
  2042. .slave = &am35xx_uart4_hwmod,
  2043. .clk = "uart4_ick",
  2044. .addr = am35xx_uart4_addr_space,
  2045. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2046. };
  2047. /* L4 CORE -> I2C1 interface */
  2048. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  2049. .master = &omap3xxx_l4_core_hwmod,
  2050. .slave = &omap3xxx_i2c1_hwmod,
  2051. .clk = "i2c1_ick",
  2052. .addr = omap2_i2c1_addr_space,
  2053. .fw = {
  2054. .omap2 = {
  2055. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  2056. .l4_prot_group = 7,
  2057. .flags = OMAP_FIREWALL_L4,
  2058. }
  2059. },
  2060. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2061. };
  2062. /* L4 CORE -> I2C2 interface */
  2063. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  2064. .master = &omap3xxx_l4_core_hwmod,
  2065. .slave = &omap3xxx_i2c2_hwmod,
  2066. .clk = "i2c2_ick",
  2067. .addr = omap2_i2c2_addr_space,
  2068. .fw = {
  2069. .omap2 = {
  2070. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  2071. .l4_prot_group = 7,
  2072. .flags = OMAP_FIREWALL_L4,
  2073. }
  2074. },
  2075. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2076. };
  2077. /* L4 CORE -> I2C3 interface */
  2078. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  2079. {
  2080. .pa_start = 0x48060000,
  2081. .pa_end = 0x48060000 + SZ_128 - 1,
  2082. .flags = ADDR_TYPE_RT,
  2083. },
  2084. { }
  2085. };
  2086. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  2087. .master = &omap3xxx_l4_core_hwmod,
  2088. .slave = &omap3xxx_i2c3_hwmod,
  2089. .clk = "i2c3_ick",
  2090. .addr = omap3xxx_i2c3_addr_space,
  2091. .fw = {
  2092. .omap2 = {
  2093. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  2094. .l4_prot_group = 7,
  2095. .flags = OMAP_FIREWALL_L4,
  2096. }
  2097. },
  2098. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2099. };
  2100. /* L4 CORE -> SR1 interface */
  2101. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  2102. {
  2103. .pa_start = OMAP34XX_SR1_BASE,
  2104. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  2105. .flags = ADDR_TYPE_RT,
  2106. },
  2107. { }
  2108. };
  2109. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
  2110. .master = &omap3xxx_l4_core_hwmod,
  2111. .slave = &omap34xx_sr1_hwmod,
  2112. .clk = "sr_l4_ick",
  2113. .addr = omap3_sr1_addr_space,
  2114. .user = OCP_USER_MPU,
  2115. };
  2116. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
  2117. .master = &omap3xxx_l4_core_hwmod,
  2118. .slave = &omap36xx_sr1_hwmod,
  2119. .clk = "sr_l4_ick",
  2120. .addr = omap3_sr1_addr_space,
  2121. .user = OCP_USER_MPU,
  2122. };
  2123. /* L4 CORE -> SR1 interface */
  2124. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  2125. {
  2126. .pa_start = OMAP34XX_SR2_BASE,
  2127. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  2128. .flags = ADDR_TYPE_RT,
  2129. },
  2130. { }
  2131. };
  2132. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
  2133. .master = &omap3xxx_l4_core_hwmod,
  2134. .slave = &omap34xx_sr2_hwmod,
  2135. .clk = "sr_l4_ick",
  2136. .addr = omap3_sr2_addr_space,
  2137. .user = OCP_USER_MPU,
  2138. };
  2139. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
  2140. .master = &omap3xxx_l4_core_hwmod,
  2141. .slave = &omap36xx_sr2_hwmod,
  2142. .clk = "sr_l4_ick",
  2143. .addr = omap3_sr2_addr_space,
  2144. .user = OCP_USER_MPU,
  2145. };
  2146. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  2147. {
  2148. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  2149. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  2150. .flags = ADDR_TYPE_RT
  2151. },
  2152. { }
  2153. };
  2154. /* l4_core -> usbhsotg */
  2155. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  2156. .master = &omap3xxx_l4_core_hwmod,
  2157. .slave = &omap3xxx_usbhsotg_hwmod,
  2158. .clk = "l4_ick",
  2159. .addr = omap3xxx_usbhsotg_addrs,
  2160. .user = OCP_USER_MPU,
  2161. };
  2162. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  2163. {
  2164. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  2165. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  2166. .flags = ADDR_TYPE_RT
  2167. },
  2168. { }
  2169. };
  2170. /* l4_core -> usbhsotg */
  2171. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  2172. .master = &omap3xxx_l4_core_hwmod,
  2173. .slave = &am35xx_usbhsotg_hwmod,
  2174. .clk = "l4_ick",
  2175. .addr = am35xx_usbhsotg_addrs,
  2176. .user = OCP_USER_MPU,
  2177. };
  2178. /* L4_WKUP -> L4_SEC interface */
  2179. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
  2180. .master = &omap3xxx_l4_wkup_hwmod,
  2181. .slave = &omap3xxx_l4_sec_hwmod,
  2182. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2183. };
  2184. /* IVA2 <- L3 interface */
  2185. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  2186. .master = &omap3xxx_l3_main_hwmod,
  2187. .slave = &omap3xxx_iva_hwmod,
  2188. .clk = "core_l3_ick",
  2189. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2190. };
  2191. static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
  2192. {
  2193. .pa_start = 0x48318000,
  2194. .pa_end = 0x48318000 + SZ_1K - 1,
  2195. .flags = ADDR_TYPE_RT
  2196. },
  2197. { }
  2198. };
  2199. /* l4_wkup -> timer1 */
  2200. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
  2201. .master = &omap3xxx_l4_wkup_hwmod,
  2202. .slave = &omap3xxx_timer1_hwmod,
  2203. .clk = "gpt1_ick",
  2204. .addr = omap3xxx_timer1_addrs,
  2205. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2206. };
  2207. static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
  2208. {
  2209. .pa_start = 0x49032000,
  2210. .pa_end = 0x49032000 + SZ_1K - 1,
  2211. .flags = ADDR_TYPE_RT
  2212. },
  2213. { }
  2214. };
  2215. /* l4_per -> timer2 */
  2216. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
  2217. .master = &omap3xxx_l4_per_hwmod,
  2218. .slave = &omap3xxx_timer2_hwmod,
  2219. .clk = "gpt2_ick",
  2220. .addr = omap3xxx_timer2_addrs,
  2221. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2222. };
  2223. static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
  2224. {
  2225. .pa_start = 0x49034000,
  2226. .pa_end = 0x49034000 + SZ_1K - 1,
  2227. .flags = ADDR_TYPE_RT
  2228. },
  2229. { }
  2230. };
  2231. /* l4_per -> timer3 */
  2232. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
  2233. .master = &omap3xxx_l4_per_hwmod,
  2234. .slave = &omap3xxx_timer3_hwmod,
  2235. .clk = "gpt3_ick",
  2236. .addr = omap3xxx_timer3_addrs,
  2237. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2238. };
  2239. static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
  2240. {
  2241. .pa_start = 0x49036000,
  2242. .pa_end = 0x49036000 + SZ_1K - 1,
  2243. .flags = ADDR_TYPE_RT
  2244. },
  2245. { }
  2246. };
  2247. /* l4_per -> timer4 */
  2248. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
  2249. .master = &omap3xxx_l4_per_hwmod,
  2250. .slave = &omap3xxx_timer4_hwmod,
  2251. .clk = "gpt4_ick",
  2252. .addr = omap3xxx_timer4_addrs,
  2253. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2254. };
  2255. static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
  2256. {
  2257. .pa_start = 0x49038000,
  2258. .pa_end = 0x49038000 + SZ_1K - 1,
  2259. .flags = ADDR_TYPE_RT
  2260. },
  2261. { }
  2262. };
  2263. /* l4_per -> timer5 */
  2264. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
  2265. .master = &omap3xxx_l4_per_hwmod,
  2266. .slave = &omap3xxx_timer5_hwmod,
  2267. .clk = "gpt5_ick",
  2268. .addr = omap3xxx_timer5_addrs,
  2269. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2270. };
  2271. static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
  2272. {
  2273. .pa_start = 0x4903A000,
  2274. .pa_end = 0x4903A000 + SZ_1K - 1,
  2275. .flags = ADDR_TYPE_RT
  2276. },
  2277. { }
  2278. };
  2279. /* l4_per -> timer6 */
  2280. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
  2281. .master = &omap3xxx_l4_per_hwmod,
  2282. .slave = &omap3xxx_timer6_hwmod,
  2283. .clk = "gpt6_ick",
  2284. .addr = omap3xxx_timer6_addrs,
  2285. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2286. };
  2287. static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
  2288. {
  2289. .pa_start = 0x4903C000,
  2290. .pa_end = 0x4903C000 + SZ_1K - 1,
  2291. .flags = ADDR_TYPE_RT
  2292. },
  2293. { }
  2294. };
  2295. /* l4_per -> timer7 */
  2296. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
  2297. .master = &omap3xxx_l4_per_hwmod,
  2298. .slave = &omap3xxx_timer7_hwmod,
  2299. .clk = "gpt7_ick",
  2300. .addr = omap3xxx_timer7_addrs,
  2301. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2302. };
  2303. static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
  2304. {
  2305. .pa_start = 0x4903E000,
  2306. .pa_end = 0x4903E000 + SZ_1K - 1,
  2307. .flags = ADDR_TYPE_RT
  2308. },
  2309. { }
  2310. };
  2311. /* l4_per -> timer8 */
  2312. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
  2313. .master = &omap3xxx_l4_per_hwmod,
  2314. .slave = &omap3xxx_timer8_hwmod,
  2315. .clk = "gpt8_ick",
  2316. .addr = omap3xxx_timer8_addrs,
  2317. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2318. };
  2319. static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
  2320. {
  2321. .pa_start = 0x49040000,
  2322. .pa_end = 0x49040000 + SZ_1K - 1,
  2323. .flags = ADDR_TYPE_RT
  2324. },
  2325. { }
  2326. };
  2327. /* l4_per -> timer9 */
  2328. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
  2329. .master = &omap3xxx_l4_per_hwmod,
  2330. .slave = &omap3xxx_timer9_hwmod,
  2331. .clk = "gpt9_ick",
  2332. .addr = omap3xxx_timer9_addrs,
  2333. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2334. };
  2335. /* l4_core -> timer10 */
  2336. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
  2337. .master = &omap3xxx_l4_core_hwmod,
  2338. .slave = &omap3xxx_timer10_hwmod,
  2339. .clk = "gpt10_ick",
  2340. .addr = omap2_timer10_addrs,
  2341. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2342. };
  2343. /* l4_core -> timer11 */
  2344. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
  2345. .master = &omap3xxx_l4_core_hwmod,
  2346. .slave = &omap3xxx_timer11_hwmod,
  2347. .clk = "gpt11_ick",
  2348. .addr = omap2_timer11_addrs,
  2349. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2350. };
  2351. static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
  2352. {
  2353. .pa_start = 0x48304000,
  2354. .pa_end = 0x48304000 + SZ_1K - 1,
  2355. .flags = ADDR_TYPE_RT
  2356. },
  2357. { }
  2358. };
  2359. /* l4_core -> timer12 */
  2360. static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
  2361. .master = &omap3xxx_l4_sec_hwmod,
  2362. .slave = &omap3xxx_timer12_hwmod,
  2363. .clk = "gpt12_ick",
  2364. .addr = omap3xxx_timer12_addrs,
  2365. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2366. };
  2367. /* l4_wkup -> wd_timer2 */
  2368. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  2369. {
  2370. .pa_start = 0x48314000,
  2371. .pa_end = 0x4831407f,
  2372. .flags = ADDR_TYPE_RT
  2373. },
  2374. { }
  2375. };
  2376. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  2377. .master = &omap3xxx_l4_wkup_hwmod,
  2378. .slave = &omap3xxx_wd_timer2_hwmod,
  2379. .clk = "wdt2_ick",
  2380. .addr = omap3xxx_wd_timer2_addrs,
  2381. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2382. };
  2383. /* l4_core -> dss */
  2384. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  2385. .master = &omap3xxx_l4_core_hwmod,
  2386. .slave = &omap3430es1_dss_core_hwmod,
  2387. .clk = "dss_ick",
  2388. .addr = omap2_dss_addrs,
  2389. .fw = {
  2390. .omap2 = {
  2391. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  2392. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2393. .flags = OMAP_FIREWALL_L4,
  2394. }
  2395. },
  2396. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2397. };
  2398. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  2399. .master = &omap3xxx_l4_core_hwmod,
  2400. .slave = &omap3xxx_dss_core_hwmod,
  2401. .clk = "dss_ick",
  2402. .addr = omap2_dss_addrs,
  2403. .fw = {
  2404. .omap2 = {
  2405. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  2406. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2407. .flags = OMAP_FIREWALL_L4,
  2408. }
  2409. },
  2410. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2411. };
  2412. /* l4_core -> dss_dispc */
  2413. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  2414. .master = &omap3xxx_l4_core_hwmod,
  2415. .slave = &omap3xxx_dss_dispc_hwmod,
  2416. .clk = "dss_ick",
  2417. .addr = omap2_dss_dispc_addrs,
  2418. .fw = {
  2419. .omap2 = {
  2420. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  2421. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2422. .flags = OMAP_FIREWALL_L4,
  2423. }
  2424. },
  2425. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2426. };
  2427. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  2428. {
  2429. .pa_start = 0x4804FC00,
  2430. .pa_end = 0x4804FFFF,
  2431. .flags = ADDR_TYPE_RT
  2432. },
  2433. { }
  2434. };
  2435. /* l4_core -> dss_dsi1 */
  2436. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  2437. .master = &omap3xxx_l4_core_hwmod,
  2438. .slave = &omap3xxx_dss_dsi1_hwmod,
  2439. .clk = "dss_ick",
  2440. .addr = omap3xxx_dss_dsi1_addrs,
  2441. .fw = {
  2442. .omap2 = {
  2443. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  2444. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2445. .flags = OMAP_FIREWALL_L4,
  2446. }
  2447. },
  2448. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2449. };
  2450. /* l4_core -> dss_rfbi */
  2451. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  2452. .master = &omap3xxx_l4_core_hwmod,
  2453. .slave = &omap3xxx_dss_rfbi_hwmod,
  2454. .clk = "dss_ick",
  2455. .addr = omap2_dss_rfbi_addrs,
  2456. .fw = {
  2457. .omap2 = {
  2458. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  2459. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  2460. .flags = OMAP_FIREWALL_L4,
  2461. }
  2462. },
  2463. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2464. };
  2465. /* l4_core -> dss_venc */
  2466. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  2467. .master = &omap3xxx_l4_core_hwmod,
  2468. .slave = &omap3xxx_dss_venc_hwmod,
  2469. .clk = "dss_ick",
  2470. .addr = omap2_dss_venc_addrs,
  2471. .fw = {
  2472. .omap2 = {
  2473. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  2474. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2475. .flags = OMAP_FIREWALL_L4,
  2476. }
  2477. },
  2478. .flags = OCPIF_SWSUP_IDLE,
  2479. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2480. };
  2481. /* l4_wkup -> gpio1 */
  2482. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  2483. {
  2484. .pa_start = 0x48310000,
  2485. .pa_end = 0x483101ff,
  2486. .flags = ADDR_TYPE_RT
  2487. },
  2488. { }
  2489. };
  2490. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  2491. .master = &omap3xxx_l4_wkup_hwmod,
  2492. .slave = &omap3xxx_gpio1_hwmod,
  2493. .addr = omap3xxx_gpio1_addrs,
  2494. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2495. };
  2496. /* l4_per -> gpio2 */
  2497. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  2498. {
  2499. .pa_start = 0x49050000,
  2500. .pa_end = 0x490501ff,
  2501. .flags = ADDR_TYPE_RT
  2502. },
  2503. { }
  2504. };
  2505. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  2506. .master = &omap3xxx_l4_per_hwmod,
  2507. .slave = &omap3xxx_gpio2_hwmod,
  2508. .addr = omap3xxx_gpio2_addrs,
  2509. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2510. };
  2511. /* l4_per -> gpio3 */
  2512. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  2513. {
  2514. .pa_start = 0x49052000,
  2515. .pa_end = 0x490521ff,
  2516. .flags = ADDR_TYPE_RT
  2517. },
  2518. { }
  2519. };
  2520. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  2521. .master = &omap3xxx_l4_per_hwmod,
  2522. .slave = &omap3xxx_gpio3_hwmod,
  2523. .addr = omap3xxx_gpio3_addrs,
  2524. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2525. };
  2526. /* l4_per -> gpio4 */
  2527. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  2528. {
  2529. .pa_start = 0x49054000,
  2530. .pa_end = 0x490541ff,
  2531. .flags = ADDR_TYPE_RT
  2532. },
  2533. { }
  2534. };
  2535. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  2536. .master = &omap3xxx_l4_per_hwmod,
  2537. .slave = &omap3xxx_gpio4_hwmod,
  2538. .addr = omap3xxx_gpio4_addrs,
  2539. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2540. };
  2541. /* l4_per -> gpio5 */
  2542. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  2543. {
  2544. .pa_start = 0x49056000,
  2545. .pa_end = 0x490561ff,
  2546. .flags = ADDR_TYPE_RT
  2547. },
  2548. { }
  2549. };
  2550. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  2551. .master = &omap3xxx_l4_per_hwmod,
  2552. .slave = &omap3xxx_gpio5_hwmod,
  2553. .addr = omap3xxx_gpio5_addrs,
  2554. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2555. };
  2556. /* l4_per -> gpio6 */
  2557. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  2558. {
  2559. .pa_start = 0x49058000,
  2560. .pa_end = 0x490581ff,
  2561. .flags = ADDR_TYPE_RT
  2562. },
  2563. { }
  2564. };
  2565. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  2566. .master = &omap3xxx_l4_per_hwmod,
  2567. .slave = &omap3xxx_gpio6_hwmod,
  2568. .addr = omap3xxx_gpio6_addrs,
  2569. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2570. };
  2571. /* dma_system -> L3 */
  2572. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  2573. .master = &omap3xxx_dma_system_hwmod,
  2574. .slave = &omap3xxx_l3_main_hwmod,
  2575. .clk = "core_l3_ick",
  2576. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2577. };
  2578. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  2579. {
  2580. .pa_start = 0x48056000,
  2581. .pa_end = 0x48056fff,
  2582. .flags = ADDR_TYPE_RT
  2583. },
  2584. { }
  2585. };
  2586. /* l4_cfg -> dma_system */
  2587. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  2588. .master = &omap3xxx_l4_core_hwmod,
  2589. .slave = &omap3xxx_dma_system_hwmod,
  2590. .clk = "core_l4_ick",
  2591. .addr = omap3xxx_dma_system_addrs,
  2592. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2593. };
  2594. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  2595. {
  2596. .name = "mpu",
  2597. .pa_start = 0x48074000,
  2598. .pa_end = 0x480740ff,
  2599. .flags = ADDR_TYPE_RT
  2600. },
  2601. { }
  2602. };
  2603. /* l4_core -> mcbsp1 */
  2604. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  2605. .master = &omap3xxx_l4_core_hwmod,
  2606. .slave = &omap3xxx_mcbsp1_hwmod,
  2607. .clk = "mcbsp1_ick",
  2608. .addr = omap3xxx_mcbsp1_addrs,
  2609. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2610. };
  2611. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  2612. {
  2613. .name = "mpu",
  2614. .pa_start = 0x49022000,
  2615. .pa_end = 0x490220ff,
  2616. .flags = ADDR_TYPE_RT
  2617. },
  2618. { }
  2619. };
  2620. /* l4_per -> mcbsp2 */
  2621. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  2622. .master = &omap3xxx_l4_per_hwmod,
  2623. .slave = &omap3xxx_mcbsp2_hwmod,
  2624. .clk = "mcbsp2_ick",
  2625. .addr = omap3xxx_mcbsp2_addrs,
  2626. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2627. };
  2628. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2629. {
  2630. .name = "mpu",
  2631. .pa_start = 0x49024000,
  2632. .pa_end = 0x490240ff,
  2633. .flags = ADDR_TYPE_RT
  2634. },
  2635. { }
  2636. };
  2637. /* l4_per -> mcbsp3 */
  2638. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2639. .master = &omap3xxx_l4_per_hwmod,
  2640. .slave = &omap3xxx_mcbsp3_hwmod,
  2641. .clk = "mcbsp3_ick",
  2642. .addr = omap3xxx_mcbsp3_addrs,
  2643. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2644. };
  2645. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2646. {
  2647. .name = "mpu",
  2648. .pa_start = 0x49026000,
  2649. .pa_end = 0x490260ff,
  2650. .flags = ADDR_TYPE_RT
  2651. },
  2652. { }
  2653. };
  2654. /* l4_per -> mcbsp4 */
  2655. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2656. .master = &omap3xxx_l4_per_hwmod,
  2657. .slave = &omap3xxx_mcbsp4_hwmod,
  2658. .clk = "mcbsp4_ick",
  2659. .addr = omap3xxx_mcbsp4_addrs,
  2660. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2661. };
  2662. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2663. {
  2664. .name = "mpu",
  2665. .pa_start = 0x48096000,
  2666. .pa_end = 0x480960ff,
  2667. .flags = ADDR_TYPE_RT
  2668. },
  2669. { }
  2670. };
  2671. /* l4_core -> mcbsp5 */
  2672. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2673. .master = &omap3xxx_l4_core_hwmod,
  2674. .slave = &omap3xxx_mcbsp5_hwmod,
  2675. .clk = "mcbsp5_ick",
  2676. .addr = omap3xxx_mcbsp5_addrs,
  2677. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2678. };
  2679. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2680. {
  2681. .name = "sidetone",
  2682. .pa_start = 0x49028000,
  2683. .pa_end = 0x490280ff,
  2684. .flags = ADDR_TYPE_RT
  2685. },
  2686. { }
  2687. };
  2688. /* l4_per -> mcbsp2_sidetone */
  2689. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2690. .master = &omap3xxx_l4_per_hwmod,
  2691. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2692. .clk = "mcbsp2_ick",
  2693. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2694. .user = OCP_USER_MPU,
  2695. };
  2696. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2697. {
  2698. .name = "sidetone",
  2699. .pa_start = 0x4902A000,
  2700. .pa_end = 0x4902A0ff,
  2701. .flags = ADDR_TYPE_RT
  2702. },
  2703. { }
  2704. };
  2705. /* l4_per -> mcbsp3_sidetone */
  2706. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2707. .master = &omap3xxx_l4_per_hwmod,
  2708. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2709. .clk = "mcbsp3_ick",
  2710. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2711. .user = OCP_USER_MPU,
  2712. };
  2713. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2714. {
  2715. .pa_start = 0x48094000,
  2716. .pa_end = 0x480941ff,
  2717. .flags = ADDR_TYPE_RT,
  2718. },
  2719. { }
  2720. };
  2721. /* l4_core -> mailbox */
  2722. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2723. .master = &omap3xxx_l4_core_hwmod,
  2724. .slave = &omap3xxx_mailbox_hwmod,
  2725. .addr = omap3xxx_mailbox_addrs,
  2726. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2727. };
  2728. /* l4 core -> mcspi1 interface */
  2729. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2730. .master = &omap3xxx_l4_core_hwmod,
  2731. .slave = &omap34xx_mcspi1,
  2732. .clk = "mcspi1_ick",
  2733. .addr = omap2_mcspi1_addr_space,
  2734. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2735. };
  2736. /* l4 core -> mcspi2 interface */
  2737. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2738. .master = &omap3xxx_l4_core_hwmod,
  2739. .slave = &omap34xx_mcspi2,
  2740. .clk = "mcspi2_ick",
  2741. .addr = omap2_mcspi2_addr_space,
  2742. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2743. };
  2744. /* l4 core -> mcspi3 interface */
  2745. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2746. .master = &omap3xxx_l4_core_hwmod,
  2747. .slave = &omap34xx_mcspi3,
  2748. .clk = "mcspi3_ick",
  2749. .addr = omap2430_mcspi3_addr_space,
  2750. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2751. };
  2752. /* l4 core -> mcspi4 interface */
  2753. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2754. {
  2755. .pa_start = 0x480ba000,
  2756. .pa_end = 0x480ba0ff,
  2757. .flags = ADDR_TYPE_RT,
  2758. },
  2759. { }
  2760. };
  2761. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2762. .master = &omap3xxx_l4_core_hwmod,
  2763. .slave = &omap34xx_mcspi4,
  2764. .clk = "mcspi4_ick",
  2765. .addr = omap34xx_mcspi4_addr_space,
  2766. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2767. };
  2768. static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
  2769. .master = &omap3xxx_usb_host_hs_hwmod,
  2770. .slave = &omap3xxx_l3_main_hwmod,
  2771. .clk = "core_l3_ick",
  2772. .user = OCP_USER_MPU,
  2773. };
  2774. static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
  2775. {
  2776. .name = "uhh",
  2777. .pa_start = 0x48064000,
  2778. .pa_end = 0x480643ff,
  2779. .flags = ADDR_TYPE_RT
  2780. },
  2781. {
  2782. .name = "ohci",
  2783. .pa_start = 0x48064400,
  2784. .pa_end = 0x480647ff,
  2785. },
  2786. {
  2787. .name = "ehci",
  2788. .pa_start = 0x48064800,
  2789. .pa_end = 0x48064cff,
  2790. },
  2791. {}
  2792. };
  2793. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
  2794. .master = &omap3xxx_l4_core_hwmod,
  2795. .slave = &omap3xxx_usb_host_hs_hwmod,
  2796. .clk = "usbhost_ick",
  2797. .addr = omap3xxx_usb_host_hs_addrs,
  2798. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2799. };
  2800. static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
  2801. {
  2802. .name = "tll",
  2803. .pa_start = 0x48062000,
  2804. .pa_end = 0x48062fff,
  2805. .flags = ADDR_TYPE_RT
  2806. },
  2807. {}
  2808. };
  2809. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
  2810. .master = &omap3xxx_l4_core_hwmod,
  2811. .slave = &omap3xxx_usb_tll_hs_hwmod,
  2812. .clk = "usbtll_ick",
  2813. .addr = omap3xxx_usb_tll_hs_addrs,
  2814. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2815. };
  2816. /* l4_core -> hdq1w interface */
  2817. static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
  2818. .master = &omap3xxx_l4_core_hwmod,
  2819. .slave = &omap3xxx_hdq1w_hwmod,
  2820. .clk = "hdq_ick",
  2821. .addr = omap2_hdq1w_addr_space,
  2822. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2823. .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
  2824. };
  2825. /* l4_wkup -> 32ksync_counter */
  2826. static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
  2827. {
  2828. .pa_start = 0x48320000,
  2829. .pa_end = 0x4832001f,
  2830. .flags = ADDR_TYPE_RT
  2831. },
  2832. { }
  2833. };
  2834. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
  2835. .master = &omap3xxx_l4_wkup_hwmod,
  2836. .slave = &omap3xxx_counter_32k_hwmod,
  2837. .clk = "omap_32ksync_ick",
  2838. .addr = omap3xxx_counter_32k_addrs,
  2839. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2840. };
  2841. static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
  2842. &omap3xxx_l3_main__l4_core,
  2843. &omap3xxx_l3_main__l4_per,
  2844. &omap3xxx_mpu__l3_main,
  2845. &omap3xxx_l4_core__l4_wkup,
  2846. &omap3xxx_l4_core__mmc3,
  2847. &omap3_l4_core__uart1,
  2848. &omap3_l4_core__uart2,
  2849. &omap3_l4_per__uart3,
  2850. &omap3_l4_core__i2c1,
  2851. &omap3_l4_core__i2c2,
  2852. &omap3_l4_core__i2c3,
  2853. &omap3xxx_l4_wkup__l4_sec,
  2854. &omap3xxx_l4_wkup__timer1,
  2855. &omap3xxx_l4_per__timer2,
  2856. &omap3xxx_l4_per__timer3,
  2857. &omap3xxx_l4_per__timer4,
  2858. &omap3xxx_l4_per__timer5,
  2859. &omap3xxx_l4_per__timer6,
  2860. &omap3xxx_l4_per__timer7,
  2861. &omap3xxx_l4_per__timer8,
  2862. &omap3xxx_l4_per__timer9,
  2863. &omap3xxx_l4_core__timer10,
  2864. &omap3xxx_l4_core__timer11,
  2865. &omap3xxx_l4_wkup__wd_timer2,
  2866. &omap3xxx_l4_wkup__gpio1,
  2867. &omap3xxx_l4_per__gpio2,
  2868. &omap3xxx_l4_per__gpio3,
  2869. &omap3xxx_l4_per__gpio4,
  2870. &omap3xxx_l4_per__gpio5,
  2871. &omap3xxx_l4_per__gpio6,
  2872. &omap3xxx_dma_system__l3,
  2873. &omap3xxx_l4_core__dma_system,
  2874. &omap3xxx_l4_core__mcbsp1,
  2875. &omap3xxx_l4_per__mcbsp2,
  2876. &omap3xxx_l4_per__mcbsp3,
  2877. &omap3xxx_l4_per__mcbsp4,
  2878. &omap3xxx_l4_core__mcbsp5,
  2879. &omap3xxx_l4_per__mcbsp2_sidetone,
  2880. &omap3xxx_l4_per__mcbsp3_sidetone,
  2881. &omap34xx_l4_core__mcspi1,
  2882. &omap34xx_l4_core__mcspi2,
  2883. &omap34xx_l4_core__mcspi3,
  2884. &omap34xx_l4_core__mcspi4,
  2885. &omap3xxx_l4_wkup__counter_32k,
  2886. NULL,
  2887. };
  2888. /* GP-only hwmod links */
  2889. static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
  2890. &omap3xxx_l4_sec__timer12,
  2891. NULL
  2892. };
  2893. /* 3430ES1-only hwmod links */
  2894. static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
  2895. &omap3430es1_dss__l3,
  2896. &omap3430es1_l4_core__dss,
  2897. NULL
  2898. };
  2899. /* 3430ES2+-only hwmod links */
  2900. static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
  2901. &omap3xxx_dss__l3,
  2902. &omap3xxx_l4_core__dss,
  2903. &omap3xxx_usbhsotg__l3,
  2904. &omap3xxx_l4_core__usbhsotg,
  2905. &omap3xxx_usb_host_hs__l3_main_2,
  2906. &omap3xxx_l4_core__usb_host_hs,
  2907. &omap3xxx_l4_core__usb_tll_hs,
  2908. NULL
  2909. };
  2910. /* <= 3430ES3-only hwmod links */
  2911. static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
  2912. &omap3xxx_l4_core__pre_es3_mmc1,
  2913. &omap3xxx_l4_core__pre_es3_mmc2,
  2914. NULL
  2915. };
  2916. /* 3430ES3+-only hwmod links */
  2917. static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
  2918. &omap3xxx_l4_core__es3plus_mmc1,
  2919. &omap3xxx_l4_core__es3plus_mmc2,
  2920. NULL
  2921. };
  2922. /* 34xx-only hwmod links (all ES revisions) */
  2923. static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
  2924. &omap3xxx_l3__iva,
  2925. &omap34xx_l4_core__sr1,
  2926. &omap34xx_l4_core__sr2,
  2927. &omap3xxx_l4_core__mailbox,
  2928. &omap3xxx_l4_core__hdq1w,
  2929. NULL
  2930. };
  2931. /* 36xx-only hwmod links (all ES revisions) */
  2932. static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
  2933. &omap3xxx_l3__iva,
  2934. &omap36xx_l4_per__uart4,
  2935. &omap3xxx_dss__l3,
  2936. &omap3xxx_l4_core__dss,
  2937. &omap36xx_l4_core__sr1,
  2938. &omap36xx_l4_core__sr2,
  2939. &omap3xxx_usbhsotg__l3,
  2940. &omap3xxx_l4_core__usbhsotg,
  2941. &omap3xxx_l4_core__mailbox,
  2942. &omap3xxx_usb_host_hs__l3_main_2,
  2943. &omap3xxx_l4_core__usb_host_hs,
  2944. &omap3xxx_l4_core__usb_tll_hs,
  2945. &omap3xxx_l4_core__es3plus_mmc1,
  2946. &omap3xxx_l4_core__es3plus_mmc2,
  2947. &omap3xxx_l4_core__hdq1w,
  2948. NULL
  2949. };
  2950. static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
  2951. &omap3xxx_dss__l3,
  2952. &omap3xxx_l4_core__dss,
  2953. &am35xx_usbhsotg__l3,
  2954. &am35xx_l4_core__usbhsotg,
  2955. &am35xx_l4_core__uart4,
  2956. &omap3xxx_usb_host_hs__l3_main_2,
  2957. &omap3xxx_l4_core__usb_host_hs,
  2958. &omap3xxx_l4_core__usb_tll_hs,
  2959. &omap3xxx_l4_core__es3plus_mmc1,
  2960. &omap3xxx_l4_core__es3plus_mmc2,
  2961. NULL
  2962. };
  2963. static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
  2964. &omap3xxx_l4_core__dss_dispc,
  2965. &omap3xxx_l4_core__dss_dsi1,
  2966. &omap3xxx_l4_core__dss_rfbi,
  2967. &omap3xxx_l4_core__dss_venc,
  2968. NULL
  2969. };
  2970. int __init omap3xxx_hwmod_init(void)
  2971. {
  2972. int r;
  2973. struct omap_hwmod_ocp_if **h = NULL;
  2974. unsigned int rev;
  2975. omap_hwmod_init();
  2976. /* Register hwmod links common to all OMAP3 */
  2977. r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
  2978. if (r < 0)
  2979. return r;
  2980. /* Register GP-only hwmod links. */
  2981. if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
  2982. r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
  2983. if (r < 0)
  2984. return r;
  2985. }
  2986. rev = omap_rev();
  2987. /*
  2988. * Register hwmod links common to individual OMAP3 families, all
  2989. * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
  2990. * All possible revisions should be included in this conditional.
  2991. */
  2992. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  2993. rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
  2994. rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
  2995. h = omap34xx_hwmod_ocp_ifs;
  2996. } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
  2997. h = am35xx_hwmod_ocp_ifs;
  2998. } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
  2999. rev == OMAP3630_REV_ES1_2) {
  3000. h = omap36xx_hwmod_ocp_ifs;
  3001. } else {
  3002. WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
  3003. return -EINVAL;
  3004. };
  3005. r = omap_hwmod_register_links(h);
  3006. if (r < 0)
  3007. return r;
  3008. /*
  3009. * Register hwmod links specific to certain ES levels of a
  3010. * particular family of silicon (e.g., 34xx ES1.0)
  3011. */
  3012. h = NULL;
  3013. if (rev == OMAP3430_REV_ES1_0) {
  3014. h = omap3430es1_hwmod_ocp_ifs;
  3015. } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
  3016. rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3017. rev == OMAP3430_REV_ES3_1_2) {
  3018. h = omap3430es2plus_hwmod_ocp_ifs;
  3019. };
  3020. if (h) {
  3021. r = omap_hwmod_register_links(h);
  3022. if (r < 0)
  3023. return r;
  3024. }
  3025. h = NULL;
  3026. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3027. rev == OMAP3430_REV_ES2_1) {
  3028. h = omap3430_pre_es3_hwmod_ocp_ifs;
  3029. } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3030. rev == OMAP3430_REV_ES3_1_2) {
  3031. h = omap3430_es3plus_hwmod_ocp_ifs;
  3032. };
  3033. if (h)
  3034. r = omap_hwmod_register_links(h);
  3035. if (r < 0)
  3036. return r;
  3037. /*
  3038. * DSS code presumes that dss_core hwmod is handled first,
  3039. * _before_ any other DSS related hwmods so register common
  3040. * DSS hwmod links last to ensure that dss_core is already
  3041. * registered. Otherwise some change things may happen, for
  3042. * ex. if dispc is handled before dss_core and DSS is enabled
  3043. * in bootloader DISPC will be reset with outputs enabled
  3044. * which sometimes leads to unrecoverable L3 error. XXX The
  3045. * long-term fix to this is to ensure hwmods are set up in
  3046. * dependency order in the hwmod core code.
  3047. */
  3048. r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
  3049. return r;
  3050. }