omap_hwmod_7xx_data.c 103 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114
  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. .flags = HWMOD_CLKDM_NOAUTO,
  323. .prcm = {
  324. .omap4 = {
  325. .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
  326. .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
  327. .modulemode = MODULEMODE_SWCTRL,
  328. },
  329. },
  330. };
  331. /* dcan2 */
  332. static struct omap_hwmod dra7xx_dcan2_hwmod = {
  333. .name = "dcan2",
  334. .class = &dra7xx_dcan_hwmod_class,
  335. .clkdm_name = "l4per2_clkdm",
  336. .main_clk = "sys_clkin1",
  337. .flags = HWMOD_CLKDM_NOAUTO,
  338. .prcm = {
  339. .omap4 = {
  340. .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
  341. .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
  342. .modulemode = MODULEMODE_SWCTRL,
  343. },
  344. },
  345. };
  346. /* pwmss */
  347. static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
  348. .rev_offs = 0x0,
  349. .sysc_offs = 0x4,
  350. .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
  351. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  352. .sysc_fields = &omap_hwmod_sysc_type2,
  353. };
  354. /*
  355. * epwmss class
  356. */
  357. static struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
  358. .name = "epwmss",
  359. .sysc = &dra7xx_epwmss_sysc,
  360. };
  361. /* epwmss0 */
  362. static struct omap_hwmod dra7xx_epwmss0_hwmod = {
  363. .name = "epwmss0",
  364. .class = &dra7xx_epwmss_hwmod_class,
  365. .clkdm_name = "l4per2_clkdm",
  366. .main_clk = "l4_root_clk_div",
  367. .prcm = {
  368. .omap4 = {
  369. .modulemode = MODULEMODE_SWCTRL,
  370. .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
  371. .context_offs = DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
  372. },
  373. },
  374. };
  375. /* epwmss1 */
  376. static struct omap_hwmod dra7xx_epwmss1_hwmod = {
  377. .name = "epwmss1",
  378. .class = &dra7xx_epwmss_hwmod_class,
  379. .clkdm_name = "l4per2_clkdm",
  380. .main_clk = "l4_root_clk_div",
  381. .prcm = {
  382. .omap4 = {
  383. .modulemode = MODULEMODE_SWCTRL,
  384. .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
  385. .context_offs = DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
  386. },
  387. },
  388. };
  389. /* epwmss2 */
  390. static struct omap_hwmod dra7xx_epwmss2_hwmod = {
  391. .name = "epwmss2",
  392. .class = &dra7xx_epwmss_hwmod_class,
  393. .clkdm_name = "l4per2_clkdm",
  394. .main_clk = "l4_root_clk_div",
  395. .prcm = {
  396. .omap4 = {
  397. .modulemode = MODULEMODE_SWCTRL,
  398. .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
  399. .context_offs = DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
  400. },
  401. },
  402. };
  403. /*
  404. * 'dma' class
  405. *
  406. */
  407. static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
  408. .rev_offs = 0x0000,
  409. .sysc_offs = 0x002c,
  410. .syss_offs = 0x0028,
  411. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  412. SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  413. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  414. SYSS_HAS_RESET_STATUS),
  415. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  416. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  417. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  418. .sysc_fields = &omap_hwmod_sysc_type1,
  419. };
  420. static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
  421. .name = "dma",
  422. .sysc = &dra7xx_dma_sysc,
  423. };
  424. /* dma dev_attr */
  425. static struct omap_dma_dev_attr dma_dev_attr = {
  426. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  427. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  428. .lch_count = 32,
  429. };
  430. /* dma_system */
  431. static struct omap_hwmod dra7xx_dma_system_hwmod = {
  432. .name = "dma_system",
  433. .class = &dra7xx_dma_hwmod_class,
  434. .clkdm_name = "dma_clkdm",
  435. .main_clk = "l3_iclk_div",
  436. .prcm = {
  437. .omap4 = {
  438. .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
  439. .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
  440. },
  441. },
  442. .dev_attr = &dma_dev_attr,
  443. };
  444. /*
  445. * 'tpcc' class
  446. *
  447. */
  448. static struct omap_hwmod_class dra7xx_tpcc_hwmod_class = {
  449. .name = "tpcc",
  450. };
  451. static struct omap_hwmod dra7xx_tpcc_hwmod = {
  452. .name = "tpcc",
  453. .class = &dra7xx_tpcc_hwmod_class,
  454. .clkdm_name = "l3main1_clkdm",
  455. .main_clk = "l3_iclk_div",
  456. .prcm = {
  457. .omap4 = {
  458. .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET,
  459. .context_offs = DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET,
  460. },
  461. },
  462. };
  463. /*
  464. * 'tptc' class
  465. *
  466. */
  467. static struct omap_hwmod_class dra7xx_tptc_hwmod_class = {
  468. .name = "tptc",
  469. };
  470. /* tptc0 */
  471. static struct omap_hwmod dra7xx_tptc0_hwmod = {
  472. .name = "tptc0",
  473. .class = &dra7xx_tptc_hwmod_class,
  474. .clkdm_name = "l3main1_clkdm",
  475. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  476. .main_clk = "l3_iclk_div",
  477. .prcm = {
  478. .omap4 = {
  479. .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET,
  480. .context_offs = DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET,
  481. .modulemode = MODULEMODE_HWCTRL,
  482. },
  483. },
  484. };
  485. /* tptc1 */
  486. static struct omap_hwmod dra7xx_tptc1_hwmod = {
  487. .name = "tptc1",
  488. .class = &dra7xx_tptc_hwmod_class,
  489. .clkdm_name = "l3main1_clkdm",
  490. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  491. .main_clk = "l3_iclk_div",
  492. .prcm = {
  493. .omap4 = {
  494. .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET,
  495. .context_offs = DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET,
  496. .modulemode = MODULEMODE_HWCTRL,
  497. },
  498. },
  499. };
  500. /*
  501. * 'dss' class
  502. *
  503. */
  504. static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
  505. .rev_offs = 0x0000,
  506. .syss_offs = 0x0014,
  507. .sysc_flags = SYSS_HAS_RESET_STATUS,
  508. };
  509. static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
  510. .name = "dss",
  511. .sysc = &dra7xx_dss_sysc,
  512. .reset = omap_dss_reset,
  513. };
  514. /* dss */
  515. static struct omap_hwmod_dma_info dra7xx_dss_sdma_reqs[] = {
  516. { .dma_req = 75 + DRA7XX_DMA_REQ_START },
  517. { .dma_req = -1 }
  518. };
  519. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  520. { .role = "dss_clk", .clk = "dss_dss_clk" },
  521. { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
  522. { .role = "32khz_clk", .clk = "dss_32khz_clk" },
  523. { .role = "video2_clk", .clk = "dss_video2_clk" },
  524. { .role = "video1_clk", .clk = "dss_video1_clk" },
  525. { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
  526. { .role = "hdcp_clk", .clk = "dss_deshdcp_clk" },
  527. };
  528. static struct omap_hwmod dra7xx_dss_hwmod = {
  529. .name = "dss_core",
  530. .class = &dra7xx_dss_hwmod_class,
  531. .clkdm_name = "dss_clkdm",
  532. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  533. .sdma_reqs = dra7xx_dss_sdma_reqs,
  534. .main_clk = "dss_dss_clk",
  535. .prcm = {
  536. .omap4 = {
  537. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  538. .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
  539. .modulemode = MODULEMODE_SWCTRL,
  540. },
  541. },
  542. .opt_clks = dss_opt_clks,
  543. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  544. };
  545. /*
  546. * 'dispc' class
  547. * display controller
  548. */
  549. static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
  550. .rev_offs = 0x0000,
  551. .sysc_offs = 0x0010,
  552. .syss_offs = 0x0014,
  553. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  554. SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
  555. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  556. SYSS_HAS_RESET_STATUS),
  557. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  558. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  559. .sysc_fields = &omap_hwmod_sysc_type1,
  560. };
  561. static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
  562. .name = "dispc",
  563. .sysc = &dra7xx_dispc_sysc,
  564. };
  565. /* dss_dispc */
  566. /* dss_dispc dev_attr */
  567. static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
  568. .has_framedonetv_irq = 1,
  569. .manager_count = 4,
  570. };
  571. static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
  572. .name = "dss_dispc",
  573. .class = &dra7xx_dispc_hwmod_class,
  574. .clkdm_name = "dss_clkdm",
  575. .main_clk = "dss_dss_clk",
  576. .prcm = {
  577. .omap4 = {
  578. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  579. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  580. },
  581. },
  582. .dev_attr = &dss_dispc_dev_attr,
  583. .parent_hwmod = &dra7xx_dss_hwmod,
  584. };
  585. /*
  586. * 'hdmi' class
  587. * hdmi controller
  588. */
  589. static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
  590. .rev_offs = 0x0000,
  591. .sysc_offs = 0x0010,
  592. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  593. SYSC_HAS_SOFTRESET),
  594. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  595. SIDLE_SMART_WKUP),
  596. .sysc_fields = &omap_hwmod_sysc_type2,
  597. };
  598. static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
  599. .name = "hdmi",
  600. .sysc = &dra7xx_hdmi_sysc,
  601. };
  602. /* dss_hdmi */
  603. static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
  604. { .role = "sys_clk", .clk = "dss_hdmi_clk" },
  605. };
  606. static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
  607. .name = "dss_hdmi",
  608. .class = &dra7xx_hdmi_hwmod_class,
  609. .clkdm_name = "dss_clkdm",
  610. .main_clk = "dss_48mhz_clk",
  611. .prcm = {
  612. .omap4 = {
  613. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  614. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  615. },
  616. },
  617. .opt_clks = dss_hdmi_opt_clks,
  618. .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
  619. .parent_hwmod = &dra7xx_dss_hwmod,
  620. };
  621. /* AES (the 'P' (public) device) */
  622. static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
  623. .rev_offs = 0x0080,
  624. .sysc_offs = 0x0084,
  625. .syss_offs = 0x0088,
  626. .sysc_flags = SYSS_HAS_RESET_STATUS,
  627. };
  628. static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
  629. .name = "aes",
  630. .sysc = &dra7xx_aes_sysc,
  631. .rev = 2,
  632. };
  633. /* AES1 */
  634. static struct omap_hwmod dra7xx_aes1_hwmod = {
  635. .name = "aes1",
  636. .class = &dra7xx_aes_hwmod_class,
  637. .clkdm_name = "l4sec_clkdm",
  638. .main_clk = "l3_iclk_div",
  639. .prcm = {
  640. .omap4 = {
  641. .clkctrl_offs = DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET,
  642. .context_offs = DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET,
  643. .modulemode = MODULEMODE_HWCTRL,
  644. },
  645. },
  646. };
  647. /* AES2 */
  648. static struct omap_hwmod dra7xx_aes2_hwmod = {
  649. .name = "aes2",
  650. .class = &dra7xx_aes_hwmod_class,
  651. .clkdm_name = "l4sec_clkdm",
  652. .main_clk = "l3_iclk_div",
  653. .prcm = {
  654. .omap4 = {
  655. .clkctrl_offs = DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET,
  656. .context_offs = DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET,
  657. .modulemode = MODULEMODE_HWCTRL,
  658. },
  659. },
  660. };
  661. /* sha0 HIB2 (the 'P' (public) device) */
  662. static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
  663. .rev_offs = 0x100,
  664. .sysc_offs = 0x110,
  665. .syss_offs = 0x114,
  666. .sysc_flags = SYSS_HAS_RESET_STATUS,
  667. };
  668. static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
  669. .name = "sham",
  670. .sysc = &dra7xx_sha0_sysc,
  671. .rev = 2,
  672. };
  673. struct omap_hwmod dra7xx_sha0_hwmod = {
  674. .name = "sham",
  675. .class = &dra7xx_sha0_hwmod_class,
  676. .clkdm_name = "l4sec_clkdm",
  677. .main_clk = "l3_iclk_div",
  678. .prcm = {
  679. .omap4 = {
  680. .clkctrl_offs = DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
  681. .context_offs = DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
  682. .modulemode = MODULEMODE_HWCTRL,
  683. },
  684. },
  685. };
  686. /*
  687. * 'elm' class
  688. *
  689. */
  690. static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
  691. .rev_offs = 0x0000,
  692. .sysc_offs = 0x0010,
  693. .syss_offs = 0x0014,
  694. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  695. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  696. SYSS_HAS_RESET_STATUS),
  697. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  698. SIDLE_SMART_WKUP),
  699. .sysc_fields = &omap_hwmod_sysc_type1,
  700. };
  701. static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
  702. .name = "elm",
  703. .sysc = &dra7xx_elm_sysc,
  704. };
  705. /* elm */
  706. static struct omap_hwmod dra7xx_elm_hwmod = {
  707. .name = "elm",
  708. .class = &dra7xx_elm_hwmod_class,
  709. .clkdm_name = "l4per_clkdm",
  710. .main_clk = "l3_iclk_div",
  711. .prcm = {
  712. .omap4 = {
  713. .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
  714. .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
  715. },
  716. },
  717. };
  718. /*
  719. * 'gpio' class
  720. *
  721. */
  722. static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
  723. .rev_offs = 0x0000,
  724. .sysc_offs = 0x0010,
  725. .syss_offs = 0x0114,
  726. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  727. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  728. SYSS_HAS_RESET_STATUS),
  729. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  730. SIDLE_SMART_WKUP),
  731. .sysc_fields = &omap_hwmod_sysc_type1,
  732. };
  733. static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
  734. .name = "gpio",
  735. .sysc = &dra7xx_gpio_sysc,
  736. .rev = 2,
  737. };
  738. /* gpio dev_attr */
  739. static struct omap_gpio_dev_attr gpio_dev_attr = {
  740. .bank_width = 32,
  741. .dbck_flag = true,
  742. };
  743. /* gpio1 */
  744. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  745. { .role = "dbclk", .clk = "gpio1_dbclk" },
  746. };
  747. static struct omap_hwmod dra7xx_gpio1_hwmod = {
  748. .name = "gpio1",
  749. .class = &dra7xx_gpio_hwmod_class,
  750. .clkdm_name = "wkupaon_clkdm",
  751. .main_clk = "wkupaon_iclk_mux",
  752. .prcm = {
  753. .omap4 = {
  754. .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
  755. .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
  756. .modulemode = MODULEMODE_HWCTRL,
  757. },
  758. },
  759. .opt_clks = gpio1_opt_clks,
  760. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  761. .dev_attr = &gpio_dev_attr,
  762. };
  763. /* gpio2 */
  764. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  765. { .role = "dbclk", .clk = "gpio2_dbclk" },
  766. };
  767. static struct omap_hwmod dra7xx_gpio2_hwmod = {
  768. .name = "gpio2",
  769. .class = &dra7xx_gpio_hwmod_class,
  770. .clkdm_name = "l4per_clkdm",
  771. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  772. .main_clk = "l3_iclk_div",
  773. .prcm = {
  774. .omap4 = {
  775. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
  776. .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
  777. .modulemode = MODULEMODE_HWCTRL,
  778. },
  779. },
  780. .opt_clks = gpio2_opt_clks,
  781. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  782. .dev_attr = &gpio_dev_attr,
  783. };
  784. /* gpio3 */
  785. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  786. { .role = "dbclk", .clk = "gpio3_dbclk" },
  787. };
  788. static struct omap_hwmod dra7xx_gpio3_hwmod = {
  789. .name = "gpio3",
  790. .class = &dra7xx_gpio_hwmod_class,
  791. .clkdm_name = "l4per_clkdm",
  792. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  793. .main_clk = "l3_iclk_div",
  794. .prcm = {
  795. .omap4 = {
  796. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
  797. .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
  798. .modulemode = MODULEMODE_HWCTRL,
  799. },
  800. },
  801. .opt_clks = gpio3_opt_clks,
  802. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  803. .dev_attr = &gpio_dev_attr,
  804. };
  805. /* gpio4 */
  806. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  807. { .role = "dbclk", .clk = "gpio4_dbclk" },
  808. };
  809. static struct omap_hwmod dra7xx_gpio4_hwmod = {
  810. .name = "gpio4",
  811. .class = &dra7xx_gpio_hwmod_class,
  812. .clkdm_name = "l4per_clkdm",
  813. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  814. .main_clk = "l3_iclk_div",
  815. .prcm = {
  816. .omap4 = {
  817. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
  818. .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
  819. .modulemode = MODULEMODE_HWCTRL,
  820. },
  821. },
  822. .opt_clks = gpio4_opt_clks,
  823. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  824. .dev_attr = &gpio_dev_attr,
  825. };
  826. /* gpio5 */
  827. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  828. { .role = "dbclk", .clk = "gpio5_dbclk" },
  829. };
  830. static struct omap_hwmod dra7xx_gpio5_hwmod = {
  831. .name = "gpio5",
  832. .class = &dra7xx_gpio_hwmod_class,
  833. .clkdm_name = "l4per_clkdm",
  834. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  835. .main_clk = "l3_iclk_div",
  836. .prcm = {
  837. .omap4 = {
  838. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
  839. .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
  840. .modulemode = MODULEMODE_HWCTRL,
  841. },
  842. },
  843. .opt_clks = gpio5_opt_clks,
  844. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  845. .dev_attr = &gpio_dev_attr,
  846. };
  847. /* gpio6 */
  848. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  849. { .role = "dbclk", .clk = "gpio6_dbclk" },
  850. };
  851. static struct omap_hwmod dra7xx_gpio6_hwmod = {
  852. .name = "gpio6",
  853. .class = &dra7xx_gpio_hwmod_class,
  854. .clkdm_name = "l4per_clkdm",
  855. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  856. .main_clk = "l3_iclk_div",
  857. .prcm = {
  858. .omap4 = {
  859. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
  860. .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
  861. .modulemode = MODULEMODE_HWCTRL,
  862. },
  863. },
  864. .opt_clks = gpio6_opt_clks,
  865. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  866. .dev_attr = &gpio_dev_attr,
  867. };
  868. /* gpio7 */
  869. static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
  870. { .role = "dbclk", .clk = "gpio7_dbclk" },
  871. };
  872. static struct omap_hwmod dra7xx_gpio7_hwmod = {
  873. .name = "gpio7",
  874. .class = &dra7xx_gpio_hwmod_class,
  875. .clkdm_name = "l4per_clkdm",
  876. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  877. .main_clk = "l3_iclk_div",
  878. .prcm = {
  879. .omap4 = {
  880. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
  881. .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
  882. .modulemode = MODULEMODE_HWCTRL,
  883. },
  884. },
  885. .opt_clks = gpio7_opt_clks,
  886. .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
  887. .dev_attr = &gpio_dev_attr,
  888. };
  889. /* gpio8 */
  890. static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
  891. { .role = "dbclk", .clk = "gpio8_dbclk" },
  892. };
  893. static struct omap_hwmod dra7xx_gpio8_hwmod = {
  894. .name = "gpio8",
  895. .class = &dra7xx_gpio_hwmod_class,
  896. .clkdm_name = "l4per_clkdm",
  897. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  898. .main_clk = "l3_iclk_div",
  899. .prcm = {
  900. .omap4 = {
  901. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
  902. .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
  903. .modulemode = MODULEMODE_HWCTRL,
  904. },
  905. },
  906. .opt_clks = gpio8_opt_clks,
  907. .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
  908. .dev_attr = &gpio_dev_attr,
  909. };
  910. /*
  911. * 'gpmc' class
  912. *
  913. */
  914. static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
  915. .rev_offs = 0x0000,
  916. .sysc_offs = 0x0010,
  917. .syss_offs = 0x0014,
  918. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  919. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  920. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  921. .sysc_fields = &omap_hwmod_sysc_type1,
  922. };
  923. static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
  924. .name = "gpmc",
  925. .sysc = &dra7xx_gpmc_sysc,
  926. };
  927. /* gpmc */
  928. static struct omap_hwmod dra7xx_gpmc_hwmod = {
  929. .name = "gpmc",
  930. .class = &dra7xx_gpmc_hwmod_class,
  931. .clkdm_name = "l3main1_clkdm",
  932. /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
  933. .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
  934. .main_clk = "l3_iclk_div",
  935. .prcm = {
  936. .omap4 = {
  937. .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
  938. .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
  939. .modulemode = MODULEMODE_HWCTRL,
  940. },
  941. },
  942. };
  943. /*
  944. * 'hdq1w' class
  945. *
  946. */
  947. static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
  948. .rev_offs = 0x0000,
  949. .sysc_offs = 0x0014,
  950. .syss_offs = 0x0018,
  951. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
  952. SYSS_HAS_RESET_STATUS),
  953. .sysc_fields = &omap_hwmod_sysc_type1,
  954. };
  955. static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
  956. .name = "hdq1w",
  957. .sysc = &dra7xx_hdq1w_sysc,
  958. };
  959. /* hdq1w */
  960. static struct omap_hwmod dra7xx_hdq1w_hwmod = {
  961. .name = "hdq1w",
  962. .class = &dra7xx_hdq1w_hwmod_class,
  963. .clkdm_name = "l4per_clkdm",
  964. .flags = HWMOD_INIT_NO_RESET,
  965. .main_clk = "func_12m_fclk",
  966. .prcm = {
  967. .omap4 = {
  968. .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
  969. .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
  970. .modulemode = MODULEMODE_SWCTRL,
  971. },
  972. },
  973. };
  974. /*
  975. * 'i2c' class
  976. *
  977. */
  978. static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
  979. .sysc_offs = 0x0010,
  980. .syss_offs = 0x0090,
  981. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  982. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  983. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  984. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  985. SIDLE_SMART_WKUP),
  986. .sysc_fields = &omap_hwmod_sysc_type1,
  987. };
  988. static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
  989. .name = "i2c",
  990. .sysc = &dra7xx_i2c_sysc,
  991. .reset = &omap_i2c_reset,
  992. .rev = OMAP_I2C_IP_VERSION_2,
  993. };
  994. /* i2c dev_attr */
  995. static struct omap_i2c_dev_attr i2c_dev_attr = {
  996. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  997. };
  998. /* i2c1 */
  999. static struct omap_hwmod dra7xx_i2c1_hwmod = {
  1000. .name = "i2c1",
  1001. .class = &dra7xx_i2c_hwmod_class,
  1002. .clkdm_name = "l4per_clkdm",
  1003. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1004. .main_clk = "func_96m_fclk",
  1005. .prcm = {
  1006. .omap4 = {
  1007. .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
  1008. .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
  1009. .modulemode = MODULEMODE_SWCTRL,
  1010. },
  1011. },
  1012. .dev_attr = &i2c_dev_attr,
  1013. };
  1014. /* i2c2 */
  1015. static struct omap_hwmod dra7xx_i2c2_hwmod = {
  1016. .name = "i2c2",
  1017. .class = &dra7xx_i2c_hwmod_class,
  1018. .clkdm_name = "l4per_clkdm",
  1019. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1020. .main_clk = "func_96m_fclk",
  1021. .prcm = {
  1022. .omap4 = {
  1023. .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
  1024. .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
  1025. .modulemode = MODULEMODE_SWCTRL,
  1026. },
  1027. },
  1028. .dev_attr = &i2c_dev_attr,
  1029. };
  1030. /* i2c3 */
  1031. static struct omap_hwmod dra7xx_i2c3_hwmod = {
  1032. .name = "i2c3",
  1033. .class = &dra7xx_i2c_hwmod_class,
  1034. .clkdm_name = "l4per_clkdm",
  1035. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1036. .main_clk = "func_96m_fclk",
  1037. .prcm = {
  1038. .omap4 = {
  1039. .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
  1040. .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
  1041. .modulemode = MODULEMODE_SWCTRL,
  1042. },
  1043. },
  1044. .dev_attr = &i2c_dev_attr,
  1045. };
  1046. /* i2c4 */
  1047. static struct omap_hwmod dra7xx_i2c4_hwmod = {
  1048. .name = "i2c4",
  1049. .class = &dra7xx_i2c_hwmod_class,
  1050. .clkdm_name = "l4per_clkdm",
  1051. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1052. .main_clk = "func_96m_fclk",
  1053. .prcm = {
  1054. .omap4 = {
  1055. .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
  1056. .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
  1057. .modulemode = MODULEMODE_SWCTRL,
  1058. },
  1059. },
  1060. .dev_attr = &i2c_dev_attr,
  1061. };
  1062. /* i2c5 */
  1063. static struct omap_hwmod dra7xx_i2c5_hwmod = {
  1064. .name = "i2c5",
  1065. .class = &dra7xx_i2c_hwmod_class,
  1066. .clkdm_name = "ipu_clkdm",
  1067. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1068. .main_clk = "func_96m_fclk",
  1069. .prcm = {
  1070. .omap4 = {
  1071. .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
  1072. .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
  1073. .modulemode = MODULEMODE_SWCTRL,
  1074. },
  1075. },
  1076. .dev_attr = &i2c_dev_attr,
  1077. };
  1078. /*
  1079. * 'mailbox' class
  1080. *
  1081. */
  1082. static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
  1083. .rev_offs = 0x0000,
  1084. .sysc_offs = 0x0010,
  1085. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1086. SYSC_HAS_SOFTRESET),
  1087. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1088. .sysc_fields = &omap_hwmod_sysc_type2,
  1089. };
  1090. static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
  1091. .name = "mailbox",
  1092. .sysc = &dra7xx_mailbox_sysc,
  1093. };
  1094. /* mailbox1 */
  1095. static struct omap_hwmod dra7xx_mailbox1_hwmod = {
  1096. .name = "mailbox1",
  1097. .class = &dra7xx_mailbox_hwmod_class,
  1098. .clkdm_name = "l4cfg_clkdm",
  1099. .prcm = {
  1100. .omap4 = {
  1101. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
  1102. .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
  1103. },
  1104. },
  1105. };
  1106. /* mailbox2 */
  1107. static struct omap_hwmod dra7xx_mailbox2_hwmod = {
  1108. .name = "mailbox2",
  1109. .class = &dra7xx_mailbox_hwmod_class,
  1110. .clkdm_name = "l4cfg_clkdm",
  1111. .prcm = {
  1112. .omap4 = {
  1113. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
  1114. .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
  1115. },
  1116. },
  1117. };
  1118. /* mailbox3 */
  1119. static struct omap_hwmod dra7xx_mailbox3_hwmod = {
  1120. .name = "mailbox3",
  1121. .class = &dra7xx_mailbox_hwmod_class,
  1122. .clkdm_name = "l4cfg_clkdm",
  1123. .prcm = {
  1124. .omap4 = {
  1125. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
  1126. .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
  1127. },
  1128. },
  1129. };
  1130. /* mailbox4 */
  1131. static struct omap_hwmod dra7xx_mailbox4_hwmod = {
  1132. .name = "mailbox4",
  1133. .class = &dra7xx_mailbox_hwmod_class,
  1134. .clkdm_name = "l4cfg_clkdm",
  1135. .prcm = {
  1136. .omap4 = {
  1137. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
  1138. .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
  1139. },
  1140. },
  1141. };
  1142. /* mailbox5 */
  1143. static struct omap_hwmod dra7xx_mailbox5_hwmod = {
  1144. .name = "mailbox5",
  1145. .class = &dra7xx_mailbox_hwmod_class,
  1146. .clkdm_name = "l4cfg_clkdm",
  1147. .prcm = {
  1148. .omap4 = {
  1149. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
  1150. .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
  1151. },
  1152. },
  1153. };
  1154. /* mailbox6 */
  1155. static struct omap_hwmod dra7xx_mailbox6_hwmod = {
  1156. .name = "mailbox6",
  1157. .class = &dra7xx_mailbox_hwmod_class,
  1158. .clkdm_name = "l4cfg_clkdm",
  1159. .prcm = {
  1160. .omap4 = {
  1161. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
  1162. .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
  1163. },
  1164. },
  1165. };
  1166. /* mailbox7 */
  1167. static struct omap_hwmod dra7xx_mailbox7_hwmod = {
  1168. .name = "mailbox7",
  1169. .class = &dra7xx_mailbox_hwmod_class,
  1170. .clkdm_name = "l4cfg_clkdm",
  1171. .prcm = {
  1172. .omap4 = {
  1173. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
  1174. .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
  1175. },
  1176. },
  1177. };
  1178. /* mailbox8 */
  1179. static struct omap_hwmod dra7xx_mailbox8_hwmod = {
  1180. .name = "mailbox8",
  1181. .class = &dra7xx_mailbox_hwmod_class,
  1182. .clkdm_name = "l4cfg_clkdm",
  1183. .prcm = {
  1184. .omap4 = {
  1185. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
  1186. .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
  1187. },
  1188. },
  1189. };
  1190. /* mailbox9 */
  1191. static struct omap_hwmod dra7xx_mailbox9_hwmod = {
  1192. .name = "mailbox9",
  1193. .class = &dra7xx_mailbox_hwmod_class,
  1194. .clkdm_name = "l4cfg_clkdm",
  1195. .prcm = {
  1196. .omap4 = {
  1197. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
  1198. .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
  1199. },
  1200. },
  1201. };
  1202. /* mailbox10 */
  1203. static struct omap_hwmod dra7xx_mailbox10_hwmod = {
  1204. .name = "mailbox10",
  1205. .class = &dra7xx_mailbox_hwmod_class,
  1206. .clkdm_name = "l4cfg_clkdm",
  1207. .prcm = {
  1208. .omap4 = {
  1209. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
  1210. .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
  1211. },
  1212. },
  1213. };
  1214. /* mailbox11 */
  1215. static struct omap_hwmod dra7xx_mailbox11_hwmod = {
  1216. .name = "mailbox11",
  1217. .class = &dra7xx_mailbox_hwmod_class,
  1218. .clkdm_name = "l4cfg_clkdm",
  1219. .prcm = {
  1220. .omap4 = {
  1221. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
  1222. .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
  1223. },
  1224. },
  1225. };
  1226. /* mailbox12 */
  1227. static struct omap_hwmod dra7xx_mailbox12_hwmod = {
  1228. .name = "mailbox12",
  1229. .class = &dra7xx_mailbox_hwmod_class,
  1230. .clkdm_name = "l4cfg_clkdm",
  1231. .prcm = {
  1232. .omap4 = {
  1233. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
  1234. .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
  1235. },
  1236. },
  1237. };
  1238. /* mailbox13 */
  1239. static struct omap_hwmod dra7xx_mailbox13_hwmod = {
  1240. .name = "mailbox13",
  1241. .class = &dra7xx_mailbox_hwmod_class,
  1242. .clkdm_name = "l4cfg_clkdm",
  1243. .prcm = {
  1244. .omap4 = {
  1245. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
  1246. .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
  1247. },
  1248. },
  1249. };
  1250. /*
  1251. * 'mcspi' class
  1252. *
  1253. */
  1254. static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
  1255. .rev_offs = 0x0000,
  1256. .sysc_offs = 0x0010,
  1257. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1258. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1259. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1260. SIDLE_SMART_WKUP),
  1261. .sysc_fields = &omap_hwmod_sysc_type2,
  1262. };
  1263. static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
  1264. .name = "mcspi",
  1265. .sysc = &dra7xx_mcspi_sysc,
  1266. .rev = OMAP4_MCSPI_REV,
  1267. };
  1268. /* mcspi1 */
  1269. /* mcspi1 dev_attr */
  1270. static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
  1271. .num_chipselect = 4,
  1272. };
  1273. static struct omap_hwmod dra7xx_mcspi1_hwmod = {
  1274. .name = "mcspi1",
  1275. .class = &dra7xx_mcspi_hwmod_class,
  1276. .clkdm_name = "l4per_clkdm",
  1277. .main_clk = "func_48m_fclk",
  1278. .prcm = {
  1279. .omap4 = {
  1280. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
  1281. .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
  1282. .modulemode = MODULEMODE_SWCTRL,
  1283. },
  1284. },
  1285. .dev_attr = &mcspi1_dev_attr,
  1286. };
  1287. /* mcspi2 */
  1288. /* mcspi2 dev_attr */
  1289. static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
  1290. .num_chipselect = 2,
  1291. };
  1292. static struct omap_hwmod dra7xx_mcspi2_hwmod = {
  1293. .name = "mcspi2",
  1294. .class = &dra7xx_mcspi_hwmod_class,
  1295. .clkdm_name = "l4per_clkdm",
  1296. .main_clk = "func_48m_fclk",
  1297. .prcm = {
  1298. .omap4 = {
  1299. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
  1300. .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
  1301. .modulemode = MODULEMODE_SWCTRL,
  1302. },
  1303. },
  1304. .dev_attr = &mcspi2_dev_attr,
  1305. };
  1306. /* mcspi3 */
  1307. /* mcspi3 dev_attr */
  1308. static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
  1309. .num_chipselect = 2,
  1310. };
  1311. static struct omap_hwmod dra7xx_mcspi3_hwmod = {
  1312. .name = "mcspi3",
  1313. .class = &dra7xx_mcspi_hwmod_class,
  1314. .clkdm_name = "l4per_clkdm",
  1315. .main_clk = "func_48m_fclk",
  1316. .prcm = {
  1317. .omap4 = {
  1318. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
  1319. .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
  1320. .modulemode = MODULEMODE_SWCTRL,
  1321. },
  1322. },
  1323. .dev_attr = &mcspi3_dev_attr,
  1324. };
  1325. /* mcspi4 */
  1326. /* mcspi4 dev_attr */
  1327. static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
  1328. .num_chipselect = 1,
  1329. };
  1330. static struct omap_hwmod dra7xx_mcspi4_hwmod = {
  1331. .name = "mcspi4",
  1332. .class = &dra7xx_mcspi_hwmod_class,
  1333. .clkdm_name = "l4per_clkdm",
  1334. .main_clk = "func_48m_fclk",
  1335. .prcm = {
  1336. .omap4 = {
  1337. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
  1338. .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
  1339. .modulemode = MODULEMODE_SWCTRL,
  1340. },
  1341. },
  1342. .dev_attr = &mcspi4_dev_attr,
  1343. };
  1344. /*
  1345. * 'mcasp' class
  1346. *
  1347. */
  1348. static struct omap_hwmod_class_sysconfig dra7xx_mcasp_sysc = {
  1349. .sysc_offs = 0x0004,
  1350. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1351. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1352. .sysc_fields = &omap_hwmod_sysc_type3,
  1353. };
  1354. static struct omap_hwmod_class dra7xx_mcasp_hwmod_class = {
  1355. .name = "mcasp",
  1356. .sysc = &dra7xx_mcasp_sysc,
  1357. };
  1358. /* mcasp1 */
  1359. static struct omap_hwmod_opt_clk mcasp1_opt_clks[] = {
  1360. { .role = "ahclkx", .clk = "mcasp1_ahclkx_mux" },
  1361. { .role = "ahclkr", .clk = "mcasp1_ahclkr_mux" },
  1362. };
  1363. static struct omap_hwmod dra7xx_mcasp1_hwmod = {
  1364. .name = "mcasp1",
  1365. .class = &dra7xx_mcasp_hwmod_class,
  1366. .clkdm_name = "ipu_clkdm",
  1367. .main_clk = "mcasp1_aux_gfclk_mux",
  1368. .flags = HWMOD_OPT_CLKS_NEEDED,
  1369. .prcm = {
  1370. .omap4 = {
  1371. .clkctrl_offs = DRA7XX_CM_IPU_MCASP1_CLKCTRL_OFFSET,
  1372. .context_offs = DRA7XX_RM_IPU_MCASP1_CONTEXT_OFFSET,
  1373. .modulemode = MODULEMODE_SWCTRL,
  1374. },
  1375. },
  1376. .opt_clks = mcasp1_opt_clks,
  1377. .opt_clks_cnt = ARRAY_SIZE(mcasp1_opt_clks),
  1378. };
  1379. /* mcasp2 */
  1380. static struct omap_hwmod_opt_clk mcasp2_opt_clks[] = {
  1381. { .role = "ahclkx", .clk = "mcasp2_ahclkx_mux" },
  1382. { .role = "ahclkr", .clk = "mcasp2_ahclkr_mux" },
  1383. };
  1384. static struct omap_hwmod dra7xx_mcasp2_hwmod = {
  1385. .name = "mcasp2",
  1386. .class = &dra7xx_mcasp_hwmod_class,
  1387. .clkdm_name = "l4per2_clkdm",
  1388. .main_clk = "mcasp2_aux_gfclk_mux",
  1389. .flags = HWMOD_OPT_CLKS_NEEDED,
  1390. .prcm = {
  1391. .omap4 = {
  1392. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP2_CLKCTRL_OFFSET,
  1393. .context_offs = DRA7XX_RM_L4PER2_MCASP2_CONTEXT_OFFSET,
  1394. .modulemode = MODULEMODE_SWCTRL,
  1395. },
  1396. },
  1397. .opt_clks = mcasp2_opt_clks,
  1398. .opt_clks_cnt = ARRAY_SIZE(mcasp2_opt_clks),
  1399. };
  1400. /* mcasp3 */
  1401. static struct omap_hwmod_opt_clk mcasp3_opt_clks[] = {
  1402. { .role = "ahclkx", .clk = "mcasp3_ahclkx_mux" },
  1403. };
  1404. static struct omap_hwmod dra7xx_mcasp3_hwmod = {
  1405. .name = "mcasp3",
  1406. .class = &dra7xx_mcasp_hwmod_class,
  1407. .clkdm_name = "l4per2_clkdm",
  1408. .main_clk = "mcasp3_aux_gfclk_mux",
  1409. .flags = HWMOD_OPT_CLKS_NEEDED,
  1410. .prcm = {
  1411. .omap4 = {
  1412. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET,
  1413. .context_offs = DRA7XX_RM_L4PER2_MCASP3_CONTEXT_OFFSET,
  1414. .modulemode = MODULEMODE_SWCTRL,
  1415. },
  1416. },
  1417. .opt_clks = mcasp3_opt_clks,
  1418. .opt_clks_cnt = ARRAY_SIZE(mcasp3_opt_clks),
  1419. };
  1420. /* mcasp4 */
  1421. static struct omap_hwmod_opt_clk mcasp4_opt_clks[] = {
  1422. { .role = "ahclkx", .clk = "mcasp4_ahclkx_mux" },
  1423. };
  1424. static struct omap_hwmod dra7xx_mcasp4_hwmod = {
  1425. .name = "mcasp4",
  1426. .class = &dra7xx_mcasp_hwmod_class,
  1427. .clkdm_name = "l4per2_clkdm",
  1428. .main_clk = "mcasp4_aux_gfclk_mux",
  1429. .flags = HWMOD_OPT_CLKS_NEEDED,
  1430. .prcm = {
  1431. .omap4 = {
  1432. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP4_CLKCTRL_OFFSET,
  1433. .context_offs = DRA7XX_RM_L4PER2_MCASP4_CONTEXT_OFFSET,
  1434. .modulemode = MODULEMODE_SWCTRL,
  1435. },
  1436. },
  1437. .opt_clks = mcasp4_opt_clks,
  1438. .opt_clks_cnt = ARRAY_SIZE(mcasp4_opt_clks),
  1439. };
  1440. /* mcasp5 */
  1441. static struct omap_hwmod_opt_clk mcasp5_opt_clks[] = {
  1442. { .role = "ahclkx", .clk = "mcasp5_ahclkx_mux" },
  1443. };
  1444. static struct omap_hwmod dra7xx_mcasp5_hwmod = {
  1445. .name = "mcasp5",
  1446. .class = &dra7xx_mcasp_hwmod_class,
  1447. .clkdm_name = "l4per2_clkdm",
  1448. .main_clk = "mcasp5_aux_gfclk_mux",
  1449. .flags = HWMOD_OPT_CLKS_NEEDED,
  1450. .prcm = {
  1451. .omap4 = {
  1452. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP5_CLKCTRL_OFFSET,
  1453. .context_offs = DRA7XX_RM_L4PER2_MCASP5_CONTEXT_OFFSET,
  1454. .modulemode = MODULEMODE_SWCTRL,
  1455. },
  1456. },
  1457. .opt_clks = mcasp5_opt_clks,
  1458. .opt_clks_cnt = ARRAY_SIZE(mcasp5_opt_clks),
  1459. };
  1460. /* mcasp6 */
  1461. static struct omap_hwmod_opt_clk mcasp6_opt_clks[] = {
  1462. { .role = "ahclkx", .clk = "mcasp6_ahclkx_mux" },
  1463. };
  1464. static struct omap_hwmod dra7xx_mcasp6_hwmod = {
  1465. .name = "mcasp6",
  1466. .class = &dra7xx_mcasp_hwmod_class,
  1467. .clkdm_name = "l4per2_clkdm",
  1468. .main_clk = "mcasp6_aux_gfclk_mux",
  1469. .flags = HWMOD_OPT_CLKS_NEEDED,
  1470. .prcm = {
  1471. .omap4 = {
  1472. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP6_CLKCTRL_OFFSET,
  1473. .context_offs = DRA7XX_RM_L4PER2_MCASP6_CONTEXT_OFFSET,
  1474. .modulemode = MODULEMODE_SWCTRL,
  1475. },
  1476. },
  1477. .opt_clks = mcasp6_opt_clks,
  1478. .opt_clks_cnt = ARRAY_SIZE(mcasp6_opt_clks),
  1479. };
  1480. /* mcasp7 */
  1481. static struct omap_hwmod_opt_clk mcasp7_opt_clks[] = {
  1482. { .role = "ahclkx", .clk = "mcasp7_ahclkx_mux" },
  1483. };
  1484. static struct omap_hwmod dra7xx_mcasp7_hwmod = {
  1485. .name = "mcasp7",
  1486. .class = &dra7xx_mcasp_hwmod_class,
  1487. .clkdm_name = "l4per2_clkdm",
  1488. .main_clk = "mcasp7_aux_gfclk_mux",
  1489. .flags = HWMOD_OPT_CLKS_NEEDED,
  1490. .prcm = {
  1491. .omap4 = {
  1492. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP7_CLKCTRL_OFFSET,
  1493. .context_offs = DRA7XX_RM_L4PER2_MCASP7_CONTEXT_OFFSET,
  1494. .modulemode = MODULEMODE_SWCTRL,
  1495. },
  1496. },
  1497. .opt_clks = mcasp7_opt_clks,
  1498. .opt_clks_cnt = ARRAY_SIZE(mcasp7_opt_clks),
  1499. };
  1500. /* mcasp8 */
  1501. static struct omap_hwmod_opt_clk mcasp8_opt_clks[] = {
  1502. { .role = "ahclkx", .clk = "mcasp8_ahclkx_mux" },
  1503. };
  1504. static struct omap_hwmod dra7xx_mcasp8_hwmod = {
  1505. .name = "mcasp8",
  1506. .class = &dra7xx_mcasp_hwmod_class,
  1507. .clkdm_name = "l4per2_clkdm",
  1508. .main_clk = "mcasp8_aux_gfclk_mux",
  1509. .flags = HWMOD_OPT_CLKS_NEEDED,
  1510. .prcm = {
  1511. .omap4 = {
  1512. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP8_CLKCTRL_OFFSET,
  1513. .context_offs = DRA7XX_RM_L4PER2_MCASP8_CONTEXT_OFFSET,
  1514. .modulemode = MODULEMODE_SWCTRL,
  1515. },
  1516. },
  1517. .opt_clks = mcasp8_opt_clks,
  1518. .opt_clks_cnt = ARRAY_SIZE(mcasp8_opt_clks),
  1519. };
  1520. /*
  1521. * 'mmc' class
  1522. *
  1523. */
  1524. static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
  1525. .rev_offs = 0x0000,
  1526. .sysc_offs = 0x0010,
  1527. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  1528. SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1529. SYSC_HAS_SOFTRESET),
  1530. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1531. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1532. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1533. .sysc_fields = &omap_hwmod_sysc_type2,
  1534. };
  1535. static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
  1536. .name = "mmc",
  1537. .sysc = &dra7xx_mmc_sysc,
  1538. };
  1539. /* mmc1 */
  1540. static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
  1541. { .role = "clk32k", .clk = "mmc1_clk32k" },
  1542. };
  1543. /* mmc1 dev_attr */
  1544. static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
  1545. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1546. };
  1547. static struct omap_hwmod dra7xx_mmc1_hwmod = {
  1548. .name = "mmc1",
  1549. .class = &dra7xx_mmc_hwmod_class,
  1550. .clkdm_name = "l3init_clkdm",
  1551. .main_clk = "mmc1_fclk_div",
  1552. .prcm = {
  1553. .omap4 = {
  1554. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
  1555. .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
  1556. .modulemode = MODULEMODE_SWCTRL,
  1557. },
  1558. },
  1559. .opt_clks = mmc1_opt_clks,
  1560. .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
  1561. .dev_attr = &mmc1_dev_attr,
  1562. };
  1563. /* mmc2 */
  1564. static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
  1565. { .role = "clk32k", .clk = "mmc2_clk32k" },
  1566. };
  1567. static struct omap_hwmod dra7xx_mmc2_hwmod = {
  1568. .name = "mmc2",
  1569. .class = &dra7xx_mmc_hwmod_class,
  1570. .clkdm_name = "l3init_clkdm",
  1571. .main_clk = "mmc2_fclk_div",
  1572. .prcm = {
  1573. .omap4 = {
  1574. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
  1575. .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
  1576. .modulemode = MODULEMODE_SWCTRL,
  1577. },
  1578. },
  1579. .opt_clks = mmc2_opt_clks,
  1580. .opt_clks_cnt = ARRAY_SIZE(mmc2_opt_clks),
  1581. };
  1582. /* mmc3 */
  1583. static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
  1584. { .role = "clk32k", .clk = "mmc3_clk32k" },
  1585. };
  1586. static struct omap_hwmod dra7xx_mmc3_hwmod = {
  1587. .name = "mmc3",
  1588. .class = &dra7xx_mmc_hwmod_class,
  1589. .clkdm_name = "l4per_clkdm",
  1590. .main_clk = "mmc3_gfclk_div",
  1591. .prcm = {
  1592. .omap4 = {
  1593. .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
  1594. .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
  1595. .modulemode = MODULEMODE_SWCTRL,
  1596. },
  1597. },
  1598. .opt_clks = mmc3_opt_clks,
  1599. .opt_clks_cnt = ARRAY_SIZE(mmc3_opt_clks),
  1600. };
  1601. /* mmc4 */
  1602. static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
  1603. { .role = "clk32k", .clk = "mmc4_clk32k" },
  1604. };
  1605. static struct omap_hwmod dra7xx_mmc4_hwmod = {
  1606. .name = "mmc4",
  1607. .class = &dra7xx_mmc_hwmod_class,
  1608. .clkdm_name = "l4per_clkdm",
  1609. .main_clk = "mmc4_gfclk_div",
  1610. .prcm = {
  1611. .omap4 = {
  1612. .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
  1613. .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
  1614. .modulemode = MODULEMODE_SWCTRL,
  1615. },
  1616. },
  1617. .opt_clks = mmc4_opt_clks,
  1618. .opt_clks_cnt = ARRAY_SIZE(mmc4_opt_clks),
  1619. };
  1620. /*
  1621. * 'mpu' class
  1622. *
  1623. */
  1624. static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
  1625. .name = "mpu",
  1626. };
  1627. /* mpu */
  1628. static struct omap_hwmod dra7xx_mpu_hwmod = {
  1629. .name = "mpu",
  1630. .class = &dra7xx_mpu_hwmod_class,
  1631. .clkdm_name = "mpu_clkdm",
  1632. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  1633. .main_clk = "dpll_mpu_m2_ck",
  1634. .prcm = {
  1635. .omap4 = {
  1636. .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  1637. .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
  1638. },
  1639. },
  1640. };
  1641. /*
  1642. * 'ocp2scp' class
  1643. *
  1644. */
  1645. static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
  1646. .rev_offs = 0x0000,
  1647. .sysc_offs = 0x0010,
  1648. .syss_offs = 0x0014,
  1649. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1650. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1651. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1652. .sysc_fields = &omap_hwmod_sysc_type1,
  1653. };
  1654. static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
  1655. .name = "ocp2scp",
  1656. .sysc = &dra7xx_ocp2scp_sysc,
  1657. };
  1658. /* ocp2scp1 */
  1659. static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
  1660. .name = "ocp2scp1",
  1661. .class = &dra7xx_ocp2scp_hwmod_class,
  1662. .clkdm_name = "l3init_clkdm",
  1663. .main_clk = "l4_root_clk_div",
  1664. .prcm = {
  1665. .omap4 = {
  1666. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
  1667. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
  1668. .modulemode = MODULEMODE_HWCTRL,
  1669. },
  1670. },
  1671. };
  1672. /* ocp2scp3 */
  1673. static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
  1674. .name = "ocp2scp3",
  1675. .class = &dra7xx_ocp2scp_hwmod_class,
  1676. .clkdm_name = "l3init_clkdm",
  1677. .main_clk = "l4_root_clk_div",
  1678. .prcm = {
  1679. .omap4 = {
  1680. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
  1681. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
  1682. .modulemode = MODULEMODE_HWCTRL,
  1683. },
  1684. },
  1685. };
  1686. /*
  1687. * 'PCIE' class
  1688. *
  1689. */
  1690. /*
  1691. * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
  1692. * functionality of OMAP HWMOD layer does not deassert the hardreset lines
  1693. * associated with an IP automatically leaving the driver to handle that
  1694. * by itself. This does not work for PCIeSS which needs the reset lines
  1695. * deasserted for the driver to start accessing registers.
  1696. *
  1697. * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
  1698. * lines after asserting them.
  1699. */
  1700. static int dra7xx_pciess_reset(struct omap_hwmod *oh)
  1701. {
  1702. int i;
  1703. for (i = 0; i < oh->rst_lines_cnt; i++) {
  1704. omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
  1705. omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
  1706. }
  1707. return 0;
  1708. }
  1709. static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
  1710. .name = "pcie",
  1711. .reset = dra7xx_pciess_reset,
  1712. };
  1713. /* pcie1 */
  1714. static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
  1715. { .name = "pcie", .rst_shift = 0 },
  1716. };
  1717. static struct omap_hwmod dra7xx_pciess1_hwmod = {
  1718. .name = "pcie1",
  1719. .class = &dra7xx_pciess_hwmod_class,
  1720. .clkdm_name = "pcie_clkdm",
  1721. .rst_lines = dra7xx_pciess1_resets,
  1722. .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess1_resets),
  1723. .main_clk = "l4_root_clk_div",
  1724. .prcm = {
  1725. .omap4 = {
  1726. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
  1727. .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
  1728. .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
  1729. .modulemode = MODULEMODE_SWCTRL,
  1730. },
  1731. },
  1732. };
  1733. /* pcie2 */
  1734. static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
  1735. { .name = "pcie", .rst_shift = 1 },
  1736. };
  1737. /* pcie2 */
  1738. static struct omap_hwmod dra7xx_pciess2_hwmod = {
  1739. .name = "pcie2",
  1740. .class = &dra7xx_pciess_hwmod_class,
  1741. .clkdm_name = "pcie_clkdm",
  1742. .rst_lines = dra7xx_pciess2_resets,
  1743. .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess2_resets),
  1744. .main_clk = "l4_root_clk_div",
  1745. .prcm = {
  1746. .omap4 = {
  1747. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
  1748. .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
  1749. .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
  1750. .modulemode = MODULEMODE_SWCTRL,
  1751. },
  1752. },
  1753. };
  1754. /*
  1755. * 'qspi' class
  1756. *
  1757. */
  1758. static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
  1759. .sysc_offs = 0x0010,
  1760. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1761. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1762. SIDLE_SMART_WKUP),
  1763. .sysc_fields = &omap_hwmod_sysc_type2,
  1764. };
  1765. static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
  1766. .name = "qspi",
  1767. .sysc = &dra7xx_qspi_sysc,
  1768. };
  1769. /* qspi */
  1770. static struct omap_hwmod dra7xx_qspi_hwmod = {
  1771. .name = "qspi",
  1772. .class = &dra7xx_qspi_hwmod_class,
  1773. .clkdm_name = "l4per2_clkdm",
  1774. .main_clk = "qspi_gfclk_div",
  1775. .prcm = {
  1776. .omap4 = {
  1777. .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
  1778. .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
  1779. .modulemode = MODULEMODE_SWCTRL,
  1780. },
  1781. },
  1782. };
  1783. /*
  1784. * 'rtcss' class
  1785. *
  1786. */
  1787. static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
  1788. .sysc_offs = 0x0078,
  1789. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1790. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1791. SIDLE_SMART_WKUP),
  1792. .sysc_fields = &omap_hwmod_sysc_type3,
  1793. };
  1794. static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
  1795. .name = "rtcss",
  1796. .sysc = &dra7xx_rtcss_sysc,
  1797. .unlock = &omap_hwmod_rtc_unlock,
  1798. .lock = &omap_hwmod_rtc_lock,
  1799. };
  1800. /* rtcss */
  1801. static struct omap_hwmod dra7xx_rtcss_hwmod = {
  1802. .name = "rtcss",
  1803. .class = &dra7xx_rtcss_hwmod_class,
  1804. .clkdm_name = "rtc_clkdm",
  1805. .main_clk = "sys_32k_ck",
  1806. .prcm = {
  1807. .omap4 = {
  1808. .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
  1809. .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
  1810. .modulemode = MODULEMODE_SWCTRL,
  1811. },
  1812. },
  1813. };
  1814. /*
  1815. * 'sata' class
  1816. *
  1817. */
  1818. static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
  1819. .sysc_offs = 0x0000,
  1820. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
  1821. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1822. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1823. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1824. .sysc_fields = &omap_hwmod_sysc_type2,
  1825. };
  1826. static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
  1827. .name = "sata",
  1828. .sysc = &dra7xx_sata_sysc,
  1829. };
  1830. /* sata */
  1831. static struct omap_hwmod dra7xx_sata_hwmod = {
  1832. .name = "sata",
  1833. .class = &dra7xx_sata_hwmod_class,
  1834. .clkdm_name = "l3init_clkdm",
  1835. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1836. .main_clk = "func_48m_fclk",
  1837. .mpu_rt_idx = 1,
  1838. .prcm = {
  1839. .omap4 = {
  1840. .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
  1841. .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
  1842. .modulemode = MODULEMODE_SWCTRL,
  1843. },
  1844. },
  1845. };
  1846. /*
  1847. * 'smartreflex' class
  1848. *
  1849. */
  1850. /* The IP is not compliant to type1 / type2 scheme */
  1851. static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
  1852. .sidle_shift = 24,
  1853. .enwkup_shift = 26,
  1854. };
  1855. static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
  1856. .sysc_offs = 0x0038,
  1857. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
  1858. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1859. SIDLE_SMART_WKUP),
  1860. .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
  1861. };
  1862. static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
  1863. .name = "smartreflex",
  1864. .sysc = &dra7xx_smartreflex_sysc,
  1865. .rev = 2,
  1866. };
  1867. /* smartreflex_core */
  1868. /* smartreflex_core dev_attr */
  1869. static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
  1870. .sensor_voltdm_name = "core",
  1871. };
  1872. static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
  1873. .name = "smartreflex_core",
  1874. .class = &dra7xx_smartreflex_hwmod_class,
  1875. .clkdm_name = "coreaon_clkdm",
  1876. .main_clk = "wkupaon_iclk_mux",
  1877. .prcm = {
  1878. .omap4 = {
  1879. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
  1880. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
  1881. .modulemode = MODULEMODE_SWCTRL,
  1882. },
  1883. },
  1884. .dev_attr = &smartreflex_core_dev_attr,
  1885. };
  1886. /* smartreflex_mpu */
  1887. /* smartreflex_mpu dev_attr */
  1888. static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
  1889. .sensor_voltdm_name = "mpu",
  1890. };
  1891. static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
  1892. .name = "smartreflex_mpu",
  1893. .class = &dra7xx_smartreflex_hwmod_class,
  1894. .clkdm_name = "coreaon_clkdm",
  1895. .main_clk = "wkupaon_iclk_mux",
  1896. .prcm = {
  1897. .omap4 = {
  1898. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
  1899. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
  1900. .modulemode = MODULEMODE_SWCTRL,
  1901. },
  1902. },
  1903. .dev_attr = &smartreflex_mpu_dev_attr,
  1904. };
  1905. /*
  1906. * 'spinlock' class
  1907. *
  1908. */
  1909. static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
  1910. .rev_offs = 0x0000,
  1911. .sysc_offs = 0x0010,
  1912. .syss_offs = 0x0014,
  1913. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  1914. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1915. SYSS_HAS_RESET_STATUS),
  1916. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1917. .sysc_fields = &omap_hwmod_sysc_type1,
  1918. };
  1919. static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
  1920. .name = "spinlock",
  1921. .sysc = &dra7xx_spinlock_sysc,
  1922. };
  1923. /* spinlock */
  1924. static struct omap_hwmod dra7xx_spinlock_hwmod = {
  1925. .name = "spinlock",
  1926. .class = &dra7xx_spinlock_hwmod_class,
  1927. .clkdm_name = "l4cfg_clkdm",
  1928. .main_clk = "l3_iclk_div",
  1929. .prcm = {
  1930. .omap4 = {
  1931. .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
  1932. .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
  1933. },
  1934. },
  1935. };
  1936. /*
  1937. * 'timer' class
  1938. *
  1939. * This class contains several variants: ['timer_1ms', 'timer_secure',
  1940. * 'timer']
  1941. */
  1942. static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
  1943. .rev_offs = 0x0000,
  1944. .sysc_offs = 0x0010,
  1945. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1946. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1947. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1948. SIDLE_SMART_WKUP),
  1949. .sysc_fields = &omap_hwmod_sysc_type2,
  1950. };
  1951. static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
  1952. .name = "timer",
  1953. .sysc = &dra7xx_timer_1ms_sysc,
  1954. };
  1955. static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
  1956. .rev_offs = 0x0000,
  1957. .sysc_offs = 0x0010,
  1958. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1959. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1960. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1961. SIDLE_SMART_WKUP),
  1962. .sysc_fields = &omap_hwmod_sysc_type2,
  1963. };
  1964. static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
  1965. .name = "timer",
  1966. .sysc = &dra7xx_timer_sysc,
  1967. };
  1968. /* timer1 */
  1969. static struct omap_hwmod dra7xx_timer1_hwmod = {
  1970. .name = "timer1",
  1971. .class = &dra7xx_timer_1ms_hwmod_class,
  1972. .clkdm_name = "wkupaon_clkdm",
  1973. .main_clk = "timer1_gfclk_mux",
  1974. .prcm = {
  1975. .omap4 = {
  1976. .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
  1977. .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
  1978. .modulemode = MODULEMODE_SWCTRL,
  1979. },
  1980. },
  1981. };
  1982. /* timer2 */
  1983. static struct omap_hwmod dra7xx_timer2_hwmod = {
  1984. .name = "timer2",
  1985. .class = &dra7xx_timer_1ms_hwmod_class,
  1986. .clkdm_name = "l4per_clkdm",
  1987. .main_clk = "timer2_gfclk_mux",
  1988. .prcm = {
  1989. .omap4 = {
  1990. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
  1991. .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
  1992. .modulemode = MODULEMODE_SWCTRL,
  1993. },
  1994. },
  1995. };
  1996. /* timer3 */
  1997. static struct omap_hwmod dra7xx_timer3_hwmod = {
  1998. .name = "timer3",
  1999. .class = &dra7xx_timer_hwmod_class,
  2000. .clkdm_name = "l4per_clkdm",
  2001. .main_clk = "timer3_gfclk_mux",
  2002. .prcm = {
  2003. .omap4 = {
  2004. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
  2005. .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
  2006. .modulemode = MODULEMODE_SWCTRL,
  2007. },
  2008. },
  2009. };
  2010. /* timer4 */
  2011. static struct omap_hwmod dra7xx_timer4_hwmod = {
  2012. .name = "timer4",
  2013. .class = &dra7xx_timer_hwmod_class,
  2014. .clkdm_name = "l4per_clkdm",
  2015. .main_clk = "timer4_gfclk_mux",
  2016. .prcm = {
  2017. .omap4 = {
  2018. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
  2019. .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
  2020. .modulemode = MODULEMODE_SWCTRL,
  2021. },
  2022. },
  2023. };
  2024. /* timer5 */
  2025. static struct omap_hwmod dra7xx_timer5_hwmod = {
  2026. .name = "timer5",
  2027. .class = &dra7xx_timer_hwmod_class,
  2028. .clkdm_name = "ipu_clkdm",
  2029. .main_clk = "timer5_gfclk_mux",
  2030. .prcm = {
  2031. .omap4 = {
  2032. .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
  2033. .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
  2034. .modulemode = MODULEMODE_SWCTRL,
  2035. },
  2036. },
  2037. };
  2038. /* timer6 */
  2039. static struct omap_hwmod dra7xx_timer6_hwmod = {
  2040. .name = "timer6",
  2041. .class = &dra7xx_timer_hwmod_class,
  2042. .clkdm_name = "ipu_clkdm",
  2043. .main_clk = "timer6_gfclk_mux",
  2044. .prcm = {
  2045. .omap4 = {
  2046. .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
  2047. .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
  2048. .modulemode = MODULEMODE_SWCTRL,
  2049. },
  2050. },
  2051. };
  2052. /* timer7 */
  2053. static struct omap_hwmod dra7xx_timer7_hwmod = {
  2054. .name = "timer7",
  2055. .class = &dra7xx_timer_hwmod_class,
  2056. .clkdm_name = "ipu_clkdm",
  2057. .main_clk = "timer7_gfclk_mux",
  2058. .prcm = {
  2059. .omap4 = {
  2060. .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
  2061. .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
  2062. .modulemode = MODULEMODE_SWCTRL,
  2063. },
  2064. },
  2065. };
  2066. /* timer8 */
  2067. static struct omap_hwmod dra7xx_timer8_hwmod = {
  2068. .name = "timer8",
  2069. .class = &dra7xx_timer_hwmod_class,
  2070. .clkdm_name = "ipu_clkdm",
  2071. .main_clk = "timer8_gfclk_mux",
  2072. .prcm = {
  2073. .omap4 = {
  2074. .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
  2075. .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
  2076. .modulemode = MODULEMODE_SWCTRL,
  2077. },
  2078. },
  2079. };
  2080. /* timer9 */
  2081. static struct omap_hwmod dra7xx_timer9_hwmod = {
  2082. .name = "timer9",
  2083. .class = &dra7xx_timer_hwmod_class,
  2084. .clkdm_name = "l4per_clkdm",
  2085. .main_clk = "timer9_gfclk_mux",
  2086. .prcm = {
  2087. .omap4 = {
  2088. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
  2089. .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
  2090. .modulemode = MODULEMODE_SWCTRL,
  2091. },
  2092. },
  2093. };
  2094. /* timer10 */
  2095. static struct omap_hwmod dra7xx_timer10_hwmod = {
  2096. .name = "timer10",
  2097. .class = &dra7xx_timer_1ms_hwmod_class,
  2098. .clkdm_name = "l4per_clkdm",
  2099. .main_clk = "timer10_gfclk_mux",
  2100. .prcm = {
  2101. .omap4 = {
  2102. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
  2103. .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
  2104. .modulemode = MODULEMODE_SWCTRL,
  2105. },
  2106. },
  2107. };
  2108. /* timer11 */
  2109. static struct omap_hwmod dra7xx_timer11_hwmod = {
  2110. .name = "timer11",
  2111. .class = &dra7xx_timer_hwmod_class,
  2112. .clkdm_name = "l4per_clkdm",
  2113. .main_clk = "timer11_gfclk_mux",
  2114. .prcm = {
  2115. .omap4 = {
  2116. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
  2117. .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
  2118. .modulemode = MODULEMODE_SWCTRL,
  2119. },
  2120. },
  2121. };
  2122. /* timer12 */
  2123. static struct omap_hwmod dra7xx_timer12_hwmod = {
  2124. .name = "timer12",
  2125. .class = &dra7xx_timer_hwmod_class,
  2126. .clkdm_name = "wkupaon_clkdm",
  2127. .main_clk = "secure_32k_clk_src_ck",
  2128. .prcm = {
  2129. .omap4 = {
  2130. .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET,
  2131. .context_offs = DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET,
  2132. },
  2133. },
  2134. };
  2135. /* timer13 */
  2136. static struct omap_hwmod dra7xx_timer13_hwmod = {
  2137. .name = "timer13",
  2138. .class = &dra7xx_timer_hwmod_class,
  2139. .clkdm_name = "l4per3_clkdm",
  2140. .main_clk = "timer13_gfclk_mux",
  2141. .prcm = {
  2142. .omap4 = {
  2143. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
  2144. .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
  2145. .modulemode = MODULEMODE_SWCTRL,
  2146. },
  2147. },
  2148. };
  2149. /* timer14 */
  2150. static struct omap_hwmod dra7xx_timer14_hwmod = {
  2151. .name = "timer14",
  2152. .class = &dra7xx_timer_hwmod_class,
  2153. .clkdm_name = "l4per3_clkdm",
  2154. .main_clk = "timer14_gfclk_mux",
  2155. .prcm = {
  2156. .omap4 = {
  2157. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
  2158. .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
  2159. .modulemode = MODULEMODE_SWCTRL,
  2160. },
  2161. },
  2162. };
  2163. /* timer15 */
  2164. static struct omap_hwmod dra7xx_timer15_hwmod = {
  2165. .name = "timer15",
  2166. .class = &dra7xx_timer_hwmod_class,
  2167. .clkdm_name = "l4per3_clkdm",
  2168. .main_clk = "timer15_gfclk_mux",
  2169. .prcm = {
  2170. .omap4 = {
  2171. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
  2172. .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
  2173. .modulemode = MODULEMODE_SWCTRL,
  2174. },
  2175. },
  2176. };
  2177. /* timer16 */
  2178. static struct omap_hwmod dra7xx_timer16_hwmod = {
  2179. .name = "timer16",
  2180. .class = &dra7xx_timer_hwmod_class,
  2181. .clkdm_name = "l4per3_clkdm",
  2182. .main_clk = "timer16_gfclk_mux",
  2183. .prcm = {
  2184. .omap4 = {
  2185. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
  2186. .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
  2187. .modulemode = MODULEMODE_SWCTRL,
  2188. },
  2189. },
  2190. };
  2191. /*
  2192. * 'uart' class
  2193. *
  2194. */
  2195. static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
  2196. .rev_offs = 0x0050,
  2197. .sysc_offs = 0x0054,
  2198. .syss_offs = 0x0058,
  2199. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  2200. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  2201. SYSS_HAS_RESET_STATUS),
  2202. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2203. SIDLE_SMART_WKUP),
  2204. .sysc_fields = &omap_hwmod_sysc_type1,
  2205. };
  2206. static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
  2207. .name = "uart",
  2208. .sysc = &dra7xx_uart_sysc,
  2209. };
  2210. /* uart1 */
  2211. static struct omap_hwmod dra7xx_uart1_hwmod = {
  2212. .name = "uart1",
  2213. .class = &dra7xx_uart_hwmod_class,
  2214. .clkdm_name = "l4per_clkdm",
  2215. .main_clk = "uart1_gfclk_mux",
  2216. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
  2217. .prcm = {
  2218. .omap4 = {
  2219. .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
  2220. .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
  2221. .modulemode = MODULEMODE_SWCTRL,
  2222. },
  2223. },
  2224. };
  2225. /* uart2 */
  2226. static struct omap_hwmod dra7xx_uart2_hwmod = {
  2227. .name = "uart2",
  2228. .class = &dra7xx_uart_hwmod_class,
  2229. .clkdm_name = "l4per_clkdm",
  2230. .main_clk = "uart2_gfclk_mux",
  2231. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2232. .prcm = {
  2233. .omap4 = {
  2234. .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
  2235. .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
  2236. .modulemode = MODULEMODE_SWCTRL,
  2237. },
  2238. },
  2239. };
  2240. /* uart3 */
  2241. static struct omap_hwmod dra7xx_uart3_hwmod = {
  2242. .name = "uart3",
  2243. .class = &dra7xx_uart_hwmod_class,
  2244. .clkdm_name = "l4per_clkdm",
  2245. .main_clk = "uart3_gfclk_mux",
  2246. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
  2247. .prcm = {
  2248. .omap4 = {
  2249. .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
  2250. .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
  2251. .modulemode = MODULEMODE_SWCTRL,
  2252. },
  2253. },
  2254. };
  2255. /* uart4 */
  2256. static struct omap_hwmod dra7xx_uart4_hwmod = {
  2257. .name = "uart4",
  2258. .class = &dra7xx_uart_hwmod_class,
  2259. .clkdm_name = "l4per_clkdm",
  2260. .main_clk = "uart4_gfclk_mux",
  2261. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART4_FLAGS,
  2262. .prcm = {
  2263. .omap4 = {
  2264. .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
  2265. .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
  2266. .modulemode = MODULEMODE_SWCTRL,
  2267. },
  2268. },
  2269. };
  2270. /* uart5 */
  2271. static struct omap_hwmod dra7xx_uart5_hwmod = {
  2272. .name = "uart5",
  2273. .class = &dra7xx_uart_hwmod_class,
  2274. .clkdm_name = "l4per_clkdm",
  2275. .main_clk = "uart5_gfclk_mux",
  2276. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2277. .prcm = {
  2278. .omap4 = {
  2279. .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
  2280. .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
  2281. .modulemode = MODULEMODE_SWCTRL,
  2282. },
  2283. },
  2284. };
  2285. /* uart6 */
  2286. static struct omap_hwmod dra7xx_uart6_hwmod = {
  2287. .name = "uart6",
  2288. .class = &dra7xx_uart_hwmod_class,
  2289. .clkdm_name = "ipu_clkdm",
  2290. .main_clk = "uart6_gfclk_mux",
  2291. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2292. .prcm = {
  2293. .omap4 = {
  2294. .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
  2295. .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
  2296. .modulemode = MODULEMODE_SWCTRL,
  2297. },
  2298. },
  2299. };
  2300. /* uart7 */
  2301. static struct omap_hwmod dra7xx_uart7_hwmod = {
  2302. .name = "uart7",
  2303. .class = &dra7xx_uart_hwmod_class,
  2304. .clkdm_name = "l4per2_clkdm",
  2305. .main_clk = "uart7_gfclk_mux",
  2306. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2307. .prcm = {
  2308. .omap4 = {
  2309. .clkctrl_offs = DRA7XX_CM_L4PER2_UART7_CLKCTRL_OFFSET,
  2310. .context_offs = DRA7XX_RM_L4PER2_UART7_CONTEXT_OFFSET,
  2311. .modulemode = MODULEMODE_SWCTRL,
  2312. },
  2313. },
  2314. };
  2315. /* uart8 */
  2316. static struct omap_hwmod dra7xx_uart8_hwmod = {
  2317. .name = "uart8",
  2318. .class = &dra7xx_uart_hwmod_class,
  2319. .clkdm_name = "l4per2_clkdm",
  2320. .main_clk = "uart8_gfclk_mux",
  2321. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2322. .prcm = {
  2323. .omap4 = {
  2324. .clkctrl_offs = DRA7XX_CM_L4PER2_UART8_CLKCTRL_OFFSET,
  2325. .context_offs = DRA7XX_RM_L4PER2_UART8_CONTEXT_OFFSET,
  2326. .modulemode = MODULEMODE_SWCTRL,
  2327. },
  2328. },
  2329. };
  2330. /* uart9 */
  2331. static struct omap_hwmod dra7xx_uart9_hwmod = {
  2332. .name = "uart9",
  2333. .class = &dra7xx_uart_hwmod_class,
  2334. .clkdm_name = "l4per2_clkdm",
  2335. .main_clk = "uart9_gfclk_mux",
  2336. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2337. .prcm = {
  2338. .omap4 = {
  2339. .clkctrl_offs = DRA7XX_CM_L4PER2_UART9_CLKCTRL_OFFSET,
  2340. .context_offs = DRA7XX_RM_L4PER2_UART9_CONTEXT_OFFSET,
  2341. .modulemode = MODULEMODE_SWCTRL,
  2342. },
  2343. },
  2344. };
  2345. /* uart10 */
  2346. static struct omap_hwmod dra7xx_uart10_hwmod = {
  2347. .name = "uart10",
  2348. .class = &dra7xx_uart_hwmod_class,
  2349. .clkdm_name = "wkupaon_clkdm",
  2350. .main_clk = "uart10_gfclk_mux",
  2351. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2352. .prcm = {
  2353. .omap4 = {
  2354. .clkctrl_offs = DRA7XX_CM_WKUPAON_UART10_CLKCTRL_OFFSET,
  2355. .context_offs = DRA7XX_RM_WKUPAON_UART10_CONTEXT_OFFSET,
  2356. .modulemode = MODULEMODE_SWCTRL,
  2357. },
  2358. },
  2359. };
  2360. /* DES (the 'P' (public) device) */
  2361. static struct omap_hwmod_class_sysconfig dra7xx_des_sysc = {
  2362. .rev_offs = 0x0030,
  2363. .sysc_offs = 0x0034,
  2364. .syss_offs = 0x0038,
  2365. .sysc_flags = SYSS_HAS_RESET_STATUS,
  2366. };
  2367. static struct omap_hwmod_class dra7xx_des_hwmod_class = {
  2368. .name = "des",
  2369. .sysc = &dra7xx_des_sysc,
  2370. };
  2371. /* DES */
  2372. static struct omap_hwmod dra7xx_des_hwmod = {
  2373. .name = "des",
  2374. .class = &dra7xx_des_hwmod_class,
  2375. .clkdm_name = "l4sec_clkdm",
  2376. .main_clk = "l3_iclk_div",
  2377. .prcm = {
  2378. .omap4 = {
  2379. .clkctrl_offs = DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET,
  2380. .context_offs = DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET,
  2381. .modulemode = MODULEMODE_HWCTRL,
  2382. },
  2383. },
  2384. };
  2385. /* rng */
  2386. static struct omap_hwmod_class_sysconfig dra7xx_rng_sysc = {
  2387. .rev_offs = 0x1fe0,
  2388. .sysc_offs = 0x1fe4,
  2389. .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
  2390. .idlemodes = SIDLE_FORCE | SIDLE_NO,
  2391. .sysc_fields = &omap_hwmod_sysc_type1,
  2392. };
  2393. static struct omap_hwmod_class dra7xx_rng_hwmod_class = {
  2394. .name = "rng",
  2395. .sysc = &dra7xx_rng_sysc,
  2396. };
  2397. static struct omap_hwmod dra7xx_rng_hwmod = {
  2398. .name = "rng",
  2399. .class = &dra7xx_rng_hwmod_class,
  2400. .flags = HWMOD_SWSUP_SIDLE,
  2401. .clkdm_name = "l4sec_clkdm",
  2402. .prcm = {
  2403. .omap4 = {
  2404. .clkctrl_offs = DRA7XX_CM_L4SEC_RNG_CLKCTRL_OFFSET,
  2405. .context_offs = DRA7XX_RM_L4SEC_RNG_CONTEXT_OFFSET,
  2406. .modulemode = MODULEMODE_HWCTRL,
  2407. },
  2408. },
  2409. };
  2410. /*
  2411. * 'usb_otg_ss' class
  2412. *
  2413. */
  2414. static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
  2415. .rev_offs = 0x0000,
  2416. .sysc_offs = 0x0010,
  2417. .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
  2418. SYSC_HAS_SIDLEMODE),
  2419. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2420. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  2421. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  2422. .sysc_fields = &omap_hwmod_sysc_type2,
  2423. };
  2424. static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
  2425. .name = "usb_otg_ss",
  2426. .sysc = &dra7xx_usb_otg_ss_sysc,
  2427. };
  2428. /* usb_otg_ss1 */
  2429. static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
  2430. { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
  2431. };
  2432. static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
  2433. .name = "usb_otg_ss1",
  2434. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2435. .clkdm_name = "l3init_clkdm",
  2436. .main_clk = "dpll_core_h13x2_ck",
  2437. .flags = HWMOD_CLKDM_NOAUTO,
  2438. .prcm = {
  2439. .omap4 = {
  2440. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
  2441. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
  2442. .modulemode = MODULEMODE_HWCTRL,
  2443. },
  2444. },
  2445. .opt_clks = usb_otg_ss1_opt_clks,
  2446. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
  2447. };
  2448. /* usb_otg_ss2 */
  2449. static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
  2450. { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
  2451. };
  2452. static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
  2453. .name = "usb_otg_ss2",
  2454. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2455. .clkdm_name = "l3init_clkdm",
  2456. .main_clk = "dpll_core_h13x2_ck",
  2457. .flags = HWMOD_CLKDM_NOAUTO,
  2458. .prcm = {
  2459. .omap4 = {
  2460. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
  2461. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
  2462. .modulemode = MODULEMODE_HWCTRL,
  2463. },
  2464. },
  2465. .opt_clks = usb_otg_ss2_opt_clks,
  2466. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
  2467. };
  2468. /* usb_otg_ss3 */
  2469. static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
  2470. .name = "usb_otg_ss3",
  2471. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2472. .clkdm_name = "l3init_clkdm",
  2473. .main_clk = "dpll_core_h13x2_ck",
  2474. .prcm = {
  2475. .omap4 = {
  2476. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
  2477. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
  2478. .modulemode = MODULEMODE_HWCTRL,
  2479. },
  2480. },
  2481. };
  2482. /* usb_otg_ss4 */
  2483. static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
  2484. .name = "usb_otg_ss4",
  2485. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2486. .clkdm_name = "l3init_clkdm",
  2487. .main_clk = "dpll_core_h13x2_ck",
  2488. .prcm = {
  2489. .omap4 = {
  2490. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
  2491. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
  2492. .modulemode = MODULEMODE_HWCTRL,
  2493. },
  2494. },
  2495. };
  2496. /*
  2497. * 'vcp' class
  2498. *
  2499. */
  2500. static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
  2501. .name = "vcp",
  2502. };
  2503. /* vcp1 */
  2504. static struct omap_hwmod dra7xx_vcp1_hwmod = {
  2505. .name = "vcp1",
  2506. .class = &dra7xx_vcp_hwmod_class,
  2507. .clkdm_name = "l3main1_clkdm",
  2508. .main_clk = "l3_iclk_div",
  2509. .prcm = {
  2510. .omap4 = {
  2511. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
  2512. .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
  2513. },
  2514. },
  2515. };
  2516. /* vcp2 */
  2517. static struct omap_hwmod dra7xx_vcp2_hwmod = {
  2518. .name = "vcp2",
  2519. .class = &dra7xx_vcp_hwmod_class,
  2520. .clkdm_name = "l3main1_clkdm",
  2521. .main_clk = "l3_iclk_div",
  2522. .prcm = {
  2523. .omap4 = {
  2524. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
  2525. .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
  2526. },
  2527. },
  2528. };
  2529. /*
  2530. * 'wd_timer' class
  2531. *
  2532. */
  2533. static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
  2534. .rev_offs = 0x0000,
  2535. .sysc_offs = 0x0010,
  2536. .syss_offs = 0x0014,
  2537. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  2538. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  2539. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2540. SIDLE_SMART_WKUP),
  2541. .sysc_fields = &omap_hwmod_sysc_type1,
  2542. };
  2543. static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
  2544. .name = "wd_timer",
  2545. .sysc = &dra7xx_wd_timer_sysc,
  2546. .pre_shutdown = &omap2_wd_timer_disable,
  2547. .reset = &omap2_wd_timer_reset,
  2548. };
  2549. /* wd_timer2 */
  2550. static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
  2551. .name = "wd_timer2",
  2552. .class = &dra7xx_wd_timer_hwmod_class,
  2553. .clkdm_name = "wkupaon_clkdm",
  2554. .main_clk = "sys_32k_ck",
  2555. .prcm = {
  2556. .omap4 = {
  2557. .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
  2558. .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
  2559. .modulemode = MODULEMODE_SWCTRL,
  2560. },
  2561. },
  2562. };
  2563. /*
  2564. * Interfaces
  2565. */
  2566. /* l3_main_1 -> dmm */
  2567. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
  2568. .master = &dra7xx_l3_main_1_hwmod,
  2569. .slave = &dra7xx_dmm_hwmod,
  2570. .clk = "l3_iclk_div",
  2571. .user = OCP_USER_SDMA,
  2572. };
  2573. /* l3_main_2 -> l3_instr */
  2574. static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
  2575. .master = &dra7xx_l3_main_2_hwmod,
  2576. .slave = &dra7xx_l3_instr_hwmod,
  2577. .clk = "l3_iclk_div",
  2578. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2579. };
  2580. /* l4_cfg -> l3_main_1 */
  2581. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
  2582. .master = &dra7xx_l4_cfg_hwmod,
  2583. .slave = &dra7xx_l3_main_1_hwmod,
  2584. .clk = "l3_iclk_div",
  2585. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2586. };
  2587. /* mpu -> l3_main_1 */
  2588. static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
  2589. .master = &dra7xx_mpu_hwmod,
  2590. .slave = &dra7xx_l3_main_1_hwmod,
  2591. .clk = "l3_iclk_div",
  2592. .user = OCP_USER_MPU,
  2593. };
  2594. /* l3_main_1 -> l3_main_2 */
  2595. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
  2596. .master = &dra7xx_l3_main_1_hwmod,
  2597. .slave = &dra7xx_l3_main_2_hwmod,
  2598. .clk = "l3_iclk_div",
  2599. .user = OCP_USER_MPU,
  2600. };
  2601. /* l4_cfg -> l3_main_2 */
  2602. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
  2603. .master = &dra7xx_l4_cfg_hwmod,
  2604. .slave = &dra7xx_l3_main_2_hwmod,
  2605. .clk = "l3_iclk_div",
  2606. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2607. };
  2608. /* l3_main_1 -> l4_cfg */
  2609. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
  2610. .master = &dra7xx_l3_main_1_hwmod,
  2611. .slave = &dra7xx_l4_cfg_hwmod,
  2612. .clk = "l3_iclk_div",
  2613. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2614. };
  2615. /* l3_main_1 -> l4_per1 */
  2616. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
  2617. .master = &dra7xx_l3_main_1_hwmod,
  2618. .slave = &dra7xx_l4_per1_hwmod,
  2619. .clk = "l3_iclk_div",
  2620. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2621. };
  2622. /* l3_main_1 -> l4_per2 */
  2623. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
  2624. .master = &dra7xx_l3_main_1_hwmod,
  2625. .slave = &dra7xx_l4_per2_hwmod,
  2626. .clk = "l3_iclk_div",
  2627. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2628. };
  2629. /* l3_main_1 -> l4_per3 */
  2630. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
  2631. .master = &dra7xx_l3_main_1_hwmod,
  2632. .slave = &dra7xx_l4_per3_hwmod,
  2633. .clk = "l3_iclk_div",
  2634. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2635. };
  2636. /* l3_main_1 -> l4_wkup */
  2637. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
  2638. .master = &dra7xx_l3_main_1_hwmod,
  2639. .slave = &dra7xx_l4_wkup_hwmod,
  2640. .clk = "wkupaon_iclk_mux",
  2641. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2642. };
  2643. /* l4_per2 -> atl */
  2644. static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
  2645. .master = &dra7xx_l4_per2_hwmod,
  2646. .slave = &dra7xx_atl_hwmod,
  2647. .clk = "l3_iclk_div",
  2648. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2649. };
  2650. /* l3_main_1 -> bb2d */
  2651. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
  2652. .master = &dra7xx_l3_main_1_hwmod,
  2653. .slave = &dra7xx_bb2d_hwmod,
  2654. .clk = "l3_iclk_div",
  2655. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2656. };
  2657. /* l4_wkup -> counter_32k */
  2658. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
  2659. .master = &dra7xx_l4_wkup_hwmod,
  2660. .slave = &dra7xx_counter_32k_hwmod,
  2661. .clk = "wkupaon_iclk_mux",
  2662. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2663. };
  2664. /* l4_wkup -> ctrl_module_wkup */
  2665. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
  2666. .master = &dra7xx_l4_wkup_hwmod,
  2667. .slave = &dra7xx_ctrl_module_wkup_hwmod,
  2668. .clk = "wkupaon_iclk_mux",
  2669. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2670. };
  2671. static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = {
  2672. .master = &dra7xx_l4_per2_hwmod,
  2673. .slave = &dra7xx_gmac_hwmod,
  2674. .clk = "dpll_gmac_ck",
  2675. .user = OCP_USER_MPU,
  2676. };
  2677. static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = {
  2678. .master = &dra7xx_gmac_hwmod,
  2679. .slave = &dra7xx_mdio_hwmod,
  2680. .user = OCP_USER_MPU,
  2681. };
  2682. /* l4_wkup -> dcan1 */
  2683. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
  2684. .master = &dra7xx_l4_wkup_hwmod,
  2685. .slave = &dra7xx_dcan1_hwmod,
  2686. .clk = "wkupaon_iclk_mux",
  2687. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2688. };
  2689. /* l4_per2 -> dcan2 */
  2690. static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
  2691. .master = &dra7xx_l4_per2_hwmod,
  2692. .slave = &dra7xx_dcan2_hwmod,
  2693. .clk = "l3_iclk_div",
  2694. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2695. };
  2696. static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
  2697. {
  2698. .pa_start = 0x4a056000,
  2699. .pa_end = 0x4a056fff,
  2700. .flags = ADDR_TYPE_RT
  2701. },
  2702. { }
  2703. };
  2704. /* l4_cfg -> dma_system */
  2705. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
  2706. .master = &dra7xx_l4_cfg_hwmod,
  2707. .slave = &dra7xx_dma_system_hwmod,
  2708. .clk = "l3_iclk_div",
  2709. .addr = dra7xx_dma_system_addrs,
  2710. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2711. };
  2712. /* l3_main_1 -> tpcc */
  2713. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
  2714. .master = &dra7xx_l3_main_1_hwmod,
  2715. .slave = &dra7xx_tpcc_hwmod,
  2716. .clk = "l3_iclk_div",
  2717. .user = OCP_USER_MPU,
  2718. };
  2719. /* l3_main_1 -> tptc0 */
  2720. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0 = {
  2721. .master = &dra7xx_l3_main_1_hwmod,
  2722. .slave = &dra7xx_tptc0_hwmod,
  2723. .clk = "l3_iclk_div",
  2724. .user = OCP_USER_MPU,
  2725. };
  2726. /* l3_main_1 -> tptc1 */
  2727. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1 = {
  2728. .master = &dra7xx_l3_main_1_hwmod,
  2729. .slave = &dra7xx_tptc1_hwmod,
  2730. .clk = "l3_iclk_div",
  2731. .user = OCP_USER_MPU,
  2732. };
  2733. /* l3_main_1 -> dss */
  2734. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
  2735. .master = &dra7xx_l3_main_1_hwmod,
  2736. .slave = &dra7xx_dss_hwmod,
  2737. .clk = "l3_iclk_div",
  2738. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2739. };
  2740. /* l3_main_1 -> dispc */
  2741. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
  2742. .master = &dra7xx_l3_main_1_hwmod,
  2743. .slave = &dra7xx_dss_dispc_hwmod,
  2744. .clk = "l3_iclk_div",
  2745. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2746. };
  2747. /* l3_main_1 -> dispc */
  2748. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
  2749. .master = &dra7xx_l3_main_1_hwmod,
  2750. .slave = &dra7xx_dss_hdmi_hwmod,
  2751. .clk = "l3_iclk_div",
  2752. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2753. };
  2754. /* l3_main_1 -> aes1 */
  2755. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1 = {
  2756. .master = &dra7xx_l3_main_1_hwmod,
  2757. .slave = &dra7xx_aes1_hwmod,
  2758. .clk = "l3_iclk_div",
  2759. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2760. };
  2761. /* l3_main_1 -> aes2 */
  2762. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2 = {
  2763. .master = &dra7xx_l3_main_1_hwmod,
  2764. .slave = &dra7xx_aes2_hwmod,
  2765. .clk = "l3_iclk_div",
  2766. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2767. };
  2768. /* l3_main_1 -> sha0 */
  2769. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0 = {
  2770. .master = &dra7xx_l3_main_1_hwmod,
  2771. .slave = &dra7xx_sha0_hwmod,
  2772. .clk = "l3_iclk_div",
  2773. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2774. };
  2775. /* l4_per2 -> mcasp1 */
  2776. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp1 = {
  2777. .master = &dra7xx_l4_per2_hwmod,
  2778. .slave = &dra7xx_mcasp1_hwmod,
  2779. .clk = "l4_root_clk_div",
  2780. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2781. };
  2782. /* l3_main_1 -> mcasp1 */
  2783. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp1 = {
  2784. .master = &dra7xx_l3_main_1_hwmod,
  2785. .slave = &dra7xx_mcasp1_hwmod,
  2786. .clk = "l3_iclk_div",
  2787. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2788. };
  2789. /* l4_per2 -> mcasp2 */
  2790. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp2 = {
  2791. .master = &dra7xx_l4_per2_hwmod,
  2792. .slave = &dra7xx_mcasp2_hwmod,
  2793. .clk = "l4_root_clk_div",
  2794. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2795. };
  2796. /* l3_main_1 -> mcasp2 */
  2797. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp2 = {
  2798. .master = &dra7xx_l3_main_1_hwmod,
  2799. .slave = &dra7xx_mcasp2_hwmod,
  2800. .clk = "l3_iclk_div",
  2801. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2802. };
  2803. /* l4_per2 -> mcasp3 */
  2804. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp3 = {
  2805. .master = &dra7xx_l4_per2_hwmod,
  2806. .slave = &dra7xx_mcasp3_hwmod,
  2807. .clk = "l4_root_clk_div",
  2808. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2809. };
  2810. /* l3_main_1 -> mcasp3 */
  2811. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp3 = {
  2812. .master = &dra7xx_l3_main_1_hwmod,
  2813. .slave = &dra7xx_mcasp3_hwmod,
  2814. .clk = "l3_iclk_div",
  2815. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2816. };
  2817. /* l4_per2 -> mcasp4 */
  2818. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp4 = {
  2819. .master = &dra7xx_l4_per2_hwmod,
  2820. .slave = &dra7xx_mcasp4_hwmod,
  2821. .clk = "l4_root_clk_div",
  2822. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2823. };
  2824. /* l4_per2 -> mcasp5 */
  2825. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp5 = {
  2826. .master = &dra7xx_l4_per2_hwmod,
  2827. .slave = &dra7xx_mcasp5_hwmod,
  2828. .clk = "l4_root_clk_div",
  2829. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2830. };
  2831. /* l4_per2 -> mcasp6 */
  2832. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp6 = {
  2833. .master = &dra7xx_l4_per2_hwmod,
  2834. .slave = &dra7xx_mcasp6_hwmod,
  2835. .clk = "l4_root_clk_div",
  2836. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2837. };
  2838. /* l4_per2 -> mcasp7 */
  2839. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp7 = {
  2840. .master = &dra7xx_l4_per2_hwmod,
  2841. .slave = &dra7xx_mcasp7_hwmod,
  2842. .clk = "l4_root_clk_div",
  2843. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2844. };
  2845. /* l4_per2 -> mcasp8 */
  2846. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp8 = {
  2847. .master = &dra7xx_l4_per2_hwmod,
  2848. .slave = &dra7xx_mcasp8_hwmod,
  2849. .clk = "l4_root_clk_div",
  2850. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2851. };
  2852. /* l4_per1 -> elm */
  2853. static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
  2854. .master = &dra7xx_l4_per1_hwmod,
  2855. .slave = &dra7xx_elm_hwmod,
  2856. .clk = "l3_iclk_div",
  2857. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2858. };
  2859. /* l4_wkup -> gpio1 */
  2860. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
  2861. .master = &dra7xx_l4_wkup_hwmod,
  2862. .slave = &dra7xx_gpio1_hwmod,
  2863. .clk = "wkupaon_iclk_mux",
  2864. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2865. };
  2866. /* l4_per1 -> gpio2 */
  2867. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
  2868. .master = &dra7xx_l4_per1_hwmod,
  2869. .slave = &dra7xx_gpio2_hwmod,
  2870. .clk = "l3_iclk_div",
  2871. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2872. };
  2873. /* l4_per1 -> gpio3 */
  2874. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
  2875. .master = &dra7xx_l4_per1_hwmod,
  2876. .slave = &dra7xx_gpio3_hwmod,
  2877. .clk = "l3_iclk_div",
  2878. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2879. };
  2880. /* l4_per1 -> gpio4 */
  2881. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
  2882. .master = &dra7xx_l4_per1_hwmod,
  2883. .slave = &dra7xx_gpio4_hwmod,
  2884. .clk = "l3_iclk_div",
  2885. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2886. };
  2887. /* l4_per1 -> gpio5 */
  2888. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
  2889. .master = &dra7xx_l4_per1_hwmod,
  2890. .slave = &dra7xx_gpio5_hwmod,
  2891. .clk = "l3_iclk_div",
  2892. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2893. };
  2894. /* l4_per1 -> gpio6 */
  2895. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
  2896. .master = &dra7xx_l4_per1_hwmod,
  2897. .slave = &dra7xx_gpio6_hwmod,
  2898. .clk = "l3_iclk_div",
  2899. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2900. };
  2901. /* l4_per1 -> gpio7 */
  2902. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
  2903. .master = &dra7xx_l4_per1_hwmod,
  2904. .slave = &dra7xx_gpio7_hwmod,
  2905. .clk = "l3_iclk_div",
  2906. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2907. };
  2908. /* l4_per1 -> gpio8 */
  2909. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
  2910. .master = &dra7xx_l4_per1_hwmod,
  2911. .slave = &dra7xx_gpio8_hwmod,
  2912. .clk = "l3_iclk_div",
  2913. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2914. };
  2915. /* l3_main_1 -> gpmc */
  2916. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
  2917. .master = &dra7xx_l3_main_1_hwmod,
  2918. .slave = &dra7xx_gpmc_hwmod,
  2919. .clk = "l3_iclk_div",
  2920. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2921. };
  2922. static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
  2923. {
  2924. .pa_start = 0x480b2000,
  2925. .pa_end = 0x480b201f,
  2926. .flags = ADDR_TYPE_RT
  2927. },
  2928. { }
  2929. };
  2930. /* l4_per1 -> hdq1w */
  2931. static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
  2932. .master = &dra7xx_l4_per1_hwmod,
  2933. .slave = &dra7xx_hdq1w_hwmod,
  2934. .clk = "l3_iclk_div",
  2935. .addr = dra7xx_hdq1w_addrs,
  2936. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2937. };
  2938. /* l4_per1 -> i2c1 */
  2939. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
  2940. .master = &dra7xx_l4_per1_hwmod,
  2941. .slave = &dra7xx_i2c1_hwmod,
  2942. .clk = "l3_iclk_div",
  2943. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2944. };
  2945. /* l4_per1 -> i2c2 */
  2946. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
  2947. .master = &dra7xx_l4_per1_hwmod,
  2948. .slave = &dra7xx_i2c2_hwmod,
  2949. .clk = "l3_iclk_div",
  2950. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2951. };
  2952. /* l4_per1 -> i2c3 */
  2953. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
  2954. .master = &dra7xx_l4_per1_hwmod,
  2955. .slave = &dra7xx_i2c3_hwmod,
  2956. .clk = "l3_iclk_div",
  2957. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2958. };
  2959. /* l4_per1 -> i2c4 */
  2960. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
  2961. .master = &dra7xx_l4_per1_hwmod,
  2962. .slave = &dra7xx_i2c4_hwmod,
  2963. .clk = "l3_iclk_div",
  2964. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2965. };
  2966. /* l4_per1 -> i2c5 */
  2967. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
  2968. .master = &dra7xx_l4_per1_hwmod,
  2969. .slave = &dra7xx_i2c5_hwmod,
  2970. .clk = "l3_iclk_div",
  2971. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2972. };
  2973. /* l4_cfg -> mailbox1 */
  2974. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
  2975. .master = &dra7xx_l4_cfg_hwmod,
  2976. .slave = &dra7xx_mailbox1_hwmod,
  2977. .clk = "l3_iclk_div",
  2978. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2979. };
  2980. /* l4_per3 -> mailbox2 */
  2981. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
  2982. .master = &dra7xx_l4_per3_hwmod,
  2983. .slave = &dra7xx_mailbox2_hwmod,
  2984. .clk = "l3_iclk_div",
  2985. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2986. };
  2987. /* l4_per3 -> mailbox3 */
  2988. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
  2989. .master = &dra7xx_l4_per3_hwmod,
  2990. .slave = &dra7xx_mailbox3_hwmod,
  2991. .clk = "l3_iclk_div",
  2992. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2993. };
  2994. /* l4_per3 -> mailbox4 */
  2995. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
  2996. .master = &dra7xx_l4_per3_hwmod,
  2997. .slave = &dra7xx_mailbox4_hwmod,
  2998. .clk = "l3_iclk_div",
  2999. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3000. };
  3001. /* l4_per3 -> mailbox5 */
  3002. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
  3003. .master = &dra7xx_l4_per3_hwmod,
  3004. .slave = &dra7xx_mailbox5_hwmod,
  3005. .clk = "l3_iclk_div",
  3006. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3007. };
  3008. /* l4_per3 -> mailbox6 */
  3009. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
  3010. .master = &dra7xx_l4_per3_hwmod,
  3011. .slave = &dra7xx_mailbox6_hwmod,
  3012. .clk = "l3_iclk_div",
  3013. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3014. };
  3015. /* l4_per3 -> mailbox7 */
  3016. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
  3017. .master = &dra7xx_l4_per3_hwmod,
  3018. .slave = &dra7xx_mailbox7_hwmod,
  3019. .clk = "l3_iclk_div",
  3020. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3021. };
  3022. /* l4_per3 -> mailbox8 */
  3023. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
  3024. .master = &dra7xx_l4_per3_hwmod,
  3025. .slave = &dra7xx_mailbox8_hwmod,
  3026. .clk = "l3_iclk_div",
  3027. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3028. };
  3029. /* l4_per3 -> mailbox9 */
  3030. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
  3031. .master = &dra7xx_l4_per3_hwmod,
  3032. .slave = &dra7xx_mailbox9_hwmod,
  3033. .clk = "l3_iclk_div",
  3034. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3035. };
  3036. /* l4_per3 -> mailbox10 */
  3037. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
  3038. .master = &dra7xx_l4_per3_hwmod,
  3039. .slave = &dra7xx_mailbox10_hwmod,
  3040. .clk = "l3_iclk_div",
  3041. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3042. };
  3043. /* l4_per3 -> mailbox11 */
  3044. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
  3045. .master = &dra7xx_l4_per3_hwmod,
  3046. .slave = &dra7xx_mailbox11_hwmod,
  3047. .clk = "l3_iclk_div",
  3048. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3049. };
  3050. /* l4_per3 -> mailbox12 */
  3051. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
  3052. .master = &dra7xx_l4_per3_hwmod,
  3053. .slave = &dra7xx_mailbox12_hwmod,
  3054. .clk = "l3_iclk_div",
  3055. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3056. };
  3057. /* l4_per3 -> mailbox13 */
  3058. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
  3059. .master = &dra7xx_l4_per3_hwmod,
  3060. .slave = &dra7xx_mailbox13_hwmod,
  3061. .clk = "l3_iclk_div",
  3062. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3063. };
  3064. /* l4_per1 -> mcspi1 */
  3065. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
  3066. .master = &dra7xx_l4_per1_hwmod,
  3067. .slave = &dra7xx_mcspi1_hwmod,
  3068. .clk = "l3_iclk_div",
  3069. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3070. };
  3071. /* l4_per1 -> mcspi2 */
  3072. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
  3073. .master = &dra7xx_l4_per1_hwmod,
  3074. .slave = &dra7xx_mcspi2_hwmod,
  3075. .clk = "l3_iclk_div",
  3076. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3077. };
  3078. /* l4_per1 -> mcspi3 */
  3079. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
  3080. .master = &dra7xx_l4_per1_hwmod,
  3081. .slave = &dra7xx_mcspi3_hwmod,
  3082. .clk = "l3_iclk_div",
  3083. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3084. };
  3085. /* l4_per1 -> mcspi4 */
  3086. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
  3087. .master = &dra7xx_l4_per1_hwmod,
  3088. .slave = &dra7xx_mcspi4_hwmod,
  3089. .clk = "l3_iclk_div",
  3090. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3091. };
  3092. /* l4_per1 -> mmc1 */
  3093. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
  3094. .master = &dra7xx_l4_per1_hwmod,
  3095. .slave = &dra7xx_mmc1_hwmod,
  3096. .clk = "l3_iclk_div",
  3097. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3098. };
  3099. /* l4_per1 -> mmc2 */
  3100. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
  3101. .master = &dra7xx_l4_per1_hwmod,
  3102. .slave = &dra7xx_mmc2_hwmod,
  3103. .clk = "l3_iclk_div",
  3104. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3105. };
  3106. /* l4_per1 -> mmc3 */
  3107. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
  3108. .master = &dra7xx_l4_per1_hwmod,
  3109. .slave = &dra7xx_mmc3_hwmod,
  3110. .clk = "l3_iclk_div",
  3111. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3112. };
  3113. /* l4_per1 -> mmc4 */
  3114. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
  3115. .master = &dra7xx_l4_per1_hwmod,
  3116. .slave = &dra7xx_mmc4_hwmod,
  3117. .clk = "l3_iclk_div",
  3118. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3119. };
  3120. /* l4_cfg -> mpu */
  3121. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
  3122. .master = &dra7xx_l4_cfg_hwmod,
  3123. .slave = &dra7xx_mpu_hwmod,
  3124. .clk = "l3_iclk_div",
  3125. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3126. };
  3127. /* l4_cfg -> ocp2scp1 */
  3128. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
  3129. .master = &dra7xx_l4_cfg_hwmod,
  3130. .slave = &dra7xx_ocp2scp1_hwmod,
  3131. .clk = "l4_root_clk_div",
  3132. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3133. };
  3134. /* l4_cfg -> ocp2scp3 */
  3135. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
  3136. .master = &dra7xx_l4_cfg_hwmod,
  3137. .slave = &dra7xx_ocp2scp3_hwmod,
  3138. .clk = "l4_root_clk_div",
  3139. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3140. };
  3141. /* l3_main_1 -> pciess1 */
  3142. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
  3143. .master = &dra7xx_l3_main_1_hwmod,
  3144. .slave = &dra7xx_pciess1_hwmod,
  3145. .clk = "l3_iclk_div",
  3146. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3147. };
  3148. /* l4_cfg -> pciess1 */
  3149. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
  3150. .master = &dra7xx_l4_cfg_hwmod,
  3151. .slave = &dra7xx_pciess1_hwmod,
  3152. .clk = "l4_root_clk_div",
  3153. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3154. };
  3155. /* l3_main_1 -> pciess2 */
  3156. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
  3157. .master = &dra7xx_l3_main_1_hwmod,
  3158. .slave = &dra7xx_pciess2_hwmod,
  3159. .clk = "l3_iclk_div",
  3160. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3161. };
  3162. /* l4_cfg -> pciess2 */
  3163. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
  3164. .master = &dra7xx_l4_cfg_hwmod,
  3165. .slave = &dra7xx_pciess2_hwmod,
  3166. .clk = "l4_root_clk_div",
  3167. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3168. };
  3169. /* l3_main_1 -> qspi */
  3170. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
  3171. .master = &dra7xx_l3_main_1_hwmod,
  3172. .slave = &dra7xx_qspi_hwmod,
  3173. .clk = "l3_iclk_div",
  3174. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3175. };
  3176. /* l4_per3 -> rtcss */
  3177. static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
  3178. .master = &dra7xx_l4_per3_hwmod,
  3179. .slave = &dra7xx_rtcss_hwmod,
  3180. .clk = "l4_root_clk_div",
  3181. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3182. };
  3183. static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
  3184. {
  3185. .name = "sysc",
  3186. .pa_start = 0x4a141100,
  3187. .pa_end = 0x4a141107,
  3188. .flags = ADDR_TYPE_RT
  3189. },
  3190. { }
  3191. };
  3192. /* l4_cfg -> sata */
  3193. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
  3194. .master = &dra7xx_l4_cfg_hwmod,
  3195. .slave = &dra7xx_sata_hwmod,
  3196. .clk = "l3_iclk_div",
  3197. .addr = dra7xx_sata_addrs,
  3198. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3199. };
  3200. static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
  3201. {
  3202. .pa_start = 0x4a0dd000,
  3203. .pa_end = 0x4a0dd07f,
  3204. .flags = ADDR_TYPE_RT
  3205. },
  3206. { }
  3207. };
  3208. /* l4_cfg -> smartreflex_core */
  3209. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
  3210. .master = &dra7xx_l4_cfg_hwmod,
  3211. .slave = &dra7xx_smartreflex_core_hwmod,
  3212. .clk = "l4_root_clk_div",
  3213. .addr = dra7xx_smartreflex_core_addrs,
  3214. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3215. };
  3216. static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
  3217. {
  3218. .pa_start = 0x4a0d9000,
  3219. .pa_end = 0x4a0d907f,
  3220. .flags = ADDR_TYPE_RT
  3221. },
  3222. { }
  3223. };
  3224. /* l4_cfg -> smartreflex_mpu */
  3225. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
  3226. .master = &dra7xx_l4_cfg_hwmod,
  3227. .slave = &dra7xx_smartreflex_mpu_hwmod,
  3228. .clk = "l4_root_clk_div",
  3229. .addr = dra7xx_smartreflex_mpu_addrs,
  3230. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3231. };
  3232. /* l4_cfg -> spinlock */
  3233. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
  3234. .master = &dra7xx_l4_cfg_hwmod,
  3235. .slave = &dra7xx_spinlock_hwmod,
  3236. .clk = "l3_iclk_div",
  3237. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3238. };
  3239. /* l4_wkup -> timer1 */
  3240. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
  3241. .master = &dra7xx_l4_wkup_hwmod,
  3242. .slave = &dra7xx_timer1_hwmod,
  3243. .clk = "wkupaon_iclk_mux",
  3244. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3245. };
  3246. /* l4_per1 -> timer2 */
  3247. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
  3248. .master = &dra7xx_l4_per1_hwmod,
  3249. .slave = &dra7xx_timer2_hwmod,
  3250. .clk = "l3_iclk_div",
  3251. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3252. };
  3253. /* l4_per1 -> timer3 */
  3254. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
  3255. .master = &dra7xx_l4_per1_hwmod,
  3256. .slave = &dra7xx_timer3_hwmod,
  3257. .clk = "l3_iclk_div",
  3258. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3259. };
  3260. /* l4_per1 -> timer4 */
  3261. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
  3262. .master = &dra7xx_l4_per1_hwmod,
  3263. .slave = &dra7xx_timer4_hwmod,
  3264. .clk = "l3_iclk_div",
  3265. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3266. };
  3267. /* l4_per3 -> timer5 */
  3268. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
  3269. .master = &dra7xx_l4_per3_hwmod,
  3270. .slave = &dra7xx_timer5_hwmod,
  3271. .clk = "l3_iclk_div",
  3272. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3273. };
  3274. /* l4_per3 -> timer6 */
  3275. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
  3276. .master = &dra7xx_l4_per3_hwmod,
  3277. .slave = &dra7xx_timer6_hwmod,
  3278. .clk = "l3_iclk_div",
  3279. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3280. };
  3281. /* l4_per3 -> timer7 */
  3282. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
  3283. .master = &dra7xx_l4_per3_hwmod,
  3284. .slave = &dra7xx_timer7_hwmod,
  3285. .clk = "l3_iclk_div",
  3286. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3287. };
  3288. /* l4_per3 -> timer8 */
  3289. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
  3290. .master = &dra7xx_l4_per3_hwmod,
  3291. .slave = &dra7xx_timer8_hwmod,
  3292. .clk = "l3_iclk_div",
  3293. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3294. };
  3295. /* l4_per1 -> timer9 */
  3296. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
  3297. .master = &dra7xx_l4_per1_hwmod,
  3298. .slave = &dra7xx_timer9_hwmod,
  3299. .clk = "l3_iclk_div",
  3300. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3301. };
  3302. /* l4_per1 -> timer10 */
  3303. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
  3304. .master = &dra7xx_l4_per1_hwmod,
  3305. .slave = &dra7xx_timer10_hwmod,
  3306. .clk = "l3_iclk_div",
  3307. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3308. };
  3309. /* l4_per1 -> timer11 */
  3310. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
  3311. .master = &dra7xx_l4_per1_hwmod,
  3312. .slave = &dra7xx_timer11_hwmod,
  3313. .clk = "l3_iclk_div",
  3314. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3315. };
  3316. /* l4_wkup -> timer12 */
  3317. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12 = {
  3318. .master = &dra7xx_l4_wkup_hwmod,
  3319. .slave = &dra7xx_timer12_hwmod,
  3320. .clk = "wkupaon_iclk_mux",
  3321. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3322. };
  3323. /* l4_per3 -> timer13 */
  3324. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
  3325. .master = &dra7xx_l4_per3_hwmod,
  3326. .slave = &dra7xx_timer13_hwmod,
  3327. .clk = "l3_iclk_div",
  3328. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3329. };
  3330. /* l4_per3 -> timer14 */
  3331. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
  3332. .master = &dra7xx_l4_per3_hwmod,
  3333. .slave = &dra7xx_timer14_hwmod,
  3334. .clk = "l3_iclk_div",
  3335. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3336. };
  3337. /* l4_per3 -> timer15 */
  3338. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
  3339. .master = &dra7xx_l4_per3_hwmod,
  3340. .slave = &dra7xx_timer15_hwmod,
  3341. .clk = "l3_iclk_div",
  3342. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3343. };
  3344. /* l4_per3 -> timer16 */
  3345. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
  3346. .master = &dra7xx_l4_per3_hwmod,
  3347. .slave = &dra7xx_timer16_hwmod,
  3348. .clk = "l3_iclk_div",
  3349. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3350. };
  3351. /* l4_per1 -> uart1 */
  3352. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
  3353. .master = &dra7xx_l4_per1_hwmod,
  3354. .slave = &dra7xx_uart1_hwmod,
  3355. .clk = "l3_iclk_div",
  3356. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3357. };
  3358. /* l4_per1 -> uart2 */
  3359. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
  3360. .master = &dra7xx_l4_per1_hwmod,
  3361. .slave = &dra7xx_uart2_hwmod,
  3362. .clk = "l3_iclk_div",
  3363. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3364. };
  3365. /* l4_per1 -> uart3 */
  3366. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
  3367. .master = &dra7xx_l4_per1_hwmod,
  3368. .slave = &dra7xx_uart3_hwmod,
  3369. .clk = "l3_iclk_div",
  3370. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3371. };
  3372. /* l4_per1 -> uart4 */
  3373. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
  3374. .master = &dra7xx_l4_per1_hwmod,
  3375. .slave = &dra7xx_uart4_hwmod,
  3376. .clk = "l3_iclk_div",
  3377. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3378. };
  3379. /* l4_per1 -> uart5 */
  3380. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
  3381. .master = &dra7xx_l4_per1_hwmod,
  3382. .slave = &dra7xx_uart5_hwmod,
  3383. .clk = "l3_iclk_div",
  3384. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3385. };
  3386. /* l4_per1 -> uart6 */
  3387. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
  3388. .master = &dra7xx_l4_per1_hwmod,
  3389. .slave = &dra7xx_uart6_hwmod,
  3390. .clk = "l3_iclk_div",
  3391. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3392. };
  3393. /* l4_per2 -> uart7 */
  3394. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = {
  3395. .master = &dra7xx_l4_per2_hwmod,
  3396. .slave = &dra7xx_uart7_hwmod,
  3397. .clk = "l3_iclk_div",
  3398. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3399. };
  3400. /* l4_per1 -> des */
  3401. static struct omap_hwmod_ocp_if dra7xx_l4_per1__des = {
  3402. .master = &dra7xx_l4_per1_hwmod,
  3403. .slave = &dra7xx_des_hwmod,
  3404. .clk = "l3_iclk_div",
  3405. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3406. };
  3407. /* l4_per2 -> uart8 */
  3408. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = {
  3409. .master = &dra7xx_l4_per2_hwmod,
  3410. .slave = &dra7xx_uart8_hwmod,
  3411. .clk = "l3_iclk_div",
  3412. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3413. };
  3414. /* l4_per2 -> uart9 */
  3415. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart9 = {
  3416. .master = &dra7xx_l4_per2_hwmod,
  3417. .slave = &dra7xx_uart9_hwmod,
  3418. .clk = "l3_iclk_div",
  3419. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3420. };
  3421. /* l4_wkup -> uart10 */
  3422. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = {
  3423. .master = &dra7xx_l4_wkup_hwmod,
  3424. .slave = &dra7xx_uart10_hwmod,
  3425. .clk = "wkupaon_iclk_mux",
  3426. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3427. };
  3428. /* l4_per1 -> rng */
  3429. static struct omap_hwmod_ocp_if dra7xx_l4_per1__rng = {
  3430. .master = &dra7xx_l4_per1_hwmod,
  3431. .slave = &dra7xx_rng_hwmod,
  3432. .user = OCP_USER_MPU,
  3433. };
  3434. /* l4_per3 -> usb_otg_ss1 */
  3435. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
  3436. .master = &dra7xx_l4_per3_hwmod,
  3437. .slave = &dra7xx_usb_otg_ss1_hwmod,
  3438. .clk = "dpll_core_h13x2_ck",
  3439. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3440. };
  3441. /* l4_per3 -> usb_otg_ss2 */
  3442. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
  3443. .master = &dra7xx_l4_per3_hwmod,
  3444. .slave = &dra7xx_usb_otg_ss2_hwmod,
  3445. .clk = "dpll_core_h13x2_ck",
  3446. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3447. };
  3448. /* l4_per3 -> usb_otg_ss3 */
  3449. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
  3450. .master = &dra7xx_l4_per3_hwmod,
  3451. .slave = &dra7xx_usb_otg_ss3_hwmod,
  3452. .clk = "dpll_core_h13x2_ck",
  3453. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3454. };
  3455. /* l4_per3 -> usb_otg_ss4 */
  3456. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
  3457. .master = &dra7xx_l4_per3_hwmod,
  3458. .slave = &dra7xx_usb_otg_ss4_hwmod,
  3459. .clk = "dpll_core_h13x2_ck",
  3460. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3461. };
  3462. /* l3_main_1 -> vcp1 */
  3463. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
  3464. .master = &dra7xx_l3_main_1_hwmod,
  3465. .slave = &dra7xx_vcp1_hwmod,
  3466. .clk = "l3_iclk_div",
  3467. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3468. };
  3469. /* l4_per2 -> vcp1 */
  3470. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
  3471. .master = &dra7xx_l4_per2_hwmod,
  3472. .slave = &dra7xx_vcp1_hwmod,
  3473. .clk = "l3_iclk_div",
  3474. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3475. };
  3476. /* l3_main_1 -> vcp2 */
  3477. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
  3478. .master = &dra7xx_l3_main_1_hwmod,
  3479. .slave = &dra7xx_vcp2_hwmod,
  3480. .clk = "l3_iclk_div",
  3481. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3482. };
  3483. /* l4_per2 -> vcp2 */
  3484. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
  3485. .master = &dra7xx_l4_per2_hwmod,
  3486. .slave = &dra7xx_vcp2_hwmod,
  3487. .clk = "l3_iclk_div",
  3488. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3489. };
  3490. /* l4_wkup -> wd_timer2 */
  3491. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
  3492. .master = &dra7xx_l4_wkup_hwmod,
  3493. .slave = &dra7xx_wd_timer2_hwmod,
  3494. .clk = "wkupaon_iclk_mux",
  3495. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3496. };
  3497. /* l4_per2 -> epwmss0 */
  3498. static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
  3499. .master = &dra7xx_l4_per2_hwmod,
  3500. .slave = &dra7xx_epwmss0_hwmod,
  3501. .clk = "l4_root_clk_div",
  3502. .user = OCP_USER_MPU,
  3503. };
  3504. /* l4_per2 -> epwmss1 */
  3505. static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
  3506. .master = &dra7xx_l4_per2_hwmod,
  3507. .slave = &dra7xx_epwmss1_hwmod,
  3508. .clk = "l4_root_clk_div",
  3509. .user = OCP_USER_MPU,
  3510. };
  3511. /* l4_per2 -> epwmss2 */
  3512. static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
  3513. .master = &dra7xx_l4_per2_hwmod,
  3514. .slave = &dra7xx_epwmss2_hwmod,
  3515. .clk = "l4_root_clk_div",
  3516. .user = OCP_USER_MPU,
  3517. };
  3518. static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
  3519. &dra7xx_l3_main_1__dmm,
  3520. &dra7xx_l3_main_2__l3_instr,
  3521. &dra7xx_l4_cfg__l3_main_1,
  3522. &dra7xx_mpu__l3_main_1,
  3523. &dra7xx_l3_main_1__l3_main_2,
  3524. &dra7xx_l4_cfg__l3_main_2,
  3525. &dra7xx_l3_main_1__l4_cfg,
  3526. &dra7xx_l3_main_1__l4_per1,
  3527. &dra7xx_l3_main_1__l4_per2,
  3528. &dra7xx_l3_main_1__l4_per3,
  3529. &dra7xx_l3_main_1__l4_wkup,
  3530. &dra7xx_l4_per2__atl,
  3531. &dra7xx_l3_main_1__bb2d,
  3532. &dra7xx_l4_wkup__counter_32k,
  3533. &dra7xx_l4_wkup__ctrl_module_wkup,
  3534. &dra7xx_l4_wkup__dcan1,
  3535. &dra7xx_l4_per2__dcan2,
  3536. &dra7xx_l4_per2__cpgmac0,
  3537. &dra7xx_l4_per2__mcasp1,
  3538. &dra7xx_l3_main_1__mcasp1,
  3539. &dra7xx_l4_per2__mcasp2,
  3540. &dra7xx_l3_main_1__mcasp2,
  3541. &dra7xx_l4_per2__mcasp3,
  3542. &dra7xx_l3_main_1__mcasp3,
  3543. &dra7xx_l4_per2__mcasp4,
  3544. &dra7xx_l4_per2__mcasp5,
  3545. &dra7xx_l4_per2__mcasp6,
  3546. &dra7xx_l4_per2__mcasp7,
  3547. &dra7xx_l4_per2__mcasp8,
  3548. &dra7xx_gmac__mdio,
  3549. &dra7xx_l4_cfg__dma_system,
  3550. &dra7xx_l3_main_1__tpcc,
  3551. &dra7xx_l3_main_1__tptc0,
  3552. &dra7xx_l3_main_1__tptc1,
  3553. &dra7xx_l3_main_1__dss,
  3554. &dra7xx_l3_main_1__dispc,
  3555. &dra7xx_l3_main_1__hdmi,
  3556. &dra7xx_l3_main_1__aes1,
  3557. &dra7xx_l3_main_1__aes2,
  3558. &dra7xx_l3_main_1__sha0,
  3559. &dra7xx_l4_per1__elm,
  3560. &dra7xx_l4_wkup__gpio1,
  3561. &dra7xx_l4_per1__gpio2,
  3562. &dra7xx_l4_per1__gpio3,
  3563. &dra7xx_l4_per1__gpio4,
  3564. &dra7xx_l4_per1__gpio5,
  3565. &dra7xx_l4_per1__gpio6,
  3566. &dra7xx_l4_per1__gpio7,
  3567. &dra7xx_l4_per1__gpio8,
  3568. &dra7xx_l3_main_1__gpmc,
  3569. &dra7xx_l4_per1__hdq1w,
  3570. &dra7xx_l4_per1__i2c1,
  3571. &dra7xx_l4_per1__i2c2,
  3572. &dra7xx_l4_per1__i2c3,
  3573. &dra7xx_l4_per1__i2c4,
  3574. &dra7xx_l4_per1__i2c5,
  3575. &dra7xx_l4_cfg__mailbox1,
  3576. &dra7xx_l4_per3__mailbox2,
  3577. &dra7xx_l4_per3__mailbox3,
  3578. &dra7xx_l4_per3__mailbox4,
  3579. &dra7xx_l4_per3__mailbox5,
  3580. &dra7xx_l4_per3__mailbox6,
  3581. &dra7xx_l4_per3__mailbox7,
  3582. &dra7xx_l4_per3__mailbox8,
  3583. &dra7xx_l4_per3__mailbox9,
  3584. &dra7xx_l4_per3__mailbox10,
  3585. &dra7xx_l4_per3__mailbox11,
  3586. &dra7xx_l4_per3__mailbox12,
  3587. &dra7xx_l4_per3__mailbox13,
  3588. &dra7xx_l4_per1__mcspi1,
  3589. &dra7xx_l4_per1__mcspi2,
  3590. &dra7xx_l4_per1__mcspi3,
  3591. &dra7xx_l4_per1__mcspi4,
  3592. &dra7xx_l4_per1__mmc1,
  3593. &dra7xx_l4_per1__mmc2,
  3594. &dra7xx_l4_per1__mmc3,
  3595. &dra7xx_l4_per1__mmc4,
  3596. &dra7xx_l4_cfg__mpu,
  3597. &dra7xx_l4_cfg__ocp2scp1,
  3598. &dra7xx_l4_cfg__ocp2scp3,
  3599. &dra7xx_l3_main_1__pciess1,
  3600. &dra7xx_l4_cfg__pciess1,
  3601. &dra7xx_l3_main_1__pciess2,
  3602. &dra7xx_l4_cfg__pciess2,
  3603. &dra7xx_l3_main_1__qspi,
  3604. &dra7xx_l4_cfg__sata,
  3605. &dra7xx_l4_cfg__smartreflex_core,
  3606. &dra7xx_l4_cfg__smartreflex_mpu,
  3607. &dra7xx_l4_cfg__spinlock,
  3608. &dra7xx_l4_wkup__timer1,
  3609. &dra7xx_l4_per1__timer2,
  3610. &dra7xx_l4_per1__timer3,
  3611. &dra7xx_l4_per1__timer4,
  3612. &dra7xx_l4_per3__timer5,
  3613. &dra7xx_l4_per3__timer6,
  3614. &dra7xx_l4_per3__timer7,
  3615. &dra7xx_l4_per3__timer8,
  3616. &dra7xx_l4_per1__timer9,
  3617. &dra7xx_l4_per1__timer10,
  3618. &dra7xx_l4_per1__timer11,
  3619. &dra7xx_l4_per3__timer13,
  3620. &dra7xx_l4_per3__timer14,
  3621. &dra7xx_l4_per3__timer15,
  3622. &dra7xx_l4_per3__timer16,
  3623. &dra7xx_l4_per1__uart1,
  3624. &dra7xx_l4_per1__uart2,
  3625. &dra7xx_l4_per1__uart3,
  3626. &dra7xx_l4_per1__uart4,
  3627. &dra7xx_l4_per1__uart5,
  3628. &dra7xx_l4_per1__uart6,
  3629. &dra7xx_l4_per2__uart7,
  3630. &dra7xx_l4_per2__uart8,
  3631. &dra7xx_l4_per2__uart9,
  3632. &dra7xx_l4_wkup__uart10,
  3633. &dra7xx_l4_per1__des,
  3634. &dra7xx_l4_per3__usb_otg_ss1,
  3635. &dra7xx_l4_per3__usb_otg_ss2,
  3636. &dra7xx_l4_per3__usb_otg_ss3,
  3637. &dra7xx_l3_main_1__vcp1,
  3638. &dra7xx_l4_per2__vcp1,
  3639. &dra7xx_l3_main_1__vcp2,
  3640. &dra7xx_l4_per2__vcp2,
  3641. &dra7xx_l4_wkup__wd_timer2,
  3642. &dra7xx_l4_per2__epwmss0,
  3643. &dra7xx_l4_per2__epwmss1,
  3644. &dra7xx_l4_per2__epwmss2,
  3645. NULL,
  3646. };
  3647. /* GP-only hwmod links */
  3648. static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
  3649. &dra7xx_l4_wkup__timer12,
  3650. &dra7xx_l4_per1__rng,
  3651. NULL,
  3652. };
  3653. /* SoC variant specific hwmod links */
  3654. static struct omap_hwmod_ocp_if *dra76x_hwmod_ocp_ifs[] __initdata = {
  3655. &dra7xx_l4_per3__usb_otg_ss4,
  3656. NULL,
  3657. };
  3658. static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
  3659. &dra7xx_l4_per3__usb_otg_ss4,
  3660. NULL,
  3661. };
  3662. static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
  3663. NULL,
  3664. };
  3665. static struct omap_hwmod_ocp_if *dra74x_dra72x_hwmod_ocp_ifs[] __initdata = {
  3666. &dra7xx_l4_per3__rtcss,
  3667. NULL,
  3668. };
  3669. int __init dra7xx_hwmod_init(void)
  3670. {
  3671. int ret;
  3672. omap_hwmod_init();
  3673. ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
  3674. if (!ret && soc_is_dra74x())
  3675. ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
  3676. else if (!ret && soc_is_dra72x())
  3677. ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
  3678. else if (!ret && soc_is_dra76x())
  3679. ret = omap_hwmod_register_links(dra76x_hwmod_ocp_ifs);
  3680. if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
  3681. ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
  3682. /* now for the IPs available only in dra74 and dra72 */
  3683. if (!ret && !of_machine_is_compatible("ti,dra718") && !soc_is_dra76x())
  3684. ret = omap_hwmod_register_links(dra74x_dra72x_hwmod_ocp_ifs);
  3685. return ret;
  3686. }