omap_hwmod_3xxx_data.c 82 KB

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