omap_hwmod_33xx_data.c 80 KB

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