omap_hwmod_7xx_data.c 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454
  1. /*
  2. * Hardware modules present on the DRA7xx chips
  3. *
  4. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
  5. *
  6. * Paul Walmsley
  7. * Benoit Cousson
  8. *
  9. * This file is automatically generated from the OMAP hardware databases.
  10. * We respectfully ask that any modifications to this file be coordinated
  11. * with the public linux-omap@vger.kernel.org mailing list and the
  12. * authors above to ensure that the autogeneration scripts are kept
  13. * up-to-date with the file contents.
  14. *
  15. * This program is free software; you can redistribute it and/or modify
  16. * it under the terms of the GNU General Public License version 2 as
  17. * published by the Free Software Foundation.
  18. */
  19. #include <linux/io.h>
  20. #include <linux/platform_data/gpio-omap.h>
  21. #include <linux/platform_data/hsmmc-omap.h>
  22. #include <linux/power/smartreflex.h>
  23. #include <linux/i2c-omap.h>
  24. #include <linux/omap-dma.h>
  25. #include <linux/platform_data/spi-omap2-mcspi.h>
  26. #include <linux/platform_data/asoc-ti-mcbsp.h>
  27. #include <plat/dmtimer.h>
  28. #include "omap_hwmod.h"
  29. #include "omap_hwmod_common_data.h"
  30. #include "cm1_7xx.h"
  31. #include "cm2_7xx.h"
  32. #include "prm7xx.h"
  33. #include "i2c.h"
  34. #include "wd_timer.h"
  35. #include "soc.h"
  36. /* Base offset for all DRA7XX interrupts external to MPUSS */
  37. #define DRA7XX_IRQ_GIC_START 32
  38. /* Base offset for all DRA7XX dma requests */
  39. #define DRA7XX_DMA_REQ_START 1
  40. /*
  41. * IP blocks
  42. */
  43. /*
  44. * 'dmm' class
  45. * instance(s): dmm
  46. */
  47. static struct omap_hwmod_class dra7xx_dmm_hwmod_class = {
  48. .name = "dmm",
  49. };
  50. /* dmm */
  51. static struct omap_hwmod dra7xx_dmm_hwmod = {
  52. .name = "dmm",
  53. .class = &dra7xx_dmm_hwmod_class,
  54. .clkdm_name = "emif_clkdm",
  55. .prcm = {
  56. .omap4 = {
  57. .clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
  58. .context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET,
  59. },
  60. },
  61. };
  62. /*
  63. * 'l3' class
  64. * instance(s): l3_instr, l3_main_1, l3_main_2
  65. */
  66. static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
  67. .name = "l3",
  68. };
  69. /* l3_instr */
  70. static struct omap_hwmod dra7xx_l3_instr_hwmod = {
  71. .name = "l3_instr",
  72. .class = &dra7xx_l3_hwmod_class,
  73. .clkdm_name = "l3instr_clkdm",
  74. .prcm = {
  75. .omap4 = {
  76. .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
  77. .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
  78. .modulemode = MODULEMODE_HWCTRL,
  79. },
  80. },
  81. };
  82. /* l3_main_1 */
  83. static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
  84. .name = "l3_main_1",
  85. .class = &dra7xx_l3_hwmod_class,
  86. .clkdm_name = "l3main1_clkdm",
  87. .prcm = {
  88. .omap4 = {
  89. .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
  90. .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
  91. },
  92. },
  93. };
  94. /* l3_main_2 */
  95. static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
  96. .name = "l3_main_2",
  97. .class = &dra7xx_l3_hwmod_class,
  98. .clkdm_name = "l3instr_clkdm",
  99. .prcm = {
  100. .omap4 = {
  101. .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
  102. .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
  103. .modulemode = MODULEMODE_HWCTRL,
  104. },
  105. },
  106. };
  107. /*
  108. * 'l4' class
  109. * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
  110. */
  111. static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
  112. .name = "l4",
  113. };
  114. /* l4_cfg */
  115. static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
  116. .name = "l4_cfg",
  117. .class = &dra7xx_l4_hwmod_class,
  118. .clkdm_name = "l4cfg_clkdm",
  119. .prcm = {
  120. .omap4 = {
  121. .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
  122. .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
  123. },
  124. },
  125. };
  126. /* l4_per1 */
  127. static struct omap_hwmod dra7xx_l4_per1_hwmod = {
  128. .name = "l4_per1",
  129. .class = &dra7xx_l4_hwmod_class,
  130. .clkdm_name = "l4per_clkdm",
  131. .prcm = {
  132. .omap4 = {
  133. .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
  134. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  135. },
  136. },
  137. };
  138. /* l4_per2 */
  139. static struct omap_hwmod dra7xx_l4_per2_hwmod = {
  140. .name = "l4_per2",
  141. .class = &dra7xx_l4_hwmod_class,
  142. .clkdm_name = "l4per2_clkdm",
  143. .prcm = {
  144. .omap4 = {
  145. .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
  146. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  147. },
  148. },
  149. };
  150. /* l4_per3 */
  151. static struct omap_hwmod dra7xx_l4_per3_hwmod = {
  152. .name = "l4_per3",
  153. .class = &dra7xx_l4_hwmod_class,
  154. .clkdm_name = "l4per3_clkdm",
  155. .prcm = {
  156. .omap4 = {
  157. .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
  158. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  159. },
  160. },
  161. };
  162. /* l4_wkup */
  163. static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
  164. .name = "l4_wkup",
  165. .class = &dra7xx_l4_hwmod_class,
  166. .clkdm_name = "wkupaon_clkdm",
  167. .prcm = {
  168. .omap4 = {
  169. .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
  170. .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
  171. },
  172. },
  173. };
  174. /*
  175. * 'atl' class
  176. *
  177. */
  178. static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
  179. .name = "atl",
  180. };
  181. /* atl */
  182. static struct omap_hwmod dra7xx_atl_hwmod = {
  183. .name = "atl",
  184. .class = &dra7xx_atl_hwmod_class,
  185. .clkdm_name = "atl_clkdm",
  186. .main_clk = "atl_gfclk_mux",
  187. .prcm = {
  188. .omap4 = {
  189. .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
  190. .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
  191. .modulemode = MODULEMODE_SWCTRL,
  192. },
  193. },
  194. };
  195. /*
  196. * 'bb2d' class
  197. *
  198. */
  199. static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
  200. .name = "bb2d",
  201. };
  202. /* bb2d */
  203. static struct omap_hwmod dra7xx_bb2d_hwmod = {
  204. .name = "bb2d",
  205. .class = &dra7xx_bb2d_hwmod_class,
  206. .clkdm_name = "dss_clkdm",
  207. .main_clk = "dpll_core_h24x2_ck",
  208. .prcm = {
  209. .omap4 = {
  210. .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
  211. .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
  212. .modulemode = MODULEMODE_SWCTRL,
  213. },
  214. },
  215. };
  216. /*
  217. * 'counter' class
  218. *
  219. */
  220. static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
  221. .rev_offs = 0x0000,
  222. .sysc_offs = 0x0010,
  223. .sysc_flags = SYSC_HAS_SIDLEMODE,
  224. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  225. SIDLE_SMART_WKUP),
  226. .sysc_fields = &omap_hwmod_sysc_type1,
  227. };
  228. static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
  229. .name = "counter",
  230. .sysc = &dra7xx_counter_sysc,
  231. };
  232. /* counter_32k */
  233. static struct omap_hwmod dra7xx_counter_32k_hwmod = {
  234. .name = "counter_32k",
  235. .class = &dra7xx_counter_hwmod_class,
  236. .clkdm_name = "wkupaon_clkdm",
  237. .flags = HWMOD_SWSUP_SIDLE,
  238. .main_clk = "wkupaon_iclk_mux",
  239. .prcm = {
  240. .omap4 = {
  241. .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
  242. .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
  243. },
  244. },
  245. };
  246. /*
  247. * 'ctrl_module' class
  248. *
  249. */
  250. static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
  251. .name = "ctrl_module",
  252. };
  253. /* ctrl_module_wkup */
  254. static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
  255. .name = "ctrl_module_wkup",
  256. .class = &dra7xx_ctrl_module_hwmod_class,
  257. .clkdm_name = "wkupaon_clkdm",
  258. .prcm = {
  259. .omap4 = {
  260. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  261. },
  262. },
  263. };
  264. /*
  265. * 'gmac' class
  266. * cpsw/gmac sub system
  267. */
  268. static struct omap_hwmod_class_sysconfig dra7xx_gmac_sysc = {
  269. .rev_offs = 0x0,
  270. .sysc_offs = 0x8,
  271. .syss_offs = 0x4,
  272. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  273. SYSS_HAS_RESET_STATUS),
  274. .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  275. MSTANDBY_NO),
  276. .sysc_fields = &omap_hwmod_sysc_type3,
  277. };
  278. static struct omap_hwmod_class dra7xx_gmac_hwmod_class = {
  279. .name = "gmac",
  280. .sysc = &dra7xx_gmac_sysc,
  281. };
  282. static struct omap_hwmod dra7xx_gmac_hwmod = {
  283. .name = "gmac",
  284. .class = &dra7xx_gmac_hwmod_class,
  285. .clkdm_name = "gmac_clkdm",
  286. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  287. .main_clk = "dpll_gmac_ck",
  288. .mpu_rt_idx = 1,
  289. .prcm = {
  290. .omap4 = {
  291. .clkctrl_offs = DRA7XX_CM_GMAC_GMAC_CLKCTRL_OFFSET,
  292. .context_offs = DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET,
  293. .modulemode = MODULEMODE_SWCTRL,
  294. },
  295. },
  296. };
  297. /*
  298. * 'mdio' class
  299. */
  300. static struct omap_hwmod_class dra7xx_mdio_hwmod_class = {
  301. .name = "davinci_mdio",
  302. };
  303. static struct omap_hwmod dra7xx_mdio_hwmod = {
  304. .name = "davinci_mdio",
  305. .class = &dra7xx_mdio_hwmod_class,
  306. .clkdm_name = "gmac_clkdm",
  307. .main_clk = "dpll_gmac_ck",
  308. };
  309. /*
  310. * 'dcan' class
  311. *
  312. */
  313. static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
  314. .name = "dcan",
  315. };
  316. /* dcan1 */
  317. static struct omap_hwmod dra7xx_dcan1_hwmod = {
  318. .name = "dcan1",
  319. .class = &dra7xx_dcan_hwmod_class,
  320. .clkdm_name = "wkupaon_clkdm",
  321. .main_clk = "dcan1_sys_clk_mux",
  322. .prcm = {
  323. .omap4 = {
  324. .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
  325. .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
  326. .modulemode = MODULEMODE_SWCTRL,
  327. },
  328. },
  329. };
  330. /* dcan2 */
  331. static struct omap_hwmod dra7xx_dcan2_hwmod = {
  332. .name = "dcan2",
  333. .class = &dra7xx_dcan_hwmod_class,
  334. .clkdm_name = "l4per2_clkdm",
  335. .main_clk = "sys_clkin1",
  336. .prcm = {
  337. .omap4 = {
  338. .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
  339. .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
  340. .modulemode = MODULEMODE_SWCTRL,
  341. },
  342. },
  343. };
  344. /*
  345. * 'dma' class
  346. *
  347. */
  348. static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
  349. .rev_offs = 0x0000,
  350. .sysc_offs = 0x002c,
  351. .syss_offs = 0x0028,
  352. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  353. SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  354. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  355. SYSS_HAS_RESET_STATUS),
  356. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  357. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  358. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  359. .sysc_fields = &omap_hwmod_sysc_type1,
  360. };
  361. static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
  362. .name = "dma",
  363. .sysc = &dra7xx_dma_sysc,
  364. };
  365. /* dma dev_attr */
  366. static struct omap_dma_dev_attr dma_dev_attr = {
  367. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  368. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  369. .lch_count = 32,
  370. };
  371. /* dma_system */
  372. static struct omap_hwmod dra7xx_dma_system_hwmod = {
  373. .name = "dma_system",
  374. .class = &dra7xx_dma_hwmod_class,
  375. .clkdm_name = "dma_clkdm",
  376. .main_clk = "l3_iclk_div",
  377. .prcm = {
  378. .omap4 = {
  379. .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
  380. .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
  381. },
  382. },
  383. .dev_attr = &dma_dev_attr,
  384. };
  385. /*
  386. * 'dss' class
  387. *
  388. */
  389. static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
  390. .rev_offs = 0x0000,
  391. .syss_offs = 0x0014,
  392. .sysc_flags = SYSS_HAS_RESET_STATUS,
  393. };
  394. static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
  395. .name = "dss",
  396. .sysc = &dra7xx_dss_sysc,
  397. .reset = omap_dss_reset,
  398. };
  399. /* dss */
  400. static struct omap_hwmod_dma_info dra7xx_dss_sdma_reqs[] = {
  401. { .dma_req = 75 + DRA7XX_DMA_REQ_START },
  402. { .dma_req = -1 }
  403. };
  404. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  405. { .role = "dss_clk", .clk = "dss_dss_clk" },
  406. { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
  407. { .role = "32khz_clk", .clk = "dss_32khz_clk" },
  408. { .role = "video2_clk", .clk = "dss_video2_clk" },
  409. { .role = "video1_clk", .clk = "dss_video1_clk" },
  410. { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
  411. { .role = "hdcp_clk", .clk = "dss_deshdcp_clk" },
  412. };
  413. static struct omap_hwmod dra7xx_dss_hwmod = {
  414. .name = "dss_core",
  415. .class = &dra7xx_dss_hwmod_class,
  416. .clkdm_name = "dss_clkdm",
  417. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  418. .sdma_reqs = dra7xx_dss_sdma_reqs,
  419. .main_clk = "dss_dss_clk",
  420. .prcm = {
  421. .omap4 = {
  422. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  423. .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
  424. .modulemode = MODULEMODE_SWCTRL,
  425. },
  426. },
  427. .opt_clks = dss_opt_clks,
  428. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  429. };
  430. /*
  431. * 'dispc' class
  432. * display controller
  433. */
  434. static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
  435. .rev_offs = 0x0000,
  436. .sysc_offs = 0x0010,
  437. .syss_offs = 0x0014,
  438. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  439. SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
  440. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  441. SYSS_HAS_RESET_STATUS),
  442. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  443. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  444. .sysc_fields = &omap_hwmod_sysc_type1,
  445. };
  446. static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
  447. .name = "dispc",
  448. .sysc = &dra7xx_dispc_sysc,
  449. };
  450. /* dss_dispc */
  451. /* dss_dispc dev_attr */
  452. static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
  453. .has_framedonetv_irq = 1,
  454. .manager_count = 4,
  455. };
  456. static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
  457. .name = "dss_dispc",
  458. .class = &dra7xx_dispc_hwmod_class,
  459. .clkdm_name = "dss_clkdm",
  460. .main_clk = "dss_dss_clk",
  461. .prcm = {
  462. .omap4 = {
  463. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  464. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  465. },
  466. },
  467. .dev_attr = &dss_dispc_dev_attr,
  468. .parent_hwmod = &dra7xx_dss_hwmod,
  469. };
  470. /*
  471. * 'hdmi' class
  472. * hdmi controller
  473. */
  474. static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
  475. .rev_offs = 0x0000,
  476. .sysc_offs = 0x0010,
  477. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  478. SYSC_HAS_SOFTRESET),
  479. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  480. SIDLE_SMART_WKUP),
  481. .sysc_fields = &omap_hwmod_sysc_type2,
  482. };
  483. static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
  484. .name = "hdmi",
  485. .sysc = &dra7xx_hdmi_sysc,
  486. };
  487. /* dss_hdmi */
  488. static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
  489. { .role = "sys_clk", .clk = "dss_hdmi_clk" },
  490. };
  491. static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
  492. .name = "dss_hdmi",
  493. .class = &dra7xx_hdmi_hwmod_class,
  494. .clkdm_name = "dss_clkdm",
  495. .main_clk = "dss_48mhz_clk",
  496. .prcm = {
  497. .omap4 = {
  498. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  499. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  500. },
  501. },
  502. .opt_clks = dss_hdmi_opt_clks,
  503. .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
  504. .parent_hwmod = &dra7xx_dss_hwmod,
  505. };
  506. /*
  507. * 'elm' class
  508. *
  509. */
  510. static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
  511. .rev_offs = 0x0000,
  512. .sysc_offs = 0x0010,
  513. .syss_offs = 0x0014,
  514. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  515. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  516. SYSS_HAS_RESET_STATUS),
  517. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  518. SIDLE_SMART_WKUP),
  519. .sysc_fields = &omap_hwmod_sysc_type1,
  520. };
  521. static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
  522. .name = "elm",
  523. .sysc = &dra7xx_elm_sysc,
  524. };
  525. /* elm */
  526. static struct omap_hwmod dra7xx_elm_hwmod = {
  527. .name = "elm",
  528. .class = &dra7xx_elm_hwmod_class,
  529. .clkdm_name = "l4per_clkdm",
  530. .main_clk = "l3_iclk_div",
  531. .prcm = {
  532. .omap4 = {
  533. .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
  534. .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
  535. },
  536. },
  537. };
  538. /*
  539. * 'gpio' class
  540. *
  541. */
  542. static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
  543. .rev_offs = 0x0000,
  544. .sysc_offs = 0x0010,
  545. .syss_offs = 0x0114,
  546. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  547. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  548. SYSS_HAS_RESET_STATUS),
  549. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  550. SIDLE_SMART_WKUP),
  551. .sysc_fields = &omap_hwmod_sysc_type1,
  552. };
  553. static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
  554. .name = "gpio",
  555. .sysc = &dra7xx_gpio_sysc,
  556. .rev = 2,
  557. };
  558. /* gpio dev_attr */
  559. static struct omap_gpio_dev_attr gpio_dev_attr = {
  560. .bank_width = 32,
  561. .dbck_flag = true,
  562. };
  563. /* gpio1 */
  564. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  565. { .role = "dbclk", .clk = "gpio1_dbclk" },
  566. };
  567. static struct omap_hwmod dra7xx_gpio1_hwmod = {
  568. .name = "gpio1",
  569. .class = &dra7xx_gpio_hwmod_class,
  570. .clkdm_name = "wkupaon_clkdm",
  571. .main_clk = "wkupaon_iclk_mux",
  572. .prcm = {
  573. .omap4 = {
  574. .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
  575. .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
  576. .modulemode = MODULEMODE_HWCTRL,
  577. },
  578. },
  579. .opt_clks = gpio1_opt_clks,
  580. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  581. .dev_attr = &gpio_dev_attr,
  582. };
  583. /* gpio2 */
  584. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  585. { .role = "dbclk", .clk = "gpio2_dbclk" },
  586. };
  587. static struct omap_hwmod dra7xx_gpio2_hwmod = {
  588. .name = "gpio2",
  589. .class = &dra7xx_gpio_hwmod_class,
  590. .clkdm_name = "l4per_clkdm",
  591. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  592. .main_clk = "l3_iclk_div",
  593. .prcm = {
  594. .omap4 = {
  595. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
  596. .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
  597. .modulemode = MODULEMODE_HWCTRL,
  598. },
  599. },
  600. .opt_clks = gpio2_opt_clks,
  601. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  602. .dev_attr = &gpio_dev_attr,
  603. };
  604. /* gpio3 */
  605. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  606. { .role = "dbclk", .clk = "gpio3_dbclk" },
  607. };
  608. static struct omap_hwmod dra7xx_gpio3_hwmod = {
  609. .name = "gpio3",
  610. .class = &dra7xx_gpio_hwmod_class,
  611. .clkdm_name = "l4per_clkdm",
  612. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  613. .main_clk = "l3_iclk_div",
  614. .prcm = {
  615. .omap4 = {
  616. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
  617. .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
  618. .modulemode = MODULEMODE_HWCTRL,
  619. },
  620. },
  621. .opt_clks = gpio3_opt_clks,
  622. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  623. .dev_attr = &gpio_dev_attr,
  624. };
  625. /* gpio4 */
  626. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  627. { .role = "dbclk", .clk = "gpio4_dbclk" },
  628. };
  629. static struct omap_hwmod dra7xx_gpio4_hwmod = {
  630. .name = "gpio4",
  631. .class = &dra7xx_gpio_hwmod_class,
  632. .clkdm_name = "l4per_clkdm",
  633. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  634. .main_clk = "l3_iclk_div",
  635. .prcm = {
  636. .omap4 = {
  637. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
  638. .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
  639. .modulemode = MODULEMODE_HWCTRL,
  640. },
  641. },
  642. .opt_clks = gpio4_opt_clks,
  643. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  644. .dev_attr = &gpio_dev_attr,
  645. };
  646. /* gpio5 */
  647. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  648. { .role = "dbclk", .clk = "gpio5_dbclk" },
  649. };
  650. static struct omap_hwmod dra7xx_gpio5_hwmod = {
  651. .name = "gpio5",
  652. .class = &dra7xx_gpio_hwmod_class,
  653. .clkdm_name = "l4per_clkdm",
  654. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  655. .main_clk = "l3_iclk_div",
  656. .prcm = {
  657. .omap4 = {
  658. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
  659. .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
  660. .modulemode = MODULEMODE_HWCTRL,
  661. },
  662. },
  663. .opt_clks = gpio5_opt_clks,
  664. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  665. .dev_attr = &gpio_dev_attr,
  666. };
  667. /* gpio6 */
  668. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  669. { .role = "dbclk", .clk = "gpio6_dbclk" },
  670. };
  671. static struct omap_hwmod dra7xx_gpio6_hwmod = {
  672. .name = "gpio6",
  673. .class = &dra7xx_gpio_hwmod_class,
  674. .clkdm_name = "l4per_clkdm",
  675. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  676. .main_clk = "l3_iclk_div",
  677. .prcm = {
  678. .omap4 = {
  679. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
  680. .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
  681. .modulemode = MODULEMODE_HWCTRL,
  682. },
  683. },
  684. .opt_clks = gpio6_opt_clks,
  685. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  686. .dev_attr = &gpio_dev_attr,
  687. };
  688. /* gpio7 */
  689. static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
  690. { .role = "dbclk", .clk = "gpio7_dbclk" },
  691. };
  692. static struct omap_hwmod dra7xx_gpio7_hwmod = {
  693. .name = "gpio7",
  694. .class = &dra7xx_gpio_hwmod_class,
  695. .clkdm_name = "l4per_clkdm",
  696. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  697. .main_clk = "l3_iclk_div",
  698. .prcm = {
  699. .omap4 = {
  700. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
  701. .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
  702. .modulemode = MODULEMODE_HWCTRL,
  703. },
  704. },
  705. .opt_clks = gpio7_opt_clks,
  706. .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
  707. .dev_attr = &gpio_dev_attr,
  708. };
  709. /* gpio8 */
  710. static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
  711. { .role = "dbclk", .clk = "gpio8_dbclk" },
  712. };
  713. static struct omap_hwmod dra7xx_gpio8_hwmod = {
  714. .name = "gpio8",
  715. .class = &dra7xx_gpio_hwmod_class,
  716. .clkdm_name = "l4per_clkdm",
  717. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  718. .main_clk = "l3_iclk_div",
  719. .prcm = {
  720. .omap4 = {
  721. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
  722. .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
  723. .modulemode = MODULEMODE_HWCTRL,
  724. },
  725. },
  726. .opt_clks = gpio8_opt_clks,
  727. .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
  728. .dev_attr = &gpio_dev_attr,
  729. };
  730. /*
  731. * 'gpmc' class
  732. *
  733. */
  734. static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
  735. .rev_offs = 0x0000,
  736. .sysc_offs = 0x0010,
  737. .syss_offs = 0x0014,
  738. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  739. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  740. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  741. .sysc_fields = &omap_hwmod_sysc_type1,
  742. };
  743. static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
  744. .name = "gpmc",
  745. .sysc = &dra7xx_gpmc_sysc,
  746. };
  747. /* gpmc */
  748. static struct omap_hwmod dra7xx_gpmc_hwmod = {
  749. .name = "gpmc",
  750. .class = &dra7xx_gpmc_hwmod_class,
  751. .clkdm_name = "l3main1_clkdm",
  752. /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
  753. .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
  754. .main_clk = "l3_iclk_div",
  755. .prcm = {
  756. .omap4 = {
  757. .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
  758. .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
  759. .modulemode = MODULEMODE_HWCTRL,
  760. },
  761. },
  762. };
  763. /*
  764. * 'hdq1w' class
  765. *
  766. */
  767. static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
  768. .rev_offs = 0x0000,
  769. .sysc_offs = 0x0014,
  770. .syss_offs = 0x0018,
  771. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
  772. SYSS_HAS_RESET_STATUS),
  773. .sysc_fields = &omap_hwmod_sysc_type1,
  774. };
  775. static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
  776. .name = "hdq1w",
  777. .sysc = &dra7xx_hdq1w_sysc,
  778. };
  779. /* hdq1w */
  780. static struct omap_hwmod dra7xx_hdq1w_hwmod = {
  781. .name = "hdq1w",
  782. .class = &dra7xx_hdq1w_hwmod_class,
  783. .clkdm_name = "l4per_clkdm",
  784. .flags = HWMOD_INIT_NO_RESET,
  785. .main_clk = "func_12m_fclk",
  786. .prcm = {
  787. .omap4 = {
  788. .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
  789. .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
  790. .modulemode = MODULEMODE_SWCTRL,
  791. },
  792. },
  793. };
  794. /*
  795. * 'i2c' class
  796. *
  797. */
  798. static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
  799. .sysc_offs = 0x0010,
  800. .syss_offs = 0x0090,
  801. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  802. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  803. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  804. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  805. SIDLE_SMART_WKUP),
  806. .clockact = CLOCKACT_TEST_ICLK,
  807. .sysc_fields = &omap_hwmod_sysc_type1,
  808. };
  809. static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
  810. .name = "i2c",
  811. .sysc = &dra7xx_i2c_sysc,
  812. .reset = &omap_i2c_reset,
  813. .rev = OMAP_I2C_IP_VERSION_2,
  814. };
  815. /* i2c dev_attr */
  816. static struct omap_i2c_dev_attr i2c_dev_attr = {
  817. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  818. };
  819. /* i2c1 */
  820. static struct omap_hwmod dra7xx_i2c1_hwmod = {
  821. .name = "i2c1",
  822. .class = &dra7xx_i2c_hwmod_class,
  823. .clkdm_name = "l4per_clkdm",
  824. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  825. .main_clk = "func_96m_fclk",
  826. .prcm = {
  827. .omap4 = {
  828. .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
  829. .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
  830. .modulemode = MODULEMODE_SWCTRL,
  831. },
  832. },
  833. .dev_attr = &i2c_dev_attr,
  834. };
  835. /* i2c2 */
  836. static struct omap_hwmod dra7xx_i2c2_hwmod = {
  837. .name = "i2c2",
  838. .class = &dra7xx_i2c_hwmod_class,
  839. .clkdm_name = "l4per_clkdm",
  840. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  841. .main_clk = "func_96m_fclk",
  842. .prcm = {
  843. .omap4 = {
  844. .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
  845. .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
  846. .modulemode = MODULEMODE_SWCTRL,
  847. },
  848. },
  849. .dev_attr = &i2c_dev_attr,
  850. };
  851. /* i2c3 */
  852. static struct omap_hwmod dra7xx_i2c3_hwmod = {
  853. .name = "i2c3",
  854. .class = &dra7xx_i2c_hwmod_class,
  855. .clkdm_name = "l4per_clkdm",
  856. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  857. .main_clk = "func_96m_fclk",
  858. .prcm = {
  859. .omap4 = {
  860. .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
  861. .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
  862. .modulemode = MODULEMODE_SWCTRL,
  863. },
  864. },
  865. .dev_attr = &i2c_dev_attr,
  866. };
  867. /* i2c4 */
  868. static struct omap_hwmod dra7xx_i2c4_hwmod = {
  869. .name = "i2c4",
  870. .class = &dra7xx_i2c_hwmod_class,
  871. .clkdm_name = "l4per_clkdm",
  872. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  873. .main_clk = "func_96m_fclk",
  874. .prcm = {
  875. .omap4 = {
  876. .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
  877. .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
  878. .modulemode = MODULEMODE_SWCTRL,
  879. },
  880. },
  881. .dev_attr = &i2c_dev_attr,
  882. };
  883. /* i2c5 */
  884. static struct omap_hwmod dra7xx_i2c5_hwmod = {
  885. .name = "i2c5",
  886. .class = &dra7xx_i2c_hwmod_class,
  887. .clkdm_name = "ipu_clkdm",
  888. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  889. .main_clk = "func_96m_fclk",
  890. .prcm = {
  891. .omap4 = {
  892. .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
  893. .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
  894. .modulemode = MODULEMODE_SWCTRL,
  895. },
  896. },
  897. .dev_attr = &i2c_dev_attr,
  898. };
  899. /*
  900. * 'mailbox' class
  901. *
  902. */
  903. static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
  904. .rev_offs = 0x0000,
  905. .sysc_offs = 0x0010,
  906. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  907. SYSC_HAS_SOFTRESET),
  908. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  909. .sysc_fields = &omap_hwmod_sysc_type2,
  910. };
  911. static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
  912. .name = "mailbox",
  913. .sysc = &dra7xx_mailbox_sysc,
  914. };
  915. /* mailbox1 */
  916. static struct omap_hwmod dra7xx_mailbox1_hwmod = {
  917. .name = "mailbox1",
  918. .class = &dra7xx_mailbox_hwmod_class,
  919. .clkdm_name = "l4cfg_clkdm",
  920. .prcm = {
  921. .omap4 = {
  922. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
  923. .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
  924. },
  925. },
  926. };
  927. /* mailbox2 */
  928. static struct omap_hwmod dra7xx_mailbox2_hwmod = {
  929. .name = "mailbox2",
  930. .class = &dra7xx_mailbox_hwmod_class,
  931. .clkdm_name = "l4cfg_clkdm",
  932. .prcm = {
  933. .omap4 = {
  934. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
  935. .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
  936. },
  937. },
  938. };
  939. /* mailbox3 */
  940. static struct omap_hwmod dra7xx_mailbox3_hwmod = {
  941. .name = "mailbox3",
  942. .class = &dra7xx_mailbox_hwmod_class,
  943. .clkdm_name = "l4cfg_clkdm",
  944. .prcm = {
  945. .omap4 = {
  946. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
  947. .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
  948. },
  949. },
  950. };
  951. /* mailbox4 */
  952. static struct omap_hwmod dra7xx_mailbox4_hwmod = {
  953. .name = "mailbox4",
  954. .class = &dra7xx_mailbox_hwmod_class,
  955. .clkdm_name = "l4cfg_clkdm",
  956. .prcm = {
  957. .omap4 = {
  958. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
  959. .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
  960. },
  961. },
  962. };
  963. /* mailbox5 */
  964. static struct omap_hwmod dra7xx_mailbox5_hwmod = {
  965. .name = "mailbox5",
  966. .class = &dra7xx_mailbox_hwmod_class,
  967. .clkdm_name = "l4cfg_clkdm",
  968. .prcm = {
  969. .omap4 = {
  970. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
  971. .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
  972. },
  973. },
  974. };
  975. /* mailbox6 */
  976. static struct omap_hwmod dra7xx_mailbox6_hwmod = {
  977. .name = "mailbox6",
  978. .class = &dra7xx_mailbox_hwmod_class,
  979. .clkdm_name = "l4cfg_clkdm",
  980. .prcm = {
  981. .omap4 = {
  982. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
  983. .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
  984. },
  985. },
  986. };
  987. /* mailbox7 */
  988. static struct omap_hwmod dra7xx_mailbox7_hwmod = {
  989. .name = "mailbox7",
  990. .class = &dra7xx_mailbox_hwmod_class,
  991. .clkdm_name = "l4cfg_clkdm",
  992. .prcm = {
  993. .omap4 = {
  994. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
  995. .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
  996. },
  997. },
  998. };
  999. /* mailbox8 */
  1000. static struct omap_hwmod dra7xx_mailbox8_hwmod = {
  1001. .name = "mailbox8",
  1002. .class = &dra7xx_mailbox_hwmod_class,
  1003. .clkdm_name = "l4cfg_clkdm",
  1004. .prcm = {
  1005. .omap4 = {
  1006. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
  1007. .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
  1008. },
  1009. },
  1010. };
  1011. /* mailbox9 */
  1012. static struct omap_hwmod dra7xx_mailbox9_hwmod = {
  1013. .name = "mailbox9",
  1014. .class = &dra7xx_mailbox_hwmod_class,
  1015. .clkdm_name = "l4cfg_clkdm",
  1016. .prcm = {
  1017. .omap4 = {
  1018. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
  1019. .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
  1020. },
  1021. },
  1022. };
  1023. /* mailbox10 */
  1024. static struct omap_hwmod dra7xx_mailbox10_hwmod = {
  1025. .name = "mailbox10",
  1026. .class = &dra7xx_mailbox_hwmod_class,
  1027. .clkdm_name = "l4cfg_clkdm",
  1028. .prcm = {
  1029. .omap4 = {
  1030. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
  1031. .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
  1032. },
  1033. },
  1034. };
  1035. /* mailbox11 */
  1036. static struct omap_hwmod dra7xx_mailbox11_hwmod = {
  1037. .name = "mailbox11",
  1038. .class = &dra7xx_mailbox_hwmod_class,
  1039. .clkdm_name = "l4cfg_clkdm",
  1040. .prcm = {
  1041. .omap4 = {
  1042. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
  1043. .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
  1044. },
  1045. },
  1046. };
  1047. /* mailbox12 */
  1048. static struct omap_hwmod dra7xx_mailbox12_hwmod = {
  1049. .name = "mailbox12",
  1050. .class = &dra7xx_mailbox_hwmod_class,
  1051. .clkdm_name = "l4cfg_clkdm",
  1052. .prcm = {
  1053. .omap4 = {
  1054. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
  1055. .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
  1056. },
  1057. },
  1058. };
  1059. /* mailbox13 */
  1060. static struct omap_hwmod dra7xx_mailbox13_hwmod = {
  1061. .name = "mailbox13",
  1062. .class = &dra7xx_mailbox_hwmod_class,
  1063. .clkdm_name = "l4cfg_clkdm",
  1064. .prcm = {
  1065. .omap4 = {
  1066. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
  1067. .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
  1068. },
  1069. },
  1070. };
  1071. /*
  1072. * 'mcspi' class
  1073. *
  1074. */
  1075. static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
  1076. .rev_offs = 0x0000,
  1077. .sysc_offs = 0x0010,
  1078. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1079. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1080. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1081. SIDLE_SMART_WKUP),
  1082. .sysc_fields = &omap_hwmod_sysc_type2,
  1083. };
  1084. static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
  1085. .name = "mcspi",
  1086. .sysc = &dra7xx_mcspi_sysc,
  1087. .rev = OMAP4_MCSPI_REV,
  1088. };
  1089. /* mcspi1 */
  1090. /* mcspi1 dev_attr */
  1091. static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
  1092. .num_chipselect = 4,
  1093. };
  1094. static struct omap_hwmod dra7xx_mcspi1_hwmod = {
  1095. .name = "mcspi1",
  1096. .class = &dra7xx_mcspi_hwmod_class,
  1097. .clkdm_name = "l4per_clkdm",
  1098. .main_clk = "func_48m_fclk",
  1099. .prcm = {
  1100. .omap4 = {
  1101. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
  1102. .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
  1103. .modulemode = MODULEMODE_SWCTRL,
  1104. },
  1105. },
  1106. .dev_attr = &mcspi1_dev_attr,
  1107. };
  1108. /* mcspi2 */
  1109. /* mcspi2 dev_attr */
  1110. static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
  1111. .num_chipselect = 2,
  1112. };
  1113. static struct omap_hwmod dra7xx_mcspi2_hwmod = {
  1114. .name = "mcspi2",
  1115. .class = &dra7xx_mcspi_hwmod_class,
  1116. .clkdm_name = "l4per_clkdm",
  1117. .main_clk = "func_48m_fclk",
  1118. .prcm = {
  1119. .omap4 = {
  1120. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
  1121. .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
  1122. .modulemode = MODULEMODE_SWCTRL,
  1123. },
  1124. },
  1125. .dev_attr = &mcspi2_dev_attr,
  1126. };
  1127. /* mcspi3 */
  1128. /* mcspi3 dev_attr */
  1129. static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
  1130. .num_chipselect = 2,
  1131. };
  1132. static struct omap_hwmod dra7xx_mcspi3_hwmod = {
  1133. .name = "mcspi3",
  1134. .class = &dra7xx_mcspi_hwmod_class,
  1135. .clkdm_name = "l4per_clkdm",
  1136. .main_clk = "func_48m_fclk",
  1137. .prcm = {
  1138. .omap4 = {
  1139. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
  1140. .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
  1141. .modulemode = MODULEMODE_SWCTRL,
  1142. },
  1143. },
  1144. .dev_attr = &mcspi3_dev_attr,
  1145. };
  1146. /* mcspi4 */
  1147. /* mcspi4 dev_attr */
  1148. static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
  1149. .num_chipselect = 1,
  1150. };
  1151. static struct omap_hwmod dra7xx_mcspi4_hwmod = {
  1152. .name = "mcspi4",
  1153. .class = &dra7xx_mcspi_hwmod_class,
  1154. .clkdm_name = "l4per_clkdm",
  1155. .main_clk = "func_48m_fclk",
  1156. .prcm = {
  1157. .omap4 = {
  1158. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
  1159. .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
  1160. .modulemode = MODULEMODE_SWCTRL,
  1161. },
  1162. },
  1163. .dev_attr = &mcspi4_dev_attr,
  1164. };
  1165. /*
  1166. * 'mmc' class
  1167. *
  1168. */
  1169. static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
  1170. .rev_offs = 0x0000,
  1171. .sysc_offs = 0x0010,
  1172. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  1173. SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1174. SYSC_HAS_SOFTRESET),
  1175. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1176. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1177. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1178. .sysc_fields = &omap_hwmod_sysc_type2,
  1179. };
  1180. static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
  1181. .name = "mmc",
  1182. .sysc = &dra7xx_mmc_sysc,
  1183. };
  1184. /* mmc1 */
  1185. static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
  1186. { .role = "clk32k", .clk = "mmc1_clk32k" },
  1187. };
  1188. /* mmc1 dev_attr */
  1189. static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
  1190. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1191. };
  1192. static struct omap_hwmod dra7xx_mmc1_hwmod = {
  1193. .name = "mmc1",
  1194. .class = &dra7xx_mmc_hwmod_class,
  1195. .clkdm_name = "l3init_clkdm",
  1196. .main_clk = "mmc1_fclk_div",
  1197. .prcm = {
  1198. .omap4 = {
  1199. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
  1200. .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
  1201. .modulemode = MODULEMODE_SWCTRL,
  1202. },
  1203. },
  1204. .opt_clks = mmc1_opt_clks,
  1205. .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
  1206. .dev_attr = &mmc1_dev_attr,
  1207. };
  1208. /* mmc2 */
  1209. static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
  1210. { .role = "clk32k", .clk = "mmc2_clk32k" },
  1211. };
  1212. static struct omap_hwmod dra7xx_mmc2_hwmod = {
  1213. .name = "mmc2",
  1214. .class = &dra7xx_mmc_hwmod_class,
  1215. .clkdm_name = "l3init_clkdm",
  1216. .main_clk = "mmc2_fclk_div",
  1217. .prcm = {
  1218. .omap4 = {
  1219. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
  1220. .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
  1221. .modulemode = MODULEMODE_SWCTRL,
  1222. },
  1223. },
  1224. .opt_clks = mmc2_opt_clks,
  1225. .opt_clks_cnt = ARRAY_SIZE(mmc2_opt_clks),
  1226. };
  1227. /* mmc3 */
  1228. static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
  1229. { .role = "clk32k", .clk = "mmc3_clk32k" },
  1230. };
  1231. static struct omap_hwmod dra7xx_mmc3_hwmod = {
  1232. .name = "mmc3",
  1233. .class = &dra7xx_mmc_hwmod_class,
  1234. .clkdm_name = "l4per_clkdm",
  1235. .main_clk = "mmc3_gfclk_div",
  1236. .prcm = {
  1237. .omap4 = {
  1238. .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
  1239. .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
  1240. .modulemode = MODULEMODE_SWCTRL,
  1241. },
  1242. },
  1243. .opt_clks = mmc3_opt_clks,
  1244. .opt_clks_cnt = ARRAY_SIZE(mmc3_opt_clks),
  1245. };
  1246. /* mmc4 */
  1247. static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
  1248. { .role = "clk32k", .clk = "mmc4_clk32k" },
  1249. };
  1250. static struct omap_hwmod dra7xx_mmc4_hwmod = {
  1251. .name = "mmc4",
  1252. .class = &dra7xx_mmc_hwmod_class,
  1253. .clkdm_name = "l4per_clkdm",
  1254. .main_clk = "mmc4_gfclk_div",
  1255. .prcm = {
  1256. .omap4 = {
  1257. .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
  1258. .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
  1259. .modulemode = MODULEMODE_SWCTRL,
  1260. },
  1261. },
  1262. .opt_clks = mmc4_opt_clks,
  1263. .opt_clks_cnt = ARRAY_SIZE(mmc4_opt_clks),
  1264. };
  1265. /*
  1266. * 'mpu' class
  1267. *
  1268. */
  1269. static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
  1270. .name = "mpu",
  1271. };
  1272. /* mpu */
  1273. static struct omap_hwmod dra7xx_mpu_hwmod = {
  1274. .name = "mpu",
  1275. .class = &dra7xx_mpu_hwmod_class,
  1276. .clkdm_name = "mpu_clkdm",
  1277. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  1278. .main_clk = "dpll_mpu_m2_ck",
  1279. .prcm = {
  1280. .omap4 = {
  1281. .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  1282. .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
  1283. },
  1284. },
  1285. };
  1286. /*
  1287. * 'ocp2scp' class
  1288. *
  1289. */
  1290. static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
  1291. .rev_offs = 0x0000,
  1292. .sysc_offs = 0x0010,
  1293. .syss_offs = 0x0014,
  1294. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1295. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1296. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1297. SIDLE_SMART_WKUP),
  1298. .sysc_fields = &omap_hwmod_sysc_type1,
  1299. };
  1300. static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
  1301. .name = "ocp2scp",
  1302. .sysc = &dra7xx_ocp2scp_sysc,
  1303. };
  1304. /* ocp2scp1 */
  1305. static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
  1306. .name = "ocp2scp1",
  1307. .class = &dra7xx_ocp2scp_hwmod_class,
  1308. .clkdm_name = "l3init_clkdm",
  1309. .main_clk = "l4_root_clk_div",
  1310. .prcm = {
  1311. .omap4 = {
  1312. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
  1313. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
  1314. .modulemode = MODULEMODE_HWCTRL,
  1315. },
  1316. },
  1317. };
  1318. /* ocp2scp3 */
  1319. static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
  1320. .name = "ocp2scp3",
  1321. .class = &dra7xx_ocp2scp_hwmod_class,
  1322. .clkdm_name = "l3init_clkdm",
  1323. .main_clk = "l4_root_clk_div",
  1324. .prcm = {
  1325. .omap4 = {
  1326. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
  1327. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
  1328. .modulemode = MODULEMODE_HWCTRL,
  1329. },
  1330. },
  1331. };
  1332. /*
  1333. * 'PCIE' class
  1334. *
  1335. */
  1336. static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
  1337. .name = "pcie",
  1338. };
  1339. /* pcie1 */
  1340. static struct omap_hwmod dra7xx_pciess1_hwmod = {
  1341. .name = "pcie1",
  1342. .class = &dra7xx_pciess_hwmod_class,
  1343. .clkdm_name = "pcie_clkdm",
  1344. .main_clk = "l4_root_clk_div",
  1345. .prcm = {
  1346. .omap4 = {
  1347. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
  1348. .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
  1349. .modulemode = MODULEMODE_SWCTRL,
  1350. },
  1351. },
  1352. };
  1353. /* pcie2 */
  1354. static struct omap_hwmod dra7xx_pciess2_hwmod = {
  1355. .name = "pcie2",
  1356. .class = &dra7xx_pciess_hwmod_class,
  1357. .clkdm_name = "pcie_clkdm",
  1358. .main_clk = "l4_root_clk_div",
  1359. .prcm = {
  1360. .omap4 = {
  1361. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
  1362. .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
  1363. .modulemode = MODULEMODE_SWCTRL,
  1364. },
  1365. },
  1366. };
  1367. /*
  1368. * 'qspi' class
  1369. *
  1370. */
  1371. static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
  1372. .sysc_offs = 0x0010,
  1373. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1374. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1375. SIDLE_SMART_WKUP),
  1376. .sysc_fields = &omap_hwmod_sysc_type2,
  1377. };
  1378. static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
  1379. .name = "qspi",
  1380. .sysc = &dra7xx_qspi_sysc,
  1381. };
  1382. /* qspi */
  1383. static struct omap_hwmod dra7xx_qspi_hwmod = {
  1384. .name = "qspi",
  1385. .class = &dra7xx_qspi_hwmod_class,
  1386. .clkdm_name = "l4per2_clkdm",
  1387. .main_clk = "qspi_gfclk_div",
  1388. .prcm = {
  1389. .omap4 = {
  1390. .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
  1391. .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
  1392. .modulemode = MODULEMODE_SWCTRL,
  1393. },
  1394. },
  1395. };
  1396. /*
  1397. * 'rtcss' class
  1398. *
  1399. */
  1400. static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
  1401. .sysc_offs = 0x0078,
  1402. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1403. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1404. SIDLE_SMART_WKUP),
  1405. .sysc_fields = &omap_hwmod_sysc_type3,
  1406. };
  1407. static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
  1408. .name = "rtcss",
  1409. .sysc = &dra7xx_rtcss_sysc,
  1410. };
  1411. /* rtcss */
  1412. static struct omap_hwmod dra7xx_rtcss_hwmod = {
  1413. .name = "rtcss",
  1414. .class = &dra7xx_rtcss_hwmod_class,
  1415. .clkdm_name = "rtc_clkdm",
  1416. .main_clk = "sys_32k_ck",
  1417. .prcm = {
  1418. .omap4 = {
  1419. .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
  1420. .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
  1421. .modulemode = MODULEMODE_SWCTRL,
  1422. },
  1423. },
  1424. };
  1425. /*
  1426. * 'sata' class
  1427. *
  1428. */
  1429. static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
  1430. .sysc_offs = 0x0000,
  1431. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
  1432. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1433. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1434. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1435. .sysc_fields = &omap_hwmod_sysc_type2,
  1436. };
  1437. static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
  1438. .name = "sata",
  1439. .sysc = &dra7xx_sata_sysc,
  1440. };
  1441. /* sata */
  1442. static struct omap_hwmod dra7xx_sata_hwmod = {
  1443. .name = "sata",
  1444. .class = &dra7xx_sata_hwmod_class,
  1445. .clkdm_name = "l3init_clkdm",
  1446. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1447. .main_clk = "func_48m_fclk",
  1448. .mpu_rt_idx = 1,
  1449. .prcm = {
  1450. .omap4 = {
  1451. .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
  1452. .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
  1453. .modulemode = MODULEMODE_SWCTRL,
  1454. },
  1455. },
  1456. };
  1457. /*
  1458. * 'smartreflex' class
  1459. *
  1460. */
  1461. /* The IP is not compliant to type1 / type2 scheme */
  1462. static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
  1463. .sidle_shift = 24,
  1464. .enwkup_shift = 26,
  1465. };
  1466. static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
  1467. .sysc_offs = 0x0038,
  1468. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
  1469. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1470. SIDLE_SMART_WKUP),
  1471. .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
  1472. };
  1473. static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
  1474. .name = "smartreflex",
  1475. .sysc = &dra7xx_smartreflex_sysc,
  1476. .rev = 2,
  1477. };
  1478. /* smartreflex_core */
  1479. /* smartreflex_core dev_attr */
  1480. static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
  1481. .sensor_voltdm_name = "core",
  1482. };
  1483. static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
  1484. .name = "smartreflex_core",
  1485. .class = &dra7xx_smartreflex_hwmod_class,
  1486. .clkdm_name = "coreaon_clkdm",
  1487. .main_clk = "wkupaon_iclk_mux",
  1488. .prcm = {
  1489. .omap4 = {
  1490. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
  1491. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
  1492. .modulemode = MODULEMODE_SWCTRL,
  1493. },
  1494. },
  1495. .dev_attr = &smartreflex_core_dev_attr,
  1496. };
  1497. /* smartreflex_mpu */
  1498. /* smartreflex_mpu dev_attr */
  1499. static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
  1500. .sensor_voltdm_name = "mpu",
  1501. };
  1502. static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
  1503. .name = "smartreflex_mpu",
  1504. .class = &dra7xx_smartreflex_hwmod_class,
  1505. .clkdm_name = "coreaon_clkdm",
  1506. .main_clk = "wkupaon_iclk_mux",
  1507. .prcm = {
  1508. .omap4 = {
  1509. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
  1510. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
  1511. .modulemode = MODULEMODE_SWCTRL,
  1512. },
  1513. },
  1514. .dev_attr = &smartreflex_mpu_dev_attr,
  1515. };
  1516. /*
  1517. * 'spinlock' class
  1518. *
  1519. */
  1520. static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
  1521. .rev_offs = 0x0000,
  1522. .sysc_offs = 0x0010,
  1523. .syss_offs = 0x0014,
  1524. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  1525. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1526. SYSS_HAS_RESET_STATUS),
  1527. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1528. .sysc_fields = &omap_hwmod_sysc_type1,
  1529. };
  1530. static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
  1531. .name = "spinlock",
  1532. .sysc = &dra7xx_spinlock_sysc,
  1533. };
  1534. /* spinlock */
  1535. static struct omap_hwmod dra7xx_spinlock_hwmod = {
  1536. .name = "spinlock",
  1537. .class = &dra7xx_spinlock_hwmod_class,
  1538. .clkdm_name = "l4cfg_clkdm",
  1539. .main_clk = "l3_iclk_div",
  1540. .prcm = {
  1541. .omap4 = {
  1542. .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
  1543. .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
  1544. },
  1545. },
  1546. };
  1547. /*
  1548. * 'timer' class
  1549. *
  1550. * This class contains several variants: ['timer_1ms', 'timer_secure',
  1551. * 'timer']
  1552. */
  1553. static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
  1554. .rev_offs = 0x0000,
  1555. .sysc_offs = 0x0010,
  1556. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1557. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1558. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1559. SIDLE_SMART_WKUP),
  1560. .sysc_fields = &omap_hwmod_sysc_type2,
  1561. };
  1562. static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
  1563. .name = "timer",
  1564. .sysc = &dra7xx_timer_1ms_sysc,
  1565. };
  1566. static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
  1567. .rev_offs = 0x0000,
  1568. .sysc_offs = 0x0010,
  1569. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1570. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1571. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1572. SIDLE_SMART_WKUP),
  1573. .sysc_fields = &omap_hwmod_sysc_type2,
  1574. };
  1575. static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
  1576. .name = "timer",
  1577. .sysc = &dra7xx_timer_sysc,
  1578. };
  1579. /* timer1 */
  1580. static struct omap_hwmod dra7xx_timer1_hwmod = {
  1581. .name = "timer1",
  1582. .class = &dra7xx_timer_1ms_hwmod_class,
  1583. .clkdm_name = "wkupaon_clkdm",
  1584. .main_clk = "timer1_gfclk_mux",
  1585. .prcm = {
  1586. .omap4 = {
  1587. .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
  1588. .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
  1589. .modulemode = MODULEMODE_SWCTRL,
  1590. },
  1591. },
  1592. };
  1593. /* timer2 */
  1594. static struct omap_hwmod dra7xx_timer2_hwmod = {
  1595. .name = "timer2",
  1596. .class = &dra7xx_timer_1ms_hwmod_class,
  1597. .clkdm_name = "l4per_clkdm",
  1598. .main_clk = "timer2_gfclk_mux",
  1599. .prcm = {
  1600. .omap4 = {
  1601. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
  1602. .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
  1603. .modulemode = MODULEMODE_SWCTRL,
  1604. },
  1605. },
  1606. };
  1607. /* timer3 */
  1608. static struct omap_hwmod dra7xx_timer3_hwmod = {
  1609. .name = "timer3",
  1610. .class = &dra7xx_timer_hwmod_class,
  1611. .clkdm_name = "l4per_clkdm",
  1612. .main_clk = "timer3_gfclk_mux",
  1613. .prcm = {
  1614. .omap4 = {
  1615. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
  1616. .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
  1617. .modulemode = MODULEMODE_SWCTRL,
  1618. },
  1619. },
  1620. };
  1621. /* timer4 */
  1622. static struct omap_hwmod dra7xx_timer4_hwmod = {
  1623. .name = "timer4",
  1624. .class = &dra7xx_timer_hwmod_class,
  1625. .clkdm_name = "l4per_clkdm",
  1626. .main_clk = "timer4_gfclk_mux",
  1627. .prcm = {
  1628. .omap4 = {
  1629. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
  1630. .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
  1631. .modulemode = MODULEMODE_SWCTRL,
  1632. },
  1633. },
  1634. };
  1635. /* timer5 */
  1636. static struct omap_hwmod dra7xx_timer5_hwmod = {
  1637. .name = "timer5",
  1638. .class = &dra7xx_timer_hwmod_class,
  1639. .clkdm_name = "ipu_clkdm",
  1640. .main_clk = "timer5_gfclk_mux",
  1641. .prcm = {
  1642. .omap4 = {
  1643. .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
  1644. .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
  1645. .modulemode = MODULEMODE_SWCTRL,
  1646. },
  1647. },
  1648. };
  1649. /* timer6 */
  1650. static struct omap_hwmod dra7xx_timer6_hwmod = {
  1651. .name = "timer6",
  1652. .class = &dra7xx_timer_hwmod_class,
  1653. .clkdm_name = "ipu_clkdm",
  1654. .main_clk = "timer6_gfclk_mux",
  1655. .prcm = {
  1656. .omap4 = {
  1657. .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
  1658. .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
  1659. .modulemode = MODULEMODE_SWCTRL,
  1660. },
  1661. },
  1662. };
  1663. /* timer7 */
  1664. static struct omap_hwmod dra7xx_timer7_hwmod = {
  1665. .name = "timer7",
  1666. .class = &dra7xx_timer_hwmod_class,
  1667. .clkdm_name = "ipu_clkdm",
  1668. .main_clk = "timer7_gfclk_mux",
  1669. .prcm = {
  1670. .omap4 = {
  1671. .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
  1672. .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
  1673. .modulemode = MODULEMODE_SWCTRL,
  1674. },
  1675. },
  1676. };
  1677. /* timer8 */
  1678. static struct omap_hwmod dra7xx_timer8_hwmod = {
  1679. .name = "timer8",
  1680. .class = &dra7xx_timer_hwmod_class,
  1681. .clkdm_name = "ipu_clkdm",
  1682. .main_clk = "timer8_gfclk_mux",
  1683. .prcm = {
  1684. .omap4 = {
  1685. .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
  1686. .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
  1687. .modulemode = MODULEMODE_SWCTRL,
  1688. },
  1689. },
  1690. };
  1691. /* timer9 */
  1692. static struct omap_hwmod dra7xx_timer9_hwmod = {
  1693. .name = "timer9",
  1694. .class = &dra7xx_timer_hwmod_class,
  1695. .clkdm_name = "l4per_clkdm",
  1696. .main_clk = "timer9_gfclk_mux",
  1697. .prcm = {
  1698. .omap4 = {
  1699. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
  1700. .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
  1701. .modulemode = MODULEMODE_SWCTRL,
  1702. },
  1703. },
  1704. };
  1705. /* timer10 */
  1706. static struct omap_hwmod dra7xx_timer10_hwmod = {
  1707. .name = "timer10",
  1708. .class = &dra7xx_timer_1ms_hwmod_class,
  1709. .clkdm_name = "l4per_clkdm",
  1710. .main_clk = "timer10_gfclk_mux",
  1711. .prcm = {
  1712. .omap4 = {
  1713. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
  1714. .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
  1715. .modulemode = MODULEMODE_SWCTRL,
  1716. },
  1717. },
  1718. };
  1719. /* timer11 */
  1720. static struct omap_hwmod dra7xx_timer11_hwmod = {
  1721. .name = "timer11",
  1722. .class = &dra7xx_timer_hwmod_class,
  1723. .clkdm_name = "l4per_clkdm",
  1724. .main_clk = "timer11_gfclk_mux",
  1725. .prcm = {
  1726. .omap4 = {
  1727. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
  1728. .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
  1729. .modulemode = MODULEMODE_SWCTRL,
  1730. },
  1731. },
  1732. };
  1733. /* timer13 */
  1734. static struct omap_hwmod dra7xx_timer13_hwmod = {
  1735. .name = "timer13",
  1736. .class = &dra7xx_timer_hwmod_class,
  1737. .clkdm_name = "l4per3_clkdm",
  1738. .main_clk = "timer13_gfclk_mux",
  1739. .prcm = {
  1740. .omap4 = {
  1741. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
  1742. .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
  1743. .modulemode = MODULEMODE_SWCTRL,
  1744. },
  1745. },
  1746. };
  1747. /* timer14 */
  1748. static struct omap_hwmod dra7xx_timer14_hwmod = {
  1749. .name = "timer14",
  1750. .class = &dra7xx_timer_hwmod_class,
  1751. .clkdm_name = "l4per3_clkdm",
  1752. .main_clk = "timer14_gfclk_mux",
  1753. .prcm = {
  1754. .omap4 = {
  1755. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
  1756. .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
  1757. .modulemode = MODULEMODE_SWCTRL,
  1758. },
  1759. },
  1760. };
  1761. /* timer15 */
  1762. static struct omap_hwmod dra7xx_timer15_hwmod = {
  1763. .name = "timer15",
  1764. .class = &dra7xx_timer_hwmod_class,
  1765. .clkdm_name = "l4per3_clkdm",
  1766. .main_clk = "timer15_gfclk_mux",
  1767. .prcm = {
  1768. .omap4 = {
  1769. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
  1770. .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
  1771. .modulemode = MODULEMODE_SWCTRL,
  1772. },
  1773. },
  1774. };
  1775. /* timer16 */
  1776. static struct omap_hwmod dra7xx_timer16_hwmod = {
  1777. .name = "timer16",
  1778. .class = &dra7xx_timer_hwmod_class,
  1779. .clkdm_name = "l4per3_clkdm",
  1780. .main_clk = "timer16_gfclk_mux",
  1781. .prcm = {
  1782. .omap4 = {
  1783. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
  1784. .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
  1785. .modulemode = MODULEMODE_SWCTRL,
  1786. },
  1787. },
  1788. };
  1789. /*
  1790. * 'uart' class
  1791. *
  1792. */
  1793. static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
  1794. .rev_offs = 0x0050,
  1795. .sysc_offs = 0x0054,
  1796. .syss_offs = 0x0058,
  1797. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  1798. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1799. SYSS_HAS_RESET_STATUS),
  1800. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1801. SIDLE_SMART_WKUP),
  1802. .sysc_fields = &omap_hwmod_sysc_type1,
  1803. };
  1804. static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
  1805. .name = "uart",
  1806. .sysc = &dra7xx_uart_sysc,
  1807. };
  1808. /* uart1 */
  1809. static struct omap_hwmod dra7xx_uart1_hwmod = {
  1810. .name = "uart1",
  1811. .class = &dra7xx_uart_hwmod_class,
  1812. .clkdm_name = "l4per_clkdm",
  1813. .main_clk = "uart1_gfclk_mux",
  1814. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
  1815. .prcm = {
  1816. .omap4 = {
  1817. .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
  1818. .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
  1819. .modulemode = MODULEMODE_SWCTRL,
  1820. },
  1821. },
  1822. };
  1823. /* uart2 */
  1824. static struct omap_hwmod dra7xx_uart2_hwmod = {
  1825. .name = "uart2",
  1826. .class = &dra7xx_uart_hwmod_class,
  1827. .clkdm_name = "l4per_clkdm",
  1828. .main_clk = "uart2_gfclk_mux",
  1829. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1830. .prcm = {
  1831. .omap4 = {
  1832. .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
  1833. .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
  1834. .modulemode = MODULEMODE_SWCTRL,
  1835. },
  1836. },
  1837. };
  1838. /* uart3 */
  1839. static struct omap_hwmod dra7xx_uart3_hwmod = {
  1840. .name = "uart3",
  1841. .class = &dra7xx_uart_hwmod_class,
  1842. .clkdm_name = "l4per_clkdm",
  1843. .main_clk = "uart3_gfclk_mux",
  1844. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
  1845. .prcm = {
  1846. .omap4 = {
  1847. .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
  1848. .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
  1849. .modulemode = MODULEMODE_SWCTRL,
  1850. },
  1851. },
  1852. };
  1853. /* uart4 */
  1854. static struct omap_hwmod dra7xx_uart4_hwmod = {
  1855. .name = "uart4",
  1856. .class = &dra7xx_uart_hwmod_class,
  1857. .clkdm_name = "l4per_clkdm",
  1858. .main_clk = "uart4_gfclk_mux",
  1859. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1860. .prcm = {
  1861. .omap4 = {
  1862. .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
  1863. .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
  1864. .modulemode = MODULEMODE_SWCTRL,
  1865. },
  1866. },
  1867. };
  1868. /* uart5 */
  1869. static struct omap_hwmod dra7xx_uart5_hwmod = {
  1870. .name = "uart5",
  1871. .class = &dra7xx_uart_hwmod_class,
  1872. .clkdm_name = "l4per_clkdm",
  1873. .main_clk = "uart5_gfclk_mux",
  1874. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1875. .prcm = {
  1876. .omap4 = {
  1877. .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
  1878. .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
  1879. .modulemode = MODULEMODE_SWCTRL,
  1880. },
  1881. },
  1882. };
  1883. /* uart6 */
  1884. static struct omap_hwmod dra7xx_uart6_hwmod = {
  1885. .name = "uart6",
  1886. .class = &dra7xx_uart_hwmod_class,
  1887. .clkdm_name = "ipu_clkdm",
  1888. .main_clk = "uart6_gfclk_mux",
  1889. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1890. .prcm = {
  1891. .omap4 = {
  1892. .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
  1893. .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
  1894. .modulemode = MODULEMODE_SWCTRL,
  1895. },
  1896. },
  1897. };
  1898. /* uart7 */
  1899. static struct omap_hwmod dra7xx_uart7_hwmod = {
  1900. .name = "uart7",
  1901. .class = &dra7xx_uart_hwmod_class,
  1902. .clkdm_name = "l4per2_clkdm",
  1903. .main_clk = "uart7_gfclk_mux",
  1904. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1905. .prcm = {
  1906. .omap4 = {
  1907. .clkctrl_offs = DRA7XX_CM_L4PER2_UART7_CLKCTRL_OFFSET,
  1908. .context_offs = DRA7XX_RM_L4PER2_UART7_CONTEXT_OFFSET,
  1909. .modulemode = MODULEMODE_SWCTRL,
  1910. },
  1911. },
  1912. };
  1913. /* uart8 */
  1914. static struct omap_hwmod dra7xx_uart8_hwmod = {
  1915. .name = "uart8",
  1916. .class = &dra7xx_uart_hwmod_class,
  1917. .clkdm_name = "l4per2_clkdm",
  1918. .main_clk = "uart8_gfclk_mux",
  1919. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1920. .prcm = {
  1921. .omap4 = {
  1922. .clkctrl_offs = DRA7XX_CM_L4PER2_UART8_CLKCTRL_OFFSET,
  1923. .context_offs = DRA7XX_RM_L4PER2_UART8_CONTEXT_OFFSET,
  1924. .modulemode = MODULEMODE_SWCTRL,
  1925. },
  1926. },
  1927. };
  1928. /* uart9 */
  1929. static struct omap_hwmod dra7xx_uart9_hwmod = {
  1930. .name = "uart9",
  1931. .class = &dra7xx_uart_hwmod_class,
  1932. .clkdm_name = "l4per2_clkdm",
  1933. .main_clk = "uart9_gfclk_mux",
  1934. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1935. .prcm = {
  1936. .omap4 = {
  1937. .clkctrl_offs = DRA7XX_CM_L4PER2_UART9_CLKCTRL_OFFSET,
  1938. .context_offs = DRA7XX_RM_L4PER2_UART9_CONTEXT_OFFSET,
  1939. .modulemode = MODULEMODE_SWCTRL,
  1940. },
  1941. },
  1942. };
  1943. /* uart10 */
  1944. static struct omap_hwmod dra7xx_uart10_hwmod = {
  1945. .name = "uart10",
  1946. .class = &dra7xx_uart_hwmod_class,
  1947. .clkdm_name = "wkupaon_clkdm",
  1948. .main_clk = "uart10_gfclk_mux",
  1949. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1950. .prcm = {
  1951. .omap4 = {
  1952. .clkctrl_offs = DRA7XX_CM_WKUPAON_UART10_CLKCTRL_OFFSET,
  1953. .context_offs = DRA7XX_RM_WKUPAON_UART10_CONTEXT_OFFSET,
  1954. .modulemode = MODULEMODE_SWCTRL,
  1955. },
  1956. },
  1957. };
  1958. /*
  1959. * 'usb_otg_ss' class
  1960. *
  1961. */
  1962. static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
  1963. .rev_offs = 0x0000,
  1964. .sysc_offs = 0x0010,
  1965. .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
  1966. SYSC_HAS_SIDLEMODE),
  1967. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1968. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1969. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1970. .sysc_fields = &omap_hwmod_sysc_type2,
  1971. };
  1972. static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
  1973. .name = "usb_otg_ss",
  1974. .sysc = &dra7xx_usb_otg_ss_sysc,
  1975. };
  1976. /* usb_otg_ss1 */
  1977. static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
  1978. { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
  1979. };
  1980. static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
  1981. .name = "usb_otg_ss1",
  1982. .class = &dra7xx_usb_otg_ss_hwmod_class,
  1983. .clkdm_name = "l3init_clkdm",
  1984. .main_clk = "dpll_core_h13x2_ck",
  1985. .prcm = {
  1986. .omap4 = {
  1987. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
  1988. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
  1989. .modulemode = MODULEMODE_HWCTRL,
  1990. },
  1991. },
  1992. .opt_clks = usb_otg_ss1_opt_clks,
  1993. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
  1994. };
  1995. /* usb_otg_ss2 */
  1996. static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
  1997. { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
  1998. };
  1999. static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
  2000. .name = "usb_otg_ss2",
  2001. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2002. .clkdm_name = "l3init_clkdm",
  2003. .main_clk = "dpll_core_h13x2_ck",
  2004. .prcm = {
  2005. .omap4 = {
  2006. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
  2007. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
  2008. .modulemode = MODULEMODE_HWCTRL,
  2009. },
  2010. },
  2011. .opt_clks = usb_otg_ss2_opt_clks,
  2012. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
  2013. };
  2014. /* usb_otg_ss3 */
  2015. static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
  2016. .name = "usb_otg_ss3",
  2017. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2018. .clkdm_name = "l3init_clkdm",
  2019. .main_clk = "dpll_core_h13x2_ck",
  2020. .prcm = {
  2021. .omap4 = {
  2022. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
  2023. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
  2024. .modulemode = MODULEMODE_HWCTRL,
  2025. },
  2026. },
  2027. };
  2028. /* usb_otg_ss4 */
  2029. static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
  2030. .name = "usb_otg_ss4",
  2031. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2032. .clkdm_name = "l3init_clkdm",
  2033. .main_clk = "dpll_core_h13x2_ck",
  2034. .prcm = {
  2035. .omap4 = {
  2036. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
  2037. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
  2038. .modulemode = MODULEMODE_HWCTRL,
  2039. },
  2040. },
  2041. };
  2042. /*
  2043. * 'vcp' class
  2044. *
  2045. */
  2046. static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
  2047. .name = "vcp",
  2048. };
  2049. /* vcp1 */
  2050. static struct omap_hwmod dra7xx_vcp1_hwmod = {
  2051. .name = "vcp1",
  2052. .class = &dra7xx_vcp_hwmod_class,
  2053. .clkdm_name = "l3main1_clkdm",
  2054. .main_clk = "l3_iclk_div",
  2055. .prcm = {
  2056. .omap4 = {
  2057. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
  2058. .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
  2059. },
  2060. },
  2061. };
  2062. /* vcp2 */
  2063. static struct omap_hwmod dra7xx_vcp2_hwmod = {
  2064. .name = "vcp2",
  2065. .class = &dra7xx_vcp_hwmod_class,
  2066. .clkdm_name = "l3main1_clkdm",
  2067. .main_clk = "l3_iclk_div",
  2068. .prcm = {
  2069. .omap4 = {
  2070. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
  2071. .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
  2072. },
  2073. },
  2074. };
  2075. /*
  2076. * 'wd_timer' class
  2077. *
  2078. */
  2079. static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
  2080. .rev_offs = 0x0000,
  2081. .sysc_offs = 0x0010,
  2082. .syss_offs = 0x0014,
  2083. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  2084. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  2085. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2086. SIDLE_SMART_WKUP),
  2087. .sysc_fields = &omap_hwmod_sysc_type1,
  2088. };
  2089. static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
  2090. .name = "wd_timer",
  2091. .sysc = &dra7xx_wd_timer_sysc,
  2092. .pre_shutdown = &omap2_wd_timer_disable,
  2093. .reset = &omap2_wd_timer_reset,
  2094. };
  2095. /* wd_timer2 */
  2096. static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
  2097. .name = "wd_timer2",
  2098. .class = &dra7xx_wd_timer_hwmod_class,
  2099. .clkdm_name = "wkupaon_clkdm",
  2100. .main_clk = "sys_32k_ck",
  2101. .prcm = {
  2102. .omap4 = {
  2103. .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
  2104. .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
  2105. .modulemode = MODULEMODE_SWCTRL,
  2106. },
  2107. },
  2108. };
  2109. /*
  2110. * Interfaces
  2111. */
  2112. /* l3_main_1 -> dmm */
  2113. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
  2114. .master = &dra7xx_l3_main_1_hwmod,
  2115. .slave = &dra7xx_dmm_hwmod,
  2116. .clk = "l3_iclk_div",
  2117. .user = OCP_USER_SDMA,
  2118. };
  2119. /* l3_main_2 -> l3_instr */
  2120. static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
  2121. .master = &dra7xx_l3_main_2_hwmod,
  2122. .slave = &dra7xx_l3_instr_hwmod,
  2123. .clk = "l3_iclk_div",
  2124. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2125. };
  2126. /* l4_cfg -> l3_main_1 */
  2127. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
  2128. .master = &dra7xx_l4_cfg_hwmod,
  2129. .slave = &dra7xx_l3_main_1_hwmod,
  2130. .clk = "l3_iclk_div",
  2131. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2132. };
  2133. /* mpu -> l3_main_1 */
  2134. static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
  2135. .master = &dra7xx_mpu_hwmod,
  2136. .slave = &dra7xx_l3_main_1_hwmod,
  2137. .clk = "l3_iclk_div",
  2138. .user = OCP_USER_MPU,
  2139. };
  2140. /* l3_main_1 -> l3_main_2 */
  2141. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
  2142. .master = &dra7xx_l3_main_1_hwmod,
  2143. .slave = &dra7xx_l3_main_2_hwmod,
  2144. .clk = "l3_iclk_div",
  2145. .user = OCP_USER_MPU,
  2146. };
  2147. /* l4_cfg -> l3_main_2 */
  2148. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
  2149. .master = &dra7xx_l4_cfg_hwmod,
  2150. .slave = &dra7xx_l3_main_2_hwmod,
  2151. .clk = "l3_iclk_div",
  2152. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2153. };
  2154. /* l3_main_1 -> l4_cfg */
  2155. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
  2156. .master = &dra7xx_l3_main_1_hwmod,
  2157. .slave = &dra7xx_l4_cfg_hwmod,
  2158. .clk = "l3_iclk_div",
  2159. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2160. };
  2161. /* l3_main_1 -> l4_per1 */
  2162. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
  2163. .master = &dra7xx_l3_main_1_hwmod,
  2164. .slave = &dra7xx_l4_per1_hwmod,
  2165. .clk = "l3_iclk_div",
  2166. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2167. };
  2168. /* l3_main_1 -> l4_per2 */
  2169. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
  2170. .master = &dra7xx_l3_main_1_hwmod,
  2171. .slave = &dra7xx_l4_per2_hwmod,
  2172. .clk = "l3_iclk_div",
  2173. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2174. };
  2175. /* l3_main_1 -> l4_per3 */
  2176. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
  2177. .master = &dra7xx_l3_main_1_hwmod,
  2178. .slave = &dra7xx_l4_per3_hwmod,
  2179. .clk = "l3_iclk_div",
  2180. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2181. };
  2182. /* l3_main_1 -> l4_wkup */
  2183. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
  2184. .master = &dra7xx_l3_main_1_hwmod,
  2185. .slave = &dra7xx_l4_wkup_hwmod,
  2186. .clk = "wkupaon_iclk_mux",
  2187. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2188. };
  2189. /* l4_per2 -> atl */
  2190. static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
  2191. .master = &dra7xx_l4_per2_hwmod,
  2192. .slave = &dra7xx_atl_hwmod,
  2193. .clk = "l3_iclk_div",
  2194. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2195. };
  2196. /* l3_main_1 -> bb2d */
  2197. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
  2198. .master = &dra7xx_l3_main_1_hwmod,
  2199. .slave = &dra7xx_bb2d_hwmod,
  2200. .clk = "l3_iclk_div",
  2201. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2202. };
  2203. /* l4_wkup -> counter_32k */
  2204. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
  2205. .master = &dra7xx_l4_wkup_hwmod,
  2206. .slave = &dra7xx_counter_32k_hwmod,
  2207. .clk = "wkupaon_iclk_mux",
  2208. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2209. };
  2210. /* l4_wkup -> ctrl_module_wkup */
  2211. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
  2212. .master = &dra7xx_l4_wkup_hwmod,
  2213. .slave = &dra7xx_ctrl_module_wkup_hwmod,
  2214. .clk = "wkupaon_iclk_mux",
  2215. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2216. };
  2217. static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = {
  2218. .master = &dra7xx_l4_per2_hwmod,
  2219. .slave = &dra7xx_gmac_hwmod,
  2220. .clk = "dpll_gmac_ck",
  2221. .user = OCP_USER_MPU,
  2222. };
  2223. static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = {
  2224. .master = &dra7xx_gmac_hwmod,
  2225. .slave = &dra7xx_mdio_hwmod,
  2226. .user = OCP_USER_MPU,
  2227. };
  2228. /* l4_wkup -> dcan1 */
  2229. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
  2230. .master = &dra7xx_l4_wkup_hwmod,
  2231. .slave = &dra7xx_dcan1_hwmod,
  2232. .clk = "wkupaon_iclk_mux",
  2233. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2234. };
  2235. /* l4_per2 -> dcan2 */
  2236. static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
  2237. .master = &dra7xx_l4_per2_hwmod,
  2238. .slave = &dra7xx_dcan2_hwmod,
  2239. .clk = "l3_iclk_div",
  2240. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2241. };
  2242. static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
  2243. {
  2244. .pa_start = 0x4a056000,
  2245. .pa_end = 0x4a056fff,
  2246. .flags = ADDR_TYPE_RT
  2247. },
  2248. { }
  2249. };
  2250. /* l4_cfg -> dma_system */
  2251. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
  2252. .master = &dra7xx_l4_cfg_hwmod,
  2253. .slave = &dra7xx_dma_system_hwmod,
  2254. .clk = "l3_iclk_div",
  2255. .addr = dra7xx_dma_system_addrs,
  2256. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2257. };
  2258. static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
  2259. {
  2260. .name = "family",
  2261. .pa_start = 0x58000000,
  2262. .pa_end = 0x5800007f,
  2263. .flags = ADDR_TYPE_RT
  2264. },
  2265. };
  2266. /* l3_main_1 -> dss */
  2267. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
  2268. .master = &dra7xx_l3_main_1_hwmod,
  2269. .slave = &dra7xx_dss_hwmod,
  2270. .clk = "l3_iclk_div",
  2271. .addr = dra7xx_dss_addrs,
  2272. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2273. };
  2274. static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = {
  2275. {
  2276. .name = "dispc",
  2277. .pa_start = 0x58001000,
  2278. .pa_end = 0x58001fff,
  2279. .flags = ADDR_TYPE_RT
  2280. },
  2281. };
  2282. /* l3_main_1 -> dispc */
  2283. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
  2284. .master = &dra7xx_l3_main_1_hwmod,
  2285. .slave = &dra7xx_dss_dispc_hwmod,
  2286. .clk = "l3_iclk_div",
  2287. .addr = dra7xx_dss_dispc_addrs,
  2288. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2289. };
  2290. static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = {
  2291. {
  2292. .name = "hdmi_wp",
  2293. .pa_start = 0x58040000,
  2294. .pa_end = 0x580400ff,
  2295. .flags = ADDR_TYPE_RT
  2296. },
  2297. { }
  2298. };
  2299. /* l3_main_1 -> dispc */
  2300. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
  2301. .master = &dra7xx_l3_main_1_hwmod,
  2302. .slave = &dra7xx_dss_hdmi_hwmod,
  2303. .clk = "l3_iclk_div",
  2304. .addr = dra7xx_dss_hdmi_addrs,
  2305. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2306. };
  2307. static struct omap_hwmod_addr_space dra7xx_elm_addrs[] = {
  2308. {
  2309. .pa_start = 0x48078000,
  2310. .pa_end = 0x48078fff,
  2311. .flags = ADDR_TYPE_RT
  2312. },
  2313. { }
  2314. };
  2315. /* l4_per1 -> elm */
  2316. static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
  2317. .master = &dra7xx_l4_per1_hwmod,
  2318. .slave = &dra7xx_elm_hwmod,
  2319. .clk = "l3_iclk_div",
  2320. .addr = dra7xx_elm_addrs,
  2321. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2322. };
  2323. /* l4_wkup -> gpio1 */
  2324. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
  2325. .master = &dra7xx_l4_wkup_hwmod,
  2326. .slave = &dra7xx_gpio1_hwmod,
  2327. .clk = "wkupaon_iclk_mux",
  2328. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2329. };
  2330. /* l4_per1 -> gpio2 */
  2331. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
  2332. .master = &dra7xx_l4_per1_hwmod,
  2333. .slave = &dra7xx_gpio2_hwmod,
  2334. .clk = "l3_iclk_div",
  2335. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2336. };
  2337. /* l4_per1 -> gpio3 */
  2338. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
  2339. .master = &dra7xx_l4_per1_hwmod,
  2340. .slave = &dra7xx_gpio3_hwmod,
  2341. .clk = "l3_iclk_div",
  2342. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2343. };
  2344. /* l4_per1 -> gpio4 */
  2345. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
  2346. .master = &dra7xx_l4_per1_hwmod,
  2347. .slave = &dra7xx_gpio4_hwmod,
  2348. .clk = "l3_iclk_div",
  2349. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2350. };
  2351. /* l4_per1 -> gpio5 */
  2352. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
  2353. .master = &dra7xx_l4_per1_hwmod,
  2354. .slave = &dra7xx_gpio5_hwmod,
  2355. .clk = "l3_iclk_div",
  2356. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2357. };
  2358. /* l4_per1 -> gpio6 */
  2359. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
  2360. .master = &dra7xx_l4_per1_hwmod,
  2361. .slave = &dra7xx_gpio6_hwmod,
  2362. .clk = "l3_iclk_div",
  2363. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2364. };
  2365. /* l4_per1 -> gpio7 */
  2366. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
  2367. .master = &dra7xx_l4_per1_hwmod,
  2368. .slave = &dra7xx_gpio7_hwmod,
  2369. .clk = "l3_iclk_div",
  2370. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2371. };
  2372. /* l4_per1 -> gpio8 */
  2373. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
  2374. .master = &dra7xx_l4_per1_hwmod,
  2375. .slave = &dra7xx_gpio8_hwmod,
  2376. .clk = "l3_iclk_div",
  2377. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2378. };
  2379. static struct omap_hwmod_addr_space dra7xx_gpmc_addrs[] = {
  2380. {
  2381. .pa_start = 0x50000000,
  2382. .pa_end = 0x500003ff,
  2383. .flags = ADDR_TYPE_RT
  2384. },
  2385. { }
  2386. };
  2387. /* l3_main_1 -> gpmc */
  2388. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
  2389. .master = &dra7xx_l3_main_1_hwmod,
  2390. .slave = &dra7xx_gpmc_hwmod,
  2391. .clk = "l3_iclk_div",
  2392. .addr = dra7xx_gpmc_addrs,
  2393. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2394. };
  2395. static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
  2396. {
  2397. .pa_start = 0x480b2000,
  2398. .pa_end = 0x480b201f,
  2399. .flags = ADDR_TYPE_RT
  2400. },
  2401. { }
  2402. };
  2403. /* l4_per1 -> hdq1w */
  2404. static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
  2405. .master = &dra7xx_l4_per1_hwmod,
  2406. .slave = &dra7xx_hdq1w_hwmod,
  2407. .clk = "l3_iclk_div",
  2408. .addr = dra7xx_hdq1w_addrs,
  2409. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2410. };
  2411. /* l4_per1 -> i2c1 */
  2412. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
  2413. .master = &dra7xx_l4_per1_hwmod,
  2414. .slave = &dra7xx_i2c1_hwmod,
  2415. .clk = "l3_iclk_div",
  2416. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2417. };
  2418. /* l4_per1 -> i2c2 */
  2419. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
  2420. .master = &dra7xx_l4_per1_hwmod,
  2421. .slave = &dra7xx_i2c2_hwmod,
  2422. .clk = "l3_iclk_div",
  2423. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2424. };
  2425. /* l4_per1 -> i2c3 */
  2426. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
  2427. .master = &dra7xx_l4_per1_hwmod,
  2428. .slave = &dra7xx_i2c3_hwmod,
  2429. .clk = "l3_iclk_div",
  2430. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2431. };
  2432. /* l4_per1 -> i2c4 */
  2433. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
  2434. .master = &dra7xx_l4_per1_hwmod,
  2435. .slave = &dra7xx_i2c4_hwmod,
  2436. .clk = "l3_iclk_div",
  2437. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2438. };
  2439. /* l4_per1 -> i2c5 */
  2440. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
  2441. .master = &dra7xx_l4_per1_hwmod,
  2442. .slave = &dra7xx_i2c5_hwmod,
  2443. .clk = "l3_iclk_div",
  2444. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2445. };
  2446. /* l4_cfg -> mailbox1 */
  2447. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
  2448. .master = &dra7xx_l4_cfg_hwmod,
  2449. .slave = &dra7xx_mailbox1_hwmod,
  2450. .clk = "l3_iclk_div",
  2451. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2452. };
  2453. /* l4_per3 -> mailbox2 */
  2454. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
  2455. .master = &dra7xx_l4_per3_hwmod,
  2456. .slave = &dra7xx_mailbox2_hwmod,
  2457. .clk = "l3_iclk_div",
  2458. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2459. };
  2460. /* l4_per3 -> mailbox3 */
  2461. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
  2462. .master = &dra7xx_l4_per3_hwmod,
  2463. .slave = &dra7xx_mailbox3_hwmod,
  2464. .clk = "l3_iclk_div",
  2465. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2466. };
  2467. /* l4_per3 -> mailbox4 */
  2468. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
  2469. .master = &dra7xx_l4_per3_hwmod,
  2470. .slave = &dra7xx_mailbox4_hwmod,
  2471. .clk = "l3_iclk_div",
  2472. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2473. };
  2474. /* l4_per3 -> mailbox5 */
  2475. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
  2476. .master = &dra7xx_l4_per3_hwmod,
  2477. .slave = &dra7xx_mailbox5_hwmod,
  2478. .clk = "l3_iclk_div",
  2479. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2480. };
  2481. /* l4_per3 -> mailbox6 */
  2482. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
  2483. .master = &dra7xx_l4_per3_hwmod,
  2484. .slave = &dra7xx_mailbox6_hwmod,
  2485. .clk = "l3_iclk_div",
  2486. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2487. };
  2488. /* l4_per3 -> mailbox7 */
  2489. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
  2490. .master = &dra7xx_l4_per3_hwmod,
  2491. .slave = &dra7xx_mailbox7_hwmod,
  2492. .clk = "l3_iclk_div",
  2493. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2494. };
  2495. /* l4_per3 -> mailbox8 */
  2496. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
  2497. .master = &dra7xx_l4_per3_hwmod,
  2498. .slave = &dra7xx_mailbox8_hwmod,
  2499. .clk = "l3_iclk_div",
  2500. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2501. };
  2502. /* l4_per3 -> mailbox9 */
  2503. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
  2504. .master = &dra7xx_l4_per3_hwmod,
  2505. .slave = &dra7xx_mailbox9_hwmod,
  2506. .clk = "l3_iclk_div",
  2507. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2508. };
  2509. /* l4_per3 -> mailbox10 */
  2510. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
  2511. .master = &dra7xx_l4_per3_hwmod,
  2512. .slave = &dra7xx_mailbox10_hwmod,
  2513. .clk = "l3_iclk_div",
  2514. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2515. };
  2516. /* l4_per3 -> mailbox11 */
  2517. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
  2518. .master = &dra7xx_l4_per3_hwmod,
  2519. .slave = &dra7xx_mailbox11_hwmod,
  2520. .clk = "l3_iclk_div",
  2521. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2522. };
  2523. /* l4_per3 -> mailbox12 */
  2524. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
  2525. .master = &dra7xx_l4_per3_hwmod,
  2526. .slave = &dra7xx_mailbox12_hwmod,
  2527. .clk = "l3_iclk_div",
  2528. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2529. };
  2530. /* l4_per3 -> mailbox13 */
  2531. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
  2532. .master = &dra7xx_l4_per3_hwmod,
  2533. .slave = &dra7xx_mailbox13_hwmod,
  2534. .clk = "l3_iclk_div",
  2535. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2536. };
  2537. /* l4_per1 -> mcspi1 */
  2538. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
  2539. .master = &dra7xx_l4_per1_hwmod,
  2540. .slave = &dra7xx_mcspi1_hwmod,
  2541. .clk = "l3_iclk_div",
  2542. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2543. };
  2544. /* l4_per1 -> mcspi2 */
  2545. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
  2546. .master = &dra7xx_l4_per1_hwmod,
  2547. .slave = &dra7xx_mcspi2_hwmod,
  2548. .clk = "l3_iclk_div",
  2549. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2550. };
  2551. /* l4_per1 -> mcspi3 */
  2552. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
  2553. .master = &dra7xx_l4_per1_hwmod,
  2554. .slave = &dra7xx_mcspi3_hwmod,
  2555. .clk = "l3_iclk_div",
  2556. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2557. };
  2558. /* l4_per1 -> mcspi4 */
  2559. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
  2560. .master = &dra7xx_l4_per1_hwmod,
  2561. .slave = &dra7xx_mcspi4_hwmod,
  2562. .clk = "l3_iclk_div",
  2563. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2564. };
  2565. /* l4_per1 -> mmc1 */
  2566. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
  2567. .master = &dra7xx_l4_per1_hwmod,
  2568. .slave = &dra7xx_mmc1_hwmod,
  2569. .clk = "l3_iclk_div",
  2570. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2571. };
  2572. /* l4_per1 -> mmc2 */
  2573. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
  2574. .master = &dra7xx_l4_per1_hwmod,
  2575. .slave = &dra7xx_mmc2_hwmod,
  2576. .clk = "l3_iclk_div",
  2577. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2578. };
  2579. /* l4_per1 -> mmc3 */
  2580. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
  2581. .master = &dra7xx_l4_per1_hwmod,
  2582. .slave = &dra7xx_mmc3_hwmod,
  2583. .clk = "l3_iclk_div",
  2584. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2585. };
  2586. /* l4_per1 -> mmc4 */
  2587. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
  2588. .master = &dra7xx_l4_per1_hwmod,
  2589. .slave = &dra7xx_mmc4_hwmod,
  2590. .clk = "l3_iclk_div",
  2591. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2592. };
  2593. /* l4_cfg -> mpu */
  2594. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
  2595. .master = &dra7xx_l4_cfg_hwmod,
  2596. .slave = &dra7xx_mpu_hwmod,
  2597. .clk = "l3_iclk_div",
  2598. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2599. };
  2600. /* l4_cfg -> ocp2scp1 */
  2601. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
  2602. .master = &dra7xx_l4_cfg_hwmod,
  2603. .slave = &dra7xx_ocp2scp1_hwmod,
  2604. .clk = "l4_root_clk_div",
  2605. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2606. };
  2607. /* l4_cfg -> ocp2scp3 */
  2608. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
  2609. .master = &dra7xx_l4_cfg_hwmod,
  2610. .slave = &dra7xx_ocp2scp3_hwmod,
  2611. .clk = "l4_root_clk_div",
  2612. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2613. };
  2614. /* l3_main_1 -> pciess1 */
  2615. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
  2616. .master = &dra7xx_l3_main_1_hwmod,
  2617. .slave = &dra7xx_pciess1_hwmod,
  2618. .clk = "l3_iclk_div",
  2619. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2620. };
  2621. /* l4_cfg -> pciess1 */
  2622. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
  2623. .master = &dra7xx_l4_cfg_hwmod,
  2624. .slave = &dra7xx_pciess1_hwmod,
  2625. .clk = "l4_root_clk_div",
  2626. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2627. };
  2628. /* l3_main_1 -> pciess2 */
  2629. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
  2630. .master = &dra7xx_l3_main_1_hwmod,
  2631. .slave = &dra7xx_pciess2_hwmod,
  2632. .clk = "l3_iclk_div",
  2633. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2634. };
  2635. /* l4_cfg -> pciess2 */
  2636. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
  2637. .master = &dra7xx_l4_cfg_hwmod,
  2638. .slave = &dra7xx_pciess2_hwmod,
  2639. .clk = "l4_root_clk_div",
  2640. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2641. };
  2642. static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
  2643. {
  2644. .pa_start = 0x4b300000,
  2645. .pa_end = 0x4b30007f,
  2646. .flags = ADDR_TYPE_RT
  2647. },
  2648. { }
  2649. };
  2650. /* l3_main_1 -> qspi */
  2651. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
  2652. .master = &dra7xx_l3_main_1_hwmod,
  2653. .slave = &dra7xx_qspi_hwmod,
  2654. .clk = "l3_iclk_div",
  2655. .addr = dra7xx_qspi_addrs,
  2656. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2657. };
  2658. /* l4_per3 -> rtcss */
  2659. static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
  2660. .master = &dra7xx_l4_per3_hwmod,
  2661. .slave = &dra7xx_rtcss_hwmod,
  2662. .clk = "l4_root_clk_div",
  2663. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2664. };
  2665. static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
  2666. {
  2667. .name = "sysc",
  2668. .pa_start = 0x4a141100,
  2669. .pa_end = 0x4a141107,
  2670. .flags = ADDR_TYPE_RT
  2671. },
  2672. { }
  2673. };
  2674. /* l4_cfg -> sata */
  2675. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
  2676. .master = &dra7xx_l4_cfg_hwmod,
  2677. .slave = &dra7xx_sata_hwmod,
  2678. .clk = "l3_iclk_div",
  2679. .addr = dra7xx_sata_addrs,
  2680. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2681. };
  2682. static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
  2683. {
  2684. .pa_start = 0x4a0dd000,
  2685. .pa_end = 0x4a0dd07f,
  2686. .flags = ADDR_TYPE_RT
  2687. },
  2688. { }
  2689. };
  2690. /* l4_cfg -> smartreflex_core */
  2691. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
  2692. .master = &dra7xx_l4_cfg_hwmod,
  2693. .slave = &dra7xx_smartreflex_core_hwmod,
  2694. .clk = "l4_root_clk_div",
  2695. .addr = dra7xx_smartreflex_core_addrs,
  2696. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2697. };
  2698. static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
  2699. {
  2700. .pa_start = 0x4a0d9000,
  2701. .pa_end = 0x4a0d907f,
  2702. .flags = ADDR_TYPE_RT
  2703. },
  2704. { }
  2705. };
  2706. /* l4_cfg -> smartreflex_mpu */
  2707. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
  2708. .master = &dra7xx_l4_cfg_hwmod,
  2709. .slave = &dra7xx_smartreflex_mpu_hwmod,
  2710. .clk = "l4_root_clk_div",
  2711. .addr = dra7xx_smartreflex_mpu_addrs,
  2712. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2713. };
  2714. static struct omap_hwmod_addr_space dra7xx_spinlock_addrs[] = {
  2715. {
  2716. .pa_start = 0x4a0f6000,
  2717. .pa_end = 0x4a0f6fff,
  2718. .flags = ADDR_TYPE_RT
  2719. },
  2720. { }
  2721. };
  2722. /* l4_cfg -> spinlock */
  2723. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
  2724. .master = &dra7xx_l4_cfg_hwmod,
  2725. .slave = &dra7xx_spinlock_hwmod,
  2726. .clk = "l3_iclk_div",
  2727. .addr = dra7xx_spinlock_addrs,
  2728. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2729. };
  2730. /* l4_wkup -> timer1 */
  2731. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
  2732. .master = &dra7xx_l4_wkup_hwmod,
  2733. .slave = &dra7xx_timer1_hwmod,
  2734. .clk = "wkupaon_iclk_mux",
  2735. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2736. };
  2737. /* l4_per1 -> timer2 */
  2738. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
  2739. .master = &dra7xx_l4_per1_hwmod,
  2740. .slave = &dra7xx_timer2_hwmod,
  2741. .clk = "l3_iclk_div",
  2742. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2743. };
  2744. /* l4_per1 -> timer3 */
  2745. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
  2746. .master = &dra7xx_l4_per1_hwmod,
  2747. .slave = &dra7xx_timer3_hwmod,
  2748. .clk = "l3_iclk_div",
  2749. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2750. };
  2751. /* l4_per1 -> timer4 */
  2752. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
  2753. .master = &dra7xx_l4_per1_hwmod,
  2754. .slave = &dra7xx_timer4_hwmod,
  2755. .clk = "l3_iclk_div",
  2756. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2757. };
  2758. /* l4_per3 -> timer5 */
  2759. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
  2760. .master = &dra7xx_l4_per3_hwmod,
  2761. .slave = &dra7xx_timer5_hwmod,
  2762. .clk = "l3_iclk_div",
  2763. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2764. };
  2765. /* l4_per3 -> timer6 */
  2766. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
  2767. .master = &dra7xx_l4_per3_hwmod,
  2768. .slave = &dra7xx_timer6_hwmod,
  2769. .clk = "l3_iclk_div",
  2770. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2771. };
  2772. /* l4_per3 -> timer7 */
  2773. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
  2774. .master = &dra7xx_l4_per3_hwmod,
  2775. .slave = &dra7xx_timer7_hwmod,
  2776. .clk = "l3_iclk_div",
  2777. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2778. };
  2779. /* l4_per3 -> timer8 */
  2780. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
  2781. .master = &dra7xx_l4_per3_hwmod,
  2782. .slave = &dra7xx_timer8_hwmod,
  2783. .clk = "l3_iclk_div",
  2784. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2785. };
  2786. /* l4_per1 -> timer9 */
  2787. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
  2788. .master = &dra7xx_l4_per1_hwmod,
  2789. .slave = &dra7xx_timer9_hwmod,
  2790. .clk = "l3_iclk_div",
  2791. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2792. };
  2793. /* l4_per1 -> timer10 */
  2794. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
  2795. .master = &dra7xx_l4_per1_hwmod,
  2796. .slave = &dra7xx_timer10_hwmod,
  2797. .clk = "l3_iclk_div",
  2798. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2799. };
  2800. /* l4_per1 -> timer11 */
  2801. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
  2802. .master = &dra7xx_l4_per1_hwmod,
  2803. .slave = &dra7xx_timer11_hwmod,
  2804. .clk = "l3_iclk_div",
  2805. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2806. };
  2807. /* l4_per3 -> timer13 */
  2808. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
  2809. .master = &dra7xx_l4_per3_hwmod,
  2810. .slave = &dra7xx_timer13_hwmod,
  2811. .clk = "l3_iclk_div",
  2812. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2813. };
  2814. /* l4_per3 -> timer14 */
  2815. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
  2816. .master = &dra7xx_l4_per3_hwmod,
  2817. .slave = &dra7xx_timer14_hwmod,
  2818. .clk = "l3_iclk_div",
  2819. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2820. };
  2821. /* l4_per3 -> timer15 */
  2822. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
  2823. .master = &dra7xx_l4_per3_hwmod,
  2824. .slave = &dra7xx_timer15_hwmod,
  2825. .clk = "l3_iclk_div",
  2826. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2827. };
  2828. /* l4_per3 -> timer16 */
  2829. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
  2830. .master = &dra7xx_l4_per3_hwmod,
  2831. .slave = &dra7xx_timer16_hwmod,
  2832. .clk = "l3_iclk_div",
  2833. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2834. };
  2835. /* l4_per1 -> uart1 */
  2836. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
  2837. .master = &dra7xx_l4_per1_hwmod,
  2838. .slave = &dra7xx_uart1_hwmod,
  2839. .clk = "l3_iclk_div",
  2840. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2841. };
  2842. /* l4_per1 -> uart2 */
  2843. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
  2844. .master = &dra7xx_l4_per1_hwmod,
  2845. .slave = &dra7xx_uart2_hwmod,
  2846. .clk = "l3_iclk_div",
  2847. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2848. };
  2849. /* l4_per1 -> uart3 */
  2850. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
  2851. .master = &dra7xx_l4_per1_hwmod,
  2852. .slave = &dra7xx_uart3_hwmod,
  2853. .clk = "l3_iclk_div",
  2854. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2855. };
  2856. /* l4_per1 -> uart4 */
  2857. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
  2858. .master = &dra7xx_l4_per1_hwmod,
  2859. .slave = &dra7xx_uart4_hwmod,
  2860. .clk = "l3_iclk_div",
  2861. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2862. };
  2863. /* l4_per1 -> uart5 */
  2864. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
  2865. .master = &dra7xx_l4_per1_hwmod,
  2866. .slave = &dra7xx_uart5_hwmod,
  2867. .clk = "l3_iclk_div",
  2868. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2869. };
  2870. /* l4_per1 -> uart6 */
  2871. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
  2872. .master = &dra7xx_l4_per1_hwmod,
  2873. .slave = &dra7xx_uart6_hwmod,
  2874. .clk = "l3_iclk_div",
  2875. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2876. };
  2877. /* l4_per2 -> uart7 */
  2878. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = {
  2879. .master = &dra7xx_l4_per2_hwmod,
  2880. .slave = &dra7xx_uart7_hwmod,
  2881. .clk = "l3_iclk_div",
  2882. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2883. };
  2884. /* l4_per2 -> uart8 */
  2885. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = {
  2886. .master = &dra7xx_l4_per2_hwmod,
  2887. .slave = &dra7xx_uart8_hwmod,
  2888. .clk = "l3_iclk_div",
  2889. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2890. };
  2891. /* l4_per2 -> uart9 */
  2892. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart9 = {
  2893. .master = &dra7xx_l4_per2_hwmod,
  2894. .slave = &dra7xx_uart9_hwmod,
  2895. .clk = "l3_iclk_div",
  2896. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2897. };
  2898. /* l4_wkup -> uart10 */
  2899. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = {
  2900. .master = &dra7xx_l4_wkup_hwmod,
  2901. .slave = &dra7xx_uart10_hwmod,
  2902. .clk = "wkupaon_iclk_mux",
  2903. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2904. };
  2905. /* l4_per3 -> usb_otg_ss1 */
  2906. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
  2907. .master = &dra7xx_l4_per3_hwmod,
  2908. .slave = &dra7xx_usb_otg_ss1_hwmod,
  2909. .clk = "dpll_core_h13x2_ck",
  2910. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2911. };
  2912. /* l4_per3 -> usb_otg_ss2 */
  2913. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
  2914. .master = &dra7xx_l4_per3_hwmod,
  2915. .slave = &dra7xx_usb_otg_ss2_hwmod,
  2916. .clk = "dpll_core_h13x2_ck",
  2917. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2918. };
  2919. /* l4_per3 -> usb_otg_ss3 */
  2920. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
  2921. .master = &dra7xx_l4_per3_hwmod,
  2922. .slave = &dra7xx_usb_otg_ss3_hwmod,
  2923. .clk = "dpll_core_h13x2_ck",
  2924. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2925. };
  2926. /* l4_per3 -> usb_otg_ss4 */
  2927. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
  2928. .master = &dra7xx_l4_per3_hwmod,
  2929. .slave = &dra7xx_usb_otg_ss4_hwmod,
  2930. .clk = "dpll_core_h13x2_ck",
  2931. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2932. };
  2933. /* l3_main_1 -> vcp1 */
  2934. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
  2935. .master = &dra7xx_l3_main_1_hwmod,
  2936. .slave = &dra7xx_vcp1_hwmod,
  2937. .clk = "l3_iclk_div",
  2938. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2939. };
  2940. /* l4_per2 -> vcp1 */
  2941. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
  2942. .master = &dra7xx_l4_per2_hwmod,
  2943. .slave = &dra7xx_vcp1_hwmod,
  2944. .clk = "l3_iclk_div",
  2945. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2946. };
  2947. /* l3_main_1 -> vcp2 */
  2948. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
  2949. .master = &dra7xx_l3_main_1_hwmod,
  2950. .slave = &dra7xx_vcp2_hwmod,
  2951. .clk = "l3_iclk_div",
  2952. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2953. };
  2954. /* l4_per2 -> vcp2 */
  2955. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
  2956. .master = &dra7xx_l4_per2_hwmod,
  2957. .slave = &dra7xx_vcp2_hwmod,
  2958. .clk = "l3_iclk_div",
  2959. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2960. };
  2961. /* l4_wkup -> wd_timer2 */
  2962. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
  2963. .master = &dra7xx_l4_wkup_hwmod,
  2964. .slave = &dra7xx_wd_timer2_hwmod,
  2965. .clk = "wkupaon_iclk_mux",
  2966. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2967. };
  2968. static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
  2969. &dra7xx_l3_main_1__dmm,
  2970. &dra7xx_l3_main_2__l3_instr,
  2971. &dra7xx_l4_cfg__l3_main_1,
  2972. &dra7xx_mpu__l3_main_1,
  2973. &dra7xx_l3_main_1__l3_main_2,
  2974. &dra7xx_l4_cfg__l3_main_2,
  2975. &dra7xx_l3_main_1__l4_cfg,
  2976. &dra7xx_l3_main_1__l4_per1,
  2977. &dra7xx_l3_main_1__l4_per2,
  2978. &dra7xx_l3_main_1__l4_per3,
  2979. &dra7xx_l3_main_1__l4_wkup,
  2980. &dra7xx_l4_per2__atl,
  2981. &dra7xx_l3_main_1__bb2d,
  2982. &dra7xx_l4_wkup__counter_32k,
  2983. &dra7xx_l4_wkup__ctrl_module_wkup,
  2984. &dra7xx_l4_wkup__dcan1,
  2985. &dra7xx_l4_per2__dcan2,
  2986. &dra7xx_l4_per2__cpgmac0,
  2987. &dra7xx_gmac__mdio,
  2988. &dra7xx_l4_cfg__dma_system,
  2989. &dra7xx_l3_main_1__dss,
  2990. &dra7xx_l3_main_1__dispc,
  2991. &dra7xx_l3_main_1__hdmi,
  2992. &dra7xx_l4_per1__elm,
  2993. &dra7xx_l4_wkup__gpio1,
  2994. &dra7xx_l4_per1__gpio2,
  2995. &dra7xx_l4_per1__gpio3,
  2996. &dra7xx_l4_per1__gpio4,
  2997. &dra7xx_l4_per1__gpio5,
  2998. &dra7xx_l4_per1__gpio6,
  2999. &dra7xx_l4_per1__gpio7,
  3000. &dra7xx_l4_per1__gpio8,
  3001. &dra7xx_l3_main_1__gpmc,
  3002. &dra7xx_l4_per1__hdq1w,
  3003. &dra7xx_l4_per1__i2c1,
  3004. &dra7xx_l4_per1__i2c2,
  3005. &dra7xx_l4_per1__i2c3,
  3006. &dra7xx_l4_per1__i2c4,
  3007. &dra7xx_l4_per1__i2c5,
  3008. &dra7xx_l4_cfg__mailbox1,
  3009. &dra7xx_l4_per3__mailbox2,
  3010. &dra7xx_l4_per3__mailbox3,
  3011. &dra7xx_l4_per3__mailbox4,
  3012. &dra7xx_l4_per3__mailbox5,
  3013. &dra7xx_l4_per3__mailbox6,
  3014. &dra7xx_l4_per3__mailbox7,
  3015. &dra7xx_l4_per3__mailbox8,
  3016. &dra7xx_l4_per3__mailbox9,
  3017. &dra7xx_l4_per3__mailbox10,
  3018. &dra7xx_l4_per3__mailbox11,
  3019. &dra7xx_l4_per3__mailbox12,
  3020. &dra7xx_l4_per3__mailbox13,
  3021. &dra7xx_l4_per1__mcspi1,
  3022. &dra7xx_l4_per1__mcspi2,
  3023. &dra7xx_l4_per1__mcspi3,
  3024. &dra7xx_l4_per1__mcspi4,
  3025. &dra7xx_l4_per1__mmc1,
  3026. &dra7xx_l4_per1__mmc2,
  3027. &dra7xx_l4_per1__mmc3,
  3028. &dra7xx_l4_per1__mmc4,
  3029. &dra7xx_l4_cfg__mpu,
  3030. &dra7xx_l4_cfg__ocp2scp1,
  3031. &dra7xx_l4_cfg__ocp2scp3,
  3032. &dra7xx_l3_main_1__pciess1,
  3033. &dra7xx_l4_cfg__pciess1,
  3034. &dra7xx_l3_main_1__pciess2,
  3035. &dra7xx_l4_cfg__pciess2,
  3036. &dra7xx_l3_main_1__qspi,
  3037. &dra7xx_l4_per3__rtcss,
  3038. &dra7xx_l4_cfg__sata,
  3039. &dra7xx_l4_cfg__smartreflex_core,
  3040. &dra7xx_l4_cfg__smartreflex_mpu,
  3041. &dra7xx_l4_cfg__spinlock,
  3042. &dra7xx_l4_wkup__timer1,
  3043. &dra7xx_l4_per1__timer2,
  3044. &dra7xx_l4_per1__timer3,
  3045. &dra7xx_l4_per1__timer4,
  3046. &dra7xx_l4_per3__timer5,
  3047. &dra7xx_l4_per3__timer6,
  3048. &dra7xx_l4_per3__timer7,
  3049. &dra7xx_l4_per3__timer8,
  3050. &dra7xx_l4_per1__timer9,
  3051. &dra7xx_l4_per1__timer10,
  3052. &dra7xx_l4_per1__timer11,
  3053. &dra7xx_l4_per3__timer13,
  3054. &dra7xx_l4_per3__timer14,
  3055. &dra7xx_l4_per3__timer15,
  3056. &dra7xx_l4_per3__timer16,
  3057. &dra7xx_l4_per1__uart1,
  3058. &dra7xx_l4_per1__uart2,
  3059. &dra7xx_l4_per1__uart3,
  3060. &dra7xx_l4_per1__uart4,
  3061. &dra7xx_l4_per1__uart5,
  3062. &dra7xx_l4_per1__uart6,
  3063. &dra7xx_l4_per2__uart7,
  3064. &dra7xx_l4_per2__uart8,
  3065. &dra7xx_l4_per2__uart9,
  3066. &dra7xx_l4_wkup__uart10,
  3067. &dra7xx_l4_per3__usb_otg_ss1,
  3068. &dra7xx_l4_per3__usb_otg_ss2,
  3069. &dra7xx_l4_per3__usb_otg_ss3,
  3070. &dra7xx_l3_main_1__vcp1,
  3071. &dra7xx_l4_per2__vcp1,
  3072. &dra7xx_l3_main_1__vcp2,
  3073. &dra7xx_l4_per2__vcp2,
  3074. &dra7xx_l4_wkup__wd_timer2,
  3075. NULL,
  3076. };
  3077. static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
  3078. &dra7xx_l4_per3__usb_otg_ss4,
  3079. NULL,
  3080. };
  3081. static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
  3082. NULL,
  3083. };
  3084. int __init dra7xx_hwmod_init(void)
  3085. {
  3086. int ret;
  3087. omap_hwmod_init();
  3088. ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
  3089. if (!ret && soc_is_dra74x())
  3090. return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
  3091. else if (!ret && soc_is_dra72x())
  3092. return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
  3093. return ret;
  3094. }