omap_hwmod_3xxx_data.c 101 KB

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