omap_hwmod_3xxx_data.c 97 KB

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