omap_hwmod_3xxx_data.c 101 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996
  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,
  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,
  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,
  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,
  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 | HWMOD_RECONFIG_IO_CHAIN,
  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. SYSS_HAS_RESET_STATUS),
  1751. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1752. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1753. .sysc_fields = &omap_hwmod_sysc_type1,
  1754. };
  1755. static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
  1756. .name = "usb_host_hs",
  1757. .sysc = &omap3xxx_usb_host_hs_sysc,
  1758. };
  1759. static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
  1760. { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
  1761. { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
  1762. { .irq = -1 },
  1763. };
  1764. static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
  1765. .name = "usb_host_hs",
  1766. .class = &omap3xxx_usb_host_hs_hwmod_class,
  1767. .clkdm_name = "usbhost_clkdm",
  1768. .mpu_irqs = omap3xxx_usb_host_hs_irqs,
  1769. .main_clk = "usbhost_48m_fck",
  1770. .prcm = {
  1771. .omap2 = {
  1772. .module_offs = OMAP3430ES2_USBHOST_MOD,
  1773. .prcm_reg_id = 1,
  1774. .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
  1775. .idlest_reg_id = 1,
  1776. .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
  1777. .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
  1778. },
  1779. },
  1780. /*
  1781. * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
  1782. * id: i660
  1783. *
  1784. * Description:
  1785. * In the following configuration :
  1786. * - USBHOST module is set to smart-idle mode
  1787. * - PRCM asserts idle_req to the USBHOST module ( This typically
  1788. * happens when the system is going to a low power mode : all ports
  1789. * have been suspended, the master part of the USBHOST module has
  1790. * entered the standby state, and SW has cut the functional clocks)
  1791. * - an USBHOST interrupt occurs before the module is able to answer
  1792. * idle_ack, typically a remote wakeup IRQ.
  1793. * Then the USB HOST module will enter a deadlock situation where it
  1794. * is no more accessible nor functional.
  1795. *
  1796. * Workaround:
  1797. * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
  1798. */
  1799. /*
  1800. * Errata: USB host EHCI may stall when entering smart-standby mode
  1801. * Id: i571
  1802. *
  1803. * Description:
  1804. * When the USBHOST module is set to smart-standby mode, and when it is
  1805. * ready to enter the standby state (i.e. all ports are suspended and
  1806. * all attached devices are in suspend mode), then it can wrongly assert
  1807. * the Mstandby signal too early while there are still some residual OCP
  1808. * transactions ongoing. If this condition occurs, the internal state
  1809. * machine may go to an undefined state and the USB link may be stuck
  1810. * upon the next resume.
  1811. *
  1812. * Workaround:
  1813. * Don't use smart standby; use only force standby,
  1814. * hence HWMOD_SWSUP_MSTANDBY
  1815. */
  1816. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1817. };
  1818. /*
  1819. * 'usb_tll_hs' class
  1820. * usb_tll_hs module is the adapter on the usb_host_hs ports
  1821. */
  1822. static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
  1823. .rev_offs = 0x0000,
  1824. .sysc_offs = 0x0010,
  1825. .syss_offs = 0x0014,
  1826. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1827. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1828. SYSC_HAS_AUTOIDLE),
  1829. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1830. .sysc_fields = &omap_hwmod_sysc_type1,
  1831. };
  1832. static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
  1833. .name = "usb_tll_hs",
  1834. .sysc = &omap3xxx_usb_tll_hs_sysc,
  1835. };
  1836. static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
  1837. { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
  1838. { .irq = -1 },
  1839. };
  1840. static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
  1841. .name = "usb_tll_hs",
  1842. .class = &omap3xxx_usb_tll_hs_hwmod_class,
  1843. .clkdm_name = "core_l4_clkdm",
  1844. .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
  1845. .main_clk = "usbtll_fck",
  1846. .prcm = {
  1847. .omap2 = {
  1848. .module_offs = CORE_MOD,
  1849. .prcm_reg_id = 3,
  1850. .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
  1851. .idlest_reg_id = 3,
  1852. .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
  1853. },
  1854. },
  1855. };
  1856. static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
  1857. .name = "hdq1w",
  1858. .mpu_irqs = omap2_hdq1w_mpu_irqs,
  1859. .main_clk = "hdq_fck",
  1860. .prcm = {
  1861. .omap2 = {
  1862. .module_offs = CORE_MOD,
  1863. .prcm_reg_id = 1,
  1864. .module_bit = OMAP3430_EN_HDQ_SHIFT,
  1865. .idlest_reg_id = 1,
  1866. .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
  1867. },
  1868. },
  1869. .class = &omap2_hdq1w_class,
  1870. };
  1871. /* SAD2D */
  1872. static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
  1873. { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
  1874. { .name = "rst_modem_sw", .rst_shift = 1 },
  1875. };
  1876. static struct omap_hwmod_class omap3xxx_sad2d_class = {
  1877. .name = "sad2d",
  1878. };
  1879. static struct omap_hwmod omap3xxx_sad2d_hwmod = {
  1880. .name = "sad2d",
  1881. .rst_lines = omap3xxx_sad2d_resets,
  1882. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
  1883. .main_clk = "sad2d_ick",
  1884. .prcm = {
  1885. .omap2 = {
  1886. .module_offs = CORE_MOD,
  1887. .prcm_reg_id = 1,
  1888. .module_bit = OMAP3430_EN_SAD2D_SHIFT,
  1889. .idlest_reg_id = 1,
  1890. .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
  1891. },
  1892. },
  1893. .class = &omap3xxx_sad2d_class,
  1894. };
  1895. /*
  1896. * '32K sync counter' class
  1897. * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
  1898. */
  1899. static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
  1900. .rev_offs = 0x0000,
  1901. .sysc_offs = 0x0004,
  1902. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1903. .idlemodes = (SIDLE_FORCE | SIDLE_NO),
  1904. .sysc_fields = &omap_hwmod_sysc_type1,
  1905. };
  1906. static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
  1907. .name = "counter",
  1908. .sysc = &omap3xxx_counter_sysc,
  1909. };
  1910. static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
  1911. .name = "counter_32k",
  1912. .class = &omap3xxx_counter_hwmod_class,
  1913. .clkdm_name = "wkup_clkdm",
  1914. .flags = HWMOD_SWSUP_SIDLE,
  1915. .main_clk = "wkup_32k_fck",
  1916. .prcm = {
  1917. .omap2 = {
  1918. .module_offs = WKUP_MOD,
  1919. .prcm_reg_id = 1,
  1920. .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1921. .idlest_reg_id = 1,
  1922. .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1923. },
  1924. },
  1925. };
  1926. /*
  1927. * 'gpmc' class
  1928. * general purpose memory controller
  1929. */
  1930. static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
  1931. .rev_offs = 0x0000,
  1932. .sysc_offs = 0x0010,
  1933. .syss_offs = 0x0014,
  1934. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1935. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1936. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1937. .sysc_fields = &omap_hwmod_sysc_type1,
  1938. };
  1939. static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
  1940. .name = "gpmc",
  1941. .sysc = &omap3xxx_gpmc_sysc,
  1942. };
  1943. static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = {
  1944. { .irq = 20 + OMAP_INTC_START, },
  1945. { .irq = -1 }
  1946. };
  1947. static struct omap_hwmod omap3xxx_gpmc_hwmod = {
  1948. .name = "gpmc",
  1949. .class = &omap3xxx_gpmc_hwmod_class,
  1950. .clkdm_name = "core_l3_clkdm",
  1951. .mpu_irqs = omap3xxx_gpmc_irqs,
  1952. .main_clk = "gpmc_fck",
  1953. /*
  1954. * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
  1955. * block. It is not being added due to any known bugs with
  1956. * resetting the GPMC IP block, but rather because any timings
  1957. * set by the bootloader are not being correctly programmed by
  1958. * the kernel from the board file or DT data.
  1959. * HWMOD_INIT_NO_RESET should be removed ASAP.
  1960. */
  1961. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
  1962. HWMOD_NO_IDLEST),
  1963. };
  1964. /*
  1965. * interfaces
  1966. */
  1967. /* L3 -> L4_CORE interface */
  1968. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  1969. .master = &omap3xxx_l3_main_hwmod,
  1970. .slave = &omap3xxx_l4_core_hwmod,
  1971. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1972. };
  1973. /* L3 -> L4_PER interface */
  1974. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  1975. .master = &omap3xxx_l3_main_hwmod,
  1976. .slave = &omap3xxx_l4_per_hwmod,
  1977. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1978. };
  1979. static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
  1980. {
  1981. .pa_start = 0x68000000,
  1982. .pa_end = 0x6800ffff,
  1983. .flags = ADDR_TYPE_RT,
  1984. },
  1985. { }
  1986. };
  1987. /* MPU -> L3 interface */
  1988. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  1989. .master = &omap3xxx_mpu_hwmod,
  1990. .slave = &omap3xxx_l3_main_hwmod,
  1991. .addr = omap3xxx_l3_main_addrs,
  1992. .user = OCP_USER_MPU,
  1993. };
  1994. static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = {
  1995. {
  1996. .pa_start = 0x54000000,
  1997. .pa_end = 0x547fffff,
  1998. .flags = ADDR_TYPE_RT,
  1999. },
  2000. { }
  2001. };
  2002. /* l3 -> debugss */
  2003. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
  2004. .master = &omap3xxx_l3_main_hwmod,
  2005. .slave = &omap3xxx_debugss_hwmod,
  2006. .addr = omap3xxx_l4_emu_addrs,
  2007. .user = OCP_USER_MPU,
  2008. };
  2009. /* DSS -> l3 */
  2010. static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
  2011. .master = &omap3430es1_dss_core_hwmod,
  2012. .slave = &omap3xxx_l3_main_hwmod,
  2013. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2014. };
  2015. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  2016. .master = &omap3xxx_dss_core_hwmod,
  2017. .slave = &omap3xxx_l3_main_hwmod,
  2018. .fw = {
  2019. .omap2 = {
  2020. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  2021. .flags = OMAP_FIREWALL_L3,
  2022. }
  2023. },
  2024. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2025. };
  2026. /* l3_core -> usbhsotg interface */
  2027. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  2028. .master = &omap3xxx_usbhsotg_hwmod,
  2029. .slave = &omap3xxx_l3_main_hwmod,
  2030. .clk = "core_l3_ick",
  2031. .user = OCP_USER_MPU,
  2032. };
  2033. /* l3_core -> am35xx_usbhsotg interface */
  2034. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  2035. .master = &am35xx_usbhsotg_hwmod,
  2036. .slave = &omap3xxx_l3_main_hwmod,
  2037. .clk = "hsotgusb_ick",
  2038. .user = OCP_USER_MPU,
  2039. };
  2040. /* l3_core -> sad2d interface */
  2041. static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
  2042. .master = &omap3xxx_sad2d_hwmod,
  2043. .slave = &omap3xxx_l3_main_hwmod,
  2044. .clk = "core_l3_ick",
  2045. .user = OCP_USER_MPU,
  2046. };
  2047. /* L4_CORE -> L4_WKUP interface */
  2048. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  2049. .master = &omap3xxx_l4_core_hwmod,
  2050. .slave = &omap3xxx_l4_wkup_hwmod,
  2051. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2052. };
  2053. /* L4 CORE -> MMC1 interface */
  2054. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
  2055. .master = &omap3xxx_l4_core_hwmod,
  2056. .slave = &omap3xxx_pre_es3_mmc1_hwmod,
  2057. .clk = "mmchs1_ick",
  2058. .addr = omap2430_mmc1_addr_space,
  2059. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2060. .flags = OMAP_FIREWALL_L4
  2061. };
  2062. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
  2063. .master = &omap3xxx_l4_core_hwmod,
  2064. .slave = &omap3xxx_es3plus_mmc1_hwmod,
  2065. .clk = "mmchs1_ick",
  2066. .addr = omap2430_mmc1_addr_space,
  2067. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2068. .flags = OMAP_FIREWALL_L4
  2069. };
  2070. /* L4 CORE -> MMC2 interface */
  2071. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
  2072. .master = &omap3xxx_l4_core_hwmod,
  2073. .slave = &omap3xxx_pre_es3_mmc2_hwmod,
  2074. .clk = "mmchs2_ick",
  2075. .addr = omap2430_mmc2_addr_space,
  2076. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2077. .flags = OMAP_FIREWALL_L4
  2078. };
  2079. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
  2080. .master = &omap3xxx_l4_core_hwmod,
  2081. .slave = &omap3xxx_es3plus_mmc2_hwmod,
  2082. .clk = "mmchs2_ick",
  2083. .addr = omap2430_mmc2_addr_space,
  2084. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2085. .flags = OMAP_FIREWALL_L4
  2086. };
  2087. /* L4 CORE -> MMC3 interface */
  2088. static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
  2089. {
  2090. .pa_start = 0x480ad000,
  2091. .pa_end = 0x480ad1ff,
  2092. .flags = ADDR_TYPE_RT,
  2093. },
  2094. { }
  2095. };
  2096. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
  2097. .master = &omap3xxx_l4_core_hwmod,
  2098. .slave = &omap3xxx_mmc3_hwmod,
  2099. .clk = "mmchs3_ick",
  2100. .addr = omap3xxx_mmc3_addr_space,
  2101. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2102. .flags = OMAP_FIREWALL_L4
  2103. };
  2104. /* L4 CORE -> UART1 interface */
  2105. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  2106. {
  2107. .pa_start = OMAP3_UART1_BASE,
  2108. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  2109. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2110. },
  2111. { }
  2112. };
  2113. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  2114. .master = &omap3xxx_l4_core_hwmod,
  2115. .slave = &omap3xxx_uart1_hwmod,
  2116. .clk = "uart1_ick",
  2117. .addr = omap3xxx_uart1_addr_space,
  2118. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2119. };
  2120. /* L4 CORE -> UART2 interface */
  2121. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  2122. {
  2123. .pa_start = OMAP3_UART2_BASE,
  2124. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  2125. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2126. },
  2127. { }
  2128. };
  2129. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  2130. .master = &omap3xxx_l4_core_hwmod,
  2131. .slave = &omap3xxx_uart2_hwmod,
  2132. .clk = "uart2_ick",
  2133. .addr = omap3xxx_uart2_addr_space,
  2134. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2135. };
  2136. /* L4 PER -> UART3 interface */
  2137. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  2138. {
  2139. .pa_start = OMAP3_UART3_BASE,
  2140. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  2141. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2142. },
  2143. { }
  2144. };
  2145. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  2146. .master = &omap3xxx_l4_per_hwmod,
  2147. .slave = &omap3xxx_uart3_hwmod,
  2148. .clk = "uart3_ick",
  2149. .addr = omap3xxx_uart3_addr_space,
  2150. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2151. };
  2152. /* L4 PER -> UART4 interface */
  2153. static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
  2154. {
  2155. .pa_start = OMAP3_UART4_BASE,
  2156. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  2157. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2158. },
  2159. { }
  2160. };
  2161. static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
  2162. .master = &omap3xxx_l4_per_hwmod,
  2163. .slave = &omap36xx_uart4_hwmod,
  2164. .clk = "uart4_ick",
  2165. .addr = omap36xx_uart4_addr_space,
  2166. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2167. };
  2168. /* AM35xx: L4 CORE -> UART4 interface */
  2169. static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
  2170. {
  2171. .pa_start = OMAP3_UART4_AM35XX_BASE,
  2172. .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
  2173. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2174. },
  2175. { }
  2176. };
  2177. static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
  2178. .master = &omap3xxx_l4_core_hwmod,
  2179. .slave = &am35xx_uart4_hwmod,
  2180. .clk = "uart4_ick",
  2181. .addr = am35xx_uart4_addr_space,
  2182. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2183. };
  2184. /* L4 CORE -> I2C1 interface */
  2185. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  2186. .master = &omap3xxx_l4_core_hwmod,
  2187. .slave = &omap3xxx_i2c1_hwmod,
  2188. .clk = "i2c1_ick",
  2189. .addr = omap2_i2c1_addr_space,
  2190. .fw = {
  2191. .omap2 = {
  2192. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  2193. .l4_prot_group = 7,
  2194. .flags = OMAP_FIREWALL_L4,
  2195. }
  2196. },
  2197. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2198. };
  2199. /* L4 CORE -> I2C2 interface */
  2200. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  2201. .master = &omap3xxx_l4_core_hwmod,
  2202. .slave = &omap3xxx_i2c2_hwmod,
  2203. .clk = "i2c2_ick",
  2204. .addr = omap2_i2c2_addr_space,
  2205. .fw = {
  2206. .omap2 = {
  2207. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  2208. .l4_prot_group = 7,
  2209. .flags = OMAP_FIREWALL_L4,
  2210. }
  2211. },
  2212. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2213. };
  2214. /* L4 CORE -> I2C3 interface */
  2215. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  2216. {
  2217. .pa_start = 0x48060000,
  2218. .pa_end = 0x48060000 + SZ_128 - 1,
  2219. .flags = ADDR_TYPE_RT,
  2220. },
  2221. { }
  2222. };
  2223. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  2224. .master = &omap3xxx_l4_core_hwmod,
  2225. .slave = &omap3xxx_i2c3_hwmod,
  2226. .clk = "i2c3_ick",
  2227. .addr = omap3xxx_i2c3_addr_space,
  2228. .fw = {
  2229. .omap2 = {
  2230. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  2231. .l4_prot_group = 7,
  2232. .flags = OMAP_FIREWALL_L4,
  2233. }
  2234. },
  2235. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2236. };
  2237. /* L4 CORE -> SR1 interface */
  2238. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  2239. {
  2240. .pa_start = OMAP34XX_SR1_BASE,
  2241. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  2242. .flags = ADDR_TYPE_RT,
  2243. },
  2244. { }
  2245. };
  2246. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
  2247. .master = &omap3xxx_l4_core_hwmod,
  2248. .slave = &omap34xx_sr1_hwmod,
  2249. .clk = "sr_l4_ick",
  2250. .addr = omap3_sr1_addr_space,
  2251. .user = OCP_USER_MPU,
  2252. };
  2253. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
  2254. .master = &omap3xxx_l4_core_hwmod,
  2255. .slave = &omap36xx_sr1_hwmod,
  2256. .clk = "sr_l4_ick",
  2257. .addr = omap3_sr1_addr_space,
  2258. .user = OCP_USER_MPU,
  2259. };
  2260. /* L4 CORE -> SR1 interface */
  2261. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  2262. {
  2263. .pa_start = OMAP34XX_SR2_BASE,
  2264. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  2265. .flags = ADDR_TYPE_RT,
  2266. },
  2267. { }
  2268. };
  2269. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
  2270. .master = &omap3xxx_l4_core_hwmod,
  2271. .slave = &omap34xx_sr2_hwmod,
  2272. .clk = "sr_l4_ick",
  2273. .addr = omap3_sr2_addr_space,
  2274. .user = OCP_USER_MPU,
  2275. };
  2276. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
  2277. .master = &omap3xxx_l4_core_hwmod,
  2278. .slave = &omap36xx_sr2_hwmod,
  2279. .clk = "sr_l4_ick",
  2280. .addr = omap3_sr2_addr_space,
  2281. .user = OCP_USER_MPU,
  2282. };
  2283. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  2284. {
  2285. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  2286. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  2287. .flags = ADDR_TYPE_RT
  2288. },
  2289. { }
  2290. };
  2291. /* l4_core -> usbhsotg */
  2292. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  2293. .master = &omap3xxx_l4_core_hwmod,
  2294. .slave = &omap3xxx_usbhsotg_hwmod,
  2295. .clk = "l4_ick",
  2296. .addr = omap3xxx_usbhsotg_addrs,
  2297. .user = OCP_USER_MPU,
  2298. };
  2299. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  2300. {
  2301. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  2302. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  2303. .flags = ADDR_TYPE_RT
  2304. },
  2305. { }
  2306. };
  2307. /* l4_core -> usbhsotg */
  2308. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  2309. .master = &omap3xxx_l4_core_hwmod,
  2310. .slave = &am35xx_usbhsotg_hwmod,
  2311. .clk = "hsotgusb_ick",
  2312. .addr = am35xx_usbhsotg_addrs,
  2313. .user = OCP_USER_MPU,
  2314. };
  2315. /* L4_WKUP -> L4_SEC interface */
  2316. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
  2317. .master = &omap3xxx_l4_wkup_hwmod,
  2318. .slave = &omap3xxx_l4_sec_hwmod,
  2319. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2320. };
  2321. /* IVA2 <- L3 interface */
  2322. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  2323. .master = &omap3xxx_l3_main_hwmod,
  2324. .slave = &omap3xxx_iva_hwmod,
  2325. .clk = "core_l3_ick",
  2326. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2327. };
  2328. static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
  2329. {
  2330. .pa_start = 0x48318000,
  2331. .pa_end = 0x48318000 + SZ_1K - 1,
  2332. .flags = ADDR_TYPE_RT
  2333. },
  2334. { }
  2335. };
  2336. /* l4_wkup -> timer1 */
  2337. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
  2338. .master = &omap3xxx_l4_wkup_hwmod,
  2339. .slave = &omap3xxx_timer1_hwmod,
  2340. .clk = "gpt1_ick",
  2341. .addr = omap3xxx_timer1_addrs,
  2342. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2343. };
  2344. static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
  2345. {
  2346. .pa_start = 0x49032000,
  2347. .pa_end = 0x49032000 + SZ_1K - 1,
  2348. .flags = ADDR_TYPE_RT
  2349. },
  2350. { }
  2351. };
  2352. /* l4_per -> timer2 */
  2353. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
  2354. .master = &omap3xxx_l4_per_hwmod,
  2355. .slave = &omap3xxx_timer2_hwmod,
  2356. .clk = "gpt2_ick",
  2357. .addr = omap3xxx_timer2_addrs,
  2358. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2359. };
  2360. static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
  2361. {
  2362. .pa_start = 0x49034000,
  2363. .pa_end = 0x49034000 + SZ_1K - 1,
  2364. .flags = ADDR_TYPE_RT
  2365. },
  2366. { }
  2367. };
  2368. /* l4_per -> timer3 */
  2369. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
  2370. .master = &omap3xxx_l4_per_hwmod,
  2371. .slave = &omap3xxx_timer3_hwmod,
  2372. .clk = "gpt3_ick",
  2373. .addr = omap3xxx_timer3_addrs,
  2374. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2375. };
  2376. static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
  2377. {
  2378. .pa_start = 0x49036000,
  2379. .pa_end = 0x49036000 + SZ_1K - 1,
  2380. .flags = ADDR_TYPE_RT
  2381. },
  2382. { }
  2383. };
  2384. /* l4_per -> timer4 */
  2385. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
  2386. .master = &omap3xxx_l4_per_hwmod,
  2387. .slave = &omap3xxx_timer4_hwmod,
  2388. .clk = "gpt4_ick",
  2389. .addr = omap3xxx_timer4_addrs,
  2390. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2391. };
  2392. static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
  2393. {
  2394. .pa_start = 0x49038000,
  2395. .pa_end = 0x49038000 + SZ_1K - 1,
  2396. .flags = ADDR_TYPE_RT
  2397. },
  2398. { }
  2399. };
  2400. /* l4_per -> timer5 */
  2401. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
  2402. .master = &omap3xxx_l4_per_hwmod,
  2403. .slave = &omap3xxx_timer5_hwmod,
  2404. .clk = "gpt5_ick",
  2405. .addr = omap3xxx_timer5_addrs,
  2406. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2407. };
  2408. static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
  2409. {
  2410. .pa_start = 0x4903A000,
  2411. .pa_end = 0x4903A000 + SZ_1K - 1,
  2412. .flags = ADDR_TYPE_RT
  2413. },
  2414. { }
  2415. };
  2416. /* l4_per -> timer6 */
  2417. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
  2418. .master = &omap3xxx_l4_per_hwmod,
  2419. .slave = &omap3xxx_timer6_hwmod,
  2420. .clk = "gpt6_ick",
  2421. .addr = omap3xxx_timer6_addrs,
  2422. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2423. };
  2424. static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
  2425. {
  2426. .pa_start = 0x4903C000,
  2427. .pa_end = 0x4903C000 + SZ_1K - 1,
  2428. .flags = ADDR_TYPE_RT
  2429. },
  2430. { }
  2431. };
  2432. /* l4_per -> timer7 */
  2433. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
  2434. .master = &omap3xxx_l4_per_hwmod,
  2435. .slave = &omap3xxx_timer7_hwmod,
  2436. .clk = "gpt7_ick",
  2437. .addr = omap3xxx_timer7_addrs,
  2438. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2439. };
  2440. static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
  2441. {
  2442. .pa_start = 0x4903E000,
  2443. .pa_end = 0x4903E000 + SZ_1K - 1,
  2444. .flags = ADDR_TYPE_RT
  2445. },
  2446. { }
  2447. };
  2448. /* l4_per -> timer8 */
  2449. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
  2450. .master = &omap3xxx_l4_per_hwmod,
  2451. .slave = &omap3xxx_timer8_hwmod,
  2452. .clk = "gpt8_ick",
  2453. .addr = omap3xxx_timer8_addrs,
  2454. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2455. };
  2456. static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
  2457. {
  2458. .pa_start = 0x49040000,
  2459. .pa_end = 0x49040000 + SZ_1K - 1,
  2460. .flags = ADDR_TYPE_RT
  2461. },
  2462. { }
  2463. };
  2464. /* l4_per -> timer9 */
  2465. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
  2466. .master = &omap3xxx_l4_per_hwmod,
  2467. .slave = &omap3xxx_timer9_hwmod,
  2468. .clk = "gpt9_ick",
  2469. .addr = omap3xxx_timer9_addrs,
  2470. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2471. };
  2472. /* l4_core -> timer10 */
  2473. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
  2474. .master = &omap3xxx_l4_core_hwmod,
  2475. .slave = &omap3xxx_timer10_hwmod,
  2476. .clk = "gpt10_ick",
  2477. .addr = omap2_timer10_addrs,
  2478. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2479. };
  2480. /* l4_core -> timer11 */
  2481. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
  2482. .master = &omap3xxx_l4_core_hwmod,
  2483. .slave = &omap3xxx_timer11_hwmod,
  2484. .clk = "gpt11_ick",
  2485. .addr = omap2_timer11_addrs,
  2486. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2487. };
  2488. static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
  2489. {
  2490. .pa_start = 0x48304000,
  2491. .pa_end = 0x48304000 + SZ_1K - 1,
  2492. .flags = ADDR_TYPE_RT
  2493. },
  2494. { }
  2495. };
  2496. /* l4_core -> timer12 */
  2497. static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
  2498. .master = &omap3xxx_l4_sec_hwmod,
  2499. .slave = &omap3xxx_timer12_hwmod,
  2500. .clk = "gpt12_ick",
  2501. .addr = omap3xxx_timer12_addrs,
  2502. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2503. };
  2504. /* l4_wkup -> wd_timer2 */
  2505. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  2506. {
  2507. .pa_start = 0x48314000,
  2508. .pa_end = 0x4831407f,
  2509. .flags = ADDR_TYPE_RT
  2510. },
  2511. { }
  2512. };
  2513. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  2514. .master = &omap3xxx_l4_wkup_hwmod,
  2515. .slave = &omap3xxx_wd_timer2_hwmod,
  2516. .clk = "wdt2_ick",
  2517. .addr = omap3xxx_wd_timer2_addrs,
  2518. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2519. };
  2520. /* l4_core -> dss */
  2521. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  2522. .master = &omap3xxx_l4_core_hwmod,
  2523. .slave = &omap3430es1_dss_core_hwmod,
  2524. .clk = "dss_ick",
  2525. .addr = omap2_dss_addrs,
  2526. .fw = {
  2527. .omap2 = {
  2528. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  2529. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2530. .flags = OMAP_FIREWALL_L4,
  2531. }
  2532. },
  2533. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2534. };
  2535. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  2536. .master = &omap3xxx_l4_core_hwmod,
  2537. .slave = &omap3xxx_dss_core_hwmod,
  2538. .clk = "dss_ick",
  2539. .addr = omap2_dss_addrs,
  2540. .fw = {
  2541. .omap2 = {
  2542. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  2543. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2544. .flags = OMAP_FIREWALL_L4,
  2545. }
  2546. },
  2547. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2548. };
  2549. /* l4_core -> dss_dispc */
  2550. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  2551. .master = &omap3xxx_l4_core_hwmod,
  2552. .slave = &omap3xxx_dss_dispc_hwmod,
  2553. .clk = "dss_ick",
  2554. .addr = omap2_dss_dispc_addrs,
  2555. .fw = {
  2556. .omap2 = {
  2557. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  2558. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2559. .flags = OMAP_FIREWALL_L4,
  2560. }
  2561. },
  2562. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2563. };
  2564. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  2565. {
  2566. .pa_start = 0x4804FC00,
  2567. .pa_end = 0x4804FFFF,
  2568. .flags = ADDR_TYPE_RT
  2569. },
  2570. { }
  2571. };
  2572. /* l4_core -> dss_dsi1 */
  2573. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  2574. .master = &omap3xxx_l4_core_hwmod,
  2575. .slave = &omap3xxx_dss_dsi1_hwmod,
  2576. .clk = "dss_ick",
  2577. .addr = omap3xxx_dss_dsi1_addrs,
  2578. .fw = {
  2579. .omap2 = {
  2580. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  2581. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2582. .flags = OMAP_FIREWALL_L4,
  2583. }
  2584. },
  2585. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2586. };
  2587. /* l4_core -> dss_rfbi */
  2588. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  2589. .master = &omap3xxx_l4_core_hwmod,
  2590. .slave = &omap3xxx_dss_rfbi_hwmod,
  2591. .clk = "dss_ick",
  2592. .addr = omap2_dss_rfbi_addrs,
  2593. .fw = {
  2594. .omap2 = {
  2595. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  2596. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  2597. .flags = OMAP_FIREWALL_L4,
  2598. }
  2599. },
  2600. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2601. };
  2602. /* l4_core -> dss_venc */
  2603. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  2604. .master = &omap3xxx_l4_core_hwmod,
  2605. .slave = &omap3xxx_dss_venc_hwmod,
  2606. .clk = "dss_ick",
  2607. .addr = omap2_dss_venc_addrs,
  2608. .fw = {
  2609. .omap2 = {
  2610. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  2611. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2612. .flags = OMAP_FIREWALL_L4,
  2613. }
  2614. },
  2615. .flags = OCPIF_SWSUP_IDLE,
  2616. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2617. };
  2618. /* l4_wkup -> gpio1 */
  2619. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  2620. {
  2621. .pa_start = 0x48310000,
  2622. .pa_end = 0x483101ff,
  2623. .flags = ADDR_TYPE_RT
  2624. },
  2625. { }
  2626. };
  2627. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  2628. .master = &omap3xxx_l4_wkup_hwmod,
  2629. .slave = &omap3xxx_gpio1_hwmod,
  2630. .addr = omap3xxx_gpio1_addrs,
  2631. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2632. };
  2633. /* l4_per -> gpio2 */
  2634. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  2635. {
  2636. .pa_start = 0x49050000,
  2637. .pa_end = 0x490501ff,
  2638. .flags = ADDR_TYPE_RT
  2639. },
  2640. { }
  2641. };
  2642. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  2643. .master = &omap3xxx_l4_per_hwmod,
  2644. .slave = &omap3xxx_gpio2_hwmod,
  2645. .addr = omap3xxx_gpio2_addrs,
  2646. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2647. };
  2648. /* l4_per -> gpio3 */
  2649. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  2650. {
  2651. .pa_start = 0x49052000,
  2652. .pa_end = 0x490521ff,
  2653. .flags = ADDR_TYPE_RT
  2654. },
  2655. { }
  2656. };
  2657. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  2658. .master = &omap3xxx_l4_per_hwmod,
  2659. .slave = &omap3xxx_gpio3_hwmod,
  2660. .addr = omap3xxx_gpio3_addrs,
  2661. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2662. };
  2663. /*
  2664. * 'mmu' class
  2665. * The memory management unit performs virtual to physical address translation
  2666. * for its requestors.
  2667. */
  2668. static struct omap_hwmod_class_sysconfig mmu_sysc = {
  2669. .rev_offs = 0x000,
  2670. .sysc_offs = 0x010,
  2671. .syss_offs = 0x014,
  2672. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2673. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2674. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2675. .sysc_fields = &omap_hwmod_sysc_type1,
  2676. };
  2677. static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
  2678. .name = "mmu",
  2679. .sysc = &mmu_sysc,
  2680. };
  2681. /* mmu isp */
  2682. static struct omap_mmu_dev_attr mmu_isp_dev_attr = {
  2683. .nr_tlb_entries = 8,
  2684. };
  2685. static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
  2686. static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = {
  2687. { .irq = 24 + OMAP_INTC_START, },
  2688. { .irq = -1 }
  2689. };
  2690. static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = {
  2691. {
  2692. .pa_start = 0x480bd400,
  2693. .pa_end = 0x480bd47f,
  2694. .flags = ADDR_TYPE_RT,
  2695. },
  2696. { }
  2697. };
  2698. /* l4_core -> mmu isp */
  2699. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
  2700. .master = &omap3xxx_l4_core_hwmod,
  2701. .slave = &omap3xxx_mmu_isp_hwmod,
  2702. .addr = omap3xxx_mmu_isp_addrs,
  2703. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2704. };
  2705. static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
  2706. .name = "mmu_isp",
  2707. .class = &omap3xxx_mmu_hwmod_class,
  2708. .mpu_irqs = omap3xxx_mmu_isp_irqs,
  2709. .main_clk = "cam_ick",
  2710. .dev_attr = &mmu_isp_dev_attr,
  2711. .flags = HWMOD_NO_IDLEST,
  2712. };
  2713. /* mmu iva */
  2714. static struct omap_mmu_dev_attr mmu_iva_dev_attr = {
  2715. .nr_tlb_entries = 32,
  2716. };
  2717. static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
  2718. static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = {
  2719. { .irq = 28 + OMAP_INTC_START, },
  2720. { .irq = -1 }
  2721. };
  2722. static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
  2723. { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
  2724. };
  2725. static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = {
  2726. {
  2727. .pa_start = 0x5d000000,
  2728. .pa_end = 0x5d00007f,
  2729. .flags = ADDR_TYPE_RT,
  2730. },
  2731. { }
  2732. };
  2733. /* l3_main -> iva mmu */
  2734. static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
  2735. .master = &omap3xxx_l3_main_hwmod,
  2736. .slave = &omap3xxx_mmu_iva_hwmod,
  2737. .addr = omap3xxx_mmu_iva_addrs,
  2738. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2739. };
  2740. static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
  2741. .name = "mmu_iva",
  2742. .class = &omap3xxx_mmu_hwmod_class,
  2743. .mpu_irqs = omap3xxx_mmu_iva_irqs,
  2744. .clkdm_name = "iva2_clkdm",
  2745. .rst_lines = omap3xxx_mmu_iva_resets,
  2746. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
  2747. .main_clk = "iva2_ck",
  2748. .prcm = {
  2749. .omap2 = {
  2750. .module_offs = OMAP3430_IVA2_MOD,
  2751. .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
  2752. .idlest_reg_id = 1,
  2753. .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
  2754. },
  2755. },
  2756. .dev_attr = &mmu_iva_dev_attr,
  2757. .flags = HWMOD_NO_IDLEST,
  2758. };
  2759. /* l4_per -> gpio4 */
  2760. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  2761. {
  2762. .pa_start = 0x49054000,
  2763. .pa_end = 0x490541ff,
  2764. .flags = ADDR_TYPE_RT
  2765. },
  2766. { }
  2767. };
  2768. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  2769. .master = &omap3xxx_l4_per_hwmod,
  2770. .slave = &omap3xxx_gpio4_hwmod,
  2771. .addr = omap3xxx_gpio4_addrs,
  2772. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2773. };
  2774. /* l4_per -> gpio5 */
  2775. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  2776. {
  2777. .pa_start = 0x49056000,
  2778. .pa_end = 0x490561ff,
  2779. .flags = ADDR_TYPE_RT
  2780. },
  2781. { }
  2782. };
  2783. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  2784. .master = &omap3xxx_l4_per_hwmod,
  2785. .slave = &omap3xxx_gpio5_hwmod,
  2786. .addr = omap3xxx_gpio5_addrs,
  2787. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2788. };
  2789. /* l4_per -> gpio6 */
  2790. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  2791. {
  2792. .pa_start = 0x49058000,
  2793. .pa_end = 0x490581ff,
  2794. .flags = ADDR_TYPE_RT
  2795. },
  2796. { }
  2797. };
  2798. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  2799. .master = &omap3xxx_l4_per_hwmod,
  2800. .slave = &omap3xxx_gpio6_hwmod,
  2801. .addr = omap3xxx_gpio6_addrs,
  2802. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2803. };
  2804. /* dma_system -> L3 */
  2805. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  2806. .master = &omap3xxx_dma_system_hwmod,
  2807. .slave = &omap3xxx_l3_main_hwmod,
  2808. .clk = "core_l3_ick",
  2809. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2810. };
  2811. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  2812. {
  2813. .pa_start = 0x48056000,
  2814. .pa_end = 0x48056fff,
  2815. .flags = ADDR_TYPE_RT
  2816. },
  2817. { }
  2818. };
  2819. /* l4_cfg -> dma_system */
  2820. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  2821. .master = &omap3xxx_l4_core_hwmod,
  2822. .slave = &omap3xxx_dma_system_hwmod,
  2823. .clk = "core_l4_ick",
  2824. .addr = omap3xxx_dma_system_addrs,
  2825. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2826. };
  2827. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  2828. {
  2829. .name = "mpu",
  2830. .pa_start = 0x48074000,
  2831. .pa_end = 0x480740ff,
  2832. .flags = ADDR_TYPE_RT
  2833. },
  2834. { }
  2835. };
  2836. /* l4_core -> mcbsp1 */
  2837. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  2838. .master = &omap3xxx_l4_core_hwmod,
  2839. .slave = &omap3xxx_mcbsp1_hwmod,
  2840. .clk = "mcbsp1_ick",
  2841. .addr = omap3xxx_mcbsp1_addrs,
  2842. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2843. };
  2844. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  2845. {
  2846. .name = "mpu",
  2847. .pa_start = 0x49022000,
  2848. .pa_end = 0x490220ff,
  2849. .flags = ADDR_TYPE_RT
  2850. },
  2851. { }
  2852. };
  2853. /* l4_per -> mcbsp2 */
  2854. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  2855. .master = &omap3xxx_l4_per_hwmod,
  2856. .slave = &omap3xxx_mcbsp2_hwmod,
  2857. .clk = "mcbsp2_ick",
  2858. .addr = omap3xxx_mcbsp2_addrs,
  2859. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2860. };
  2861. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2862. {
  2863. .name = "mpu",
  2864. .pa_start = 0x49024000,
  2865. .pa_end = 0x490240ff,
  2866. .flags = ADDR_TYPE_RT
  2867. },
  2868. { }
  2869. };
  2870. /* l4_per -> mcbsp3 */
  2871. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2872. .master = &omap3xxx_l4_per_hwmod,
  2873. .slave = &omap3xxx_mcbsp3_hwmod,
  2874. .clk = "mcbsp3_ick",
  2875. .addr = omap3xxx_mcbsp3_addrs,
  2876. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2877. };
  2878. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2879. {
  2880. .name = "mpu",
  2881. .pa_start = 0x49026000,
  2882. .pa_end = 0x490260ff,
  2883. .flags = ADDR_TYPE_RT
  2884. },
  2885. { }
  2886. };
  2887. /* l4_per -> mcbsp4 */
  2888. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2889. .master = &omap3xxx_l4_per_hwmod,
  2890. .slave = &omap3xxx_mcbsp4_hwmod,
  2891. .clk = "mcbsp4_ick",
  2892. .addr = omap3xxx_mcbsp4_addrs,
  2893. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2894. };
  2895. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2896. {
  2897. .name = "mpu",
  2898. .pa_start = 0x48096000,
  2899. .pa_end = 0x480960ff,
  2900. .flags = ADDR_TYPE_RT
  2901. },
  2902. { }
  2903. };
  2904. /* l4_core -> mcbsp5 */
  2905. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2906. .master = &omap3xxx_l4_core_hwmod,
  2907. .slave = &omap3xxx_mcbsp5_hwmod,
  2908. .clk = "mcbsp5_ick",
  2909. .addr = omap3xxx_mcbsp5_addrs,
  2910. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2911. };
  2912. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2913. {
  2914. .name = "sidetone",
  2915. .pa_start = 0x49028000,
  2916. .pa_end = 0x490280ff,
  2917. .flags = ADDR_TYPE_RT
  2918. },
  2919. { }
  2920. };
  2921. /* l4_per -> mcbsp2_sidetone */
  2922. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2923. .master = &omap3xxx_l4_per_hwmod,
  2924. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2925. .clk = "mcbsp2_ick",
  2926. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2927. .user = OCP_USER_MPU,
  2928. };
  2929. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2930. {
  2931. .name = "sidetone",
  2932. .pa_start = 0x4902A000,
  2933. .pa_end = 0x4902A0ff,
  2934. .flags = ADDR_TYPE_RT
  2935. },
  2936. { }
  2937. };
  2938. /* l4_per -> mcbsp3_sidetone */
  2939. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2940. .master = &omap3xxx_l4_per_hwmod,
  2941. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2942. .clk = "mcbsp3_ick",
  2943. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2944. .user = OCP_USER_MPU,
  2945. };
  2946. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2947. {
  2948. .pa_start = 0x48094000,
  2949. .pa_end = 0x480941ff,
  2950. .flags = ADDR_TYPE_RT,
  2951. },
  2952. { }
  2953. };
  2954. /* l4_core -> mailbox */
  2955. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2956. .master = &omap3xxx_l4_core_hwmod,
  2957. .slave = &omap3xxx_mailbox_hwmod,
  2958. .addr = omap3xxx_mailbox_addrs,
  2959. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2960. };
  2961. /* l4 core -> mcspi1 interface */
  2962. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2963. .master = &omap3xxx_l4_core_hwmod,
  2964. .slave = &omap34xx_mcspi1,
  2965. .clk = "mcspi1_ick",
  2966. .addr = omap2_mcspi1_addr_space,
  2967. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2968. };
  2969. /* l4 core -> mcspi2 interface */
  2970. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2971. .master = &omap3xxx_l4_core_hwmod,
  2972. .slave = &omap34xx_mcspi2,
  2973. .clk = "mcspi2_ick",
  2974. .addr = omap2_mcspi2_addr_space,
  2975. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2976. };
  2977. /* l4 core -> mcspi3 interface */
  2978. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2979. .master = &omap3xxx_l4_core_hwmod,
  2980. .slave = &omap34xx_mcspi3,
  2981. .clk = "mcspi3_ick",
  2982. .addr = omap2430_mcspi3_addr_space,
  2983. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2984. };
  2985. /* l4 core -> mcspi4 interface */
  2986. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2987. {
  2988. .pa_start = 0x480ba000,
  2989. .pa_end = 0x480ba0ff,
  2990. .flags = ADDR_TYPE_RT,
  2991. },
  2992. { }
  2993. };
  2994. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2995. .master = &omap3xxx_l4_core_hwmod,
  2996. .slave = &omap34xx_mcspi4,
  2997. .clk = "mcspi4_ick",
  2998. .addr = omap34xx_mcspi4_addr_space,
  2999. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3000. };
  3001. static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
  3002. .master = &omap3xxx_usb_host_hs_hwmod,
  3003. .slave = &omap3xxx_l3_main_hwmod,
  3004. .clk = "core_l3_ick",
  3005. .user = OCP_USER_MPU,
  3006. };
  3007. static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
  3008. {
  3009. .name = "uhh",
  3010. .pa_start = 0x48064000,
  3011. .pa_end = 0x480643ff,
  3012. .flags = ADDR_TYPE_RT
  3013. },
  3014. {
  3015. .name = "ohci",
  3016. .pa_start = 0x48064400,
  3017. .pa_end = 0x480647ff,
  3018. },
  3019. {
  3020. .name = "ehci",
  3021. .pa_start = 0x48064800,
  3022. .pa_end = 0x48064cff,
  3023. },
  3024. {}
  3025. };
  3026. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
  3027. .master = &omap3xxx_l4_core_hwmod,
  3028. .slave = &omap3xxx_usb_host_hs_hwmod,
  3029. .clk = "usbhost_ick",
  3030. .addr = omap3xxx_usb_host_hs_addrs,
  3031. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3032. };
  3033. static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
  3034. {
  3035. .name = "tll",
  3036. .pa_start = 0x48062000,
  3037. .pa_end = 0x48062fff,
  3038. .flags = ADDR_TYPE_RT
  3039. },
  3040. {}
  3041. };
  3042. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
  3043. .master = &omap3xxx_l4_core_hwmod,
  3044. .slave = &omap3xxx_usb_tll_hs_hwmod,
  3045. .clk = "usbtll_ick",
  3046. .addr = omap3xxx_usb_tll_hs_addrs,
  3047. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3048. };
  3049. /* l4_core -> hdq1w interface */
  3050. static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
  3051. .master = &omap3xxx_l4_core_hwmod,
  3052. .slave = &omap3xxx_hdq1w_hwmod,
  3053. .clk = "hdq_ick",
  3054. .addr = omap2_hdq1w_addr_space,
  3055. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3056. .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
  3057. };
  3058. /* l4_wkup -> 32ksync_counter */
  3059. static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
  3060. {
  3061. .pa_start = 0x48320000,
  3062. .pa_end = 0x4832001f,
  3063. .flags = ADDR_TYPE_RT
  3064. },
  3065. { }
  3066. };
  3067. static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = {
  3068. {
  3069. .pa_start = 0x6e000000,
  3070. .pa_end = 0x6e000fff,
  3071. .flags = ADDR_TYPE_RT
  3072. },
  3073. { }
  3074. };
  3075. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
  3076. .master = &omap3xxx_l4_wkup_hwmod,
  3077. .slave = &omap3xxx_counter_32k_hwmod,
  3078. .clk = "omap_32ksync_ick",
  3079. .addr = omap3xxx_counter_32k_addrs,
  3080. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3081. };
  3082. /* am35xx has Davinci MDIO & EMAC */
  3083. static struct omap_hwmod_class am35xx_mdio_class = {
  3084. .name = "davinci_mdio",
  3085. };
  3086. static struct omap_hwmod am35xx_mdio_hwmod = {
  3087. .name = "davinci_mdio",
  3088. .class = &am35xx_mdio_class,
  3089. .flags = HWMOD_NO_IDLEST,
  3090. };
  3091. /*
  3092. * XXX Should be connected to an IPSS hwmod, not the L3 directly;
  3093. * but this will probably require some additional hwmod core support,
  3094. * so is left as a future to-do item.
  3095. */
  3096. static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
  3097. .master = &am35xx_mdio_hwmod,
  3098. .slave = &omap3xxx_l3_main_hwmod,
  3099. .clk = "emac_fck",
  3100. .user = OCP_USER_MPU,
  3101. };
  3102. static struct omap_hwmod_addr_space am35xx_mdio_addrs[] = {
  3103. {
  3104. .pa_start = AM35XX_IPSS_MDIO_BASE,
  3105. .pa_end = AM35XX_IPSS_MDIO_BASE + SZ_4K - 1,
  3106. .flags = ADDR_TYPE_RT,
  3107. },
  3108. { }
  3109. };
  3110. /* l4_core -> davinci mdio */
  3111. /*
  3112. * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
  3113. * but this will probably require some additional hwmod core support,
  3114. * so is left as a future to-do item.
  3115. */
  3116. static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
  3117. .master = &omap3xxx_l4_core_hwmod,
  3118. .slave = &am35xx_mdio_hwmod,
  3119. .clk = "emac_fck",
  3120. .addr = am35xx_mdio_addrs,
  3121. .user = OCP_USER_MPU,
  3122. };
  3123. static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
  3124. { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
  3125. { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
  3126. { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
  3127. { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
  3128. { .irq = -1 },
  3129. };
  3130. static struct omap_hwmod_class am35xx_emac_class = {
  3131. .name = "davinci_emac",
  3132. };
  3133. static struct omap_hwmod am35xx_emac_hwmod = {
  3134. .name = "davinci_emac",
  3135. .mpu_irqs = am35xx_emac_mpu_irqs,
  3136. .class = &am35xx_emac_class,
  3137. /*
  3138. * According to Mark Greer, the MPU will not return from WFI
  3139. * when the EMAC signals an interrupt.
  3140. * http://www.spinics.net/lists/arm-kernel/msg174734.html
  3141. */
  3142. .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
  3143. };
  3144. /* l3_core -> davinci emac interface */
  3145. /*
  3146. * XXX Should be connected to an IPSS hwmod, not the L3 directly;
  3147. * but this will probably require some additional hwmod core support,
  3148. * so is left as a future to-do item.
  3149. */
  3150. static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
  3151. .master = &am35xx_emac_hwmod,
  3152. .slave = &omap3xxx_l3_main_hwmod,
  3153. .clk = "emac_ick",
  3154. .user = OCP_USER_MPU,
  3155. };
  3156. static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
  3157. {
  3158. .pa_start = AM35XX_IPSS_EMAC_BASE,
  3159. .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
  3160. .flags = ADDR_TYPE_RT,
  3161. },
  3162. { }
  3163. };
  3164. /* l4_core -> davinci emac */
  3165. /*
  3166. * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
  3167. * but this will probably require some additional hwmod core support,
  3168. * so is left as a future to-do item.
  3169. */
  3170. static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
  3171. .master = &omap3xxx_l4_core_hwmod,
  3172. .slave = &am35xx_emac_hwmod,
  3173. .clk = "emac_ick",
  3174. .addr = am35xx_emac_addrs,
  3175. .user = OCP_USER_MPU,
  3176. };
  3177. static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
  3178. .master = &omap3xxx_l3_main_hwmod,
  3179. .slave = &omap3xxx_gpmc_hwmod,
  3180. .clk = "core_l3_ick",
  3181. .addr = omap3xxx_gpmc_addrs,
  3182. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3183. };
  3184. /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
  3185. static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
  3186. .sidle_shift = 4,
  3187. .srst_shift = 1,
  3188. .autoidle_shift = 0,
  3189. };
  3190. static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
  3191. .rev_offs = 0x5c,
  3192. .sysc_offs = 0x60,
  3193. .syss_offs = 0x64,
  3194. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  3195. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  3196. .sysc_fields = &omap3_sham_sysc_fields,
  3197. };
  3198. static struct omap_hwmod_class omap3xxx_sham_class = {
  3199. .name = "sham",
  3200. .sysc = &omap3_sham_sysc,
  3201. };
  3202. static struct omap_hwmod_irq_info omap3_sham_mpu_irqs[] = {
  3203. { .irq = 49 + OMAP_INTC_START, },
  3204. { .irq = -1 }
  3205. };
  3206. static struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = {
  3207. { .name = "rx", .dma_req = 69, },
  3208. { .dma_req = -1 }
  3209. };
  3210. static struct omap_hwmod omap3xxx_sham_hwmod = {
  3211. .name = "sham",
  3212. .mpu_irqs = omap3_sham_mpu_irqs,
  3213. .sdma_reqs = omap3_sham_sdma_reqs,
  3214. .main_clk = "sha12_ick",
  3215. .prcm = {
  3216. .omap2 = {
  3217. .module_offs = CORE_MOD,
  3218. .prcm_reg_id = 1,
  3219. .module_bit = OMAP3430_EN_SHA12_SHIFT,
  3220. .idlest_reg_id = 1,
  3221. .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
  3222. },
  3223. },
  3224. .class = &omap3xxx_sham_class,
  3225. };
  3226. static struct omap_hwmod_addr_space omap3xxx_sham_addrs[] = {
  3227. {
  3228. .pa_start = 0x480c3000,
  3229. .pa_end = 0x480c3000 + 0x64 - 1,
  3230. .flags = ADDR_TYPE_RT
  3231. },
  3232. { }
  3233. };
  3234. static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
  3235. .master = &omap3xxx_l4_core_hwmod,
  3236. .slave = &omap3xxx_sham_hwmod,
  3237. .clk = "sha12_ick",
  3238. .addr = omap3xxx_sham_addrs,
  3239. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3240. };
  3241. /* l4_core -> AES */
  3242. static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
  3243. .sidle_shift = 6,
  3244. .srst_shift = 1,
  3245. .autoidle_shift = 0,
  3246. };
  3247. static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
  3248. .rev_offs = 0x44,
  3249. .sysc_offs = 0x48,
  3250. .syss_offs = 0x4c,
  3251. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  3252. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  3253. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  3254. .sysc_fields = &omap3xxx_aes_sysc_fields,
  3255. };
  3256. static struct omap_hwmod_class omap3xxx_aes_class = {
  3257. .name = "aes",
  3258. .sysc = &omap3_aes_sysc,
  3259. };
  3260. static struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = {
  3261. { .name = "tx", .dma_req = 65, },
  3262. { .name = "rx", .dma_req = 66, },
  3263. { .dma_req = -1 }
  3264. };
  3265. static struct omap_hwmod omap3xxx_aes_hwmod = {
  3266. .name = "aes",
  3267. .sdma_reqs = omap3_aes_sdma_reqs,
  3268. .main_clk = "aes2_ick",
  3269. .prcm = {
  3270. .omap2 = {
  3271. .module_offs = CORE_MOD,
  3272. .prcm_reg_id = 1,
  3273. .module_bit = OMAP3430_EN_AES2_SHIFT,
  3274. .idlest_reg_id = 1,
  3275. .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
  3276. },
  3277. },
  3278. .class = &omap3xxx_aes_class,
  3279. };
  3280. static struct omap_hwmod_addr_space omap3xxx_aes_addrs[] = {
  3281. {
  3282. .pa_start = 0x480c5000,
  3283. .pa_end = 0x480c5000 + 0x50 - 1,
  3284. .flags = ADDR_TYPE_RT
  3285. },
  3286. { }
  3287. };
  3288. static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
  3289. .master = &omap3xxx_l4_core_hwmod,
  3290. .slave = &omap3xxx_aes_hwmod,
  3291. .clk = "aes2_ick",
  3292. .addr = omap3xxx_aes_addrs,
  3293. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3294. };
  3295. /*
  3296. * 'ssi' class
  3297. * synchronous serial interface (multichannel and full-duplex serial if)
  3298. */
  3299. static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
  3300. .rev_offs = 0x0000,
  3301. .sysc_offs = 0x0010,
  3302. .syss_offs = 0x0014,
  3303. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE |
  3304. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  3305. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  3306. .sysc_fields = &omap_hwmod_sysc_type1,
  3307. };
  3308. static struct omap_hwmod_class omap34xx_ssi_hwmod_class = {
  3309. .name = "ssi",
  3310. .sysc = &omap34xx_ssi_sysc,
  3311. };
  3312. static struct omap_hwmod omap34xx_ssi_hwmod = {
  3313. .name = "ssi",
  3314. .class = &omap34xx_ssi_hwmod_class,
  3315. .clkdm_name = "core_l4_clkdm",
  3316. .main_clk = "ssi_ssr_fck",
  3317. .prcm = {
  3318. .omap2 = {
  3319. .prcm_reg_id = 1,
  3320. .module_bit = OMAP3430_EN_SSI_SHIFT,
  3321. .module_offs = CORE_MOD,
  3322. .idlest_reg_id = 1,
  3323. .idlest_idle_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT,
  3324. },
  3325. },
  3326. };
  3327. /* L4 CORE -> SSI */
  3328. static struct omap_hwmod_ocp_if omap34xx_l4_core__ssi = {
  3329. .master = &omap3xxx_l4_core_hwmod,
  3330. .slave = &omap34xx_ssi_hwmod,
  3331. .clk = "ssi_ick",
  3332. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3333. };
  3334. static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
  3335. &omap3xxx_l3_main__l4_core,
  3336. &omap3xxx_l3_main__l4_per,
  3337. &omap3xxx_mpu__l3_main,
  3338. &omap3xxx_l3_main__l4_debugss,
  3339. &omap3xxx_l4_core__l4_wkup,
  3340. &omap3xxx_l4_core__mmc3,
  3341. &omap3_l4_core__uart1,
  3342. &omap3_l4_core__uart2,
  3343. &omap3_l4_per__uart3,
  3344. &omap3_l4_core__i2c1,
  3345. &omap3_l4_core__i2c2,
  3346. &omap3_l4_core__i2c3,
  3347. &omap3xxx_l4_wkup__l4_sec,
  3348. &omap3xxx_l4_wkup__timer1,
  3349. &omap3xxx_l4_per__timer2,
  3350. &omap3xxx_l4_per__timer3,
  3351. &omap3xxx_l4_per__timer4,
  3352. &omap3xxx_l4_per__timer5,
  3353. &omap3xxx_l4_per__timer6,
  3354. &omap3xxx_l4_per__timer7,
  3355. &omap3xxx_l4_per__timer8,
  3356. &omap3xxx_l4_per__timer9,
  3357. &omap3xxx_l4_core__timer10,
  3358. &omap3xxx_l4_core__timer11,
  3359. &omap3xxx_l4_wkup__wd_timer2,
  3360. &omap3xxx_l4_wkup__gpio1,
  3361. &omap3xxx_l4_per__gpio2,
  3362. &omap3xxx_l4_per__gpio3,
  3363. &omap3xxx_l4_per__gpio4,
  3364. &omap3xxx_l4_per__gpio5,
  3365. &omap3xxx_l4_per__gpio6,
  3366. &omap3xxx_dma_system__l3,
  3367. &omap3xxx_l4_core__dma_system,
  3368. &omap3xxx_l4_core__mcbsp1,
  3369. &omap3xxx_l4_per__mcbsp2,
  3370. &omap3xxx_l4_per__mcbsp3,
  3371. &omap3xxx_l4_per__mcbsp4,
  3372. &omap3xxx_l4_core__mcbsp5,
  3373. &omap3xxx_l4_per__mcbsp2_sidetone,
  3374. &omap3xxx_l4_per__mcbsp3_sidetone,
  3375. &omap34xx_l4_core__mcspi1,
  3376. &omap34xx_l4_core__mcspi2,
  3377. &omap34xx_l4_core__mcspi3,
  3378. &omap34xx_l4_core__mcspi4,
  3379. &omap3xxx_l4_wkup__counter_32k,
  3380. &omap3xxx_l3_main__gpmc,
  3381. NULL,
  3382. };
  3383. /* GP-only hwmod links */
  3384. static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = {
  3385. &omap3xxx_l4_sec__timer12,
  3386. &omap3xxx_l4_core__sham,
  3387. &omap3xxx_l4_core__aes,
  3388. NULL
  3389. };
  3390. static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = {
  3391. &omap3xxx_l4_sec__timer12,
  3392. &omap3xxx_l4_core__sham,
  3393. &omap3xxx_l4_core__aes,
  3394. NULL
  3395. };
  3396. static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = {
  3397. &omap3xxx_l4_sec__timer12,
  3398. /*
  3399. * Apparently the SHA/MD5 and AES accelerator IP blocks are
  3400. * only present on some AM35xx chips, and no one knows which
  3401. * ones. See
  3402. * http://www.spinics.net/lists/arm-kernel/msg215466.html So
  3403. * if you need these IP blocks on an AM35xx, try uncommenting
  3404. * the following lines.
  3405. */
  3406. /* &omap3xxx_l4_core__sham, */
  3407. /* &omap3xxx_l4_core__aes, */
  3408. NULL
  3409. };
  3410. /* 3430ES1-only hwmod links */
  3411. static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
  3412. &omap3430es1_dss__l3,
  3413. &omap3430es1_l4_core__dss,
  3414. NULL
  3415. };
  3416. /* 3430ES2+-only hwmod links */
  3417. static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
  3418. &omap3xxx_dss__l3,
  3419. &omap3xxx_l4_core__dss,
  3420. &omap3xxx_usbhsotg__l3,
  3421. &omap3xxx_l4_core__usbhsotg,
  3422. &omap3xxx_usb_host_hs__l3_main_2,
  3423. &omap3xxx_l4_core__usb_host_hs,
  3424. &omap3xxx_l4_core__usb_tll_hs,
  3425. NULL
  3426. };
  3427. /* <= 3430ES3-only hwmod links */
  3428. static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
  3429. &omap3xxx_l4_core__pre_es3_mmc1,
  3430. &omap3xxx_l4_core__pre_es3_mmc2,
  3431. NULL
  3432. };
  3433. /* 3430ES3+-only hwmod links */
  3434. static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
  3435. &omap3xxx_l4_core__es3plus_mmc1,
  3436. &omap3xxx_l4_core__es3plus_mmc2,
  3437. NULL
  3438. };
  3439. /* 34xx-only hwmod links (all ES revisions) */
  3440. static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
  3441. &omap3xxx_l3__iva,
  3442. &omap34xx_l4_core__sr1,
  3443. &omap34xx_l4_core__sr2,
  3444. &omap3xxx_l4_core__mailbox,
  3445. &omap3xxx_l4_core__hdq1w,
  3446. &omap3xxx_sad2d__l3,
  3447. &omap3xxx_l4_core__mmu_isp,
  3448. &omap3xxx_l3_main__mmu_iva,
  3449. &omap34xx_l4_core__ssi,
  3450. NULL
  3451. };
  3452. /* 36xx-only hwmod links (all ES revisions) */
  3453. static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
  3454. &omap3xxx_l3__iva,
  3455. &omap36xx_l4_per__uart4,
  3456. &omap3xxx_dss__l3,
  3457. &omap3xxx_l4_core__dss,
  3458. &omap36xx_l4_core__sr1,
  3459. &omap36xx_l4_core__sr2,
  3460. &omap3xxx_usbhsotg__l3,
  3461. &omap3xxx_l4_core__usbhsotg,
  3462. &omap3xxx_l4_core__mailbox,
  3463. &omap3xxx_usb_host_hs__l3_main_2,
  3464. &omap3xxx_l4_core__usb_host_hs,
  3465. &omap3xxx_l4_core__usb_tll_hs,
  3466. &omap3xxx_l4_core__es3plus_mmc1,
  3467. &omap3xxx_l4_core__es3plus_mmc2,
  3468. &omap3xxx_l4_core__hdq1w,
  3469. &omap3xxx_sad2d__l3,
  3470. &omap3xxx_l4_core__mmu_isp,
  3471. &omap3xxx_l3_main__mmu_iva,
  3472. NULL
  3473. };
  3474. static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
  3475. &omap3xxx_dss__l3,
  3476. &omap3xxx_l4_core__dss,
  3477. &am35xx_usbhsotg__l3,
  3478. &am35xx_l4_core__usbhsotg,
  3479. &am35xx_l4_core__uart4,
  3480. &omap3xxx_usb_host_hs__l3_main_2,
  3481. &omap3xxx_l4_core__usb_host_hs,
  3482. &omap3xxx_l4_core__usb_tll_hs,
  3483. &omap3xxx_l4_core__es3plus_mmc1,
  3484. &omap3xxx_l4_core__es3plus_mmc2,
  3485. &omap3xxx_l4_core__hdq1w,
  3486. &am35xx_mdio__l3,
  3487. &am35xx_l4_core__mdio,
  3488. &am35xx_emac__l3,
  3489. &am35xx_l4_core__emac,
  3490. NULL
  3491. };
  3492. static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
  3493. &omap3xxx_l4_core__dss_dispc,
  3494. &omap3xxx_l4_core__dss_dsi1,
  3495. &omap3xxx_l4_core__dss_rfbi,
  3496. &omap3xxx_l4_core__dss_venc,
  3497. NULL
  3498. };
  3499. int __init omap3xxx_hwmod_init(void)
  3500. {
  3501. int r;
  3502. struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL;
  3503. unsigned int rev;
  3504. omap_hwmod_init();
  3505. /* Register hwmod links common to all OMAP3 */
  3506. r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
  3507. if (r < 0)
  3508. return r;
  3509. rev = omap_rev();
  3510. /*
  3511. * Register hwmod links common to individual OMAP3 families, all
  3512. * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
  3513. * All possible revisions should be included in this conditional.
  3514. */
  3515. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3516. rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
  3517. rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
  3518. h = omap34xx_hwmod_ocp_ifs;
  3519. h_gp = omap34xx_gp_hwmod_ocp_ifs;
  3520. } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
  3521. h = am35xx_hwmod_ocp_ifs;
  3522. h_gp = am35xx_gp_hwmod_ocp_ifs;
  3523. } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
  3524. rev == OMAP3630_REV_ES1_2) {
  3525. h = omap36xx_hwmod_ocp_ifs;
  3526. h_gp = omap36xx_gp_hwmod_ocp_ifs;
  3527. } else {
  3528. WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
  3529. return -EINVAL;
  3530. }
  3531. r = omap_hwmod_register_links(h);
  3532. if (r < 0)
  3533. return r;
  3534. /* Register GP-only hwmod links. */
  3535. if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
  3536. r = omap_hwmod_register_links(h_gp);
  3537. if (r < 0)
  3538. return r;
  3539. }
  3540. /*
  3541. * Register hwmod links specific to certain ES levels of a
  3542. * particular family of silicon (e.g., 34xx ES1.0)
  3543. */
  3544. h = NULL;
  3545. if (rev == OMAP3430_REV_ES1_0) {
  3546. h = omap3430es1_hwmod_ocp_ifs;
  3547. } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
  3548. rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3549. rev == OMAP3430_REV_ES3_1_2) {
  3550. h = omap3430es2plus_hwmod_ocp_ifs;
  3551. }
  3552. if (h) {
  3553. r = omap_hwmod_register_links(h);
  3554. if (r < 0)
  3555. return r;
  3556. }
  3557. h = NULL;
  3558. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3559. rev == OMAP3430_REV_ES2_1) {
  3560. h = omap3430_pre_es3_hwmod_ocp_ifs;
  3561. } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3562. rev == OMAP3430_REV_ES3_1_2) {
  3563. h = omap3430_es3plus_hwmod_ocp_ifs;
  3564. }
  3565. if (h)
  3566. r = omap_hwmod_register_links(h);
  3567. if (r < 0)
  3568. return r;
  3569. /*
  3570. * DSS code presumes that dss_core hwmod is handled first,
  3571. * _before_ any other DSS related hwmods so register common
  3572. * DSS hwmod links last to ensure that dss_core is already
  3573. * registered. Otherwise some change things may happen, for
  3574. * ex. if dispc is handled before dss_core and DSS is enabled
  3575. * in bootloader DISPC will be reset with outputs enabled
  3576. * which sometimes leads to unrecoverable L3 error. XXX The
  3577. * long-term fix to this is to ensure hwmods are set up in
  3578. * dependency order in the hwmod core code.
  3579. */
  3580. r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
  3581. return r;
  3582. }