omap_hwmod_33xx_data.c 80 KB

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