omap_hwmod_33xx_data.c 84 KB

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