omap_hwmod_33xx_data.c 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616
  1. /*
  2. * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
  3. *
  4. * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * This file is automatically generated from the AM33XX hardware databases.
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation version 2.
  10. *
  11. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  12. * kind, whether express or implied; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <linux/i2c-omap.h>
  17. #include "omap_hwmod.h"
  18. #include <linux/platform_data/gpio-omap.h>
  19. #include <linux/platform_data/spi-omap2-mcspi.h>
  20. #include "omap_hwmod_common_data.h"
  21. #include "control.h"
  22. #include "cm33xx.h"
  23. #include "prm33xx.h"
  24. #include "prm-regbits-33xx.h"
  25. #include "i2c.h"
  26. #include "mmc.h"
  27. #include "wd_timer.h"
  28. /*
  29. * IP blocks
  30. */
  31. /*
  32. * 'emif_fw' class
  33. * instance(s): emif_fw
  34. */
  35. static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = {
  36. .name = "emif_fw",
  37. };
  38. /* emif_fw */
  39. static struct omap_hwmod am33xx_emif_fw_hwmod = {
  40. .name = "emif_fw",
  41. .class = &am33xx_emif_fw_hwmod_class,
  42. .clkdm_name = "l4fw_clkdm",
  43. .main_clk = "l4fw_gclk",
  44. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  45. .prcm = {
  46. .omap4 = {
  47. .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET,
  48. .modulemode = MODULEMODE_SWCTRL,
  49. },
  50. },
  51. };
  52. /*
  53. * 'emif' class
  54. * instance(s): emif
  55. */
  56. static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = {
  57. .rev_offs = 0x0000,
  58. };
  59. static struct omap_hwmod_class am33xx_emif_hwmod_class = {
  60. .name = "emif",
  61. .sysc = &am33xx_emif_sysc,
  62. };
  63. static struct omap_hwmod_irq_info am33xx_emif_irqs[] = {
  64. { .name = "ddrerr0", .irq = 101 + OMAP_INTC_START, },
  65. { .irq = -1 },
  66. };
  67. /* emif */
  68. static struct omap_hwmod am33xx_emif_hwmod = {
  69. .name = "emif",
  70. .class = &am33xx_emif_hwmod_class,
  71. .clkdm_name = "l3_clkdm",
  72. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  73. .mpu_irqs = am33xx_emif_irqs,
  74. .main_clk = "dpll_ddr_m2_div2_ck",
  75. .prcm = {
  76. .omap4 = {
  77. .clkctrl_offs = AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
  78. .modulemode = MODULEMODE_SWCTRL,
  79. },
  80. },
  81. };
  82. /*
  83. * 'l3' class
  84. * instance(s): l3_main, l3_s, l3_instr
  85. */
  86. static struct omap_hwmod_class am33xx_l3_hwmod_class = {
  87. .name = "l3",
  88. };
  89. /* l3_main (l3_fast) */
  90. static struct omap_hwmod_irq_info am33xx_l3_main_irqs[] = {
  91. { .name = "l3debug", .irq = 9 + OMAP_INTC_START, },
  92. { .name = "l3appint", .irq = 10 + OMAP_INTC_START, },
  93. { .irq = -1 },
  94. };
  95. static struct omap_hwmod am33xx_l3_main_hwmod = {
  96. .name = "l3_main",
  97. .class = &am33xx_l3_hwmod_class,
  98. .clkdm_name = "l3_clkdm",
  99. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  100. .mpu_irqs = am33xx_l3_main_irqs,
  101. .main_clk = "l3_gclk",
  102. .prcm = {
  103. .omap4 = {
  104. .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET,
  105. .modulemode = MODULEMODE_SWCTRL,
  106. },
  107. },
  108. };
  109. /* l3_s */
  110. static struct omap_hwmod am33xx_l3_s_hwmod = {
  111. .name = "l3_s",
  112. .class = &am33xx_l3_hwmod_class,
  113. .clkdm_name = "l3s_clkdm",
  114. };
  115. /* l3_instr */
  116. static struct omap_hwmod am33xx_l3_instr_hwmod = {
  117. .name = "l3_instr",
  118. .class = &am33xx_l3_hwmod_class,
  119. .clkdm_name = "l3_clkdm",
  120. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  121. .main_clk = "l3_gclk",
  122. .prcm = {
  123. .omap4 = {
  124. .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET,
  125. .modulemode = MODULEMODE_SWCTRL,
  126. },
  127. },
  128. };
  129. /*
  130. * 'l4' class
  131. * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
  132. */
  133. static struct omap_hwmod_class am33xx_l4_hwmod_class = {
  134. .name = "l4",
  135. };
  136. /* l4_ls */
  137. static struct omap_hwmod am33xx_l4_ls_hwmod = {
  138. .name = "l4_ls",
  139. .class = &am33xx_l4_hwmod_class,
  140. .clkdm_name = "l4ls_clkdm",
  141. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  142. .main_clk = "l4ls_gclk",
  143. .prcm = {
  144. .omap4 = {
  145. .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET,
  146. .modulemode = MODULEMODE_SWCTRL,
  147. },
  148. },
  149. };
  150. /* l4_hs */
  151. static struct omap_hwmod am33xx_l4_hs_hwmod = {
  152. .name = "l4_hs",
  153. .class = &am33xx_l4_hwmod_class,
  154. .clkdm_name = "l4hs_clkdm",
  155. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  156. .main_clk = "l4hs_gclk",
  157. .prcm = {
  158. .omap4 = {
  159. .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET,
  160. .modulemode = MODULEMODE_SWCTRL,
  161. },
  162. },
  163. };
  164. /* l4_wkup */
  165. static struct omap_hwmod am33xx_l4_wkup_hwmod = {
  166. .name = "l4_wkup",
  167. .class = &am33xx_l4_hwmod_class,
  168. .clkdm_name = "l4_wkup_clkdm",
  169. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  170. .prcm = {
  171. .omap4 = {
  172. .clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
  173. .modulemode = MODULEMODE_SWCTRL,
  174. },
  175. },
  176. };
  177. /* l4_fw */
  178. static struct omap_hwmod am33xx_l4_fw_hwmod = {
  179. .name = "l4_fw",
  180. .class = &am33xx_l4_hwmod_class,
  181. .clkdm_name = "l4fw_clkdm",
  182. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  183. .prcm = {
  184. .omap4 = {
  185. .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET,
  186. .modulemode = MODULEMODE_SWCTRL,
  187. },
  188. },
  189. };
  190. /*
  191. * 'mpu' class
  192. */
  193. static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
  194. .name = "mpu",
  195. };
  196. /* mpu */
  197. static struct omap_hwmod_irq_info am33xx_mpu_irqs[] = {
  198. { .name = "emuint", .irq = 0 + OMAP_INTC_START, },
  199. { .name = "commtx", .irq = 1 + OMAP_INTC_START, },
  200. { .name = "commrx", .irq = 2 + OMAP_INTC_START, },
  201. { .name = "bench", .irq = 3 + OMAP_INTC_START, },
  202. { .irq = -1 },
  203. };
  204. static struct omap_hwmod am33xx_mpu_hwmod = {
  205. .name = "mpu",
  206. .class = &am33xx_mpu_hwmod_class,
  207. .clkdm_name = "mpu_clkdm",
  208. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  209. .mpu_irqs = am33xx_mpu_irqs,
  210. .main_clk = "dpll_mpu_m2_ck",
  211. .prcm = {
  212. .omap4 = {
  213. .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  214. .modulemode = MODULEMODE_SWCTRL,
  215. },
  216. },
  217. };
  218. /*
  219. * 'wakeup m3' class
  220. * Wakeup controller sub-system under wakeup domain
  221. */
  222. static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
  223. .name = "wkup_m3",
  224. };
  225. static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
  226. { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
  227. };
  228. static struct omap_hwmod_irq_info am33xx_wkup_m3_irqs[] = {
  229. { .name = "txev", .irq = 78 + OMAP_INTC_START, },
  230. { .irq = -1 },
  231. };
  232. /* wkup_m3 */
  233. static struct omap_hwmod am33xx_wkup_m3_hwmod = {
  234. .name = "wkup_m3",
  235. .class = &am33xx_wkup_m3_hwmod_class,
  236. .clkdm_name = "l4_wkup_aon_clkdm",
  237. /* Keep hardreset asserted */
  238. .flags = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST,
  239. .mpu_irqs = am33xx_wkup_m3_irqs,
  240. .main_clk = "dpll_core_m4_div2_ck",
  241. .prcm = {
  242. .omap4 = {
  243. .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
  244. .rstctrl_offs = AM33XX_RM_WKUP_RSTCTRL_OFFSET,
  245. .rstst_offs = AM33XX_RM_WKUP_RSTST_OFFSET,
  246. .modulemode = MODULEMODE_SWCTRL,
  247. },
  248. },
  249. .rst_lines = am33xx_wkup_m3_resets,
  250. .rst_lines_cnt = ARRAY_SIZE(am33xx_wkup_m3_resets),
  251. };
  252. /*
  253. * 'pru-icss' class
  254. * Programmable Real-Time Unit and Industrial Communication Subsystem
  255. */
  256. static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
  257. .name = "pruss",
  258. };
  259. static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
  260. { .name = "pruss", .rst_shift = 1 },
  261. };
  262. static struct omap_hwmod_irq_info am33xx_pruss_irqs[] = {
  263. { .name = "evtout0", .irq = 20 + OMAP_INTC_START, },
  264. { .name = "evtout1", .irq = 21 + OMAP_INTC_START, },
  265. { .name = "evtout2", .irq = 22 + OMAP_INTC_START, },
  266. { .name = "evtout3", .irq = 23 + OMAP_INTC_START, },
  267. { .name = "evtout4", .irq = 24 + OMAP_INTC_START, },
  268. { .name = "evtout5", .irq = 25 + OMAP_INTC_START, },
  269. { .name = "evtout6", .irq = 26 + OMAP_INTC_START, },
  270. { .name = "evtout7", .irq = 27 + OMAP_INTC_START, },
  271. { .irq = -1 },
  272. };
  273. /* pru-icss */
  274. /* Pseudo hwmod for reset control purpose only */
  275. static struct omap_hwmod am33xx_pruss_hwmod = {
  276. .name = "pruss",
  277. .class = &am33xx_pruss_hwmod_class,
  278. .clkdm_name = "pruss_ocp_clkdm",
  279. .mpu_irqs = am33xx_pruss_irqs,
  280. .main_clk = "pruss_ocp_gclk",
  281. .prcm = {
  282. .omap4 = {
  283. .clkctrl_offs = AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET,
  284. .rstctrl_offs = AM33XX_RM_PER_RSTCTRL_OFFSET,
  285. .modulemode = MODULEMODE_SWCTRL,
  286. },
  287. },
  288. .rst_lines = am33xx_pruss_resets,
  289. .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets),
  290. };
  291. /* gfx */
  292. /* Pseudo hwmod for reset control purpose only */
  293. static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
  294. .name = "gfx",
  295. };
  296. static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
  297. { .name = "gfx", .rst_shift = 0 },
  298. };
  299. static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
  300. { .name = "gfxint", .irq = 37 + OMAP_INTC_START, },
  301. { .irq = -1 },
  302. };
  303. static struct omap_hwmod am33xx_gfx_hwmod = {
  304. .name = "gfx",
  305. .class = &am33xx_gfx_hwmod_class,
  306. .clkdm_name = "gfx_l3_clkdm",
  307. .mpu_irqs = am33xx_gfx_irqs,
  308. .main_clk = "gfx_fck_div_ck",
  309. .prcm = {
  310. .omap4 = {
  311. .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
  312. .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
  313. .modulemode = MODULEMODE_SWCTRL,
  314. },
  315. },
  316. .rst_lines = am33xx_gfx_resets,
  317. .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets),
  318. };
  319. /*
  320. * 'prcm' class
  321. * power and reset manager (whole prcm infrastructure)
  322. */
  323. static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
  324. .name = "prcm",
  325. };
  326. /* prcm */
  327. static struct omap_hwmod am33xx_prcm_hwmod = {
  328. .name = "prcm",
  329. .class = &am33xx_prcm_hwmod_class,
  330. .clkdm_name = "l4_wkup_clkdm",
  331. };
  332. /*
  333. * 'adc/tsc' class
  334. * TouchScreen Controller (Anolog-To-Digital Converter)
  335. */
  336. static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
  337. .rev_offs = 0x00,
  338. .sysc_offs = 0x10,
  339. .sysc_flags = SYSC_HAS_SIDLEMODE,
  340. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  341. SIDLE_SMART_WKUP),
  342. .sysc_fields = &omap_hwmod_sysc_type2,
  343. };
  344. static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
  345. .name = "adc_tsc",
  346. .sysc = &am33xx_adc_tsc_sysc,
  347. };
  348. static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = {
  349. { .irq = 16 + OMAP_INTC_START, },
  350. { .irq = -1 },
  351. };
  352. static struct omap_hwmod am33xx_adc_tsc_hwmod = {
  353. .name = "adc_tsc",
  354. .class = &am33xx_adc_tsc_hwmod_class,
  355. .clkdm_name = "l4_wkup_clkdm",
  356. .mpu_irqs = am33xx_adc_tsc_irqs,
  357. .main_clk = "adc_tsc_fck",
  358. .prcm = {
  359. .omap4 = {
  360. .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
  361. .modulemode = MODULEMODE_SWCTRL,
  362. },
  363. },
  364. };
  365. /*
  366. * Modules omap_hwmod structures
  367. *
  368. * The following IPs are excluded for the moment because:
  369. * - They do not need an explicit SW control using omap_hwmod API.
  370. * - They still need to be validated with the driver
  371. * properly adapted to omap_hwmod / omap_device
  372. *
  373. * - cEFUSE (doesn't fall under any ocp_if)
  374. * - clkdiv32k
  375. * - debugss
  376. * - ocp watch point
  377. */
  378. #if 0
  379. /*
  380. * 'cefuse' class
  381. */
  382. static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
  383. .name = "cefuse",
  384. };
  385. static struct omap_hwmod am33xx_cefuse_hwmod = {
  386. .name = "cefuse",
  387. .class = &am33xx_cefuse_hwmod_class,
  388. .clkdm_name = "l4_cefuse_clkdm",
  389. .main_clk = "cefuse_fck",
  390. .prcm = {
  391. .omap4 = {
  392. .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
  393. .modulemode = MODULEMODE_SWCTRL,
  394. },
  395. },
  396. };
  397. /*
  398. * 'clkdiv32k' class
  399. */
  400. static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
  401. .name = "clkdiv32k",
  402. };
  403. static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
  404. .name = "clkdiv32k",
  405. .class = &am33xx_clkdiv32k_hwmod_class,
  406. .clkdm_name = "clk_24mhz_clkdm",
  407. .main_clk = "clkdiv32k_ick",
  408. .prcm = {
  409. .omap4 = {
  410. .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
  411. .modulemode = MODULEMODE_SWCTRL,
  412. },
  413. },
  414. };
  415. /*
  416. * 'debugss' class
  417. * debug sub system
  418. */
  419. static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
  420. .name = "debugss",
  421. };
  422. static struct omap_hwmod am33xx_debugss_hwmod = {
  423. .name = "debugss",
  424. .class = &am33xx_debugss_hwmod_class,
  425. .clkdm_name = "l3_aon_clkdm",
  426. .main_clk = "debugss_ick",
  427. .prcm = {
  428. .omap4 = {
  429. .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
  430. .modulemode = MODULEMODE_SWCTRL,
  431. },
  432. },
  433. };
  434. /* ocpwp */
  435. static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
  436. .name = "ocpwp",
  437. };
  438. static struct omap_hwmod am33xx_ocpwp_hwmod = {
  439. .name = "ocpwp",
  440. .class = &am33xx_ocpwp_hwmod_class,
  441. .clkdm_name = "l4ls_clkdm",
  442. .main_clk = "l4ls_gclk",
  443. .prcm = {
  444. .omap4 = {
  445. .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
  446. .modulemode = MODULEMODE_SWCTRL,
  447. },
  448. },
  449. };
  450. #endif
  451. /*
  452. * 'aes0' class
  453. */
  454. static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
  455. .rev_offs = 0x80,
  456. .sysc_offs = 0x84,
  457. .syss_offs = 0x88,
  458. .sysc_flags = SYSS_HAS_RESET_STATUS,
  459. };
  460. static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
  461. .name = "aes0",
  462. .sysc = &am33xx_aes0_sysc,
  463. };
  464. static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
  465. { .irq = 103 + OMAP_INTC_START, },
  466. { .irq = -1 },
  467. };
  468. static struct omap_hwmod_dma_info am33xx_aes0_edma_reqs[] = {
  469. { .name = "tx", .dma_req = 6, },
  470. { .name = "rx", .dma_req = 5, },
  471. { .dma_req = -1 }
  472. };
  473. static struct omap_hwmod am33xx_aes0_hwmod = {
  474. .name = "aes",
  475. .class = &am33xx_aes0_hwmod_class,
  476. .clkdm_name = "l3_clkdm",
  477. .mpu_irqs = am33xx_aes0_irqs,
  478. .sdma_reqs = am33xx_aes0_edma_reqs,
  479. .main_clk = "aes0_fck",
  480. .prcm = {
  481. .omap4 = {
  482. .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
  483. .modulemode = MODULEMODE_SWCTRL,
  484. },
  485. },
  486. };
  487. /* sha0 HIB2 (the 'P' (public) device) */
  488. static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
  489. .rev_offs = 0x100,
  490. .sysc_offs = 0x110,
  491. .syss_offs = 0x114,
  492. .sysc_flags = SYSS_HAS_RESET_STATUS,
  493. };
  494. static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
  495. .name = "sha0",
  496. .sysc = &am33xx_sha0_sysc,
  497. };
  498. static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
  499. { .irq = 109 + OMAP_INTC_START, },
  500. { .irq = -1 },
  501. };
  502. static struct omap_hwmod_dma_info am33xx_sha0_edma_reqs[] = {
  503. { .name = "rx", .dma_req = 36, },
  504. { .dma_req = -1 }
  505. };
  506. static struct omap_hwmod am33xx_sha0_hwmod = {
  507. .name = "sham",
  508. .class = &am33xx_sha0_hwmod_class,
  509. .clkdm_name = "l3_clkdm",
  510. .mpu_irqs = am33xx_sha0_irqs,
  511. .sdma_reqs = am33xx_sha0_edma_reqs,
  512. .main_clk = "l3_gclk",
  513. .prcm = {
  514. .omap4 = {
  515. .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET,
  516. .modulemode = MODULEMODE_SWCTRL,
  517. },
  518. },
  519. };
  520. /* ocmcram */
  521. static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
  522. .name = "ocmcram",
  523. };
  524. static struct omap_hwmod am33xx_ocmcram_hwmod = {
  525. .name = "ocmcram",
  526. .class = &am33xx_ocmcram_hwmod_class,
  527. .clkdm_name = "l3_clkdm",
  528. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  529. .main_clk = "l3_gclk",
  530. .prcm = {
  531. .omap4 = {
  532. .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
  533. .modulemode = MODULEMODE_SWCTRL,
  534. },
  535. },
  536. };
  537. /* 'smartreflex' class */
  538. static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
  539. .name = "smartreflex",
  540. };
  541. /* smartreflex0 */
  542. static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = {
  543. { .irq = 120 + OMAP_INTC_START, },
  544. { .irq = -1 },
  545. };
  546. static struct omap_hwmod am33xx_smartreflex0_hwmod = {
  547. .name = "smartreflex0",
  548. .class = &am33xx_smartreflex_hwmod_class,
  549. .clkdm_name = "l4_wkup_clkdm",
  550. .mpu_irqs = am33xx_smartreflex0_irqs,
  551. .main_clk = "smartreflex0_fck",
  552. .prcm = {
  553. .omap4 = {
  554. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
  555. .modulemode = MODULEMODE_SWCTRL,
  556. },
  557. },
  558. };
  559. /* smartreflex1 */
  560. static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = {
  561. { .irq = 121 + OMAP_INTC_START, },
  562. { .irq = -1 },
  563. };
  564. static struct omap_hwmod am33xx_smartreflex1_hwmod = {
  565. .name = "smartreflex1",
  566. .class = &am33xx_smartreflex_hwmod_class,
  567. .clkdm_name = "l4_wkup_clkdm",
  568. .mpu_irqs = am33xx_smartreflex1_irqs,
  569. .main_clk = "smartreflex1_fck",
  570. .prcm = {
  571. .omap4 = {
  572. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
  573. .modulemode = MODULEMODE_SWCTRL,
  574. },
  575. },
  576. };
  577. /*
  578. * 'control' module class
  579. */
  580. static struct omap_hwmod_class am33xx_control_hwmod_class = {
  581. .name = "control",
  582. };
  583. static struct omap_hwmod_irq_info am33xx_control_irqs[] = {
  584. { .irq = 8 + OMAP_INTC_START, },
  585. { .irq = -1 },
  586. };
  587. static struct omap_hwmod am33xx_control_hwmod = {
  588. .name = "control",
  589. .class = &am33xx_control_hwmod_class,
  590. .clkdm_name = "l4_wkup_clkdm",
  591. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  592. .mpu_irqs = am33xx_control_irqs,
  593. .main_clk = "dpll_core_m4_div2_ck",
  594. .prcm = {
  595. .omap4 = {
  596. .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
  597. .modulemode = MODULEMODE_SWCTRL,
  598. },
  599. },
  600. };
  601. /*
  602. * 'cpgmac' class
  603. * cpsw/cpgmac sub system
  604. */
  605. static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
  606. .rev_offs = 0x0,
  607. .sysc_offs = 0x8,
  608. .syss_offs = 0x4,
  609. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  610. SYSS_HAS_RESET_STATUS),
  611. .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  612. MSTANDBY_NO),
  613. .sysc_fields = &omap_hwmod_sysc_type3,
  614. };
  615. static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
  616. .name = "cpgmac0",
  617. .sysc = &am33xx_cpgmac_sysc,
  618. };
  619. static struct omap_hwmod_irq_info am33xx_cpgmac0_irqs[] = {
  620. { .name = "c0_rx_thresh_pend", .irq = 40 + OMAP_INTC_START, },
  621. { .name = "c0_rx_pend", .irq = 41 + OMAP_INTC_START, },
  622. { .name = "c0_tx_pend", .irq = 42 + OMAP_INTC_START, },
  623. { .name = "c0_misc_pend", .irq = 43 + OMAP_INTC_START, },
  624. { .irq = -1 },
  625. };
  626. static struct omap_hwmod am33xx_cpgmac0_hwmod = {
  627. .name = "cpgmac0",
  628. .class = &am33xx_cpgmac0_hwmod_class,
  629. .clkdm_name = "cpsw_125mhz_clkdm",
  630. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  631. .mpu_irqs = am33xx_cpgmac0_irqs,
  632. .main_clk = "cpsw_125mhz_gclk",
  633. .prcm = {
  634. .omap4 = {
  635. .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
  636. .modulemode = MODULEMODE_SWCTRL,
  637. },
  638. },
  639. };
  640. /*
  641. * mdio class
  642. */
  643. static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
  644. .name = "davinci_mdio",
  645. };
  646. static struct omap_hwmod am33xx_mdio_hwmod = {
  647. .name = "davinci_mdio",
  648. .class = &am33xx_mdio_hwmod_class,
  649. .clkdm_name = "cpsw_125mhz_clkdm",
  650. .main_clk = "cpsw_125mhz_gclk",
  651. };
  652. /*
  653. * dcan class
  654. */
  655. static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
  656. .name = "d_can",
  657. };
  658. /* dcan0 */
  659. static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = {
  660. { .name = "d_can_ms", .irq = 52 + OMAP_INTC_START, },
  661. { .name = "d_can_mo", .irq = 53 + OMAP_INTC_START, },
  662. { .irq = -1 },
  663. };
  664. static struct omap_hwmod am33xx_dcan0_hwmod = {
  665. .name = "d_can0",
  666. .class = &am33xx_dcan_hwmod_class,
  667. .clkdm_name = "l4ls_clkdm",
  668. .mpu_irqs = am33xx_dcan0_irqs,
  669. .main_clk = "dcan0_fck",
  670. .prcm = {
  671. .omap4 = {
  672. .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET,
  673. .modulemode = MODULEMODE_SWCTRL,
  674. },
  675. },
  676. };
  677. /* dcan1 */
  678. static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = {
  679. { .name = "d_can_ms", .irq = 55 + OMAP_INTC_START, },
  680. { .name = "d_can_mo", .irq = 56 + OMAP_INTC_START, },
  681. { .irq = -1 },
  682. };
  683. static struct omap_hwmod am33xx_dcan1_hwmod = {
  684. .name = "d_can1",
  685. .class = &am33xx_dcan_hwmod_class,
  686. .clkdm_name = "l4ls_clkdm",
  687. .mpu_irqs = am33xx_dcan1_irqs,
  688. .main_clk = "dcan1_fck",
  689. .prcm = {
  690. .omap4 = {
  691. .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET,
  692. .modulemode = MODULEMODE_SWCTRL,
  693. },
  694. },
  695. };
  696. /* elm */
  697. static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
  698. .rev_offs = 0x0000,
  699. .sysc_offs = 0x0010,
  700. .syss_offs = 0x0014,
  701. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  702. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  703. SYSS_HAS_RESET_STATUS),
  704. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  705. .sysc_fields = &omap_hwmod_sysc_type1,
  706. };
  707. static struct omap_hwmod_class am33xx_elm_hwmod_class = {
  708. .name = "elm",
  709. .sysc = &am33xx_elm_sysc,
  710. };
  711. static struct omap_hwmod_irq_info am33xx_elm_irqs[] = {
  712. { .irq = 4 + OMAP_INTC_START, },
  713. { .irq = -1 },
  714. };
  715. static struct omap_hwmod am33xx_elm_hwmod = {
  716. .name = "elm",
  717. .class = &am33xx_elm_hwmod_class,
  718. .clkdm_name = "l4ls_clkdm",
  719. .mpu_irqs = am33xx_elm_irqs,
  720. .main_clk = "l4ls_gclk",
  721. .prcm = {
  722. .omap4 = {
  723. .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET,
  724. .modulemode = MODULEMODE_SWCTRL,
  725. },
  726. },
  727. };
  728. /* pwmss */
  729. static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
  730. .rev_offs = 0x0,
  731. .sysc_offs = 0x4,
  732. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  733. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  734. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  735. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  736. .sysc_fields = &omap_hwmod_sysc_type2,
  737. };
  738. static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
  739. .name = "epwmss",
  740. .sysc = &am33xx_epwmss_sysc,
  741. };
  742. static struct omap_hwmod_class am33xx_ecap_hwmod_class = {
  743. .name = "ecap",
  744. };
  745. static struct omap_hwmod_class am33xx_eqep_hwmod_class = {
  746. .name = "eqep",
  747. };
  748. static struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = {
  749. .name = "ehrpwm",
  750. };
  751. /* epwmss0 */
  752. static struct omap_hwmod am33xx_epwmss0_hwmod = {
  753. .name = "epwmss0",
  754. .class = &am33xx_epwmss_hwmod_class,
  755. .clkdm_name = "l4ls_clkdm",
  756. .main_clk = "l4ls_gclk",
  757. .prcm = {
  758. .omap4 = {
  759. .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
  760. .modulemode = MODULEMODE_SWCTRL,
  761. },
  762. },
  763. };
  764. /* ecap0 */
  765. static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
  766. { .irq = 31 + OMAP_INTC_START, },
  767. { .irq = -1 },
  768. };
  769. static struct omap_hwmod am33xx_ecap0_hwmod = {
  770. .name = "ecap0",
  771. .class = &am33xx_ecap_hwmod_class,
  772. .clkdm_name = "l4ls_clkdm",
  773. .mpu_irqs = am33xx_ecap0_irqs,
  774. .main_clk = "l4ls_gclk",
  775. };
  776. /* eqep0 */
  777. static struct omap_hwmod_irq_info am33xx_eqep0_irqs[] = {
  778. { .irq = 79 + OMAP_INTC_START, },
  779. { .irq = -1 },
  780. };
  781. static struct omap_hwmod am33xx_eqep0_hwmod = {
  782. .name = "eqep0",
  783. .class = &am33xx_eqep_hwmod_class,
  784. .clkdm_name = "l4ls_clkdm",
  785. .mpu_irqs = am33xx_eqep0_irqs,
  786. .main_clk = "l4ls_gclk",
  787. };
  788. /* ehrpwm0 */
  789. static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
  790. { .name = "int", .irq = 86 + OMAP_INTC_START, },
  791. { .name = "tzint", .irq = 58 + OMAP_INTC_START, },
  792. { .irq = -1 },
  793. };
  794. static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
  795. .name = "ehrpwm0",
  796. .class = &am33xx_ehrpwm_hwmod_class,
  797. .clkdm_name = "l4ls_clkdm",
  798. .mpu_irqs = am33xx_ehrpwm0_irqs,
  799. .main_clk = "l4ls_gclk",
  800. };
  801. /* epwmss1 */
  802. static struct omap_hwmod am33xx_epwmss1_hwmod = {
  803. .name = "epwmss1",
  804. .class = &am33xx_epwmss_hwmod_class,
  805. .clkdm_name = "l4ls_clkdm",
  806. .main_clk = "l4ls_gclk",
  807. .prcm = {
  808. .omap4 = {
  809. .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
  810. .modulemode = MODULEMODE_SWCTRL,
  811. },
  812. },
  813. };
  814. /* ecap1 */
  815. static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
  816. { .irq = 47 + OMAP_INTC_START, },
  817. { .irq = -1 },
  818. };
  819. static struct omap_hwmod am33xx_ecap1_hwmod = {
  820. .name = "ecap1",
  821. .class = &am33xx_ecap_hwmod_class,
  822. .clkdm_name = "l4ls_clkdm",
  823. .mpu_irqs = am33xx_ecap1_irqs,
  824. .main_clk = "l4ls_gclk",
  825. };
  826. /* eqep1 */
  827. static struct omap_hwmod_irq_info am33xx_eqep1_irqs[] = {
  828. { .irq = 88 + OMAP_INTC_START, },
  829. { .irq = -1 },
  830. };
  831. static struct omap_hwmod am33xx_eqep1_hwmod = {
  832. .name = "eqep1",
  833. .class = &am33xx_eqep_hwmod_class,
  834. .clkdm_name = "l4ls_clkdm",
  835. .mpu_irqs = am33xx_eqep1_irqs,
  836. .main_clk = "l4ls_gclk",
  837. };
  838. /* ehrpwm1 */
  839. static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
  840. { .name = "int", .irq = 87 + OMAP_INTC_START, },
  841. { .name = "tzint", .irq = 59 + OMAP_INTC_START, },
  842. { .irq = -1 },
  843. };
  844. static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
  845. .name = "ehrpwm1",
  846. .class = &am33xx_ehrpwm_hwmod_class,
  847. .clkdm_name = "l4ls_clkdm",
  848. .mpu_irqs = am33xx_ehrpwm1_irqs,
  849. .main_clk = "l4ls_gclk",
  850. };
  851. /* epwmss2 */
  852. static struct omap_hwmod am33xx_epwmss2_hwmod = {
  853. .name = "epwmss2",
  854. .class = &am33xx_epwmss_hwmod_class,
  855. .clkdm_name = "l4ls_clkdm",
  856. .main_clk = "l4ls_gclk",
  857. .prcm = {
  858. .omap4 = {
  859. .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
  860. .modulemode = MODULEMODE_SWCTRL,
  861. },
  862. },
  863. };
  864. /* ecap2 */
  865. static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
  866. { .irq = 61 + OMAP_INTC_START, },
  867. { .irq = -1 },
  868. };
  869. static struct omap_hwmod am33xx_ecap2_hwmod = {
  870. .name = "ecap2",
  871. .class = &am33xx_ecap_hwmod_class,
  872. .clkdm_name = "l4ls_clkdm",
  873. .mpu_irqs = am33xx_ecap2_irqs,
  874. .main_clk = "l4ls_gclk",
  875. };
  876. /* eqep2 */
  877. static struct omap_hwmod_irq_info am33xx_eqep2_irqs[] = {
  878. { .irq = 89 + OMAP_INTC_START, },
  879. { .irq = -1 },
  880. };
  881. static struct omap_hwmod am33xx_eqep2_hwmod = {
  882. .name = "eqep2",
  883. .class = &am33xx_eqep_hwmod_class,
  884. .clkdm_name = "l4ls_clkdm",
  885. .mpu_irqs = am33xx_eqep2_irqs,
  886. .main_clk = "l4ls_gclk",
  887. };
  888. /* ehrpwm2 */
  889. static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
  890. { .name = "int", .irq = 39 + OMAP_INTC_START, },
  891. { .name = "tzint", .irq = 60 + OMAP_INTC_START, },
  892. { .irq = -1 },
  893. };
  894. static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
  895. .name = "ehrpwm2",
  896. .class = &am33xx_ehrpwm_hwmod_class,
  897. .clkdm_name = "l4ls_clkdm",
  898. .mpu_irqs = am33xx_ehrpwm2_irqs,
  899. .main_clk = "l4ls_gclk",
  900. };
  901. /*
  902. * 'gpio' class: for gpio 0,1,2,3
  903. */
  904. static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
  905. .rev_offs = 0x0000,
  906. .sysc_offs = 0x0010,
  907. .syss_offs = 0x0114,
  908. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  909. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  910. SYSS_HAS_RESET_STATUS),
  911. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  912. SIDLE_SMART_WKUP),
  913. .sysc_fields = &omap_hwmod_sysc_type1,
  914. };
  915. static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
  916. .name = "gpio",
  917. .sysc = &am33xx_gpio_sysc,
  918. .rev = 2,
  919. };
  920. static struct omap_gpio_dev_attr gpio_dev_attr = {
  921. .bank_width = 32,
  922. .dbck_flag = true,
  923. };
  924. /* gpio0 */
  925. static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
  926. { .role = "dbclk", .clk = "gpio0_dbclk" },
  927. };
  928. static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = {
  929. { .irq = 96 + OMAP_INTC_START, },
  930. { .irq = -1 },
  931. };
  932. static struct omap_hwmod am33xx_gpio0_hwmod = {
  933. .name = "gpio1",
  934. .class = &am33xx_gpio_hwmod_class,
  935. .clkdm_name = "l4_wkup_clkdm",
  936. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  937. .mpu_irqs = am33xx_gpio0_irqs,
  938. .main_clk = "dpll_core_m4_div2_ck",
  939. .prcm = {
  940. .omap4 = {
  941. .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
  942. .modulemode = MODULEMODE_SWCTRL,
  943. },
  944. },
  945. .opt_clks = gpio0_opt_clks,
  946. .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks),
  947. .dev_attr = &gpio_dev_attr,
  948. };
  949. /* gpio1 */
  950. static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = {
  951. { .irq = 98 + OMAP_INTC_START, },
  952. { .irq = -1 },
  953. };
  954. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  955. { .role = "dbclk", .clk = "gpio1_dbclk" },
  956. };
  957. static struct omap_hwmod am33xx_gpio1_hwmod = {
  958. .name = "gpio2",
  959. .class = &am33xx_gpio_hwmod_class,
  960. .clkdm_name = "l4ls_clkdm",
  961. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  962. .mpu_irqs = am33xx_gpio1_irqs,
  963. .main_clk = "l4ls_gclk",
  964. .prcm = {
  965. .omap4 = {
  966. .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET,
  967. .modulemode = MODULEMODE_SWCTRL,
  968. },
  969. },
  970. .opt_clks = gpio1_opt_clks,
  971. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  972. .dev_attr = &gpio_dev_attr,
  973. };
  974. /* gpio2 */
  975. static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = {
  976. { .irq = 32 + OMAP_INTC_START, },
  977. { .irq = -1 },
  978. };
  979. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  980. { .role = "dbclk", .clk = "gpio2_dbclk" },
  981. };
  982. static struct omap_hwmod am33xx_gpio2_hwmod = {
  983. .name = "gpio3",
  984. .class = &am33xx_gpio_hwmod_class,
  985. .clkdm_name = "l4ls_clkdm",
  986. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  987. .mpu_irqs = am33xx_gpio2_irqs,
  988. .main_clk = "l4ls_gclk",
  989. .prcm = {
  990. .omap4 = {
  991. .clkctrl_offs = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
  992. .modulemode = MODULEMODE_SWCTRL,
  993. },
  994. },
  995. .opt_clks = gpio2_opt_clks,
  996. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  997. .dev_attr = &gpio_dev_attr,
  998. };
  999. /* gpio3 */
  1000. static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = {
  1001. { .irq = 62 + OMAP_INTC_START, },
  1002. { .irq = -1 },
  1003. };
  1004. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1005. { .role = "dbclk", .clk = "gpio3_dbclk" },
  1006. };
  1007. static struct omap_hwmod am33xx_gpio3_hwmod = {
  1008. .name = "gpio4",
  1009. .class = &am33xx_gpio_hwmod_class,
  1010. .clkdm_name = "l4ls_clkdm",
  1011. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1012. .mpu_irqs = am33xx_gpio3_irqs,
  1013. .main_clk = "l4ls_gclk",
  1014. .prcm = {
  1015. .omap4 = {
  1016. .clkctrl_offs = AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET,
  1017. .modulemode = MODULEMODE_SWCTRL,
  1018. },
  1019. },
  1020. .opt_clks = gpio3_opt_clks,
  1021. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1022. .dev_attr = &gpio_dev_attr,
  1023. };
  1024. /* gpmc */
  1025. static struct omap_hwmod_class_sysconfig gpmc_sysc = {
  1026. .rev_offs = 0x0,
  1027. .sysc_offs = 0x10,
  1028. .syss_offs = 0x14,
  1029. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1030. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1031. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1032. .sysc_fields = &omap_hwmod_sysc_type1,
  1033. };
  1034. static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
  1035. .name = "gpmc",
  1036. .sysc = &gpmc_sysc,
  1037. };
  1038. static struct omap_hwmod_irq_info am33xx_gpmc_irqs[] = {
  1039. { .irq = 100 + OMAP_INTC_START, },
  1040. { .irq = -1 },
  1041. };
  1042. static struct omap_hwmod am33xx_gpmc_hwmod = {
  1043. .name = "gpmc",
  1044. .class = &am33xx_gpmc_hwmod_class,
  1045. .clkdm_name = "l3s_clkdm",
  1046. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  1047. .mpu_irqs = am33xx_gpmc_irqs,
  1048. .main_clk = "l3s_gclk",
  1049. .prcm = {
  1050. .omap4 = {
  1051. .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET,
  1052. .modulemode = MODULEMODE_SWCTRL,
  1053. },
  1054. },
  1055. };
  1056. /* 'i2c' class */
  1057. static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
  1058. .sysc_offs = 0x0010,
  1059. .syss_offs = 0x0090,
  1060. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  1061. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1062. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1063. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1064. SIDLE_SMART_WKUP),
  1065. .sysc_fields = &omap_hwmod_sysc_type1,
  1066. };
  1067. static struct omap_hwmod_class i2c_class = {
  1068. .name = "i2c",
  1069. .sysc = &am33xx_i2c_sysc,
  1070. .rev = OMAP_I2C_IP_VERSION_2,
  1071. .reset = &omap_i2c_reset,
  1072. };
  1073. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1074. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  1075. };
  1076. /* i2c1 */
  1077. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1078. { .irq = 70 + OMAP_INTC_START, },
  1079. { .irq = -1 },
  1080. };
  1081. static struct omap_hwmod_dma_info i2c1_edma_reqs[] = {
  1082. { .name = "tx", .dma_req = 0, },
  1083. { .name = "rx", .dma_req = 0, },
  1084. { .dma_req = -1 }
  1085. };
  1086. static struct omap_hwmod am33xx_i2c1_hwmod = {
  1087. .name = "i2c1",
  1088. .class = &i2c_class,
  1089. .clkdm_name = "l4_wkup_clkdm",
  1090. .mpu_irqs = i2c1_mpu_irqs,
  1091. .sdma_reqs = i2c1_edma_reqs,
  1092. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1093. .main_clk = "dpll_per_m2_div4_wkupdm_ck",
  1094. .prcm = {
  1095. .omap4 = {
  1096. .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET,
  1097. .modulemode = MODULEMODE_SWCTRL,
  1098. },
  1099. },
  1100. .dev_attr = &i2c_dev_attr,
  1101. };
  1102. /* i2c1 */
  1103. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1104. { .irq = 71 + OMAP_INTC_START, },
  1105. { .irq = -1 },
  1106. };
  1107. static struct omap_hwmod_dma_info i2c2_edma_reqs[] = {
  1108. { .name = "tx", .dma_req = 0, },
  1109. { .name = "rx", .dma_req = 0, },
  1110. { .dma_req = -1 }
  1111. };
  1112. static struct omap_hwmod am33xx_i2c2_hwmod = {
  1113. .name = "i2c2",
  1114. .class = &i2c_class,
  1115. .clkdm_name = "l4ls_clkdm",
  1116. .mpu_irqs = i2c2_mpu_irqs,
  1117. .sdma_reqs = i2c2_edma_reqs,
  1118. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1119. .main_clk = "dpll_per_m2_div4_ck",
  1120. .prcm = {
  1121. .omap4 = {
  1122. .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET,
  1123. .modulemode = MODULEMODE_SWCTRL,
  1124. },
  1125. },
  1126. .dev_attr = &i2c_dev_attr,
  1127. };
  1128. /* i2c3 */
  1129. static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
  1130. { .name = "tx", .dma_req = 0, },
  1131. { .name = "rx", .dma_req = 0, },
  1132. { .dma_req = -1 }
  1133. };
  1134. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1135. { .irq = 30 + OMAP_INTC_START, },
  1136. { .irq = -1 },
  1137. };
  1138. static struct omap_hwmod am33xx_i2c3_hwmod = {
  1139. .name = "i2c3",
  1140. .class = &i2c_class,
  1141. .clkdm_name = "l4ls_clkdm",
  1142. .mpu_irqs = i2c3_mpu_irqs,
  1143. .sdma_reqs = i2c3_edma_reqs,
  1144. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1145. .main_clk = "dpll_per_m2_div4_ck",
  1146. .prcm = {
  1147. .omap4 = {
  1148. .clkctrl_offs = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
  1149. .modulemode = MODULEMODE_SWCTRL,
  1150. },
  1151. },
  1152. .dev_attr = &i2c_dev_attr,
  1153. };
  1154. /* lcdc */
  1155. static struct omap_hwmod_class_sysconfig lcdc_sysc = {
  1156. .rev_offs = 0x0,
  1157. .sysc_offs = 0x54,
  1158. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  1159. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1160. .sysc_fields = &omap_hwmod_sysc_type2,
  1161. };
  1162. static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
  1163. .name = "lcdc",
  1164. .sysc = &lcdc_sysc,
  1165. };
  1166. static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = {
  1167. { .irq = 36 + OMAP_INTC_START, },
  1168. { .irq = -1 },
  1169. };
  1170. static struct omap_hwmod am33xx_lcdc_hwmod = {
  1171. .name = "lcdc",
  1172. .class = &am33xx_lcdc_hwmod_class,
  1173. .clkdm_name = "lcdc_clkdm",
  1174. .mpu_irqs = am33xx_lcdc_irqs,
  1175. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1176. .main_clk = "lcd_gclk",
  1177. .prcm = {
  1178. .omap4 = {
  1179. .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
  1180. .modulemode = MODULEMODE_SWCTRL,
  1181. },
  1182. },
  1183. };
  1184. /*
  1185. * 'mailbox' class
  1186. * mailbox module allowing communication between the on-chip processors using a
  1187. * queued mailbox-interrupt mechanism.
  1188. */
  1189. static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
  1190. .rev_offs = 0x0000,
  1191. .sysc_offs = 0x0010,
  1192. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1193. SYSC_HAS_SOFTRESET),
  1194. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1195. .sysc_fields = &omap_hwmod_sysc_type2,
  1196. };
  1197. static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
  1198. .name = "mailbox",
  1199. .sysc = &am33xx_mailbox_sysc,
  1200. };
  1201. static struct omap_hwmod_irq_info am33xx_mailbox_irqs[] = {
  1202. { .irq = 77 + OMAP_INTC_START, },
  1203. { .irq = -1 },
  1204. };
  1205. static struct omap_hwmod am33xx_mailbox_hwmod = {
  1206. .name = "mailbox",
  1207. .class = &am33xx_mailbox_hwmod_class,
  1208. .clkdm_name = "l4ls_clkdm",
  1209. .mpu_irqs = am33xx_mailbox_irqs,
  1210. .main_clk = "l4ls_gclk",
  1211. .prcm = {
  1212. .omap4 = {
  1213. .clkctrl_offs = AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET,
  1214. .modulemode = MODULEMODE_SWCTRL,
  1215. },
  1216. },
  1217. };
  1218. /*
  1219. * 'mcasp' class
  1220. */
  1221. static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
  1222. .rev_offs = 0x0,
  1223. .sysc_offs = 0x4,
  1224. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1225. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1226. .sysc_fields = &omap_hwmod_sysc_type3,
  1227. };
  1228. static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
  1229. .name = "mcasp",
  1230. .sysc = &am33xx_mcasp_sysc,
  1231. };
  1232. /* mcasp0 */
  1233. static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = {
  1234. { .name = "ax", .irq = 80 + OMAP_INTC_START, },
  1235. { .name = "ar", .irq = 81 + OMAP_INTC_START, },
  1236. { .irq = -1 },
  1237. };
  1238. static struct omap_hwmod_dma_info am33xx_mcasp0_edma_reqs[] = {
  1239. { .name = "tx", .dma_req = 8, },
  1240. { .name = "rx", .dma_req = 9, },
  1241. { .dma_req = -1 }
  1242. };
  1243. static struct omap_hwmod am33xx_mcasp0_hwmod = {
  1244. .name = "mcasp0",
  1245. .class = &am33xx_mcasp_hwmod_class,
  1246. .clkdm_name = "l3s_clkdm",
  1247. .mpu_irqs = am33xx_mcasp0_irqs,
  1248. .sdma_reqs = am33xx_mcasp0_edma_reqs,
  1249. .main_clk = "mcasp0_fck",
  1250. .prcm = {
  1251. .omap4 = {
  1252. .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET,
  1253. .modulemode = MODULEMODE_SWCTRL,
  1254. },
  1255. },
  1256. };
  1257. /* mcasp1 */
  1258. static struct omap_hwmod_irq_info am33xx_mcasp1_irqs[] = {
  1259. { .name = "ax", .irq = 82 + OMAP_INTC_START, },
  1260. { .name = "ar", .irq = 83 + OMAP_INTC_START, },
  1261. { .irq = -1 },
  1262. };
  1263. static struct omap_hwmod_dma_info am33xx_mcasp1_edma_reqs[] = {
  1264. { .name = "tx", .dma_req = 10, },
  1265. { .name = "rx", .dma_req = 11, },
  1266. { .dma_req = -1 }
  1267. };
  1268. static struct omap_hwmod am33xx_mcasp1_hwmod = {
  1269. .name = "mcasp1",
  1270. .class = &am33xx_mcasp_hwmod_class,
  1271. .clkdm_name = "l3s_clkdm",
  1272. .mpu_irqs = am33xx_mcasp1_irqs,
  1273. .sdma_reqs = am33xx_mcasp1_edma_reqs,
  1274. .main_clk = "mcasp1_fck",
  1275. .prcm = {
  1276. .omap4 = {
  1277. .clkctrl_offs = AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET,
  1278. .modulemode = MODULEMODE_SWCTRL,
  1279. },
  1280. },
  1281. };
  1282. /* 'mmc' class */
  1283. static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
  1284. .rev_offs = 0x1fc,
  1285. .sysc_offs = 0x10,
  1286. .syss_offs = 0x14,
  1287. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1288. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1289. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1290. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1291. .sysc_fields = &omap_hwmod_sysc_type1,
  1292. };
  1293. static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
  1294. .name = "mmc",
  1295. .sysc = &am33xx_mmc_sysc,
  1296. };
  1297. /* mmc0 */
  1298. static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = {
  1299. { .irq = 64 + OMAP_INTC_START, },
  1300. { .irq = -1 },
  1301. };
  1302. static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = {
  1303. { .name = "tx", .dma_req = 24, },
  1304. { .name = "rx", .dma_req = 25, },
  1305. { .dma_req = -1 }
  1306. };
  1307. static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
  1308. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1309. };
  1310. static struct omap_hwmod am33xx_mmc0_hwmod = {
  1311. .name = "mmc1",
  1312. .class = &am33xx_mmc_hwmod_class,
  1313. .clkdm_name = "l4ls_clkdm",
  1314. .mpu_irqs = am33xx_mmc0_irqs,
  1315. .sdma_reqs = am33xx_mmc0_edma_reqs,
  1316. .main_clk = "mmc_clk",
  1317. .prcm = {
  1318. .omap4 = {
  1319. .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET,
  1320. .modulemode = MODULEMODE_SWCTRL,
  1321. },
  1322. },
  1323. .dev_attr = &am33xx_mmc0_dev_attr,
  1324. };
  1325. /* mmc1 */
  1326. static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = {
  1327. { .irq = 28 + OMAP_INTC_START, },
  1328. { .irq = -1 },
  1329. };
  1330. static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = {
  1331. { .name = "tx", .dma_req = 2, },
  1332. { .name = "rx", .dma_req = 3, },
  1333. { .dma_req = -1 }
  1334. };
  1335. static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
  1336. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1337. };
  1338. static struct omap_hwmod am33xx_mmc1_hwmod = {
  1339. .name = "mmc2",
  1340. .class = &am33xx_mmc_hwmod_class,
  1341. .clkdm_name = "l4ls_clkdm",
  1342. .mpu_irqs = am33xx_mmc1_irqs,
  1343. .sdma_reqs = am33xx_mmc1_edma_reqs,
  1344. .main_clk = "mmc_clk",
  1345. .prcm = {
  1346. .omap4 = {
  1347. .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET,
  1348. .modulemode = MODULEMODE_SWCTRL,
  1349. },
  1350. },
  1351. .dev_attr = &am33xx_mmc1_dev_attr,
  1352. };
  1353. /* mmc2 */
  1354. static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = {
  1355. { .irq = 29 + OMAP_INTC_START, },
  1356. { .irq = -1 },
  1357. };
  1358. static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = {
  1359. { .name = "tx", .dma_req = 64, },
  1360. { .name = "rx", .dma_req = 65, },
  1361. { .dma_req = -1 }
  1362. };
  1363. static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
  1364. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1365. };
  1366. static struct omap_hwmod am33xx_mmc2_hwmod = {
  1367. .name = "mmc3",
  1368. .class = &am33xx_mmc_hwmod_class,
  1369. .clkdm_name = "l3s_clkdm",
  1370. .mpu_irqs = am33xx_mmc2_irqs,
  1371. .sdma_reqs = am33xx_mmc2_edma_reqs,
  1372. .main_clk = "mmc_clk",
  1373. .prcm = {
  1374. .omap4 = {
  1375. .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET,
  1376. .modulemode = MODULEMODE_SWCTRL,
  1377. },
  1378. },
  1379. .dev_attr = &am33xx_mmc2_dev_attr,
  1380. };
  1381. /*
  1382. * 'rtc' class
  1383. * rtc subsystem
  1384. */
  1385. static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
  1386. .rev_offs = 0x0074,
  1387. .sysc_offs = 0x0078,
  1388. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1389. .idlemodes = (SIDLE_FORCE | SIDLE_NO |
  1390. SIDLE_SMART | SIDLE_SMART_WKUP),
  1391. .sysc_fields = &omap_hwmod_sysc_type3,
  1392. };
  1393. static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
  1394. .name = "rtc",
  1395. .sysc = &am33xx_rtc_sysc,
  1396. };
  1397. static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = {
  1398. { .name = "rtcint", .irq = 75 + OMAP_INTC_START, },
  1399. { .name = "rtcalarmint", .irq = 76 + OMAP_INTC_START, },
  1400. { .irq = -1 },
  1401. };
  1402. static struct omap_hwmod am33xx_rtc_hwmod = {
  1403. .name = "rtc",
  1404. .class = &am33xx_rtc_hwmod_class,
  1405. .clkdm_name = "l4_rtc_clkdm",
  1406. .mpu_irqs = am33xx_rtc_irqs,
  1407. .main_clk = "clk_32768_ck",
  1408. .prcm = {
  1409. .omap4 = {
  1410. .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET,
  1411. .modulemode = MODULEMODE_SWCTRL,
  1412. },
  1413. },
  1414. };
  1415. /* 'spi' class */
  1416. static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
  1417. .rev_offs = 0x0000,
  1418. .sysc_offs = 0x0110,
  1419. .syss_offs = 0x0114,
  1420. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1421. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1422. SYSS_HAS_RESET_STATUS),
  1423. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1424. .sysc_fields = &omap_hwmod_sysc_type1,
  1425. };
  1426. static struct omap_hwmod_class am33xx_spi_hwmod_class = {
  1427. .name = "mcspi",
  1428. .sysc = &am33xx_mcspi_sysc,
  1429. .rev = OMAP4_MCSPI_REV,
  1430. };
  1431. /* spi0 */
  1432. static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = {
  1433. { .irq = 65 + OMAP_INTC_START, },
  1434. { .irq = -1 },
  1435. };
  1436. static struct omap_hwmod_dma_info am33xx_mcspi0_edma_reqs[] = {
  1437. { .name = "rx0", .dma_req = 17 },
  1438. { .name = "tx0", .dma_req = 16 },
  1439. { .name = "rx1", .dma_req = 19 },
  1440. { .name = "tx1", .dma_req = 18 },
  1441. { .dma_req = -1 }
  1442. };
  1443. static struct omap2_mcspi_dev_attr mcspi_attrib = {
  1444. .num_chipselect = 2,
  1445. };
  1446. static struct omap_hwmod am33xx_spi0_hwmod = {
  1447. .name = "spi0",
  1448. .class = &am33xx_spi_hwmod_class,
  1449. .clkdm_name = "l4ls_clkdm",
  1450. .mpu_irqs = am33xx_spi0_irqs,
  1451. .sdma_reqs = am33xx_mcspi0_edma_reqs,
  1452. .main_clk = "dpll_per_m2_div4_ck",
  1453. .prcm = {
  1454. .omap4 = {
  1455. .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET,
  1456. .modulemode = MODULEMODE_SWCTRL,
  1457. },
  1458. },
  1459. .dev_attr = &mcspi_attrib,
  1460. };
  1461. /* spi1 */
  1462. static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = {
  1463. { .irq = 125 + OMAP_INTC_START, },
  1464. { .irq = -1 },
  1465. };
  1466. static struct omap_hwmod_dma_info am33xx_mcspi1_edma_reqs[] = {
  1467. { .name = "rx0", .dma_req = 43 },
  1468. { .name = "tx0", .dma_req = 42 },
  1469. { .name = "rx1", .dma_req = 45 },
  1470. { .name = "tx1", .dma_req = 44 },
  1471. { .dma_req = -1 }
  1472. };
  1473. static struct omap_hwmod am33xx_spi1_hwmod = {
  1474. .name = "spi1",
  1475. .class = &am33xx_spi_hwmod_class,
  1476. .clkdm_name = "l4ls_clkdm",
  1477. .mpu_irqs = am33xx_spi1_irqs,
  1478. .sdma_reqs = am33xx_mcspi1_edma_reqs,
  1479. .main_clk = "dpll_per_m2_div4_ck",
  1480. .prcm = {
  1481. .omap4 = {
  1482. .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET,
  1483. .modulemode = MODULEMODE_SWCTRL,
  1484. },
  1485. },
  1486. .dev_attr = &mcspi_attrib,
  1487. };
  1488. /*
  1489. * 'spinlock' class
  1490. * spinlock provides hardware assistance for synchronizing the
  1491. * processes running on multiple processors
  1492. */
  1493. static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
  1494. .name = "spinlock",
  1495. };
  1496. static struct omap_hwmod am33xx_spinlock_hwmod = {
  1497. .name = "spinlock",
  1498. .class = &am33xx_spinlock_hwmod_class,
  1499. .clkdm_name = "l4ls_clkdm",
  1500. .main_clk = "l4ls_gclk",
  1501. .prcm = {
  1502. .omap4 = {
  1503. .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET,
  1504. .modulemode = MODULEMODE_SWCTRL,
  1505. },
  1506. },
  1507. };
  1508. /* 'timer 2-7' class */
  1509. static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
  1510. .rev_offs = 0x0000,
  1511. .sysc_offs = 0x0010,
  1512. .syss_offs = 0x0014,
  1513. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1514. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1515. SIDLE_SMART_WKUP),
  1516. .sysc_fields = &omap_hwmod_sysc_type2,
  1517. };
  1518. static struct omap_hwmod_class am33xx_timer_hwmod_class = {
  1519. .name = "timer",
  1520. .sysc = &am33xx_timer_sysc,
  1521. };
  1522. /* timer1 1ms */
  1523. static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
  1524. .rev_offs = 0x0000,
  1525. .sysc_offs = 0x0010,
  1526. .syss_offs = 0x0014,
  1527. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1528. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1529. SYSS_HAS_RESET_STATUS),
  1530. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1531. .sysc_fields = &omap_hwmod_sysc_type1,
  1532. };
  1533. static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
  1534. .name = "timer",
  1535. .sysc = &am33xx_timer1ms_sysc,
  1536. };
  1537. static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = {
  1538. { .irq = 67 + OMAP_INTC_START, },
  1539. { .irq = -1 },
  1540. };
  1541. static struct omap_hwmod am33xx_timer1_hwmod = {
  1542. .name = "timer1",
  1543. .class = &am33xx_timer1ms_hwmod_class,
  1544. .clkdm_name = "l4_wkup_clkdm",
  1545. .mpu_irqs = am33xx_timer1_irqs,
  1546. .main_clk = "timer1_fck",
  1547. .prcm = {
  1548. .omap4 = {
  1549. .clkctrl_offs = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
  1550. .modulemode = MODULEMODE_SWCTRL,
  1551. },
  1552. },
  1553. };
  1554. static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = {
  1555. { .irq = 68 + OMAP_INTC_START, },
  1556. { .irq = -1 },
  1557. };
  1558. static struct omap_hwmod am33xx_timer2_hwmod = {
  1559. .name = "timer2",
  1560. .class = &am33xx_timer_hwmod_class,
  1561. .clkdm_name = "l4ls_clkdm",
  1562. .mpu_irqs = am33xx_timer2_irqs,
  1563. .main_clk = "timer2_fck",
  1564. .prcm = {
  1565. .omap4 = {
  1566. .clkctrl_offs = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET,
  1567. .modulemode = MODULEMODE_SWCTRL,
  1568. },
  1569. },
  1570. };
  1571. static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = {
  1572. { .irq = 69 + OMAP_INTC_START, },
  1573. { .irq = -1 },
  1574. };
  1575. static struct omap_hwmod am33xx_timer3_hwmod = {
  1576. .name = "timer3",
  1577. .class = &am33xx_timer_hwmod_class,
  1578. .clkdm_name = "l4ls_clkdm",
  1579. .mpu_irqs = am33xx_timer3_irqs,
  1580. .main_clk = "timer3_fck",
  1581. .prcm = {
  1582. .omap4 = {
  1583. .clkctrl_offs = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET,
  1584. .modulemode = MODULEMODE_SWCTRL,
  1585. },
  1586. },
  1587. };
  1588. static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = {
  1589. { .irq = 92 + OMAP_INTC_START, },
  1590. { .irq = -1 },
  1591. };
  1592. static struct omap_hwmod am33xx_timer4_hwmod = {
  1593. .name = "timer4",
  1594. .class = &am33xx_timer_hwmod_class,
  1595. .clkdm_name = "l4ls_clkdm",
  1596. .mpu_irqs = am33xx_timer4_irqs,
  1597. .main_clk = "timer4_fck",
  1598. .prcm = {
  1599. .omap4 = {
  1600. .clkctrl_offs = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET,
  1601. .modulemode = MODULEMODE_SWCTRL,
  1602. },
  1603. },
  1604. };
  1605. static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = {
  1606. { .irq = 93 + OMAP_INTC_START, },
  1607. { .irq = -1 },
  1608. };
  1609. static struct omap_hwmod am33xx_timer5_hwmod = {
  1610. .name = "timer5",
  1611. .class = &am33xx_timer_hwmod_class,
  1612. .clkdm_name = "l4ls_clkdm",
  1613. .mpu_irqs = am33xx_timer5_irqs,
  1614. .main_clk = "timer5_fck",
  1615. .prcm = {
  1616. .omap4 = {
  1617. .clkctrl_offs = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET,
  1618. .modulemode = MODULEMODE_SWCTRL,
  1619. },
  1620. },
  1621. };
  1622. static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = {
  1623. { .irq = 94 + OMAP_INTC_START, },
  1624. { .irq = -1 },
  1625. };
  1626. static struct omap_hwmod am33xx_timer6_hwmod = {
  1627. .name = "timer6",
  1628. .class = &am33xx_timer_hwmod_class,
  1629. .clkdm_name = "l4ls_clkdm",
  1630. .mpu_irqs = am33xx_timer6_irqs,
  1631. .main_clk = "timer6_fck",
  1632. .prcm = {
  1633. .omap4 = {
  1634. .clkctrl_offs = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET,
  1635. .modulemode = MODULEMODE_SWCTRL,
  1636. },
  1637. },
  1638. };
  1639. static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = {
  1640. { .irq = 95 + OMAP_INTC_START, },
  1641. { .irq = -1 },
  1642. };
  1643. static struct omap_hwmod am33xx_timer7_hwmod = {
  1644. .name = "timer7",
  1645. .class = &am33xx_timer_hwmod_class,
  1646. .clkdm_name = "l4ls_clkdm",
  1647. .mpu_irqs = am33xx_timer7_irqs,
  1648. .main_clk = "timer7_fck",
  1649. .prcm = {
  1650. .omap4 = {
  1651. .clkctrl_offs = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET,
  1652. .modulemode = MODULEMODE_SWCTRL,
  1653. },
  1654. },
  1655. };
  1656. /* tpcc */
  1657. static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
  1658. .name = "tpcc",
  1659. };
  1660. static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = {
  1661. { .name = "edma0", .irq = 12 + OMAP_INTC_START, },
  1662. { .name = "edma0_mperr", .irq = 13 + OMAP_INTC_START, },
  1663. { .name = "edma0_err", .irq = 14 + OMAP_INTC_START, },
  1664. { .irq = -1 },
  1665. };
  1666. static struct omap_hwmod am33xx_tpcc_hwmod = {
  1667. .name = "tpcc",
  1668. .class = &am33xx_tpcc_hwmod_class,
  1669. .clkdm_name = "l3_clkdm",
  1670. .mpu_irqs = am33xx_tpcc_irqs,
  1671. .main_clk = "l3_gclk",
  1672. .prcm = {
  1673. .omap4 = {
  1674. .clkctrl_offs = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET,
  1675. .modulemode = MODULEMODE_SWCTRL,
  1676. },
  1677. },
  1678. };
  1679. static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
  1680. .rev_offs = 0x0,
  1681. .sysc_offs = 0x10,
  1682. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1683. SYSC_HAS_MIDLEMODE),
  1684. .idlemodes = (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
  1685. .sysc_fields = &omap_hwmod_sysc_type2,
  1686. };
  1687. /* 'tptc' class */
  1688. static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
  1689. .name = "tptc",
  1690. .sysc = &am33xx_tptc_sysc,
  1691. };
  1692. /* tptc0 */
  1693. static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = {
  1694. { .irq = 112 + OMAP_INTC_START, },
  1695. { .irq = -1 },
  1696. };
  1697. static struct omap_hwmod am33xx_tptc0_hwmod = {
  1698. .name = "tptc0",
  1699. .class = &am33xx_tptc_hwmod_class,
  1700. .clkdm_name = "l3_clkdm",
  1701. .mpu_irqs = am33xx_tptc0_irqs,
  1702. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1703. .main_clk = "l3_gclk",
  1704. .prcm = {
  1705. .omap4 = {
  1706. .clkctrl_offs = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET,
  1707. .modulemode = MODULEMODE_SWCTRL,
  1708. },
  1709. },
  1710. };
  1711. /* tptc1 */
  1712. static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = {
  1713. { .irq = 113 + OMAP_INTC_START, },
  1714. { .irq = -1 },
  1715. };
  1716. static struct omap_hwmod am33xx_tptc1_hwmod = {
  1717. .name = "tptc1",
  1718. .class = &am33xx_tptc_hwmod_class,
  1719. .clkdm_name = "l3_clkdm",
  1720. .mpu_irqs = am33xx_tptc1_irqs,
  1721. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  1722. .main_clk = "l3_gclk",
  1723. .prcm = {
  1724. .omap4 = {
  1725. .clkctrl_offs = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET,
  1726. .modulemode = MODULEMODE_SWCTRL,
  1727. },
  1728. },
  1729. };
  1730. /* tptc2 */
  1731. static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = {
  1732. { .irq = 114 + OMAP_INTC_START, },
  1733. { .irq = -1 },
  1734. };
  1735. static struct omap_hwmod am33xx_tptc2_hwmod = {
  1736. .name = "tptc2",
  1737. .class = &am33xx_tptc_hwmod_class,
  1738. .clkdm_name = "l3_clkdm",
  1739. .mpu_irqs = am33xx_tptc2_irqs,
  1740. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  1741. .main_clk = "l3_gclk",
  1742. .prcm = {
  1743. .omap4 = {
  1744. .clkctrl_offs = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET,
  1745. .modulemode = MODULEMODE_SWCTRL,
  1746. },
  1747. },
  1748. };
  1749. /* 'uart' class */
  1750. static struct omap_hwmod_class_sysconfig uart_sysc = {
  1751. .rev_offs = 0x50,
  1752. .sysc_offs = 0x54,
  1753. .syss_offs = 0x58,
  1754. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1755. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1756. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1757. SIDLE_SMART_WKUP),
  1758. .sysc_fields = &omap_hwmod_sysc_type1,
  1759. };
  1760. static struct omap_hwmod_class uart_class = {
  1761. .name = "uart",
  1762. .sysc = &uart_sysc,
  1763. };
  1764. /* uart1 */
  1765. static struct omap_hwmod_dma_info uart1_edma_reqs[] = {
  1766. { .name = "tx", .dma_req = 26, },
  1767. { .name = "rx", .dma_req = 27, },
  1768. { .dma_req = -1 }
  1769. };
  1770. static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = {
  1771. { .irq = 72 + OMAP_INTC_START, },
  1772. { .irq = -1 },
  1773. };
  1774. static struct omap_hwmod am33xx_uart1_hwmod = {
  1775. .name = "uart1",
  1776. .class = &uart_class,
  1777. .clkdm_name = "l4_wkup_clkdm",
  1778. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1779. .mpu_irqs = am33xx_uart1_irqs,
  1780. .sdma_reqs = uart1_edma_reqs,
  1781. .main_clk = "dpll_per_m2_div4_wkupdm_ck",
  1782. .prcm = {
  1783. .omap4 = {
  1784. .clkctrl_offs = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET,
  1785. .modulemode = MODULEMODE_SWCTRL,
  1786. },
  1787. },
  1788. };
  1789. /* uart2 */
  1790. static struct omap_hwmod_dma_info uart2_edma_reqs[] = {
  1791. { .name = "tx", .dma_req = 28, },
  1792. { .name = "rx", .dma_req = 29, },
  1793. { .dma_req = -1 }
  1794. };
  1795. static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
  1796. { .irq = 73 + OMAP_INTC_START, },
  1797. { .irq = -1 },
  1798. };
  1799. static struct omap_hwmod am33xx_uart2_hwmod = {
  1800. .name = "uart2",
  1801. .class = &uart_class,
  1802. .clkdm_name = "l4ls_clkdm",
  1803. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1804. .mpu_irqs = am33xx_uart2_irqs,
  1805. .sdma_reqs = uart2_edma_reqs,
  1806. .main_clk = "dpll_per_m2_div4_ck",
  1807. .prcm = {
  1808. .omap4 = {
  1809. .clkctrl_offs = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET,
  1810. .modulemode = MODULEMODE_SWCTRL,
  1811. },
  1812. },
  1813. };
  1814. /* uart3 */
  1815. static struct omap_hwmod_dma_info uart3_edma_reqs[] = {
  1816. { .name = "tx", .dma_req = 30, },
  1817. { .name = "rx", .dma_req = 31, },
  1818. { .dma_req = -1 }
  1819. };
  1820. static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = {
  1821. { .irq = 74 + OMAP_INTC_START, },
  1822. { .irq = -1 },
  1823. };
  1824. static struct omap_hwmod am33xx_uart3_hwmod = {
  1825. .name = "uart3",
  1826. .class = &uart_class,
  1827. .clkdm_name = "l4ls_clkdm",
  1828. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1829. .mpu_irqs = am33xx_uart3_irqs,
  1830. .sdma_reqs = uart3_edma_reqs,
  1831. .main_clk = "dpll_per_m2_div4_ck",
  1832. .prcm = {
  1833. .omap4 = {
  1834. .clkctrl_offs = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET,
  1835. .modulemode = MODULEMODE_SWCTRL,
  1836. },
  1837. },
  1838. };
  1839. static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = {
  1840. { .irq = 44 + OMAP_INTC_START, },
  1841. { .irq = -1 },
  1842. };
  1843. static struct omap_hwmod am33xx_uart4_hwmod = {
  1844. .name = "uart4",
  1845. .class = &uart_class,
  1846. .clkdm_name = "l4ls_clkdm",
  1847. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1848. .mpu_irqs = am33xx_uart4_irqs,
  1849. .sdma_reqs = uart1_edma_reqs,
  1850. .main_clk = "dpll_per_m2_div4_ck",
  1851. .prcm = {
  1852. .omap4 = {
  1853. .clkctrl_offs = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET,
  1854. .modulemode = MODULEMODE_SWCTRL,
  1855. },
  1856. },
  1857. };
  1858. static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = {
  1859. { .irq = 45 + OMAP_INTC_START, },
  1860. { .irq = -1 },
  1861. };
  1862. static struct omap_hwmod am33xx_uart5_hwmod = {
  1863. .name = "uart5",
  1864. .class = &uart_class,
  1865. .clkdm_name = "l4ls_clkdm",
  1866. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1867. .mpu_irqs = am33xx_uart5_irqs,
  1868. .sdma_reqs = uart1_edma_reqs,
  1869. .main_clk = "dpll_per_m2_div4_ck",
  1870. .prcm = {
  1871. .omap4 = {
  1872. .clkctrl_offs = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET,
  1873. .modulemode = MODULEMODE_SWCTRL,
  1874. },
  1875. },
  1876. };
  1877. static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = {
  1878. { .irq = 46 + OMAP_INTC_START, },
  1879. { .irq = -1 },
  1880. };
  1881. static struct omap_hwmod am33xx_uart6_hwmod = {
  1882. .name = "uart6",
  1883. .class = &uart_class,
  1884. .clkdm_name = "l4ls_clkdm",
  1885. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1886. .mpu_irqs = am33xx_uart6_irqs,
  1887. .sdma_reqs = uart1_edma_reqs,
  1888. .main_clk = "dpll_per_m2_div4_ck",
  1889. .prcm = {
  1890. .omap4 = {
  1891. .clkctrl_offs = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET,
  1892. .modulemode = MODULEMODE_SWCTRL,
  1893. },
  1894. },
  1895. };
  1896. /* 'wd_timer' class */
  1897. static struct omap_hwmod_class_sysconfig wdt_sysc = {
  1898. .rev_offs = 0x0,
  1899. .sysc_offs = 0x10,
  1900. .syss_offs = 0x14,
  1901. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  1902. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1903. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1904. SIDLE_SMART_WKUP),
  1905. .sysc_fields = &omap_hwmod_sysc_type1,
  1906. };
  1907. static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
  1908. .name = "wd_timer",
  1909. .sysc = &wdt_sysc,
  1910. .pre_shutdown = &omap2_wd_timer_disable,
  1911. };
  1912. /*
  1913. * XXX: device.c file uses hardcoded name for watchdog timer
  1914. * driver "wd_timer2, so we are also using same name as of now...
  1915. */
  1916. static struct omap_hwmod am33xx_wd_timer1_hwmod = {
  1917. .name = "wd_timer2",
  1918. .class = &am33xx_wd_timer_hwmod_class,
  1919. .clkdm_name = "l4_wkup_clkdm",
  1920. .flags = HWMOD_SWSUP_SIDLE,
  1921. .main_clk = "wdt1_fck",
  1922. .prcm = {
  1923. .omap4 = {
  1924. .clkctrl_offs = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET,
  1925. .modulemode = MODULEMODE_SWCTRL,
  1926. },
  1927. },
  1928. };
  1929. /*
  1930. * 'usb_otg' class
  1931. * high-speed on-the-go universal serial bus (usb_otg) controller
  1932. */
  1933. static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
  1934. .rev_offs = 0x0,
  1935. .sysc_offs = 0x10,
  1936. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  1937. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1938. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1939. .sysc_fields = &omap_hwmod_sysc_type2,
  1940. };
  1941. static struct omap_hwmod_class am33xx_usbotg_class = {
  1942. .name = "usbotg",
  1943. .sysc = &am33xx_usbhsotg_sysc,
  1944. };
  1945. static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
  1946. { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
  1947. { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
  1948. { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
  1949. { .irq = -1, },
  1950. };
  1951. static struct omap_hwmod am33xx_usbss_hwmod = {
  1952. .name = "usb_otg_hs",
  1953. .class = &am33xx_usbotg_class,
  1954. .clkdm_name = "l3s_clkdm",
  1955. .mpu_irqs = am33xx_usbss_mpu_irqs,
  1956. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1957. .main_clk = "usbotg_fck",
  1958. .prcm = {
  1959. .omap4 = {
  1960. .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
  1961. .modulemode = MODULEMODE_SWCTRL,
  1962. },
  1963. },
  1964. };
  1965. /*
  1966. * Interfaces
  1967. */
  1968. /* l4 fw -> emif fw */
  1969. static struct omap_hwmod_ocp_if am33xx_l4_fw__emif_fw = {
  1970. .master = &am33xx_l4_fw_hwmod,
  1971. .slave = &am33xx_emif_fw_hwmod,
  1972. .clk = "l4fw_gclk",
  1973. .user = OCP_USER_MPU,
  1974. };
  1975. static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
  1976. {
  1977. .pa_start = 0x4c000000,
  1978. .pa_end = 0x4c000fff,
  1979. .flags = ADDR_TYPE_RT
  1980. },
  1981. { }
  1982. };
  1983. /* l3 main -> emif */
  1984. static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
  1985. .master = &am33xx_l3_main_hwmod,
  1986. .slave = &am33xx_emif_hwmod,
  1987. .clk = "dpll_core_m4_ck",
  1988. .addr = am33xx_emif_addrs,
  1989. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1990. };
  1991. /* mpu -> l3 main */
  1992. static struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
  1993. .master = &am33xx_mpu_hwmod,
  1994. .slave = &am33xx_l3_main_hwmod,
  1995. .clk = "dpll_mpu_m2_ck",
  1996. .user = OCP_USER_MPU,
  1997. };
  1998. /* l3 main -> l4 hs */
  1999. static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
  2000. .master = &am33xx_l3_main_hwmod,
  2001. .slave = &am33xx_l4_hs_hwmod,
  2002. .clk = "l3s_gclk",
  2003. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2004. };
  2005. /* l3 main -> l3 s */
  2006. static struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
  2007. .master = &am33xx_l3_main_hwmod,
  2008. .slave = &am33xx_l3_s_hwmod,
  2009. .clk = "l3s_gclk",
  2010. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2011. };
  2012. /* l3 s -> l4 per/ls */
  2013. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
  2014. .master = &am33xx_l3_s_hwmod,
  2015. .slave = &am33xx_l4_ls_hwmod,
  2016. .clk = "l3s_gclk",
  2017. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2018. };
  2019. /* l3 s -> l4 wkup */
  2020. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
  2021. .master = &am33xx_l3_s_hwmod,
  2022. .slave = &am33xx_l4_wkup_hwmod,
  2023. .clk = "l3s_gclk",
  2024. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2025. };
  2026. /* l3 s -> l4 fw */
  2027. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_fw = {
  2028. .master = &am33xx_l3_s_hwmod,
  2029. .slave = &am33xx_l4_fw_hwmod,
  2030. .clk = "l3s_gclk",
  2031. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2032. };
  2033. /* l3 main -> l3 instr */
  2034. static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
  2035. .master = &am33xx_l3_main_hwmod,
  2036. .slave = &am33xx_l3_instr_hwmod,
  2037. .clk = "l3s_gclk",
  2038. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2039. };
  2040. /* mpu -> prcm */
  2041. static struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
  2042. .master = &am33xx_mpu_hwmod,
  2043. .slave = &am33xx_prcm_hwmod,
  2044. .clk = "dpll_mpu_m2_ck",
  2045. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2046. };
  2047. /* l3 s -> l3 main*/
  2048. static struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
  2049. .master = &am33xx_l3_s_hwmod,
  2050. .slave = &am33xx_l3_main_hwmod,
  2051. .clk = "l3s_gclk",
  2052. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2053. };
  2054. /* pru-icss -> l3 main */
  2055. static struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
  2056. .master = &am33xx_pruss_hwmod,
  2057. .slave = &am33xx_l3_main_hwmod,
  2058. .clk = "l3_gclk",
  2059. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2060. };
  2061. /* wkup m3 -> l4 wkup */
  2062. static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
  2063. .master = &am33xx_wkup_m3_hwmod,
  2064. .slave = &am33xx_l4_wkup_hwmod,
  2065. .clk = "dpll_core_m4_div2_ck",
  2066. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2067. };
  2068. /* gfx -> l3 main */
  2069. static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
  2070. .master = &am33xx_gfx_hwmod,
  2071. .slave = &am33xx_l3_main_hwmod,
  2072. .clk = "dpll_core_m4_ck",
  2073. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2074. };
  2075. /* l4 wkup -> wkup m3 */
  2076. static struct omap_hwmod_addr_space am33xx_wkup_m3_addrs[] = {
  2077. {
  2078. .name = "umem",
  2079. .pa_start = 0x44d00000,
  2080. .pa_end = 0x44d00000 + SZ_16K - 1,
  2081. .flags = ADDR_TYPE_RT
  2082. },
  2083. {
  2084. .name = "dmem",
  2085. .pa_start = 0x44d80000,
  2086. .pa_end = 0x44d80000 + SZ_8K - 1,
  2087. .flags = ADDR_TYPE_RT
  2088. },
  2089. { }
  2090. };
  2091. static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
  2092. .master = &am33xx_l4_wkup_hwmod,
  2093. .slave = &am33xx_wkup_m3_hwmod,
  2094. .clk = "dpll_core_m4_div2_ck",
  2095. .addr = am33xx_wkup_m3_addrs,
  2096. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2097. };
  2098. /* l4 hs -> pru-icss */
  2099. static struct omap_hwmod_addr_space am33xx_pruss_addrs[] = {
  2100. {
  2101. .pa_start = 0x4a300000,
  2102. .pa_end = 0x4a300000 + SZ_512K - 1,
  2103. .flags = ADDR_TYPE_RT
  2104. },
  2105. { }
  2106. };
  2107. static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
  2108. .master = &am33xx_l4_hs_hwmod,
  2109. .slave = &am33xx_pruss_hwmod,
  2110. .clk = "dpll_core_m4_ck",
  2111. .addr = am33xx_pruss_addrs,
  2112. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2113. };
  2114. /* l3 main -> gfx */
  2115. static struct omap_hwmod_addr_space am33xx_gfx_addrs[] = {
  2116. {
  2117. .pa_start = 0x56000000,
  2118. .pa_end = 0x56000000 + SZ_16M - 1,
  2119. .flags = ADDR_TYPE_RT
  2120. },
  2121. { }
  2122. };
  2123. static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
  2124. .master = &am33xx_l3_main_hwmod,
  2125. .slave = &am33xx_gfx_hwmod,
  2126. .clk = "dpll_core_m4_ck",
  2127. .addr = am33xx_gfx_addrs,
  2128. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2129. };
  2130. /* l4 wkup -> smartreflex0 */
  2131. static struct omap_hwmod_addr_space am33xx_smartreflex0_addrs[] = {
  2132. {
  2133. .pa_start = 0x44e37000,
  2134. .pa_end = 0x44e37000 + SZ_4K - 1,
  2135. .flags = ADDR_TYPE_RT
  2136. },
  2137. { }
  2138. };
  2139. static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
  2140. .master = &am33xx_l4_wkup_hwmod,
  2141. .slave = &am33xx_smartreflex0_hwmod,
  2142. .clk = "dpll_core_m4_div2_ck",
  2143. .addr = am33xx_smartreflex0_addrs,
  2144. .user = OCP_USER_MPU,
  2145. };
  2146. /* l4 wkup -> smartreflex1 */
  2147. static struct omap_hwmod_addr_space am33xx_smartreflex1_addrs[] = {
  2148. {
  2149. .pa_start = 0x44e39000,
  2150. .pa_end = 0x44e39000 + SZ_4K - 1,
  2151. .flags = ADDR_TYPE_RT
  2152. },
  2153. { }
  2154. };
  2155. static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
  2156. .master = &am33xx_l4_wkup_hwmod,
  2157. .slave = &am33xx_smartreflex1_hwmod,
  2158. .clk = "dpll_core_m4_div2_ck",
  2159. .addr = am33xx_smartreflex1_addrs,
  2160. .user = OCP_USER_MPU,
  2161. };
  2162. /* l4 wkup -> control */
  2163. static struct omap_hwmod_addr_space am33xx_control_addrs[] = {
  2164. {
  2165. .pa_start = 0x44e10000,
  2166. .pa_end = 0x44e10000 + SZ_8K - 1,
  2167. .flags = ADDR_TYPE_RT
  2168. },
  2169. { }
  2170. };
  2171. static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
  2172. .master = &am33xx_l4_wkup_hwmod,
  2173. .slave = &am33xx_control_hwmod,
  2174. .clk = "dpll_core_m4_div2_ck",
  2175. .addr = am33xx_control_addrs,
  2176. .user = OCP_USER_MPU,
  2177. };
  2178. /* l4 wkup -> rtc */
  2179. static struct omap_hwmod_addr_space am33xx_rtc_addrs[] = {
  2180. {
  2181. .pa_start = 0x44e3e000,
  2182. .pa_end = 0x44e3e000 + SZ_4K - 1,
  2183. .flags = ADDR_TYPE_RT
  2184. },
  2185. { }
  2186. };
  2187. static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
  2188. .master = &am33xx_l4_wkup_hwmod,
  2189. .slave = &am33xx_rtc_hwmod,
  2190. .clk = "clkdiv32k_ick",
  2191. .addr = am33xx_rtc_addrs,
  2192. .user = OCP_USER_MPU,
  2193. };
  2194. /* l4 per/ls -> DCAN0 */
  2195. static struct omap_hwmod_addr_space am33xx_dcan0_addrs[] = {
  2196. {
  2197. .pa_start = 0x481CC000,
  2198. .pa_end = 0x481CC000 + SZ_4K - 1,
  2199. .flags = ADDR_TYPE_RT
  2200. },
  2201. { }
  2202. };
  2203. static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
  2204. .master = &am33xx_l4_ls_hwmod,
  2205. .slave = &am33xx_dcan0_hwmod,
  2206. .clk = "l4ls_gclk",
  2207. .addr = am33xx_dcan0_addrs,
  2208. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2209. };
  2210. /* l4 per/ls -> DCAN1 */
  2211. static struct omap_hwmod_addr_space am33xx_dcan1_addrs[] = {
  2212. {
  2213. .pa_start = 0x481D0000,
  2214. .pa_end = 0x481D0000 + SZ_4K - 1,
  2215. .flags = ADDR_TYPE_RT
  2216. },
  2217. { }
  2218. };
  2219. static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
  2220. .master = &am33xx_l4_ls_hwmod,
  2221. .slave = &am33xx_dcan1_hwmod,
  2222. .clk = "l4ls_gclk",
  2223. .addr = am33xx_dcan1_addrs,
  2224. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2225. };
  2226. /* l4 per/ls -> GPIO2 */
  2227. static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = {
  2228. {
  2229. .pa_start = 0x4804C000,
  2230. .pa_end = 0x4804C000 + SZ_4K - 1,
  2231. .flags = ADDR_TYPE_RT,
  2232. },
  2233. { }
  2234. };
  2235. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
  2236. .master = &am33xx_l4_ls_hwmod,
  2237. .slave = &am33xx_gpio1_hwmod,
  2238. .clk = "l4ls_gclk",
  2239. .addr = am33xx_gpio1_addrs,
  2240. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2241. };
  2242. /* l4 per/ls -> gpio3 */
  2243. static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = {
  2244. {
  2245. .pa_start = 0x481AC000,
  2246. .pa_end = 0x481AC000 + SZ_4K - 1,
  2247. .flags = ADDR_TYPE_RT,
  2248. },
  2249. { }
  2250. };
  2251. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
  2252. .master = &am33xx_l4_ls_hwmod,
  2253. .slave = &am33xx_gpio2_hwmod,
  2254. .clk = "l4ls_gclk",
  2255. .addr = am33xx_gpio2_addrs,
  2256. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2257. };
  2258. /* l4 per/ls -> gpio4 */
  2259. static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = {
  2260. {
  2261. .pa_start = 0x481AE000,
  2262. .pa_end = 0x481AE000 + SZ_4K - 1,
  2263. .flags = ADDR_TYPE_RT,
  2264. },
  2265. { }
  2266. };
  2267. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
  2268. .master = &am33xx_l4_ls_hwmod,
  2269. .slave = &am33xx_gpio3_hwmod,
  2270. .clk = "l4ls_gclk",
  2271. .addr = am33xx_gpio3_addrs,
  2272. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2273. };
  2274. /* L4 WKUP -> I2C1 */
  2275. static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = {
  2276. {
  2277. .pa_start = 0x44E0B000,
  2278. .pa_end = 0x44E0B000 + SZ_4K - 1,
  2279. .flags = ADDR_TYPE_RT,
  2280. },
  2281. { }
  2282. };
  2283. static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
  2284. .master = &am33xx_l4_wkup_hwmod,
  2285. .slave = &am33xx_i2c1_hwmod,
  2286. .clk = "dpll_core_m4_div2_ck",
  2287. .addr = am33xx_i2c1_addr_space,
  2288. .user = OCP_USER_MPU,
  2289. };
  2290. /* L4 WKUP -> GPIO1 */
  2291. static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = {
  2292. {
  2293. .pa_start = 0x44E07000,
  2294. .pa_end = 0x44E07000 + SZ_4K - 1,
  2295. .flags = ADDR_TYPE_RT,
  2296. },
  2297. { }
  2298. };
  2299. static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
  2300. .master = &am33xx_l4_wkup_hwmod,
  2301. .slave = &am33xx_gpio0_hwmod,
  2302. .clk = "dpll_core_m4_div2_ck",
  2303. .addr = am33xx_gpio0_addrs,
  2304. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2305. };
  2306. /* L4 WKUP -> ADC_TSC */
  2307. static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
  2308. {
  2309. .pa_start = 0x44E0D000,
  2310. .pa_end = 0x44E0D000 + SZ_8K - 1,
  2311. .flags = ADDR_TYPE_RT
  2312. },
  2313. { }
  2314. };
  2315. static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
  2316. .master = &am33xx_l4_wkup_hwmod,
  2317. .slave = &am33xx_adc_tsc_hwmod,
  2318. .clk = "dpll_core_m4_div2_ck",
  2319. .addr = am33xx_adc_tsc_addrs,
  2320. .user = OCP_USER_MPU,
  2321. };
  2322. static struct omap_hwmod_addr_space am33xx_cpgmac0_addr_space[] = {
  2323. /* cpsw ss */
  2324. {
  2325. .pa_start = 0x4a100000,
  2326. .pa_end = 0x4a100000 + SZ_2K - 1,
  2327. },
  2328. /* cpsw wr */
  2329. {
  2330. .pa_start = 0x4a101200,
  2331. .pa_end = 0x4a101200 + SZ_256 - 1,
  2332. .flags = ADDR_TYPE_RT,
  2333. },
  2334. { }
  2335. };
  2336. static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
  2337. .master = &am33xx_l4_hs_hwmod,
  2338. .slave = &am33xx_cpgmac0_hwmod,
  2339. .clk = "cpsw_125mhz_gclk",
  2340. .addr = am33xx_cpgmac0_addr_space,
  2341. .user = OCP_USER_MPU,
  2342. };
  2343. static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
  2344. {
  2345. .pa_start = 0x4A101000,
  2346. .pa_end = 0x4A101000 + SZ_256 - 1,
  2347. },
  2348. { }
  2349. };
  2350. static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
  2351. .master = &am33xx_cpgmac0_hwmod,
  2352. .slave = &am33xx_mdio_hwmod,
  2353. .addr = am33xx_mdio_addr_space,
  2354. .user = OCP_USER_MPU,
  2355. };
  2356. static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
  2357. {
  2358. .pa_start = 0x48080000,
  2359. .pa_end = 0x48080000 + SZ_8K - 1,
  2360. .flags = ADDR_TYPE_RT
  2361. },
  2362. { }
  2363. };
  2364. static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
  2365. .master = &am33xx_l4_ls_hwmod,
  2366. .slave = &am33xx_elm_hwmod,
  2367. .clk = "l4ls_gclk",
  2368. .addr = am33xx_elm_addr_space,
  2369. .user = OCP_USER_MPU,
  2370. };
  2371. static struct omap_hwmod_addr_space am33xx_epwmss0_addr_space[] = {
  2372. {
  2373. .pa_start = 0x48300000,
  2374. .pa_end = 0x48300000 + SZ_16 - 1,
  2375. .flags = ADDR_TYPE_RT
  2376. },
  2377. { }
  2378. };
  2379. static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
  2380. .master = &am33xx_l4_ls_hwmod,
  2381. .slave = &am33xx_epwmss0_hwmod,
  2382. .clk = "l4ls_gclk",
  2383. .addr = am33xx_epwmss0_addr_space,
  2384. .user = OCP_USER_MPU,
  2385. };
  2386. static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
  2387. {
  2388. .pa_start = 0x48300100,
  2389. .pa_end = 0x48300100 + SZ_128 - 1,
  2390. },
  2391. { }
  2392. };
  2393. static struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
  2394. .master = &am33xx_epwmss0_hwmod,
  2395. .slave = &am33xx_ecap0_hwmod,
  2396. .clk = "l4ls_gclk",
  2397. .addr = am33xx_ecap0_addr_space,
  2398. .user = OCP_USER_MPU,
  2399. };
  2400. static struct omap_hwmod_addr_space am33xx_eqep0_addr_space[] = {
  2401. {
  2402. .pa_start = 0x48300180,
  2403. .pa_end = 0x48300180 + SZ_128 - 1,
  2404. },
  2405. { }
  2406. };
  2407. static struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
  2408. .master = &am33xx_epwmss0_hwmod,
  2409. .slave = &am33xx_eqep0_hwmod,
  2410. .clk = "l4ls_gclk",
  2411. .addr = am33xx_eqep0_addr_space,
  2412. .user = OCP_USER_MPU,
  2413. };
  2414. static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
  2415. {
  2416. .pa_start = 0x48300200,
  2417. .pa_end = 0x48300200 + SZ_128 - 1,
  2418. },
  2419. { }
  2420. };
  2421. static struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
  2422. .master = &am33xx_epwmss0_hwmod,
  2423. .slave = &am33xx_ehrpwm0_hwmod,
  2424. .clk = "l4ls_gclk",
  2425. .addr = am33xx_ehrpwm0_addr_space,
  2426. .user = OCP_USER_MPU,
  2427. };
  2428. static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = {
  2429. {
  2430. .pa_start = 0x48302000,
  2431. .pa_end = 0x48302000 + SZ_16 - 1,
  2432. .flags = ADDR_TYPE_RT
  2433. },
  2434. { }
  2435. };
  2436. static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
  2437. .master = &am33xx_l4_ls_hwmod,
  2438. .slave = &am33xx_epwmss1_hwmod,
  2439. .clk = "l4ls_gclk",
  2440. .addr = am33xx_epwmss1_addr_space,
  2441. .user = OCP_USER_MPU,
  2442. };
  2443. static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
  2444. {
  2445. .pa_start = 0x48302100,
  2446. .pa_end = 0x48302100 + SZ_128 - 1,
  2447. },
  2448. { }
  2449. };
  2450. static struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
  2451. .master = &am33xx_epwmss1_hwmod,
  2452. .slave = &am33xx_ecap1_hwmod,
  2453. .clk = "l4ls_gclk",
  2454. .addr = am33xx_ecap1_addr_space,
  2455. .user = OCP_USER_MPU,
  2456. };
  2457. static struct omap_hwmod_addr_space am33xx_eqep1_addr_space[] = {
  2458. {
  2459. .pa_start = 0x48302180,
  2460. .pa_end = 0x48302180 + SZ_128 - 1,
  2461. },
  2462. { }
  2463. };
  2464. static struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
  2465. .master = &am33xx_epwmss1_hwmod,
  2466. .slave = &am33xx_eqep1_hwmod,
  2467. .clk = "l4ls_gclk",
  2468. .addr = am33xx_eqep1_addr_space,
  2469. .user = OCP_USER_MPU,
  2470. };
  2471. static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
  2472. {
  2473. .pa_start = 0x48302200,
  2474. .pa_end = 0x48302200 + SZ_128 - 1,
  2475. },
  2476. { }
  2477. };
  2478. static struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
  2479. .master = &am33xx_epwmss1_hwmod,
  2480. .slave = &am33xx_ehrpwm1_hwmod,
  2481. .clk = "l4ls_gclk",
  2482. .addr = am33xx_ehrpwm1_addr_space,
  2483. .user = OCP_USER_MPU,
  2484. };
  2485. static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = {
  2486. {
  2487. .pa_start = 0x48304000,
  2488. .pa_end = 0x48304000 + SZ_16 - 1,
  2489. .flags = ADDR_TYPE_RT
  2490. },
  2491. { }
  2492. };
  2493. static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
  2494. .master = &am33xx_l4_ls_hwmod,
  2495. .slave = &am33xx_epwmss2_hwmod,
  2496. .clk = "l4ls_gclk",
  2497. .addr = am33xx_epwmss2_addr_space,
  2498. .user = OCP_USER_MPU,
  2499. };
  2500. static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
  2501. {
  2502. .pa_start = 0x48304100,
  2503. .pa_end = 0x48304100 + SZ_128 - 1,
  2504. },
  2505. { }
  2506. };
  2507. static struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
  2508. .master = &am33xx_epwmss2_hwmod,
  2509. .slave = &am33xx_ecap2_hwmod,
  2510. .clk = "l4ls_gclk",
  2511. .addr = am33xx_ecap2_addr_space,
  2512. .user = OCP_USER_MPU,
  2513. };
  2514. static struct omap_hwmod_addr_space am33xx_eqep2_addr_space[] = {
  2515. {
  2516. .pa_start = 0x48304180,
  2517. .pa_end = 0x48304180 + SZ_128 - 1,
  2518. },
  2519. { }
  2520. };
  2521. static struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
  2522. .master = &am33xx_epwmss2_hwmod,
  2523. .slave = &am33xx_eqep2_hwmod,
  2524. .clk = "l4ls_gclk",
  2525. .addr = am33xx_eqep2_addr_space,
  2526. .user = OCP_USER_MPU,
  2527. };
  2528. static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
  2529. {
  2530. .pa_start = 0x48304200,
  2531. .pa_end = 0x48304200 + SZ_128 - 1,
  2532. },
  2533. { }
  2534. };
  2535. static struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
  2536. .master = &am33xx_epwmss2_hwmod,
  2537. .slave = &am33xx_ehrpwm2_hwmod,
  2538. .clk = "l4ls_gclk",
  2539. .addr = am33xx_ehrpwm2_addr_space,
  2540. .user = OCP_USER_MPU,
  2541. };
  2542. /* l3s cfg -> gpmc */
  2543. static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
  2544. {
  2545. .pa_start = 0x50000000,
  2546. .pa_end = 0x50000000 + SZ_8K - 1,
  2547. .flags = ADDR_TYPE_RT,
  2548. },
  2549. { }
  2550. };
  2551. static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
  2552. .master = &am33xx_l3_s_hwmod,
  2553. .slave = &am33xx_gpmc_hwmod,
  2554. .clk = "l3s_gclk",
  2555. .addr = am33xx_gpmc_addr_space,
  2556. .user = OCP_USER_MPU,
  2557. };
  2558. /* i2c2 */
  2559. static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = {
  2560. {
  2561. .pa_start = 0x4802A000,
  2562. .pa_end = 0x4802A000 + SZ_4K - 1,
  2563. .flags = ADDR_TYPE_RT,
  2564. },
  2565. { }
  2566. };
  2567. static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
  2568. .master = &am33xx_l4_ls_hwmod,
  2569. .slave = &am33xx_i2c2_hwmod,
  2570. .clk = "l4ls_gclk",
  2571. .addr = am33xx_i2c2_addr_space,
  2572. .user = OCP_USER_MPU,
  2573. };
  2574. static struct omap_hwmod_addr_space am33xx_i2c3_addr_space[] = {
  2575. {
  2576. .pa_start = 0x4819C000,
  2577. .pa_end = 0x4819C000 + SZ_4K - 1,
  2578. .flags = ADDR_TYPE_RT
  2579. },
  2580. { }
  2581. };
  2582. static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
  2583. .master = &am33xx_l4_ls_hwmod,
  2584. .slave = &am33xx_i2c3_hwmod,
  2585. .clk = "l4ls_gclk",
  2586. .addr = am33xx_i2c3_addr_space,
  2587. .user = OCP_USER_MPU,
  2588. };
  2589. static struct omap_hwmod_addr_space am33xx_lcdc_addr_space[] = {
  2590. {
  2591. .pa_start = 0x4830E000,
  2592. .pa_end = 0x4830E000 + SZ_8K - 1,
  2593. .flags = ADDR_TYPE_RT,
  2594. },
  2595. { }
  2596. };
  2597. static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
  2598. .master = &am33xx_l3_main_hwmod,
  2599. .slave = &am33xx_lcdc_hwmod,
  2600. .clk = "dpll_core_m4_ck",
  2601. .addr = am33xx_lcdc_addr_space,
  2602. .user = OCP_USER_MPU,
  2603. };
  2604. static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
  2605. {
  2606. .pa_start = 0x480C8000,
  2607. .pa_end = 0x480C8000 + (SZ_4K - 1),
  2608. .flags = ADDR_TYPE_RT
  2609. },
  2610. { }
  2611. };
  2612. /* l4 ls -> mailbox */
  2613. static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
  2614. .master = &am33xx_l4_ls_hwmod,
  2615. .slave = &am33xx_mailbox_hwmod,
  2616. .clk = "l4ls_gclk",
  2617. .addr = am33xx_mailbox_addrs,
  2618. .user = OCP_USER_MPU,
  2619. };
  2620. /* l4 ls -> spinlock */
  2621. static struct omap_hwmod_addr_space am33xx_spinlock_addrs[] = {
  2622. {
  2623. .pa_start = 0x480Ca000,
  2624. .pa_end = 0x480Ca000 + SZ_4K - 1,
  2625. .flags = ADDR_TYPE_RT
  2626. },
  2627. { }
  2628. };
  2629. static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
  2630. .master = &am33xx_l4_ls_hwmod,
  2631. .slave = &am33xx_spinlock_hwmod,
  2632. .clk = "l4ls_gclk",
  2633. .addr = am33xx_spinlock_addrs,
  2634. .user = OCP_USER_MPU,
  2635. };
  2636. /* l4 ls -> mcasp0 */
  2637. static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
  2638. {
  2639. .pa_start = 0x48038000,
  2640. .pa_end = 0x48038000 + SZ_8K - 1,
  2641. .flags = ADDR_TYPE_RT
  2642. },
  2643. { }
  2644. };
  2645. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
  2646. .master = &am33xx_l4_ls_hwmod,
  2647. .slave = &am33xx_mcasp0_hwmod,
  2648. .clk = "l4ls_gclk",
  2649. .addr = am33xx_mcasp0_addr_space,
  2650. .user = OCP_USER_MPU,
  2651. };
  2652. /* l3 s -> mcasp0 data */
  2653. static struct omap_hwmod_addr_space am33xx_mcasp0_data_addr_space[] = {
  2654. {
  2655. .pa_start = 0x46000000,
  2656. .pa_end = 0x46000000 + SZ_4M - 1,
  2657. .flags = ADDR_TYPE_RT
  2658. },
  2659. { }
  2660. };
  2661. static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp0_data = {
  2662. .master = &am33xx_l3_s_hwmod,
  2663. .slave = &am33xx_mcasp0_hwmod,
  2664. .clk = "l3s_gclk",
  2665. .addr = am33xx_mcasp0_data_addr_space,
  2666. .user = OCP_USER_SDMA,
  2667. };
  2668. /* l4 ls -> mcasp1 */
  2669. static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
  2670. {
  2671. .pa_start = 0x4803C000,
  2672. .pa_end = 0x4803C000 + SZ_8K - 1,
  2673. .flags = ADDR_TYPE_RT
  2674. },
  2675. { }
  2676. };
  2677. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
  2678. .master = &am33xx_l4_ls_hwmod,
  2679. .slave = &am33xx_mcasp1_hwmod,
  2680. .clk = "l4ls_gclk",
  2681. .addr = am33xx_mcasp1_addr_space,
  2682. .user = OCP_USER_MPU,
  2683. };
  2684. /* l3 s -> mcasp1 data */
  2685. static struct omap_hwmod_addr_space am33xx_mcasp1_data_addr_space[] = {
  2686. {
  2687. .pa_start = 0x46400000,
  2688. .pa_end = 0x46400000 + SZ_4M - 1,
  2689. .flags = ADDR_TYPE_RT
  2690. },
  2691. { }
  2692. };
  2693. static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp1_data = {
  2694. .master = &am33xx_l3_s_hwmod,
  2695. .slave = &am33xx_mcasp1_hwmod,
  2696. .clk = "l3s_gclk",
  2697. .addr = am33xx_mcasp1_data_addr_space,
  2698. .user = OCP_USER_SDMA,
  2699. };
  2700. /* l4 ls -> mmc0 */
  2701. static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
  2702. {
  2703. .pa_start = 0x48060100,
  2704. .pa_end = 0x48060100 + SZ_4K - 1,
  2705. .flags = ADDR_TYPE_RT,
  2706. },
  2707. { }
  2708. };
  2709. static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
  2710. .master = &am33xx_l4_ls_hwmod,
  2711. .slave = &am33xx_mmc0_hwmod,
  2712. .clk = "l4ls_gclk",
  2713. .addr = am33xx_mmc0_addr_space,
  2714. .user = OCP_USER_MPU,
  2715. };
  2716. /* l4 ls -> mmc1 */
  2717. static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
  2718. {
  2719. .pa_start = 0x481d8100,
  2720. .pa_end = 0x481d8100 + SZ_4K - 1,
  2721. .flags = ADDR_TYPE_RT,
  2722. },
  2723. { }
  2724. };
  2725. static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
  2726. .master = &am33xx_l4_ls_hwmod,
  2727. .slave = &am33xx_mmc1_hwmod,
  2728. .clk = "l4ls_gclk",
  2729. .addr = am33xx_mmc1_addr_space,
  2730. .user = OCP_USER_MPU,
  2731. };
  2732. /* l3 s -> mmc2 */
  2733. static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
  2734. {
  2735. .pa_start = 0x47810100,
  2736. .pa_end = 0x47810100 + SZ_64K - 1,
  2737. .flags = ADDR_TYPE_RT,
  2738. },
  2739. { }
  2740. };
  2741. static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
  2742. .master = &am33xx_l3_s_hwmod,
  2743. .slave = &am33xx_mmc2_hwmod,
  2744. .clk = "l3s_gclk",
  2745. .addr = am33xx_mmc2_addr_space,
  2746. .user = OCP_USER_MPU,
  2747. };
  2748. /* l4 ls -> mcspi0 */
  2749. static struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = {
  2750. {
  2751. .pa_start = 0x48030000,
  2752. .pa_end = 0x48030000 + SZ_1K - 1,
  2753. .flags = ADDR_TYPE_RT,
  2754. },
  2755. { }
  2756. };
  2757. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
  2758. .master = &am33xx_l4_ls_hwmod,
  2759. .slave = &am33xx_spi0_hwmod,
  2760. .clk = "l4ls_gclk",
  2761. .addr = am33xx_mcspi0_addr_space,
  2762. .user = OCP_USER_MPU,
  2763. };
  2764. /* l4 ls -> mcspi1 */
  2765. static struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = {
  2766. {
  2767. .pa_start = 0x481A0000,
  2768. .pa_end = 0x481A0000 + SZ_1K - 1,
  2769. .flags = ADDR_TYPE_RT,
  2770. },
  2771. { }
  2772. };
  2773. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
  2774. .master = &am33xx_l4_ls_hwmod,
  2775. .slave = &am33xx_spi1_hwmod,
  2776. .clk = "l4ls_gclk",
  2777. .addr = am33xx_mcspi1_addr_space,
  2778. .user = OCP_USER_MPU,
  2779. };
  2780. /* l4 wkup -> timer1 */
  2781. static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = {
  2782. {
  2783. .pa_start = 0x44E31000,
  2784. .pa_end = 0x44E31000 + SZ_1K - 1,
  2785. .flags = ADDR_TYPE_RT
  2786. },
  2787. { }
  2788. };
  2789. static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
  2790. .master = &am33xx_l4_wkup_hwmod,
  2791. .slave = &am33xx_timer1_hwmod,
  2792. .clk = "dpll_core_m4_div2_ck",
  2793. .addr = am33xx_timer1_addr_space,
  2794. .user = OCP_USER_MPU,
  2795. };
  2796. /* l4 per -> timer2 */
  2797. static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = {
  2798. {
  2799. .pa_start = 0x48040000,
  2800. .pa_end = 0x48040000 + SZ_1K - 1,
  2801. .flags = ADDR_TYPE_RT
  2802. },
  2803. { }
  2804. };
  2805. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
  2806. .master = &am33xx_l4_ls_hwmod,
  2807. .slave = &am33xx_timer2_hwmod,
  2808. .clk = "l4ls_gclk",
  2809. .addr = am33xx_timer2_addr_space,
  2810. .user = OCP_USER_MPU,
  2811. };
  2812. /* l4 per -> timer3 */
  2813. static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = {
  2814. {
  2815. .pa_start = 0x48042000,
  2816. .pa_end = 0x48042000 + SZ_1K - 1,
  2817. .flags = ADDR_TYPE_RT
  2818. },
  2819. { }
  2820. };
  2821. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
  2822. .master = &am33xx_l4_ls_hwmod,
  2823. .slave = &am33xx_timer3_hwmod,
  2824. .clk = "l4ls_gclk",
  2825. .addr = am33xx_timer3_addr_space,
  2826. .user = OCP_USER_MPU,
  2827. };
  2828. /* l4 per -> timer4 */
  2829. static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = {
  2830. {
  2831. .pa_start = 0x48044000,
  2832. .pa_end = 0x48044000 + SZ_1K - 1,
  2833. .flags = ADDR_TYPE_RT
  2834. },
  2835. { }
  2836. };
  2837. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
  2838. .master = &am33xx_l4_ls_hwmod,
  2839. .slave = &am33xx_timer4_hwmod,
  2840. .clk = "l4ls_gclk",
  2841. .addr = am33xx_timer4_addr_space,
  2842. .user = OCP_USER_MPU,
  2843. };
  2844. /* l4 per -> timer5 */
  2845. static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = {
  2846. {
  2847. .pa_start = 0x48046000,
  2848. .pa_end = 0x48046000 + SZ_1K - 1,
  2849. .flags = ADDR_TYPE_RT
  2850. },
  2851. { }
  2852. };
  2853. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
  2854. .master = &am33xx_l4_ls_hwmod,
  2855. .slave = &am33xx_timer5_hwmod,
  2856. .clk = "l4ls_gclk",
  2857. .addr = am33xx_timer5_addr_space,
  2858. .user = OCP_USER_MPU,
  2859. };
  2860. /* l4 per -> timer6 */
  2861. static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = {
  2862. {
  2863. .pa_start = 0x48048000,
  2864. .pa_end = 0x48048000 + SZ_1K - 1,
  2865. .flags = ADDR_TYPE_RT
  2866. },
  2867. { }
  2868. };
  2869. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
  2870. .master = &am33xx_l4_ls_hwmod,
  2871. .slave = &am33xx_timer6_hwmod,
  2872. .clk = "l4ls_gclk",
  2873. .addr = am33xx_timer6_addr_space,
  2874. .user = OCP_USER_MPU,
  2875. };
  2876. /* l4 per -> timer7 */
  2877. static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = {
  2878. {
  2879. .pa_start = 0x4804A000,
  2880. .pa_end = 0x4804A000 + SZ_1K - 1,
  2881. .flags = ADDR_TYPE_RT
  2882. },
  2883. { }
  2884. };
  2885. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
  2886. .master = &am33xx_l4_ls_hwmod,
  2887. .slave = &am33xx_timer7_hwmod,
  2888. .clk = "l4ls_gclk",
  2889. .addr = am33xx_timer7_addr_space,
  2890. .user = OCP_USER_MPU,
  2891. };
  2892. /* l3 main -> tpcc */
  2893. static struct omap_hwmod_addr_space am33xx_tpcc_addr_space[] = {
  2894. {
  2895. .pa_start = 0x49000000,
  2896. .pa_end = 0x49000000 + SZ_32K - 1,
  2897. .flags = ADDR_TYPE_RT
  2898. },
  2899. { }
  2900. };
  2901. static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
  2902. .master = &am33xx_l3_main_hwmod,
  2903. .slave = &am33xx_tpcc_hwmod,
  2904. .clk = "l3_gclk",
  2905. .addr = am33xx_tpcc_addr_space,
  2906. .user = OCP_USER_MPU,
  2907. };
  2908. /* l3 main -> tpcc0 */
  2909. static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
  2910. {
  2911. .pa_start = 0x49800000,
  2912. .pa_end = 0x49800000 + SZ_8K - 1,
  2913. .flags = ADDR_TYPE_RT,
  2914. },
  2915. { }
  2916. };
  2917. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
  2918. .master = &am33xx_l3_main_hwmod,
  2919. .slave = &am33xx_tptc0_hwmod,
  2920. .clk = "l3_gclk",
  2921. .addr = am33xx_tptc0_addr_space,
  2922. .user = OCP_USER_MPU,
  2923. };
  2924. /* l3 main -> tpcc1 */
  2925. static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
  2926. {
  2927. .pa_start = 0x49900000,
  2928. .pa_end = 0x49900000 + SZ_8K - 1,
  2929. .flags = ADDR_TYPE_RT,
  2930. },
  2931. { }
  2932. };
  2933. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
  2934. .master = &am33xx_l3_main_hwmod,
  2935. .slave = &am33xx_tptc1_hwmod,
  2936. .clk = "l3_gclk",
  2937. .addr = am33xx_tptc1_addr_space,
  2938. .user = OCP_USER_MPU,
  2939. };
  2940. /* l3 main -> tpcc2 */
  2941. static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
  2942. {
  2943. .pa_start = 0x49a00000,
  2944. .pa_end = 0x49a00000 + SZ_8K - 1,
  2945. .flags = ADDR_TYPE_RT,
  2946. },
  2947. { }
  2948. };
  2949. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
  2950. .master = &am33xx_l3_main_hwmod,
  2951. .slave = &am33xx_tptc2_hwmod,
  2952. .clk = "l3_gclk",
  2953. .addr = am33xx_tptc2_addr_space,
  2954. .user = OCP_USER_MPU,
  2955. };
  2956. /* l4 wkup -> uart1 */
  2957. static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = {
  2958. {
  2959. .pa_start = 0x44E09000,
  2960. .pa_end = 0x44E09000 + SZ_8K - 1,
  2961. .flags = ADDR_TYPE_RT,
  2962. },
  2963. { }
  2964. };
  2965. static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
  2966. .master = &am33xx_l4_wkup_hwmod,
  2967. .slave = &am33xx_uart1_hwmod,
  2968. .clk = "dpll_core_m4_div2_ck",
  2969. .addr = am33xx_uart1_addr_space,
  2970. .user = OCP_USER_MPU,
  2971. };
  2972. /* l4 ls -> uart2 */
  2973. static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = {
  2974. {
  2975. .pa_start = 0x48022000,
  2976. .pa_end = 0x48022000 + SZ_8K - 1,
  2977. .flags = ADDR_TYPE_RT,
  2978. },
  2979. { }
  2980. };
  2981. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
  2982. .master = &am33xx_l4_ls_hwmod,
  2983. .slave = &am33xx_uart2_hwmod,
  2984. .clk = "l4ls_gclk",
  2985. .addr = am33xx_uart2_addr_space,
  2986. .user = OCP_USER_MPU,
  2987. };
  2988. /* l4 ls -> uart3 */
  2989. static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = {
  2990. {
  2991. .pa_start = 0x48024000,
  2992. .pa_end = 0x48024000 + SZ_8K - 1,
  2993. .flags = ADDR_TYPE_RT,
  2994. },
  2995. { }
  2996. };
  2997. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
  2998. .master = &am33xx_l4_ls_hwmod,
  2999. .slave = &am33xx_uart3_hwmod,
  3000. .clk = "l4ls_gclk",
  3001. .addr = am33xx_uart3_addr_space,
  3002. .user = OCP_USER_MPU,
  3003. };
  3004. /* l4 ls -> uart4 */
  3005. static struct omap_hwmod_addr_space am33xx_uart4_addr_space[] = {
  3006. {
  3007. .pa_start = 0x481A6000,
  3008. .pa_end = 0x481A6000 + SZ_8K - 1,
  3009. .flags = ADDR_TYPE_RT,
  3010. },
  3011. { }
  3012. };
  3013. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
  3014. .master = &am33xx_l4_ls_hwmod,
  3015. .slave = &am33xx_uart4_hwmod,
  3016. .clk = "l4ls_gclk",
  3017. .addr = am33xx_uart4_addr_space,
  3018. .user = OCP_USER_MPU,
  3019. };
  3020. /* l4 ls -> uart5 */
  3021. static struct omap_hwmod_addr_space am33xx_uart5_addr_space[] = {
  3022. {
  3023. .pa_start = 0x481A8000,
  3024. .pa_end = 0x481A8000 + SZ_8K - 1,
  3025. .flags = ADDR_TYPE_RT,
  3026. },
  3027. { }
  3028. };
  3029. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
  3030. .master = &am33xx_l4_ls_hwmod,
  3031. .slave = &am33xx_uart5_hwmod,
  3032. .clk = "l4ls_gclk",
  3033. .addr = am33xx_uart5_addr_space,
  3034. .user = OCP_USER_MPU,
  3035. };
  3036. /* l4 ls -> uart6 */
  3037. static struct omap_hwmod_addr_space am33xx_uart6_addr_space[] = {
  3038. {
  3039. .pa_start = 0x481aa000,
  3040. .pa_end = 0x481aa000 + SZ_8K - 1,
  3041. .flags = ADDR_TYPE_RT,
  3042. },
  3043. { }
  3044. };
  3045. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
  3046. .master = &am33xx_l4_ls_hwmod,
  3047. .slave = &am33xx_uart6_hwmod,
  3048. .clk = "l4ls_gclk",
  3049. .addr = am33xx_uart6_addr_space,
  3050. .user = OCP_USER_MPU,
  3051. };
  3052. /* l4 wkup -> wd_timer1 */
  3053. static struct omap_hwmod_addr_space am33xx_wd_timer1_addrs[] = {
  3054. {
  3055. .pa_start = 0x44e35000,
  3056. .pa_end = 0x44e35000 + SZ_4K - 1,
  3057. .flags = ADDR_TYPE_RT
  3058. },
  3059. { }
  3060. };
  3061. static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
  3062. .master = &am33xx_l4_wkup_hwmod,
  3063. .slave = &am33xx_wd_timer1_hwmod,
  3064. .clk = "dpll_core_m4_div2_ck",
  3065. .addr = am33xx_wd_timer1_addrs,
  3066. .user = OCP_USER_MPU,
  3067. };
  3068. /* usbss */
  3069. /* l3 s -> USBSS interface */
  3070. static struct omap_hwmod_addr_space am33xx_usbss_addr_space[] = {
  3071. {
  3072. .name = "usbss",
  3073. .pa_start = 0x47400000,
  3074. .pa_end = 0x47400000 + SZ_4K - 1,
  3075. .flags = ADDR_TYPE_RT
  3076. },
  3077. {
  3078. .name = "musb0",
  3079. .pa_start = 0x47401000,
  3080. .pa_end = 0x47401000 + SZ_2K - 1,
  3081. .flags = ADDR_TYPE_RT
  3082. },
  3083. {
  3084. .name = "musb1",
  3085. .pa_start = 0x47401800,
  3086. .pa_end = 0x47401800 + SZ_2K - 1,
  3087. .flags = ADDR_TYPE_RT
  3088. },
  3089. { }
  3090. };
  3091. static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
  3092. .master = &am33xx_l3_s_hwmod,
  3093. .slave = &am33xx_usbss_hwmod,
  3094. .clk = "l3s_gclk",
  3095. .addr = am33xx_usbss_addr_space,
  3096. .user = OCP_USER_MPU,
  3097. .flags = OCPIF_SWSUP_IDLE,
  3098. };
  3099. /* l3 main -> ocmc */
  3100. static struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
  3101. .master = &am33xx_l3_main_hwmod,
  3102. .slave = &am33xx_ocmcram_hwmod,
  3103. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3104. };
  3105. /* l3 main -> sha0 HIB2 */
  3106. static struct omap_hwmod_addr_space am33xx_sha0_addrs[] = {
  3107. {
  3108. .pa_start = 0x53100000,
  3109. .pa_end = 0x53100000 + SZ_512 - 1,
  3110. .flags = ADDR_TYPE_RT
  3111. },
  3112. { }
  3113. };
  3114. static struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
  3115. .master = &am33xx_l3_main_hwmod,
  3116. .slave = &am33xx_sha0_hwmod,
  3117. .clk = "sha0_fck",
  3118. .addr = am33xx_sha0_addrs,
  3119. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3120. };
  3121. /* l3 main -> AES0 HIB2 */
  3122. static struct omap_hwmod_addr_space am33xx_aes0_addrs[] = {
  3123. {
  3124. .pa_start = 0x53500000,
  3125. .pa_end = 0x53500000 + SZ_1M - 1,
  3126. .flags = ADDR_TYPE_RT
  3127. },
  3128. { }
  3129. };
  3130. static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
  3131. .master = &am33xx_l3_main_hwmod,
  3132. .slave = &am33xx_aes0_hwmod,
  3133. .clk = "aes0_fck",
  3134. .addr = am33xx_aes0_addrs,
  3135. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3136. };
  3137. static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
  3138. &am33xx_l4_fw__emif_fw,
  3139. &am33xx_l3_main__emif,
  3140. &am33xx_mpu__l3_main,
  3141. &am33xx_mpu__prcm,
  3142. &am33xx_l3_s__l4_ls,
  3143. &am33xx_l3_s__l4_wkup,
  3144. &am33xx_l3_s__l4_fw,
  3145. &am33xx_l3_main__l4_hs,
  3146. &am33xx_l3_main__l3_s,
  3147. &am33xx_l3_main__l3_instr,
  3148. &am33xx_l3_main__gfx,
  3149. &am33xx_l3_s__l3_main,
  3150. &am33xx_pruss__l3_main,
  3151. &am33xx_wkup_m3__l4_wkup,
  3152. &am33xx_gfx__l3_main,
  3153. &am33xx_l4_wkup__wkup_m3,
  3154. &am33xx_l4_wkup__control,
  3155. &am33xx_l4_wkup__smartreflex0,
  3156. &am33xx_l4_wkup__smartreflex1,
  3157. &am33xx_l4_wkup__uart1,
  3158. &am33xx_l4_wkup__timer1,
  3159. &am33xx_l4_wkup__rtc,
  3160. &am33xx_l4_wkup__i2c1,
  3161. &am33xx_l4_wkup__gpio0,
  3162. &am33xx_l4_wkup__adc_tsc,
  3163. &am33xx_l4_wkup__wd_timer1,
  3164. &am33xx_l4_hs__pruss,
  3165. &am33xx_l4_per__dcan0,
  3166. &am33xx_l4_per__dcan1,
  3167. &am33xx_l4_per__gpio1,
  3168. &am33xx_l4_per__gpio2,
  3169. &am33xx_l4_per__gpio3,
  3170. &am33xx_l4_per__i2c2,
  3171. &am33xx_l4_per__i2c3,
  3172. &am33xx_l4_per__mailbox,
  3173. &am33xx_l4_ls__mcasp0,
  3174. &am33xx_l3_s__mcasp0_data,
  3175. &am33xx_l4_ls__mcasp1,
  3176. &am33xx_l3_s__mcasp1_data,
  3177. &am33xx_l4_ls__mmc0,
  3178. &am33xx_l4_ls__mmc1,
  3179. &am33xx_l3_s__mmc2,
  3180. &am33xx_l4_ls__timer2,
  3181. &am33xx_l4_ls__timer3,
  3182. &am33xx_l4_ls__timer4,
  3183. &am33xx_l4_ls__timer5,
  3184. &am33xx_l4_ls__timer6,
  3185. &am33xx_l4_ls__timer7,
  3186. &am33xx_l3_main__tpcc,
  3187. &am33xx_l4_ls__uart2,
  3188. &am33xx_l4_ls__uart3,
  3189. &am33xx_l4_ls__uart4,
  3190. &am33xx_l4_ls__uart5,
  3191. &am33xx_l4_ls__uart6,
  3192. &am33xx_l4_ls__spinlock,
  3193. &am33xx_l4_ls__elm,
  3194. &am33xx_l4_ls__epwmss0,
  3195. &am33xx_epwmss0__ecap0,
  3196. &am33xx_epwmss0__eqep0,
  3197. &am33xx_epwmss0__ehrpwm0,
  3198. &am33xx_l4_ls__epwmss1,
  3199. &am33xx_epwmss1__ecap1,
  3200. &am33xx_epwmss1__eqep1,
  3201. &am33xx_epwmss1__ehrpwm1,
  3202. &am33xx_l4_ls__epwmss2,
  3203. &am33xx_epwmss2__ecap2,
  3204. &am33xx_epwmss2__eqep2,
  3205. &am33xx_epwmss2__ehrpwm2,
  3206. &am33xx_l3_s__gpmc,
  3207. &am33xx_l3_main__lcdc,
  3208. &am33xx_l4_ls__mcspi0,
  3209. &am33xx_l4_ls__mcspi1,
  3210. &am33xx_l3_main__tptc0,
  3211. &am33xx_l3_main__tptc1,
  3212. &am33xx_l3_main__tptc2,
  3213. &am33xx_l3_main__ocmc,
  3214. &am33xx_l3_s__usbss,
  3215. &am33xx_l4_hs__cpgmac0,
  3216. &am33xx_cpgmac0__mdio,
  3217. &am33xx_l3_main__sha0,
  3218. &am33xx_l3_main__aes0,
  3219. NULL,
  3220. };
  3221. int __init am33xx_hwmod_init(void)
  3222. {
  3223. omap_hwmod_init();
  3224. return omap_hwmod_register_links(am33xx_hwmod_ocp_ifs);
  3225. }