omap_hwmod_3xxx_data.c 95 KB

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