omap_hwmod_7xx_data.c 103 KB

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