omap_hwmod_3xxx_data.c 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276
  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. /* UART1 */
  1064. static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
  1065. &omap3_l4_core__uart1,
  1066. };
  1067. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  1068. .name = "uart1",
  1069. .mpu_irqs = omap2_uart1_mpu_irqs,
  1070. .sdma_reqs = omap2_uart1_sdma_reqs,
  1071. .main_clk = "uart1_fck",
  1072. .prcm = {
  1073. .omap2 = {
  1074. .module_offs = CORE_MOD,
  1075. .prcm_reg_id = 1,
  1076. .module_bit = OMAP3430_EN_UART1_SHIFT,
  1077. .idlest_reg_id = 1,
  1078. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  1079. },
  1080. },
  1081. .slaves = omap3xxx_uart1_slaves,
  1082. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
  1083. .class = &omap2_uart_class,
  1084. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1085. };
  1086. /* UART2 */
  1087. static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
  1088. &omap3_l4_core__uart2,
  1089. };
  1090. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  1091. .name = "uart2",
  1092. .mpu_irqs = omap2_uart2_mpu_irqs,
  1093. .sdma_reqs = omap2_uart2_sdma_reqs,
  1094. .main_clk = "uart2_fck",
  1095. .prcm = {
  1096. .omap2 = {
  1097. .module_offs = CORE_MOD,
  1098. .prcm_reg_id = 1,
  1099. .module_bit = OMAP3430_EN_UART2_SHIFT,
  1100. .idlest_reg_id = 1,
  1101. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  1102. },
  1103. },
  1104. .slaves = omap3xxx_uart2_slaves,
  1105. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
  1106. .class = &omap2_uart_class,
  1107. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1108. };
  1109. /* UART3 */
  1110. static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
  1111. &omap3_l4_per__uart3,
  1112. };
  1113. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  1114. .name = "uart3",
  1115. .mpu_irqs = omap2_uart3_mpu_irqs,
  1116. .sdma_reqs = omap2_uart3_sdma_reqs,
  1117. .main_clk = "uart3_fck",
  1118. .prcm = {
  1119. .omap2 = {
  1120. .module_offs = OMAP3430_PER_MOD,
  1121. .prcm_reg_id = 1,
  1122. .module_bit = OMAP3430_EN_UART3_SHIFT,
  1123. .idlest_reg_id = 1,
  1124. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  1125. },
  1126. },
  1127. .slaves = omap3xxx_uart3_slaves,
  1128. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
  1129. .class = &omap2_uart_class,
  1130. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1131. };
  1132. /* UART4 */
  1133. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  1134. { .irq = INT_36XX_UART4_IRQ, },
  1135. { .irq = -1 }
  1136. };
  1137. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  1138. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  1139. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  1140. { .dma_req = -1 }
  1141. };
  1142. static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
  1143. &omap3_l4_per__uart4,
  1144. };
  1145. static struct omap_hwmod omap3xxx_uart4_hwmod = {
  1146. .name = "uart4",
  1147. .mpu_irqs = uart4_mpu_irqs,
  1148. .sdma_reqs = uart4_sdma_reqs,
  1149. .main_clk = "uart4_fck",
  1150. .prcm = {
  1151. .omap2 = {
  1152. .module_offs = OMAP3430_PER_MOD,
  1153. .prcm_reg_id = 1,
  1154. .module_bit = OMAP3630_EN_UART4_SHIFT,
  1155. .idlest_reg_id = 1,
  1156. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  1157. },
  1158. },
  1159. .slaves = omap3xxx_uart4_slaves,
  1160. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
  1161. .class = &omap2_uart_class,
  1162. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1163. };
  1164. static struct omap_hwmod_class i2c_class = {
  1165. .name = "i2c",
  1166. .sysc = &i2c_sysc,
  1167. };
  1168. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  1169. { .name = "dispc", .dma_req = 5 },
  1170. { .name = "dsi1", .dma_req = 74 },
  1171. { .dma_req = -1 }
  1172. };
  1173. /* dss */
  1174. /* dss master ports */
  1175. static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
  1176. &omap3xxx_dss__l3,
  1177. };
  1178. /* l4_core -> dss */
  1179. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  1180. .master = &omap3xxx_l4_core_hwmod,
  1181. .slave = &omap3430es1_dss_core_hwmod,
  1182. .clk = "dss_ick",
  1183. .addr = omap2_dss_addrs,
  1184. .fw = {
  1185. .omap2 = {
  1186. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  1187. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1188. .flags = OMAP_FIREWALL_L4,
  1189. }
  1190. },
  1191. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1192. };
  1193. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  1194. .master = &omap3xxx_l4_core_hwmod,
  1195. .slave = &omap3xxx_dss_core_hwmod,
  1196. .clk = "dss_ick",
  1197. .addr = omap2_dss_addrs,
  1198. .fw = {
  1199. .omap2 = {
  1200. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  1201. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1202. .flags = OMAP_FIREWALL_L4,
  1203. }
  1204. },
  1205. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1206. };
  1207. /* dss slave ports */
  1208. static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
  1209. &omap3430es1_l4_core__dss,
  1210. };
  1211. static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
  1212. &omap3xxx_l4_core__dss,
  1213. };
  1214. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  1215. { .role = "tv_clk", .clk = "dss_tv_fck" },
  1216. { .role = "video_clk", .clk = "dss_96m_fck" },
  1217. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  1218. };
  1219. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  1220. .name = "dss_core",
  1221. .class = &omap2_dss_hwmod_class,
  1222. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  1223. .sdma_reqs = omap3xxx_dss_sdma_chs,
  1224. .prcm = {
  1225. .omap2 = {
  1226. .prcm_reg_id = 1,
  1227. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1228. .module_offs = OMAP3430_DSS_MOD,
  1229. .idlest_reg_id = 1,
  1230. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  1231. },
  1232. },
  1233. .opt_clks = dss_opt_clks,
  1234. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1235. .slaves = omap3430es1_dss_slaves,
  1236. .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
  1237. .masters = omap3xxx_dss_masters,
  1238. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  1239. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
  1240. .flags = HWMOD_NO_IDLEST,
  1241. };
  1242. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  1243. .name = "dss_core",
  1244. .class = &omap2_dss_hwmod_class,
  1245. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  1246. .sdma_reqs = omap3xxx_dss_sdma_chs,
  1247. .prcm = {
  1248. .omap2 = {
  1249. .prcm_reg_id = 1,
  1250. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1251. .module_offs = OMAP3430_DSS_MOD,
  1252. .idlest_reg_id = 1,
  1253. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  1254. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  1255. },
  1256. },
  1257. .opt_clks = dss_opt_clks,
  1258. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1259. .slaves = omap3xxx_dss_slaves,
  1260. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
  1261. .masters = omap3xxx_dss_masters,
  1262. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  1263. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 |
  1264. CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
  1265. };
  1266. /* l4_core -> dss_dispc */
  1267. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  1268. .master = &omap3xxx_l4_core_hwmod,
  1269. .slave = &omap3xxx_dss_dispc_hwmod,
  1270. .clk = "dss_ick",
  1271. .addr = omap2_dss_dispc_addrs,
  1272. .fw = {
  1273. .omap2 = {
  1274. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  1275. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1276. .flags = OMAP_FIREWALL_L4,
  1277. }
  1278. },
  1279. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1280. };
  1281. /* dss_dispc slave ports */
  1282. static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
  1283. &omap3xxx_l4_core__dss_dispc,
  1284. };
  1285. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  1286. .name = "dss_dispc",
  1287. .class = &omap2_dispc_hwmod_class,
  1288. .mpu_irqs = omap2_dispc_irqs,
  1289. .main_clk = "dss1_alwon_fck",
  1290. .prcm = {
  1291. .omap2 = {
  1292. .prcm_reg_id = 1,
  1293. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1294. .module_offs = OMAP3430_DSS_MOD,
  1295. },
  1296. },
  1297. .slaves = omap3xxx_dss_dispc_slaves,
  1298. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
  1299. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1300. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1301. CHIP_GE_OMAP3630ES1_1),
  1302. .flags = HWMOD_NO_IDLEST,
  1303. };
  1304. /*
  1305. * 'dsi' class
  1306. * display serial interface controller
  1307. */
  1308. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  1309. .name = "dsi",
  1310. };
  1311. static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
  1312. { .irq = 25 },
  1313. { .irq = -1 }
  1314. };
  1315. /* dss_dsi1 */
  1316. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  1317. {
  1318. .pa_start = 0x4804FC00,
  1319. .pa_end = 0x4804FFFF,
  1320. .flags = ADDR_TYPE_RT
  1321. },
  1322. { }
  1323. };
  1324. /* l4_core -> dss_dsi1 */
  1325. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  1326. .master = &omap3xxx_l4_core_hwmod,
  1327. .slave = &omap3xxx_dss_dsi1_hwmod,
  1328. .addr = omap3xxx_dss_dsi1_addrs,
  1329. .fw = {
  1330. .omap2 = {
  1331. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  1332. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1333. .flags = OMAP_FIREWALL_L4,
  1334. }
  1335. },
  1336. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1337. };
  1338. /* dss_dsi1 slave ports */
  1339. static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
  1340. &omap3xxx_l4_core__dss_dsi1,
  1341. };
  1342. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  1343. .name = "dss_dsi1",
  1344. .class = &omap3xxx_dsi_hwmod_class,
  1345. .mpu_irqs = omap3xxx_dsi1_irqs,
  1346. .main_clk = "dss1_alwon_fck",
  1347. .prcm = {
  1348. .omap2 = {
  1349. .prcm_reg_id = 1,
  1350. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1351. .module_offs = OMAP3430_DSS_MOD,
  1352. },
  1353. },
  1354. .slaves = omap3xxx_dss_dsi1_slaves,
  1355. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
  1356. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1357. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1358. CHIP_GE_OMAP3630ES1_1),
  1359. .flags = HWMOD_NO_IDLEST,
  1360. };
  1361. /* l4_core -> dss_rfbi */
  1362. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  1363. .master = &omap3xxx_l4_core_hwmod,
  1364. .slave = &omap3xxx_dss_rfbi_hwmod,
  1365. .clk = "dss_ick",
  1366. .addr = omap2_dss_rfbi_addrs,
  1367. .fw = {
  1368. .omap2 = {
  1369. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  1370. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  1371. .flags = OMAP_FIREWALL_L4,
  1372. }
  1373. },
  1374. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1375. };
  1376. /* dss_rfbi slave ports */
  1377. static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
  1378. &omap3xxx_l4_core__dss_rfbi,
  1379. };
  1380. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  1381. .name = "dss_rfbi",
  1382. .class = &omap2_rfbi_hwmod_class,
  1383. .main_clk = "dss1_alwon_fck",
  1384. .prcm = {
  1385. .omap2 = {
  1386. .prcm_reg_id = 1,
  1387. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1388. .module_offs = OMAP3430_DSS_MOD,
  1389. },
  1390. },
  1391. .slaves = omap3xxx_dss_rfbi_slaves,
  1392. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
  1393. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1394. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1395. CHIP_GE_OMAP3630ES1_1),
  1396. .flags = HWMOD_NO_IDLEST,
  1397. };
  1398. /* l4_core -> dss_venc */
  1399. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  1400. .master = &omap3xxx_l4_core_hwmod,
  1401. .slave = &omap3xxx_dss_venc_hwmod,
  1402. .clk = "dss_tv_fck",
  1403. .addr = omap2_dss_venc_addrs,
  1404. .fw = {
  1405. .omap2 = {
  1406. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  1407. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1408. .flags = OMAP_FIREWALL_L4,
  1409. }
  1410. },
  1411. .flags = OCPIF_SWSUP_IDLE,
  1412. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1413. };
  1414. /* dss_venc slave ports */
  1415. static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
  1416. &omap3xxx_l4_core__dss_venc,
  1417. };
  1418. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  1419. .name = "dss_venc",
  1420. .class = &omap2_venc_hwmod_class,
  1421. .main_clk = "dss1_alwon_fck",
  1422. .prcm = {
  1423. .omap2 = {
  1424. .prcm_reg_id = 1,
  1425. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1426. .module_offs = OMAP3430_DSS_MOD,
  1427. },
  1428. },
  1429. .slaves = omap3xxx_dss_venc_slaves,
  1430. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
  1431. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1432. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1433. CHIP_GE_OMAP3630ES1_1),
  1434. .flags = HWMOD_NO_IDLEST,
  1435. };
  1436. /* I2C1 */
  1437. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  1438. .fifo_depth = 8, /* bytes */
  1439. };
  1440. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  1441. &omap3_l4_core__i2c1,
  1442. };
  1443. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  1444. .name = "i2c1",
  1445. .flags = HWMOD_16BIT_REG,
  1446. .mpu_irqs = omap2_i2c1_mpu_irqs,
  1447. .sdma_reqs = omap2_i2c1_sdma_reqs,
  1448. .main_clk = "i2c1_fck",
  1449. .prcm = {
  1450. .omap2 = {
  1451. .module_offs = CORE_MOD,
  1452. .prcm_reg_id = 1,
  1453. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  1454. .idlest_reg_id = 1,
  1455. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  1456. },
  1457. },
  1458. .slaves = omap3xxx_i2c1_slaves,
  1459. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  1460. .class = &i2c_class,
  1461. .dev_attr = &i2c1_dev_attr,
  1462. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1463. };
  1464. /* I2C2 */
  1465. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  1466. .fifo_depth = 8, /* bytes */
  1467. };
  1468. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  1469. &omap3_l4_core__i2c2,
  1470. };
  1471. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  1472. .name = "i2c2",
  1473. .flags = HWMOD_16BIT_REG,
  1474. .mpu_irqs = omap2_i2c2_mpu_irqs,
  1475. .sdma_reqs = omap2_i2c2_sdma_reqs,
  1476. .main_clk = "i2c2_fck",
  1477. .prcm = {
  1478. .omap2 = {
  1479. .module_offs = CORE_MOD,
  1480. .prcm_reg_id = 1,
  1481. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  1482. .idlest_reg_id = 1,
  1483. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  1484. },
  1485. },
  1486. .slaves = omap3xxx_i2c2_slaves,
  1487. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  1488. .class = &i2c_class,
  1489. .dev_attr = &i2c2_dev_attr,
  1490. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1491. };
  1492. /* I2C3 */
  1493. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  1494. .fifo_depth = 64, /* bytes */
  1495. };
  1496. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1497. { .irq = INT_34XX_I2C3_IRQ, },
  1498. { .irq = -1 }
  1499. };
  1500. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  1501. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  1502. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  1503. { .dma_req = -1 }
  1504. };
  1505. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  1506. &omap3_l4_core__i2c3,
  1507. };
  1508. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  1509. .name = "i2c3",
  1510. .flags = HWMOD_16BIT_REG,
  1511. .mpu_irqs = i2c3_mpu_irqs,
  1512. .sdma_reqs = i2c3_sdma_reqs,
  1513. .main_clk = "i2c3_fck",
  1514. .prcm = {
  1515. .omap2 = {
  1516. .module_offs = CORE_MOD,
  1517. .prcm_reg_id = 1,
  1518. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  1519. .idlest_reg_id = 1,
  1520. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  1521. },
  1522. },
  1523. .slaves = omap3xxx_i2c3_slaves,
  1524. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  1525. .class = &i2c_class,
  1526. .dev_attr = &i2c3_dev_attr,
  1527. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1528. };
  1529. /* l4_wkup -> gpio1 */
  1530. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  1531. {
  1532. .pa_start = 0x48310000,
  1533. .pa_end = 0x483101ff,
  1534. .flags = ADDR_TYPE_RT
  1535. },
  1536. { }
  1537. };
  1538. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  1539. .master = &omap3xxx_l4_wkup_hwmod,
  1540. .slave = &omap3xxx_gpio1_hwmod,
  1541. .addr = omap3xxx_gpio1_addrs,
  1542. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1543. };
  1544. /* l4_per -> gpio2 */
  1545. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  1546. {
  1547. .pa_start = 0x49050000,
  1548. .pa_end = 0x490501ff,
  1549. .flags = ADDR_TYPE_RT
  1550. },
  1551. { }
  1552. };
  1553. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  1554. .master = &omap3xxx_l4_per_hwmod,
  1555. .slave = &omap3xxx_gpio2_hwmod,
  1556. .addr = omap3xxx_gpio2_addrs,
  1557. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1558. };
  1559. /* l4_per -> gpio3 */
  1560. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  1561. {
  1562. .pa_start = 0x49052000,
  1563. .pa_end = 0x490521ff,
  1564. .flags = ADDR_TYPE_RT
  1565. },
  1566. { }
  1567. };
  1568. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  1569. .master = &omap3xxx_l4_per_hwmod,
  1570. .slave = &omap3xxx_gpio3_hwmod,
  1571. .addr = omap3xxx_gpio3_addrs,
  1572. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1573. };
  1574. /* l4_per -> gpio4 */
  1575. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  1576. {
  1577. .pa_start = 0x49054000,
  1578. .pa_end = 0x490541ff,
  1579. .flags = ADDR_TYPE_RT
  1580. },
  1581. { }
  1582. };
  1583. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  1584. .master = &omap3xxx_l4_per_hwmod,
  1585. .slave = &omap3xxx_gpio4_hwmod,
  1586. .addr = omap3xxx_gpio4_addrs,
  1587. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1588. };
  1589. /* l4_per -> gpio5 */
  1590. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  1591. {
  1592. .pa_start = 0x49056000,
  1593. .pa_end = 0x490561ff,
  1594. .flags = ADDR_TYPE_RT
  1595. },
  1596. { }
  1597. };
  1598. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  1599. .master = &omap3xxx_l4_per_hwmod,
  1600. .slave = &omap3xxx_gpio5_hwmod,
  1601. .addr = omap3xxx_gpio5_addrs,
  1602. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1603. };
  1604. /* l4_per -> gpio6 */
  1605. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  1606. {
  1607. .pa_start = 0x49058000,
  1608. .pa_end = 0x490581ff,
  1609. .flags = ADDR_TYPE_RT
  1610. },
  1611. { }
  1612. };
  1613. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  1614. .master = &omap3xxx_l4_per_hwmod,
  1615. .slave = &omap3xxx_gpio6_hwmod,
  1616. .addr = omap3xxx_gpio6_addrs,
  1617. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1618. };
  1619. /*
  1620. * 'gpio' class
  1621. * general purpose io module
  1622. */
  1623. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  1624. .rev_offs = 0x0000,
  1625. .sysc_offs = 0x0010,
  1626. .syss_offs = 0x0014,
  1627. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1628. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1629. SYSS_HAS_RESET_STATUS),
  1630. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1631. .sysc_fields = &omap_hwmod_sysc_type1,
  1632. };
  1633. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  1634. .name = "gpio",
  1635. .sysc = &omap3xxx_gpio_sysc,
  1636. .rev = 1,
  1637. };
  1638. /* gpio_dev_attr*/
  1639. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1640. .bank_width = 32,
  1641. .dbck_flag = true,
  1642. };
  1643. /* gpio1 */
  1644. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  1645. { .role = "dbclk", .clk = "gpio1_dbck", },
  1646. };
  1647. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  1648. &omap3xxx_l4_wkup__gpio1,
  1649. };
  1650. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  1651. .name = "gpio1",
  1652. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1653. .mpu_irqs = omap2_gpio1_irqs,
  1654. .main_clk = "gpio1_ick",
  1655. .opt_clks = gpio1_opt_clks,
  1656. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1657. .prcm = {
  1658. .omap2 = {
  1659. .prcm_reg_id = 1,
  1660. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  1661. .module_offs = WKUP_MOD,
  1662. .idlest_reg_id = 1,
  1663. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  1664. },
  1665. },
  1666. .slaves = omap3xxx_gpio1_slaves,
  1667. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  1668. .class = &omap3xxx_gpio_hwmod_class,
  1669. .dev_attr = &gpio_dev_attr,
  1670. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1671. };
  1672. /* gpio2 */
  1673. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1674. { .role = "dbclk", .clk = "gpio2_dbck", },
  1675. };
  1676. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  1677. &omap3xxx_l4_per__gpio2,
  1678. };
  1679. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  1680. .name = "gpio2",
  1681. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1682. .mpu_irqs = omap2_gpio2_irqs,
  1683. .main_clk = "gpio2_ick",
  1684. .opt_clks = gpio2_opt_clks,
  1685. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1686. .prcm = {
  1687. .omap2 = {
  1688. .prcm_reg_id = 1,
  1689. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  1690. .module_offs = OMAP3430_PER_MOD,
  1691. .idlest_reg_id = 1,
  1692. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  1693. },
  1694. },
  1695. .slaves = omap3xxx_gpio2_slaves,
  1696. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  1697. .class = &omap3xxx_gpio_hwmod_class,
  1698. .dev_attr = &gpio_dev_attr,
  1699. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1700. };
  1701. /* gpio3 */
  1702. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1703. { .role = "dbclk", .clk = "gpio3_dbck", },
  1704. };
  1705. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  1706. &omap3xxx_l4_per__gpio3,
  1707. };
  1708. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  1709. .name = "gpio3",
  1710. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1711. .mpu_irqs = omap2_gpio3_irqs,
  1712. .main_clk = "gpio3_ick",
  1713. .opt_clks = gpio3_opt_clks,
  1714. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1715. .prcm = {
  1716. .omap2 = {
  1717. .prcm_reg_id = 1,
  1718. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  1719. .module_offs = OMAP3430_PER_MOD,
  1720. .idlest_reg_id = 1,
  1721. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  1722. },
  1723. },
  1724. .slaves = omap3xxx_gpio3_slaves,
  1725. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  1726. .class = &omap3xxx_gpio_hwmod_class,
  1727. .dev_attr = &gpio_dev_attr,
  1728. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1729. };
  1730. /* gpio4 */
  1731. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1732. { .role = "dbclk", .clk = "gpio4_dbck", },
  1733. };
  1734. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  1735. &omap3xxx_l4_per__gpio4,
  1736. };
  1737. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  1738. .name = "gpio4",
  1739. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1740. .mpu_irqs = omap2_gpio4_irqs,
  1741. .main_clk = "gpio4_ick",
  1742. .opt_clks = gpio4_opt_clks,
  1743. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  1744. .prcm = {
  1745. .omap2 = {
  1746. .prcm_reg_id = 1,
  1747. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  1748. .module_offs = OMAP3430_PER_MOD,
  1749. .idlest_reg_id = 1,
  1750. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  1751. },
  1752. },
  1753. .slaves = omap3xxx_gpio4_slaves,
  1754. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  1755. .class = &omap3xxx_gpio_hwmod_class,
  1756. .dev_attr = &gpio_dev_attr,
  1757. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1758. };
  1759. /* gpio5 */
  1760. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  1761. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  1762. { .irq = -1 }
  1763. };
  1764. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  1765. { .role = "dbclk", .clk = "gpio5_dbck", },
  1766. };
  1767. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  1768. &omap3xxx_l4_per__gpio5,
  1769. };
  1770. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  1771. .name = "gpio5",
  1772. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1773. .mpu_irqs = omap3xxx_gpio5_irqs,
  1774. .main_clk = "gpio5_ick",
  1775. .opt_clks = gpio5_opt_clks,
  1776. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  1777. .prcm = {
  1778. .omap2 = {
  1779. .prcm_reg_id = 1,
  1780. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  1781. .module_offs = OMAP3430_PER_MOD,
  1782. .idlest_reg_id = 1,
  1783. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  1784. },
  1785. },
  1786. .slaves = omap3xxx_gpio5_slaves,
  1787. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  1788. .class = &omap3xxx_gpio_hwmod_class,
  1789. .dev_attr = &gpio_dev_attr,
  1790. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1791. };
  1792. /* gpio6 */
  1793. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  1794. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  1795. { .irq = -1 }
  1796. };
  1797. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  1798. { .role = "dbclk", .clk = "gpio6_dbck", },
  1799. };
  1800. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  1801. &omap3xxx_l4_per__gpio6,
  1802. };
  1803. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  1804. .name = "gpio6",
  1805. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1806. .mpu_irqs = omap3xxx_gpio6_irqs,
  1807. .main_clk = "gpio6_ick",
  1808. .opt_clks = gpio6_opt_clks,
  1809. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  1810. .prcm = {
  1811. .omap2 = {
  1812. .prcm_reg_id = 1,
  1813. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  1814. .module_offs = OMAP3430_PER_MOD,
  1815. .idlest_reg_id = 1,
  1816. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  1817. },
  1818. },
  1819. .slaves = omap3xxx_gpio6_slaves,
  1820. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  1821. .class = &omap3xxx_gpio_hwmod_class,
  1822. .dev_attr = &gpio_dev_attr,
  1823. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1824. };
  1825. /* dma_system -> L3 */
  1826. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  1827. .master = &omap3xxx_dma_system_hwmod,
  1828. .slave = &omap3xxx_l3_main_hwmod,
  1829. .clk = "core_l3_ick",
  1830. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1831. };
  1832. /* dma attributes */
  1833. static struct omap_dma_dev_attr dma_dev_attr = {
  1834. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1835. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1836. .lch_count = 32,
  1837. };
  1838. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  1839. .rev_offs = 0x0000,
  1840. .sysc_offs = 0x002c,
  1841. .syss_offs = 0x0028,
  1842. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1843. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1844. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  1845. SYSS_HAS_RESET_STATUS),
  1846. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1847. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1848. .sysc_fields = &omap_hwmod_sysc_type1,
  1849. };
  1850. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  1851. .name = "dma",
  1852. .sysc = &omap3xxx_dma_sysc,
  1853. };
  1854. /* dma_system */
  1855. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  1856. {
  1857. .pa_start = 0x48056000,
  1858. .pa_end = 0x48056fff,
  1859. .flags = ADDR_TYPE_RT
  1860. },
  1861. { }
  1862. };
  1863. /* dma_system master ports */
  1864. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  1865. &omap3xxx_dma_system__l3,
  1866. };
  1867. /* l4_cfg -> dma_system */
  1868. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  1869. .master = &omap3xxx_l4_core_hwmod,
  1870. .slave = &omap3xxx_dma_system_hwmod,
  1871. .clk = "core_l4_ick",
  1872. .addr = omap3xxx_dma_system_addrs,
  1873. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1874. };
  1875. /* dma_system slave ports */
  1876. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  1877. &omap3xxx_l4_core__dma_system,
  1878. };
  1879. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  1880. .name = "dma",
  1881. .class = &omap3xxx_dma_hwmod_class,
  1882. .mpu_irqs = omap2_dma_system_irqs,
  1883. .main_clk = "core_l3_ick",
  1884. .prcm = {
  1885. .omap2 = {
  1886. .module_offs = CORE_MOD,
  1887. .prcm_reg_id = 1,
  1888. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1889. .idlest_reg_id = 1,
  1890. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1891. },
  1892. },
  1893. .slaves = omap3xxx_dma_system_slaves,
  1894. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  1895. .masters = omap3xxx_dma_system_masters,
  1896. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  1897. .dev_attr = &dma_dev_attr,
  1898. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1899. .flags = HWMOD_NO_IDLEST,
  1900. };
  1901. /*
  1902. * 'mcbsp' class
  1903. * multi channel buffered serial port controller
  1904. */
  1905. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
  1906. .sysc_offs = 0x008c,
  1907. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
  1908. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1909. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1910. .sysc_fields = &omap_hwmod_sysc_type1,
  1911. .clockact = 0x2,
  1912. };
  1913. static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
  1914. .name = "mcbsp",
  1915. .sysc = &omap3xxx_mcbsp_sysc,
  1916. .rev = MCBSP_CONFIG_TYPE3,
  1917. };
  1918. /* mcbsp1 */
  1919. static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
  1920. { .name = "irq", .irq = 16 },
  1921. { .name = "tx", .irq = 59 },
  1922. { .name = "rx", .irq = 60 },
  1923. { .irq = -1 }
  1924. };
  1925. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  1926. {
  1927. .name = "mpu",
  1928. .pa_start = 0x48074000,
  1929. .pa_end = 0x480740ff,
  1930. .flags = ADDR_TYPE_RT
  1931. },
  1932. { }
  1933. };
  1934. /* l4_core -> mcbsp1 */
  1935. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  1936. .master = &omap3xxx_l4_core_hwmod,
  1937. .slave = &omap3xxx_mcbsp1_hwmod,
  1938. .clk = "mcbsp1_ick",
  1939. .addr = omap3xxx_mcbsp1_addrs,
  1940. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1941. };
  1942. /* mcbsp1 slave ports */
  1943. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
  1944. &omap3xxx_l4_core__mcbsp1,
  1945. };
  1946. static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  1947. .name = "mcbsp1",
  1948. .class = &omap3xxx_mcbsp_hwmod_class,
  1949. .mpu_irqs = omap3xxx_mcbsp1_irqs,
  1950. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1951. .main_clk = "mcbsp1_fck",
  1952. .prcm = {
  1953. .omap2 = {
  1954. .prcm_reg_id = 1,
  1955. .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
  1956. .module_offs = CORE_MOD,
  1957. .idlest_reg_id = 1,
  1958. .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
  1959. },
  1960. },
  1961. .slaves = omap3xxx_mcbsp1_slaves,
  1962. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
  1963. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1964. };
  1965. /* mcbsp2 */
  1966. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
  1967. { .name = "irq", .irq = 17 },
  1968. { .name = "tx", .irq = 62 },
  1969. { .name = "rx", .irq = 63 },
  1970. { .irq = -1 }
  1971. };
  1972. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  1973. {
  1974. .name = "mpu",
  1975. .pa_start = 0x49022000,
  1976. .pa_end = 0x490220ff,
  1977. .flags = ADDR_TYPE_RT
  1978. },
  1979. { }
  1980. };
  1981. /* l4_per -> mcbsp2 */
  1982. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  1983. .master = &omap3xxx_l4_per_hwmod,
  1984. .slave = &omap3xxx_mcbsp2_hwmod,
  1985. .clk = "mcbsp2_ick",
  1986. .addr = omap3xxx_mcbsp2_addrs,
  1987. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1988. };
  1989. /* mcbsp2 slave ports */
  1990. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
  1991. &omap3xxx_l4_per__mcbsp2,
  1992. };
  1993. static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
  1994. .sidetone = "mcbsp2_sidetone",
  1995. };
  1996. static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
  1997. .name = "mcbsp2",
  1998. .class = &omap3xxx_mcbsp_hwmod_class,
  1999. .mpu_irqs = omap3xxx_mcbsp2_irqs,
  2000. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  2001. .main_clk = "mcbsp2_fck",
  2002. .prcm = {
  2003. .omap2 = {
  2004. .prcm_reg_id = 1,
  2005. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2006. .module_offs = OMAP3430_PER_MOD,
  2007. .idlest_reg_id = 1,
  2008. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2009. },
  2010. },
  2011. .slaves = omap3xxx_mcbsp2_slaves,
  2012. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
  2013. .dev_attr = &omap34xx_mcbsp2_dev_attr,
  2014. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2015. };
  2016. /* mcbsp3 */
  2017. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
  2018. { .name = "irq", .irq = 22 },
  2019. { .name = "tx", .irq = 89 },
  2020. { .name = "rx", .irq = 90 },
  2021. { .irq = -1 }
  2022. };
  2023. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2024. {
  2025. .name = "mpu",
  2026. .pa_start = 0x49024000,
  2027. .pa_end = 0x490240ff,
  2028. .flags = ADDR_TYPE_RT
  2029. },
  2030. { }
  2031. };
  2032. /* l4_per -> mcbsp3 */
  2033. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2034. .master = &omap3xxx_l4_per_hwmod,
  2035. .slave = &omap3xxx_mcbsp3_hwmod,
  2036. .clk = "mcbsp3_ick",
  2037. .addr = omap3xxx_mcbsp3_addrs,
  2038. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2039. };
  2040. /* mcbsp3 slave ports */
  2041. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
  2042. &omap3xxx_l4_per__mcbsp3,
  2043. };
  2044. static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
  2045. .sidetone = "mcbsp3_sidetone",
  2046. };
  2047. static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
  2048. .name = "mcbsp3",
  2049. .class = &omap3xxx_mcbsp_hwmod_class,
  2050. .mpu_irqs = omap3xxx_mcbsp3_irqs,
  2051. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  2052. .main_clk = "mcbsp3_fck",
  2053. .prcm = {
  2054. .omap2 = {
  2055. .prcm_reg_id = 1,
  2056. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2057. .module_offs = OMAP3430_PER_MOD,
  2058. .idlest_reg_id = 1,
  2059. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2060. },
  2061. },
  2062. .slaves = omap3xxx_mcbsp3_slaves,
  2063. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
  2064. .dev_attr = &omap34xx_mcbsp3_dev_attr,
  2065. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2066. };
  2067. /* mcbsp4 */
  2068. static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
  2069. { .name = "irq", .irq = 23 },
  2070. { .name = "tx", .irq = 54 },
  2071. { .name = "rx", .irq = 55 },
  2072. { .irq = -1 }
  2073. };
  2074. static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
  2075. { .name = "rx", .dma_req = 20 },
  2076. { .name = "tx", .dma_req = 19 },
  2077. { .dma_req = -1 }
  2078. };
  2079. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2080. {
  2081. .name = "mpu",
  2082. .pa_start = 0x49026000,
  2083. .pa_end = 0x490260ff,
  2084. .flags = ADDR_TYPE_RT
  2085. },
  2086. { }
  2087. };
  2088. /* l4_per -> mcbsp4 */
  2089. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2090. .master = &omap3xxx_l4_per_hwmod,
  2091. .slave = &omap3xxx_mcbsp4_hwmod,
  2092. .clk = "mcbsp4_ick",
  2093. .addr = omap3xxx_mcbsp4_addrs,
  2094. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2095. };
  2096. /* mcbsp4 slave ports */
  2097. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
  2098. &omap3xxx_l4_per__mcbsp4,
  2099. };
  2100. static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
  2101. .name = "mcbsp4",
  2102. .class = &omap3xxx_mcbsp_hwmod_class,
  2103. .mpu_irqs = omap3xxx_mcbsp4_irqs,
  2104. .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
  2105. .main_clk = "mcbsp4_fck",
  2106. .prcm = {
  2107. .omap2 = {
  2108. .prcm_reg_id = 1,
  2109. .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
  2110. .module_offs = OMAP3430_PER_MOD,
  2111. .idlest_reg_id = 1,
  2112. .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
  2113. },
  2114. },
  2115. .slaves = omap3xxx_mcbsp4_slaves,
  2116. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
  2117. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2118. };
  2119. /* mcbsp5 */
  2120. static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
  2121. { .name = "irq", .irq = 27 },
  2122. { .name = "tx", .irq = 81 },
  2123. { .name = "rx", .irq = 82 },
  2124. { .irq = -1 }
  2125. };
  2126. static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
  2127. { .name = "rx", .dma_req = 22 },
  2128. { .name = "tx", .dma_req = 21 },
  2129. { .dma_req = -1 }
  2130. };
  2131. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2132. {
  2133. .name = "mpu",
  2134. .pa_start = 0x48096000,
  2135. .pa_end = 0x480960ff,
  2136. .flags = ADDR_TYPE_RT
  2137. },
  2138. { }
  2139. };
  2140. /* l4_core -> mcbsp5 */
  2141. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2142. .master = &omap3xxx_l4_core_hwmod,
  2143. .slave = &omap3xxx_mcbsp5_hwmod,
  2144. .clk = "mcbsp5_ick",
  2145. .addr = omap3xxx_mcbsp5_addrs,
  2146. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2147. };
  2148. /* mcbsp5 slave ports */
  2149. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
  2150. &omap3xxx_l4_core__mcbsp5,
  2151. };
  2152. static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
  2153. .name = "mcbsp5",
  2154. .class = &omap3xxx_mcbsp_hwmod_class,
  2155. .mpu_irqs = omap3xxx_mcbsp5_irqs,
  2156. .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
  2157. .main_clk = "mcbsp5_fck",
  2158. .prcm = {
  2159. .omap2 = {
  2160. .prcm_reg_id = 1,
  2161. .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
  2162. .module_offs = CORE_MOD,
  2163. .idlest_reg_id = 1,
  2164. .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
  2165. },
  2166. },
  2167. .slaves = omap3xxx_mcbsp5_slaves,
  2168. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
  2169. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2170. };
  2171. /* 'mcbsp sidetone' class */
  2172. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
  2173. .sysc_offs = 0x0010,
  2174. .sysc_flags = SYSC_HAS_AUTOIDLE,
  2175. .sysc_fields = &omap_hwmod_sysc_type1,
  2176. };
  2177. static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
  2178. .name = "mcbsp_sidetone",
  2179. .sysc = &omap3xxx_mcbsp_sidetone_sysc,
  2180. };
  2181. /* mcbsp2_sidetone */
  2182. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
  2183. { .name = "irq", .irq = 4 },
  2184. { .irq = -1 }
  2185. };
  2186. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2187. {
  2188. .name = "sidetone",
  2189. .pa_start = 0x49028000,
  2190. .pa_end = 0x490280ff,
  2191. .flags = ADDR_TYPE_RT
  2192. },
  2193. { }
  2194. };
  2195. /* l4_per -> mcbsp2_sidetone */
  2196. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2197. .master = &omap3xxx_l4_per_hwmod,
  2198. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2199. .clk = "mcbsp2_ick",
  2200. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2201. .user = OCP_USER_MPU,
  2202. };
  2203. /* mcbsp2_sidetone slave ports */
  2204. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
  2205. &omap3xxx_l4_per__mcbsp2_sidetone,
  2206. };
  2207. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  2208. .name = "mcbsp2_sidetone",
  2209. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2210. .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
  2211. .main_clk = "mcbsp2_fck",
  2212. .prcm = {
  2213. .omap2 = {
  2214. .prcm_reg_id = 1,
  2215. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2216. .module_offs = OMAP3430_PER_MOD,
  2217. .idlest_reg_id = 1,
  2218. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2219. },
  2220. },
  2221. .slaves = omap3xxx_mcbsp2_sidetone_slaves,
  2222. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
  2223. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2224. };
  2225. /* mcbsp3_sidetone */
  2226. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
  2227. { .name = "irq", .irq = 5 },
  2228. { .irq = -1 }
  2229. };
  2230. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2231. {
  2232. .name = "sidetone",
  2233. .pa_start = 0x4902A000,
  2234. .pa_end = 0x4902A0ff,
  2235. .flags = ADDR_TYPE_RT
  2236. },
  2237. { }
  2238. };
  2239. /* l4_per -> mcbsp3_sidetone */
  2240. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2241. .master = &omap3xxx_l4_per_hwmod,
  2242. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2243. .clk = "mcbsp3_ick",
  2244. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2245. .user = OCP_USER_MPU,
  2246. };
  2247. /* mcbsp3_sidetone slave ports */
  2248. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
  2249. &omap3xxx_l4_per__mcbsp3_sidetone,
  2250. };
  2251. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
  2252. .name = "mcbsp3_sidetone",
  2253. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2254. .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
  2255. .main_clk = "mcbsp3_fck",
  2256. .prcm = {
  2257. .omap2 = {
  2258. .prcm_reg_id = 1,
  2259. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2260. .module_offs = OMAP3430_PER_MOD,
  2261. .idlest_reg_id = 1,
  2262. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2263. },
  2264. },
  2265. .slaves = omap3xxx_mcbsp3_sidetone_slaves,
  2266. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
  2267. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2268. };
  2269. /* SR common */
  2270. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  2271. .clkact_shift = 20,
  2272. };
  2273. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  2274. .sysc_offs = 0x24,
  2275. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  2276. .clockact = CLOCKACT_TEST_ICLK,
  2277. .sysc_fields = &omap34xx_sr_sysc_fields,
  2278. };
  2279. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  2280. .name = "smartreflex",
  2281. .sysc = &omap34xx_sr_sysc,
  2282. .rev = 1,
  2283. };
  2284. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  2285. .sidle_shift = 24,
  2286. .enwkup_shift = 26
  2287. };
  2288. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  2289. .sysc_offs = 0x38,
  2290. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2291. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  2292. SYSC_NO_CACHE),
  2293. .sysc_fields = &omap36xx_sr_sysc_fields,
  2294. };
  2295. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  2296. .name = "smartreflex",
  2297. .sysc = &omap36xx_sr_sysc,
  2298. .rev = 2,
  2299. };
  2300. /* SR1 */
  2301. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  2302. &omap3_l4_core__sr1,
  2303. };
  2304. static struct omap_hwmod omap34xx_sr1_hwmod = {
  2305. .name = "sr1_hwmod",
  2306. .class = &omap34xx_smartreflex_hwmod_class,
  2307. .main_clk = "sr1_fck",
  2308. .vdd_name = "mpu",
  2309. .prcm = {
  2310. .omap2 = {
  2311. .prcm_reg_id = 1,
  2312. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2313. .module_offs = WKUP_MOD,
  2314. .idlest_reg_id = 1,
  2315. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2316. },
  2317. },
  2318. .slaves = omap3_sr1_slaves,
  2319. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2320. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  2321. CHIP_IS_OMAP3430ES3_0 |
  2322. CHIP_IS_OMAP3430ES3_1),
  2323. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2324. };
  2325. static struct omap_hwmod omap36xx_sr1_hwmod = {
  2326. .name = "sr1_hwmod",
  2327. .class = &omap36xx_smartreflex_hwmod_class,
  2328. .main_clk = "sr1_fck",
  2329. .vdd_name = "mpu",
  2330. .prcm = {
  2331. .omap2 = {
  2332. .prcm_reg_id = 1,
  2333. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2334. .module_offs = WKUP_MOD,
  2335. .idlest_reg_id = 1,
  2336. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2337. },
  2338. },
  2339. .slaves = omap3_sr1_slaves,
  2340. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2341. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  2342. };
  2343. /* SR2 */
  2344. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  2345. &omap3_l4_core__sr2,
  2346. };
  2347. static struct omap_hwmod omap34xx_sr2_hwmod = {
  2348. .name = "sr2_hwmod",
  2349. .class = &omap34xx_smartreflex_hwmod_class,
  2350. .main_clk = "sr2_fck",
  2351. .vdd_name = "core",
  2352. .prcm = {
  2353. .omap2 = {
  2354. .prcm_reg_id = 1,
  2355. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2356. .module_offs = WKUP_MOD,
  2357. .idlest_reg_id = 1,
  2358. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2359. },
  2360. },
  2361. .slaves = omap3_sr2_slaves,
  2362. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2363. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  2364. CHIP_IS_OMAP3430ES3_0 |
  2365. CHIP_IS_OMAP3430ES3_1),
  2366. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2367. };
  2368. static struct omap_hwmod omap36xx_sr2_hwmod = {
  2369. .name = "sr2_hwmod",
  2370. .class = &omap36xx_smartreflex_hwmod_class,
  2371. .main_clk = "sr2_fck",
  2372. .vdd_name = "core",
  2373. .prcm = {
  2374. .omap2 = {
  2375. .prcm_reg_id = 1,
  2376. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2377. .module_offs = WKUP_MOD,
  2378. .idlest_reg_id = 1,
  2379. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2380. },
  2381. },
  2382. .slaves = omap3_sr2_slaves,
  2383. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2384. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  2385. };
  2386. /*
  2387. * 'mailbox' class
  2388. * mailbox module allowing communication between the on-chip processors
  2389. * using a queued mailbox-interrupt mechanism.
  2390. */
  2391. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  2392. .rev_offs = 0x000,
  2393. .sysc_offs = 0x010,
  2394. .syss_offs = 0x014,
  2395. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2396. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2397. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2398. .sysc_fields = &omap_hwmod_sysc_type1,
  2399. };
  2400. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  2401. .name = "mailbox",
  2402. .sysc = &omap3xxx_mailbox_sysc,
  2403. };
  2404. static struct omap_hwmod omap3xxx_mailbox_hwmod;
  2405. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  2406. { .irq = 26 },
  2407. { .irq = -1 }
  2408. };
  2409. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2410. {
  2411. .pa_start = 0x48094000,
  2412. .pa_end = 0x480941ff,
  2413. .flags = ADDR_TYPE_RT,
  2414. },
  2415. { }
  2416. };
  2417. /* l4_core -> mailbox */
  2418. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2419. .master = &omap3xxx_l4_core_hwmod,
  2420. .slave = &omap3xxx_mailbox_hwmod,
  2421. .addr = omap3xxx_mailbox_addrs,
  2422. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2423. };
  2424. /* mailbox slave ports */
  2425. static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
  2426. &omap3xxx_l4_core__mailbox,
  2427. };
  2428. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  2429. .name = "mailbox",
  2430. .class = &omap3xxx_mailbox_hwmod_class,
  2431. .mpu_irqs = omap3xxx_mailbox_irqs,
  2432. .main_clk = "mailboxes_ick",
  2433. .prcm = {
  2434. .omap2 = {
  2435. .prcm_reg_id = 1,
  2436. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  2437. .module_offs = CORE_MOD,
  2438. .idlest_reg_id = 1,
  2439. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  2440. },
  2441. },
  2442. .slaves = omap3xxx_mailbox_slaves,
  2443. .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
  2444. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2445. };
  2446. /* l4 core -> mcspi1 interface */
  2447. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2448. .master = &omap3xxx_l4_core_hwmod,
  2449. .slave = &omap34xx_mcspi1,
  2450. .clk = "mcspi1_ick",
  2451. .addr = omap2_mcspi1_addr_space,
  2452. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2453. };
  2454. /* l4 core -> mcspi2 interface */
  2455. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2456. .master = &omap3xxx_l4_core_hwmod,
  2457. .slave = &omap34xx_mcspi2,
  2458. .clk = "mcspi2_ick",
  2459. .addr = omap2_mcspi2_addr_space,
  2460. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2461. };
  2462. /* l4 core -> mcspi3 interface */
  2463. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2464. .master = &omap3xxx_l4_core_hwmod,
  2465. .slave = &omap34xx_mcspi3,
  2466. .clk = "mcspi3_ick",
  2467. .addr = omap2430_mcspi3_addr_space,
  2468. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2469. };
  2470. /* l4 core -> mcspi4 interface */
  2471. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2472. {
  2473. .pa_start = 0x480ba000,
  2474. .pa_end = 0x480ba0ff,
  2475. .flags = ADDR_TYPE_RT,
  2476. },
  2477. { }
  2478. };
  2479. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2480. .master = &omap3xxx_l4_core_hwmod,
  2481. .slave = &omap34xx_mcspi4,
  2482. .clk = "mcspi4_ick",
  2483. .addr = omap34xx_mcspi4_addr_space,
  2484. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2485. };
  2486. /*
  2487. * 'mcspi' class
  2488. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  2489. * bus
  2490. */
  2491. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  2492. .rev_offs = 0x0000,
  2493. .sysc_offs = 0x0010,
  2494. .syss_offs = 0x0014,
  2495. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2496. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2497. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2498. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2499. .sysc_fields = &omap_hwmod_sysc_type1,
  2500. };
  2501. static struct omap_hwmod_class omap34xx_mcspi_class = {
  2502. .name = "mcspi",
  2503. .sysc = &omap34xx_mcspi_sysc,
  2504. .rev = OMAP3_MCSPI_REV,
  2505. };
  2506. /* mcspi1 */
  2507. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  2508. &omap34xx_l4_core__mcspi1,
  2509. };
  2510. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  2511. .num_chipselect = 4,
  2512. };
  2513. static struct omap_hwmod omap34xx_mcspi1 = {
  2514. .name = "mcspi1",
  2515. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  2516. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  2517. .main_clk = "mcspi1_fck",
  2518. .prcm = {
  2519. .omap2 = {
  2520. .module_offs = CORE_MOD,
  2521. .prcm_reg_id = 1,
  2522. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  2523. .idlest_reg_id = 1,
  2524. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  2525. },
  2526. },
  2527. .slaves = omap34xx_mcspi1_slaves,
  2528. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  2529. .class = &omap34xx_mcspi_class,
  2530. .dev_attr = &omap_mcspi1_dev_attr,
  2531. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2532. };
  2533. /* mcspi2 */
  2534. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  2535. &omap34xx_l4_core__mcspi2,
  2536. };
  2537. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  2538. .num_chipselect = 2,
  2539. };
  2540. static struct omap_hwmod omap34xx_mcspi2 = {
  2541. .name = "mcspi2",
  2542. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  2543. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  2544. .main_clk = "mcspi2_fck",
  2545. .prcm = {
  2546. .omap2 = {
  2547. .module_offs = CORE_MOD,
  2548. .prcm_reg_id = 1,
  2549. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  2550. .idlest_reg_id = 1,
  2551. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  2552. },
  2553. },
  2554. .slaves = omap34xx_mcspi2_slaves,
  2555. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  2556. .class = &omap34xx_mcspi_class,
  2557. .dev_attr = &omap_mcspi2_dev_attr,
  2558. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2559. };
  2560. /* mcspi3 */
  2561. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  2562. { .name = "irq", .irq = 91 }, /* 91 */
  2563. { .irq = -1 }
  2564. };
  2565. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  2566. { .name = "tx0", .dma_req = 15 },
  2567. { .name = "rx0", .dma_req = 16 },
  2568. { .name = "tx1", .dma_req = 23 },
  2569. { .name = "rx1", .dma_req = 24 },
  2570. { .dma_req = -1 }
  2571. };
  2572. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  2573. &omap34xx_l4_core__mcspi3,
  2574. };
  2575. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  2576. .num_chipselect = 2,
  2577. };
  2578. static struct omap_hwmod omap34xx_mcspi3 = {
  2579. .name = "mcspi3",
  2580. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  2581. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  2582. .main_clk = "mcspi3_fck",
  2583. .prcm = {
  2584. .omap2 = {
  2585. .module_offs = CORE_MOD,
  2586. .prcm_reg_id = 1,
  2587. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  2588. .idlest_reg_id = 1,
  2589. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  2590. },
  2591. },
  2592. .slaves = omap34xx_mcspi3_slaves,
  2593. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  2594. .class = &omap34xx_mcspi_class,
  2595. .dev_attr = &omap_mcspi3_dev_attr,
  2596. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2597. };
  2598. /* SPI4 */
  2599. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  2600. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  2601. { .irq = -1 }
  2602. };
  2603. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  2604. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  2605. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  2606. { .dma_req = -1 }
  2607. };
  2608. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  2609. &omap34xx_l4_core__mcspi4,
  2610. };
  2611. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  2612. .num_chipselect = 1,
  2613. };
  2614. static struct omap_hwmod omap34xx_mcspi4 = {
  2615. .name = "mcspi4",
  2616. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  2617. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  2618. .main_clk = "mcspi4_fck",
  2619. .prcm = {
  2620. .omap2 = {
  2621. .module_offs = CORE_MOD,
  2622. .prcm_reg_id = 1,
  2623. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  2624. .idlest_reg_id = 1,
  2625. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  2626. },
  2627. },
  2628. .slaves = omap34xx_mcspi4_slaves,
  2629. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  2630. .class = &omap34xx_mcspi_class,
  2631. .dev_attr = &omap_mcspi4_dev_attr,
  2632. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2633. };
  2634. /*
  2635. * usbhsotg
  2636. */
  2637. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  2638. .rev_offs = 0x0400,
  2639. .sysc_offs = 0x0404,
  2640. .syss_offs = 0x0408,
  2641. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  2642. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2643. SYSC_HAS_AUTOIDLE),
  2644. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2645. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2646. .sysc_fields = &omap_hwmod_sysc_type1,
  2647. };
  2648. static struct omap_hwmod_class usbotg_class = {
  2649. .name = "usbotg",
  2650. .sysc = &omap3xxx_usbhsotg_sysc,
  2651. };
  2652. /* usb_otg_hs */
  2653. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  2654. { .name = "mc", .irq = 92 },
  2655. { .name = "dma", .irq = 93 },
  2656. { .irq = -1 }
  2657. };
  2658. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  2659. .name = "usb_otg_hs",
  2660. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  2661. .main_clk = "hsotgusb_ick",
  2662. .prcm = {
  2663. .omap2 = {
  2664. .prcm_reg_id = 1,
  2665. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  2666. .module_offs = CORE_MOD,
  2667. .idlest_reg_id = 1,
  2668. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  2669. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  2670. },
  2671. },
  2672. .masters = omap3xxx_usbhsotg_masters,
  2673. .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
  2674. .slaves = omap3xxx_usbhsotg_slaves,
  2675. .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
  2676. .class = &usbotg_class,
  2677. /*
  2678. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  2679. * broken when autoidle is enabled
  2680. * workaround is to disable the autoidle bit at module level.
  2681. */
  2682. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  2683. | HWMOD_SWSUP_MSTANDBY,
  2684. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  2685. };
  2686. /* usb_otg_hs */
  2687. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  2688. { .name = "mc", .irq = 71 },
  2689. { .irq = -1 }
  2690. };
  2691. static struct omap_hwmod_class am35xx_usbotg_class = {
  2692. .name = "am35xx_usbotg",
  2693. .sysc = NULL,
  2694. };
  2695. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  2696. .name = "am35x_otg_hs",
  2697. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  2698. .main_clk = NULL,
  2699. .prcm = {
  2700. .omap2 = {
  2701. },
  2702. },
  2703. .masters = am35xx_usbhsotg_masters,
  2704. .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
  2705. .slaves = am35xx_usbhsotg_slaves,
  2706. .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
  2707. .class = &am35xx_usbotg_class,
  2708. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
  2709. };
  2710. /* MMC/SD/SDIO common */
  2711. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  2712. .rev_offs = 0x1fc,
  2713. .sysc_offs = 0x10,
  2714. .syss_offs = 0x14,
  2715. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2716. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2717. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2718. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2719. .sysc_fields = &omap_hwmod_sysc_type1,
  2720. };
  2721. static struct omap_hwmod_class omap34xx_mmc_class = {
  2722. .name = "mmc",
  2723. .sysc = &omap34xx_mmc_sysc,
  2724. };
  2725. /* MMC/SD/SDIO1 */
  2726. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  2727. { .irq = 83, },
  2728. { .irq = -1 }
  2729. };
  2730. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  2731. { .name = "tx", .dma_req = 61, },
  2732. { .name = "rx", .dma_req = 62, },
  2733. { .dma_req = -1 }
  2734. };
  2735. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  2736. { .role = "dbck", .clk = "omap_32k_fck", },
  2737. };
  2738. static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
  2739. &omap3xxx_l4_core__mmc1,
  2740. };
  2741. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  2742. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  2743. };
  2744. static struct omap_hwmod omap3xxx_mmc1_hwmod = {
  2745. .name = "mmc1",
  2746. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  2747. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  2748. .opt_clks = omap34xx_mmc1_opt_clks,
  2749. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  2750. .main_clk = "mmchs1_fck",
  2751. .prcm = {
  2752. .omap2 = {
  2753. .module_offs = CORE_MOD,
  2754. .prcm_reg_id = 1,
  2755. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  2756. .idlest_reg_id = 1,
  2757. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  2758. },
  2759. },
  2760. .dev_attr = &mmc1_dev_attr,
  2761. .slaves = omap3xxx_mmc1_slaves,
  2762. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
  2763. .class = &omap34xx_mmc_class,
  2764. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2765. };
  2766. /* MMC/SD/SDIO2 */
  2767. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  2768. { .irq = INT_24XX_MMC2_IRQ, },
  2769. { .irq = -1 }
  2770. };
  2771. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  2772. { .name = "tx", .dma_req = 47, },
  2773. { .name = "rx", .dma_req = 48, },
  2774. { .dma_req = -1 }
  2775. };
  2776. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  2777. { .role = "dbck", .clk = "omap_32k_fck", },
  2778. };
  2779. static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
  2780. &omap3xxx_l4_core__mmc2,
  2781. };
  2782. static struct omap_hwmod omap3xxx_mmc2_hwmod = {
  2783. .name = "mmc2",
  2784. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  2785. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  2786. .opt_clks = omap34xx_mmc2_opt_clks,
  2787. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  2788. .main_clk = "mmchs2_fck",
  2789. .prcm = {
  2790. .omap2 = {
  2791. .module_offs = CORE_MOD,
  2792. .prcm_reg_id = 1,
  2793. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  2794. .idlest_reg_id = 1,
  2795. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  2796. },
  2797. },
  2798. .slaves = omap3xxx_mmc2_slaves,
  2799. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
  2800. .class = &omap34xx_mmc_class,
  2801. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2802. };
  2803. /* MMC/SD/SDIO3 */
  2804. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  2805. { .irq = 94, },
  2806. { .irq = -1 }
  2807. };
  2808. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  2809. { .name = "tx", .dma_req = 77, },
  2810. { .name = "rx", .dma_req = 78, },
  2811. { .dma_req = -1 }
  2812. };
  2813. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  2814. { .role = "dbck", .clk = "omap_32k_fck", },
  2815. };
  2816. static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
  2817. &omap3xxx_l4_core__mmc3,
  2818. };
  2819. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  2820. .name = "mmc3",
  2821. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  2822. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  2823. .opt_clks = omap34xx_mmc3_opt_clks,
  2824. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  2825. .main_clk = "mmchs3_fck",
  2826. .prcm = {
  2827. .omap2 = {
  2828. .prcm_reg_id = 1,
  2829. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  2830. .idlest_reg_id = 1,
  2831. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  2832. },
  2833. },
  2834. .slaves = omap3xxx_mmc3_slaves,
  2835. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
  2836. .class = &omap34xx_mmc_class,
  2837. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2838. };
  2839. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  2840. &omap3xxx_l3_main_hwmod,
  2841. &omap3xxx_l4_core_hwmod,
  2842. &omap3xxx_l4_per_hwmod,
  2843. &omap3xxx_l4_wkup_hwmod,
  2844. &omap3xxx_mmc1_hwmod,
  2845. &omap3xxx_mmc2_hwmod,
  2846. &omap3xxx_mmc3_hwmod,
  2847. &omap3xxx_mpu_hwmod,
  2848. &omap3xxx_iva_hwmod,
  2849. &omap3xxx_timer1_hwmod,
  2850. &omap3xxx_timer2_hwmod,
  2851. &omap3xxx_timer3_hwmod,
  2852. &omap3xxx_timer4_hwmod,
  2853. &omap3xxx_timer5_hwmod,
  2854. &omap3xxx_timer6_hwmod,
  2855. &omap3xxx_timer7_hwmod,
  2856. &omap3xxx_timer8_hwmod,
  2857. &omap3xxx_timer9_hwmod,
  2858. &omap3xxx_timer10_hwmod,
  2859. &omap3xxx_timer11_hwmod,
  2860. &omap3xxx_timer12_hwmod,
  2861. &omap3xxx_wd_timer2_hwmod,
  2862. &omap3xxx_uart1_hwmod,
  2863. &omap3xxx_uart2_hwmod,
  2864. &omap3xxx_uart3_hwmod,
  2865. &omap3xxx_uart4_hwmod,
  2866. /* dss class */
  2867. &omap3430es1_dss_core_hwmod,
  2868. &omap3xxx_dss_core_hwmod,
  2869. &omap3xxx_dss_dispc_hwmod,
  2870. &omap3xxx_dss_dsi1_hwmod,
  2871. &omap3xxx_dss_rfbi_hwmod,
  2872. &omap3xxx_dss_venc_hwmod,
  2873. /* i2c class */
  2874. &omap3xxx_i2c1_hwmod,
  2875. &omap3xxx_i2c2_hwmod,
  2876. &omap3xxx_i2c3_hwmod,
  2877. &omap34xx_sr1_hwmod,
  2878. &omap34xx_sr2_hwmod,
  2879. &omap36xx_sr1_hwmod,
  2880. &omap36xx_sr2_hwmod,
  2881. /* gpio class */
  2882. &omap3xxx_gpio1_hwmod,
  2883. &omap3xxx_gpio2_hwmod,
  2884. &omap3xxx_gpio3_hwmod,
  2885. &omap3xxx_gpio4_hwmod,
  2886. &omap3xxx_gpio5_hwmod,
  2887. &omap3xxx_gpio6_hwmod,
  2888. /* dma_system class*/
  2889. &omap3xxx_dma_system_hwmod,
  2890. /* mcbsp class */
  2891. &omap3xxx_mcbsp1_hwmod,
  2892. &omap3xxx_mcbsp2_hwmod,
  2893. &omap3xxx_mcbsp3_hwmod,
  2894. &omap3xxx_mcbsp4_hwmod,
  2895. &omap3xxx_mcbsp5_hwmod,
  2896. &omap3xxx_mcbsp2_sidetone_hwmod,
  2897. &omap3xxx_mcbsp3_sidetone_hwmod,
  2898. /* mailbox class */
  2899. &omap3xxx_mailbox_hwmod,
  2900. /* mcspi class */
  2901. &omap34xx_mcspi1,
  2902. &omap34xx_mcspi2,
  2903. &omap34xx_mcspi3,
  2904. &omap34xx_mcspi4,
  2905. /* usbotg class */
  2906. &omap3xxx_usbhsotg_hwmod,
  2907. /* usbotg for am35x */
  2908. &am35xx_usbhsotg_hwmod,
  2909. NULL,
  2910. };
  2911. int __init omap3xxx_hwmod_init(void)
  2912. {
  2913. return omap_hwmod_register(omap3xxx_hwmods);
  2914. }