omap_hwmod_3xxx_data.c 82 KB

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