omap_hwmod_7xx_data.c 102 KB

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