omap_hwmod_3xxx_data.c 100 KB

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