omap_hwmod_3xxx_data.c 85 KB

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