omap_hwmod_3xxx_data.c 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713
  1. /*
  2. * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * The data in this file should be completely autogeneratable from
  12. * the TI hardware database or other technical documentation.
  13. *
  14. * XXX these should be marked initdata for multi-OMAP kernels
  15. */
  16. #include <plat/omap_hwmod.h>
  17. #include <mach/irqs.h>
  18. #include <plat/cpu.h>
  19. #include <plat/dma.h>
  20. #include <plat/serial.h>
  21. #include <plat/l3_3xxx.h>
  22. #include <plat/l4_3xxx.h>
  23. #include <plat/i2c.h>
  24. #include <plat/gpio.h>
  25. #include <plat/mmc.h>
  26. #include <plat/mcbsp.h>
  27. #include <plat/mcspi.h>
  28. #include <plat/dmtimer.h>
  29. #include "omap_hwmod_common_data.h"
  30. #include "prm-regbits-34xx.h"
  31. #include "cm-regbits-34xx.h"
  32. #include "wd_timer.h"
  33. #include <mach/am35xx.h>
  34. /*
  35. * OMAP3xxx hardware module integration data
  36. *
  37. * ALl of the data in this section should be autogeneratable from the
  38. * TI hardware database or other technical documentation. Data that
  39. * is driver-specific or driver-kernel integration-specific belongs
  40. * elsewhere.
  41. */
  42. static struct omap_hwmod omap3xxx_mpu_hwmod;
  43. static struct omap_hwmod omap3xxx_iva_hwmod;
  44. static struct omap_hwmod omap3xxx_l3_main_hwmod;
  45. static struct omap_hwmod omap3xxx_l4_core_hwmod;
  46. static struct omap_hwmod omap3xxx_l4_per_hwmod;
  47. static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
  48. static struct omap_hwmod omap3430es1_dss_core_hwmod;
  49. static struct omap_hwmod omap3xxx_dss_core_hwmod;
  50. static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
  51. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
  52. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
  53. static struct omap_hwmod omap3xxx_dss_venc_hwmod;
  54. static struct omap_hwmod omap3xxx_i2c1_hwmod;
  55. static struct omap_hwmod omap3xxx_i2c2_hwmod;
  56. static struct omap_hwmod omap3xxx_i2c3_hwmod;
  57. static struct omap_hwmod omap3xxx_gpio1_hwmod;
  58. static struct omap_hwmod omap3xxx_gpio2_hwmod;
  59. static struct omap_hwmod omap3xxx_gpio3_hwmod;
  60. static struct omap_hwmod omap3xxx_gpio4_hwmod;
  61. static struct omap_hwmod omap3xxx_gpio5_hwmod;
  62. static struct omap_hwmod omap3xxx_gpio6_hwmod;
  63. static struct omap_hwmod omap34xx_sr1_hwmod;
  64. static struct omap_hwmod omap34xx_sr2_hwmod;
  65. static struct omap_hwmod omap34xx_mcspi1;
  66. static struct omap_hwmod omap34xx_mcspi2;
  67. static struct omap_hwmod omap34xx_mcspi3;
  68. static struct omap_hwmod omap34xx_mcspi4;
  69. static struct omap_hwmod omap3xxx_mmc1_hwmod;
  70. static struct omap_hwmod omap3xxx_mmc2_hwmod;
  71. static struct omap_hwmod omap3xxx_mmc3_hwmod;
  72. static struct omap_hwmod am35xx_usbhsotg_hwmod;
  73. static struct omap_hwmod omap3xxx_dma_system_hwmod;
  74. static struct omap_hwmod omap3xxx_mcbsp1_hwmod;
  75. static struct omap_hwmod omap3xxx_mcbsp2_hwmod;
  76. static struct omap_hwmod omap3xxx_mcbsp3_hwmod;
  77. static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
  78. static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
  79. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
  80. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
  81. static struct omap_hwmod omap3xxx_usb_host_hs_hwmod;
  82. static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod;
  83. /* L3 -> L4_CORE interface */
  84. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  85. .master = &omap3xxx_l3_main_hwmod,
  86. .slave = &omap3xxx_l4_core_hwmod,
  87. .user = OCP_USER_MPU | OCP_USER_SDMA,
  88. };
  89. /* L3 -> L4_PER interface */
  90. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  91. .master = &omap3xxx_l3_main_hwmod,
  92. .slave = &omap3xxx_l4_per_hwmod,
  93. .user = OCP_USER_MPU | OCP_USER_SDMA,
  94. };
  95. /* L3 taret configuration and error log registers */
  96. static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
  97. { .irq = INT_34XX_L3_DBG_IRQ },
  98. { .irq = INT_34XX_L3_APP_IRQ },
  99. { .irq = -1 }
  100. };
  101. static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
  102. {
  103. .pa_start = 0x68000000,
  104. .pa_end = 0x6800ffff,
  105. .flags = ADDR_TYPE_RT,
  106. },
  107. { }
  108. };
  109. /* MPU -> L3 interface */
  110. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  111. .master = &omap3xxx_mpu_hwmod,
  112. .slave = &omap3xxx_l3_main_hwmod,
  113. .addr = omap3xxx_l3_main_addrs,
  114. .user = OCP_USER_MPU,
  115. };
  116. /* Slave interfaces on the L3 interconnect */
  117. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
  118. &omap3xxx_mpu__l3_main,
  119. };
  120. /* DSS -> l3 */
  121. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  122. .master = &omap3xxx_dss_core_hwmod,
  123. .slave = &omap3xxx_l3_main_hwmod,
  124. .fw = {
  125. .omap2 = {
  126. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  127. .flags = OMAP_FIREWALL_L3,
  128. }
  129. },
  130. .user = OCP_USER_MPU | OCP_USER_SDMA,
  131. };
  132. /* Master interfaces on the L3 interconnect */
  133. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
  134. &omap3xxx_l3_main__l4_core,
  135. &omap3xxx_l3_main__l4_per,
  136. };
  137. /* L3 */
  138. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  139. .name = "l3_main",
  140. .class = &l3_hwmod_class,
  141. .mpu_irqs = omap3xxx_l3_main_irqs,
  142. .masters = omap3xxx_l3_main_masters,
  143. .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
  144. .slaves = omap3xxx_l3_main_slaves,
  145. .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
  146. .flags = HWMOD_NO_IDLEST,
  147. };
  148. static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
  149. static struct omap_hwmod omap3xxx_uart1_hwmod;
  150. static struct omap_hwmod omap3xxx_uart2_hwmod;
  151. static struct omap_hwmod omap3xxx_uart3_hwmod;
  152. static struct omap_hwmod omap3xxx_uart4_hwmod;
  153. static struct omap_hwmod am35xx_uart4_hwmod;
  154. static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
  155. /* l3_core -> usbhsotg interface */
  156. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  157. .master = &omap3xxx_usbhsotg_hwmod,
  158. .slave = &omap3xxx_l3_main_hwmod,
  159. .clk = "core_l3_ick",
  160. .user = OCP_USER_MPU,
  161. };
  162. /* l3_core -> am35xx_usbhsotg interface */
  163. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  164. .master = &am35xx_usbhsotg_hwmod,
  165. .slave = &omap3xxx_l3_main_hwmod,
  166. .clk = "core_l3_ick",
  167. .user = OCP_USER_MPU,
  168. };
  169. /* L4_CORE -> L4_WKUP interface */
  170. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  171. .master = &omap3xxx_l4_core_hwmod,
  172. .slave = &omap3xxx_l4_wkup_hwmod,
  173. .user = OCP_USER_MPU | OCP_USER_SDMA,
  174. };
  175. /* L4 CORE -> MMC1 interface */
  176. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
  177. .master = &omap3xxx_l4_core_hwmod,
  178. .slave = &omap3xxx_mmc1_hwmod,
  179. .clk = "mmchs1_ick",
  180. .addr = omap2430_mmc1_addr_space,
  181. .user = OCP_USER_MPU | OCP_USER_SDMA,
  182. .flags = OMAP_FIREWALL_L4
  183. };
  184. /* L4 CORE -> MMC2 interface */
  185. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
  186. .master = &omap3xxx_l4_core_hwmod,
  187. .slave = &omap3xxx_mmc2_hwmod,
  188. .clk = "mmchs2_ick",
  189. .addr = omap2430_mmc2_addr_space,
  190. .user = OCP_USER_MPU | OCP_USER_SDMA,
  191. .flags = OMAP_FIREWALL_L4
  192. };
  193. /* L4 CORE -> MMC3 interface */
  194. static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
  195. {
  196. .pa_start = 0x480ad000,
  197. .pa_end = 0x480ad1ff,
  198. .flags = ADDR_TYPE_RT,
  199. },
  200. { }
  201. };
  202. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
  203. .master = &omap3xxx_l4_core_hwmod,
  204. .slave = &omap3xxx_mmc3_hwmod,
  205. .clk = "mmchs3_ick",
  206. .addr = omap3xxx_mmc3_addr_space,
  207. .user = OCP_USER_MPU | OCP_USER_SDMA,
  208. .flags = OMAP_FIREWALL_L4
  209. };
  210. /* L4 CORE -> UART1 interface */
  211. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  212. {
  213. .pa_start = OMAP3_UART1_BASE,
  214. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  215. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  216. },
  217. { }
  218. };
  219. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  220. .master = &omap3xxx_l4_core_hwmod,
  221. .slave = &omap3xxx_uart1_hwmod,
  222. .clk = "uart1_ick",
  223. .addr = omap3xxx_uart1_addr_space,
  224. .user = OCP_USER_MPU | OCP_USER_SDMA,
  225. };
  226. /* L4 CORE -> UART2 interface */
  227. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  228. {
  229. .pa_start = OMAP3_UART2_BASE,
  230. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  231. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  232. },
  233. { }
  234. };
  235. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  236. .master = &omap3xxx_l4_core_hwmod,
  237. .slave = &omap3xxx_uart2_hwmod,
  238. .clk = "uart2_ick",
  239. .addr = omap3xxx_uart2_addr_space,
  240. .user = OCP_USER_MPU | OCP_USER_SDMA,
  241. };
  242. /* L4 PER -> UART3 interface */
  243. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  244. {
  245. .pa_start = OMAP3_UART3_BASE,
  246. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  247. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  248. },
  249. { }
  250. };
  251. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  252. .master = &omap3xxx_l4_per_hwmod,
  253. .slave = &omap3xxx_uart3_hwmod,
  254. .clk = "uart3_ick",
  255. .addr = omap3xxx_uart3_addr_space,
  256. .user = OCP_USER_MPU | OCP_USER_SDMA,
  257. };
  258. /* L4 PER -> UART4 interface */
  259. static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
  260. {
  261. .pa_start = OMAP3_UART4_BASE,
  262. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  263. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  264. },
  265. { }
  266. };
  267. static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
  268. .master = &omap3xxx_l4_per_hwmod,
  269. .slave = &omap3xxx_uart4_hwmod,
  270. .clk = "uart4_ick",
  271. .addr = omap3xxx_uart4_addr_space,
  272. .user = OCP_USER_MPU | OCP_USER_SDMA,
  273. };
  274. /* AM35xx: L4 CORE -> UART4 interface */
  275. static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
  276. {
  277. .pa_start = OMAP3_UART4_AM35XX_BASE,
  278. .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
  279. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  280. },
  281. };
  282. static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
  283. .master = &omap3xxx_l4_core_hwmod,
  284. .slave = &am35xx_uart4_hwmod,
  285. .clk = "uart4_ick",
  286. .addr = am35xx_uart4_addr_space,
  287. .user = OCP_USER_MPU | OCP_USER_SDMA,
  288. };
  289. /* L4 CORE -> I2C1 interface */
  290. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  291. .master = &omap3xxx_l4_core_hwmod,
  292. .slave = &omap3xxx_i2c1_hwmod,
  293. .clk = "i2c1_ick",
  294. .addr = omap2_i2c1_addr_space,
  295. .fw = {
  296. .omap2 = {
  297. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  298. .l4_prot_group = 7,
  299. .flags = OMAP_FIREWALL_L4,
  300. }
  301. },
  302. .user = OCP_USER_MPU | OCP_USER_SDMA,
  303. };
  304. /* L4 CORE -> I2C2 interface */
  305. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  306. .master = &omap3xxx_l4_core_hwmod,
  307. .slave = &omap3xxx_i2c2_hwmod,
  308. .clk = "i2c2_ick",
  309. .addr = omap2_i2c2_addr_space,
  310. .fw = {
  311. .omap2 = {
  312. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  313. .l4_prot_group = 7,
  314. .flags = OMAP_FIREWALL_L4,
  315. }
  316. },
  317. .user = OCP_USER_MPU | OCP_USER_SDMA,
  318. };
  319. /* L4 CORE -> I2C3 interface */
  320. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  321. {
  322. .pa_start = 0x48060000,
  323. .pa_end = 0x48060000 + SZ_128 - 1,
  324. .flags = ADDR_TYPE_RT,
  325. },
  326. { }
  327. };
  328. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  329. .master = &omap3xxx_l4_core_hwmod,
  330. .slave = &omap3xxx_i2c3_hwmod,
  331. .clk = "i2c3_ick",
  332. .addr = omap3xxx_i2c3_addr_space,
  333. .fw = {
  334. .omap2 = {
  335. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  336. .l4_prot_group = 7,
  337. .flags = OMAP_FIREWALL_L4,
  338. }
  339. },
  340. .user = OCP_USER_MPU | OCP_USER_SDMA,
  341. };
  342. /* L4 CORE -> SR1 interface */
  343. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  344. {
  345. .pa_start = OMAP34XX_SR1_BASE,
  346. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  347. .flags = ADDR_TYPE_RT,
  348. },
  349. { }
  350. };
  351. static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
  352. .master = &omap3xxx_l4_core_hwmod,
  353. .slave = &omap34xx_sr1_hwmod,
  354. .clk = "sr_l4_ick",
  355. .addr = omap3_sr1_addr_space,
  356. .user = OCP_USER_MPU,
  357. };
  358. /* L4 CORE -> SR1 interface */
  359. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  360. {
  361. .pa_start = OMAP34XX_SR2_BASE,
  362. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  363. .flags = ADDR_TYPE_RT,
  364. },
  365. { }
  366. };
  367. static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
  368. .master = &omap3xxx_l4_core_hwmod,
  369. .slave = &omap34xx_sr2_hwmod,
  370. .clk = "sr_l4_ick",
  371. .addr = omap3_sr2_addr_space,
  372. .user = OCP_USER_MPU,
  373. };
  374. /*
  375. * usbhsotg interface data
  376. */
  377. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  378. {
  379. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  380. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  381. .flags = ADDR_TYPE_RT
  382. },
  383. { }
  384. };
  385. /* l4_core -> usbhsotg */
  386. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  387. .master = &omap3xxx_l4_core_hwmod,
  388. .slave = &omap3xxx_usbhsotg_hwmod,
  389. .clk = "l4_ick",
  390. .addr = omap3xxx_usbhsotg_addrs,
  391. .user = OCP_USER_MPU,
  392. };
  393. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
  394. &omap3xxx_usbhsotg__l3,
  395. };
  396. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
  397. &omap3xxx_l4_core__usbhsotg,
  398. };
  399. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  400. {
  401. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  402. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  403. .flags = ADDR_TYPE_RT
  404. },
  405. { }
  406. };
  407. /* l4_core -> usbhsotg */
  408. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  409. .master = &omap3xxx_l4_core_hwmod,
  410. .slave = &am35xx_usbhsotg_hwmod,
  411. .clk = "l4_ick",
  412. .addr = am35xx_usbhsotg_addrs,
  413. .user = OCP_USER_MPU,
  414. };
  415. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
  416. &am35xx_usbhsotg__l3,
  417. };
  418. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
  419. &am35xx_l4_core__usbhsotg,
  420. };
  421. /* Slave interfaces on the L4_CORE interconnect */
  422. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
  423. &omap3xxx_l3_main__l4_core,
  424. };
  425. /* L4 CORE */
  426. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  427. .name = "l4_core",
  428. .class = &l4_hwmod_class,
  429. .slaves = omap3xxx_l4_core_slaves,
  430. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
  431. .flags = HWMOD_NO_IDLEST,
  432. };
  433. /* Slave interfaces on the L4_PER interconnect */
  434. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
  435. &omap3xxx_l3_main__l4_per,
  436. };
  437. /* L4 PER */
  438. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  439. .name = "l4_per",
  440. .class = &l4_hwmod_class,
  441. .slaves = omap3xxx_l4_per_slaves,
  442. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
  443. .flags = HWMOD_NO_IDLEST,
  444. };
  445. /* Slave interfaces on the L4_WKUP interconnect */
  446. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
  447. &omap3xxx_l4_core__l4_wkup,
  448. };
  449. /* L4 WKUP */
  450. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  451. .name = "l4_wkup",
  452. .class = &l4_hwmod_class,
  453. .slaves = omap3xxx_l4_wkup_slaves,
  454. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
  455. .flags = HWMOD_NO_IDLEST,
  456. };
  457. /* Master interfaces on the MPU device */
  458. static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
  459. &omap3xxx_mpu__l3_main,
  460. };
  461. /* MPU */
  462. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  463. .name = "mpu",
  464. .class = &mpu_hwmod_class,
  465. .main_clk = "arm_fck",
  466. .masters = omap3xxx_mpu_masters,
  467. .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
  468. };
  469. /*
  470. * IVA2_2 interface data
  471. */
  472. /* IVA2 <- L3 interface */
  473. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  474. .master = &omap3xxx_l3_main_hwmod,
  475. .slave = &omap3xxx_iva_hwmod,
  476. .clk = "iva2_ck",
  477. .user = OCP_USER_MPU | OCP_USER_SDMA,
  478. };
  479. static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
  480. &omap3xxx_l3__iva,
  481. };
  482. /*
  483. * IVA2 (IVA2)
  484. */
  485. static struct omap_hwmod omap3xxx_iva_hwmod = {
  486. .name = "iva",
  487. .class = &iva_hwmod_class,
  488. .masters = omap3xxx_iva_masters,
  489. .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
  490. };
  491. /* timer class */
  492. static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
  493. .rev_offs = 0x0000,
  494. .sysc_offs = 0x0010,
  495. .syss_offs = 0x0014,
  496. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  497. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  498. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  499. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  500. .sysc_fields = &omap_hwmod_sysc_type1,
  501. };
  502. static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
  503. .name = "timer",
  504. .sysc = &omap3xxx_timer_1ms_sysc,
  505. .rev = OMAP_TIMER_IP_VERSION_1,
  506. };
  507. static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
  508. .rev_offs = 0x0000,
  509. .sysc_offs = 0x0010,
  510. .syss_offs = 0x0014,
  511. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  512. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  513. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  514. .sysc_fields = &omap_hwmod_sysc_type1,
  515. };
  516. static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
  517. .name = "timer",
  518. .sysc = &omap3xxx_timer_sysc,
  519. .rev = OMAP_TIMER_IP_VERSION_1,
  520. };
  521. /* secure timers dev attribute */
  522. static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
  523. .timer_capability = OMAP_TIMER_SECURE,
  524. };
  525. /* always-on timers dev attribute */
  526. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  527. .timer_capability = OMAP_TIMER_ALWON,
  528. };
  529. /* pwm timers dev attribute */
  530. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  531. .timer_capability = OMAP_TIMER_HAS_PWM,
  532. };
  533. /* timer1 */
  534. static struct omap_hwmod omap3xxx_timer1_hwmod;
  535. static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
  536. {
  537. .pa_start = 0x48318000,
  538. .pa_end = 0x48318000 + SZ_1K - 1,
  539. .flags = ADDR_TYPE_RT
  540. },
  541. { }
  542. };
  543. /* l4_wkup -> timer1 */
  544. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
  545. .master = &omap3xxx_l4_wkup_hwmod,
  546. .slave = &omap3xxx_timer1_hwmod,
  547. .clk = "gpt1_ick",
  548. .addr = omap3xxx_timer1_addrs,
  549. .user = OCP_USER_MPU | OCP_USER_SDMA,
  550. };
  551. /* timer1 slave port */
  552. static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
  553. &omap3xxx_l4_wkup__timer1,
  554. };
  555. /* timer1 hwmod */
  556. static struct omap_hwmod omap3xxx_timer1_hwmod = {
  557. .name = "timer1",
  558. .mpu_irqs = omap2_timer1_mpu_irqs,
  559. .main_clk = "gpt1_fck",
  560. .prcm = {
  561. .omap2 = {
  562. .prcm_reg_id = 1,
  563. .module_bit = OMAP3430_EN_GPT1_SHIFT,
  564. .module_offs = WKUP_MOD,
  565. .idlest_reg_id = 1,
  566. .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
  567. },
  568. },
  569. .dev_attr = &capability_alwon_dev_attr,
  570. .slaves = omap3xxx_timer1_slaves,
  571. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
  572. .class = &omap3xxx_timer_1ms_hwmod_class,
  573. };
  574. /* timer2 */
  575. static struct omap_hwmod omap3xxx_timer2_hwmod;
  576. static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
  577. {
  578. .pa_start = 0x49032000,
  579. .pa_end = 0x49032000 + SZ_1K - 1,
  580. .flags = ADDR_TYPE_RT
  581. },
  582. { }
  583. };
  584. /* l4_per -> timer2 */
  585. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
  586. .master = &omap3xxx_l4_per_hwmod,
  587. .slave = &omap3xxx_timer2_hwmod,
  588. .clk = "gpt2_ick",
  589. .addr = omap3xxx_timer2_addrs,
  590. .user = OCP_USER_MPU | OCP_USER_SDMA,
  591. };
  592. /* timer2 slave port */
  593. static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
  594. &omap3xxx_l4_per__timer2,
  595. };
  596. /* timer2 hwmod */
  597. static struct omap_hwmod omap3xxx_timer2_hwmod = {
  598. .name = "timer2",
  599. .mpu_irqs = omap2_timer2_mpu_irqs,
  600. .main_clk = "gpt2_fck",
  601. .prcm = {
  602. .omap2 = {
  603. .prcm_reg_id = 1,
  604. .module_bit = OMAP3430_EN_GPT2_SHIFT,
  605. .module_offs = OMAP3430_PER_MOD,
  606. .idlest_reg_id = 1,
  607. .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
  608. },
  609. },
  610. .dev_attr = &capability_alwon_dev_attr,
  611. .slaves = omap3xxx_timer2_slaves,
  612. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
  613. .class = &omap3xxx_timer_1ms_hwmod_class,
  614. };
  615. /* timer3 */
  616. static struct omap_hwmod omap3xxx_timer3_hwmod;
  617. static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
  618. {
  619. .pa_start = 0x49034000,
  620. .pa_end = 0x49034000 + SZ_1K - 1,
  621. .flags = ADDR_TYPE_RT
  622. },
  623. { }
  624. };
  625. /* l4_per -> timer3 */
  626. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
  627. .master = &omap3xxx_l4_per_hwmod,
  628. .slave = &omap3xxx_timer3_hwmod,
  629. .clk = "gpt3_ick",
  630. .addr = omap3xxx_timer3_addrs,
  631. .user = OCP_USER_MPU | OCP_USER_SDMA,
  632. };
  633. /* timer3 slave port */
  634. static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
  635. &omap3xxx_l4_per__timer3,
  636. };
  637. /* timer3 hwmod */
  638. static struct omap_hwmod omap3xxx_timer3_hwmod = {
  639. .name = "timer3",
  640. .mpu_irqs = omap2_timer3_mpu_irqs,
  641. .main_clk = "gpt3_fck",
  642. .prcm = {
  643. .omap2 = {
  644. .prcm_reg_id = 1,
  645. .module_bit = OMAP3430_EN_GPT3_SHIFT,
  646. .module_offs = OMAP3430_PER_MOD,
  647. .idlest_reg_id = 1,
  648. .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
  649. },
  650. },
  651. .dev_attr = &capability_alwon_dev_attr,
  652. .slaves = omap3xxx_timer3_slaves,
  653. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
  654. .class = &omap3xxx_timer_hwmod_class,
  655. };
  656. /* timer4 */
  657. static struct omap_hwmod omap3xxx_timer4_hwmod;
  658. static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
  659. {
  660. .pa_start = 0x49036000,
  661. .pa_end = 0x49036000 + SZ_1K - 1,
  662. .flags = ADDR_TYPE_RT
  663. },
  664. { }
  665. };
  666. /* l4_per -> timer4 */
  667. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
  668. .master = &omap3xxx_l4_per_hwmod,
  669. .slave = &omap3xxx_timer4_hwmod,
  670. .clk = "gpt4_ick",
  671. .addr = omap3xxx_timer4_addrs,
  672. .user = OCP_USER_MPU | OCP_USER_SDMA,
  673. };
  674. /* timer4 slave port */
  675. static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
  676. &omap3xxx_l4_per__timer4,
  677. };
  678. /* timer4 hwmod */
  679. static struct omap_hwmod omap3xxx_timer4_hwmod = {
  680. .name = "timer4",
  681. .mpu_irqs = omap2_timer4_mpu_irqs,
  682. .main_clk = "gpt4_fck",
  683. .prcm = {
  684. .omap2 = {
  685. .prcm_reg_id = 1,
  686. .module_bit = OMAP3430_EN_GPT4_SHIFT,
  687. .module_offs = OMAP3430_PER_MOD,
  688. .idlest_reg_id = 1,
  689. .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
  690. },
  691. },
  692. .dev_attr = &capability_alwon_dev_attr,
  693. .slaves = omap3xxx_timer4_slaves,
  694. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
  695. .class = &omap3xxx_timer_hwmod_class,
  696. };
  697. /* timer5 */
  698. static struct omap_hwmod omap3xxx_timer5_hwmod;
  699. static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
  700. {
  701. .pa_start = 0x49038000,
  702. .pa_end = 0x49038000 + SZ_1K - 1,
  703. .flags = ADDR_TYPE_RT
  704. },
  705. { }
  706. };
  707. /* l4_per -> timer5 */
  708. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
  709. .master = &omap3xxx_l4_per_hwmod,
  710. .slave = &omap3xxx_timer5_hwmod,
  711. .clk = "gpt5_ick",
  712. .addr = omap3xxx_timer5_addrs,
  713. .user = OCP_USER_MPU | OCP_USER_SDMA,
  714. };
  715. /* timer5 slave port */
  716. static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
  717. &omap3xxx_l4_per__timer5,
  718. };
  719. /* timer5 hwmod */
  720. static struct omap_hwmod omap3xxx_timer5_hwmod = {
  721. .name = "timer5",
  722. .mpu_irqs = omap2_timer5_mpu_irqs,
  723. .main_clk = "gpt5_fck",
  724. .prcm = {
  725. .omap2 = {
  726. .prcm_reg_id = 1,
  727. .module_bit = OMAP3430_EN_GPT5_SHIFT,
  728. .module_offs = OMAP3430_PER_MOD,
  729. .idlest_reg_id = 1,
  730. .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
  731. },
  732. },
  733. .dev_attr = &capability_alwon_dev_attr,
  734. .slaves = omap3xxx_timer5_slaves,
  735. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
  736. .class = &omap3xxx_timer_hwmod_class,
  737. };
  738. /* timer6 */
  739. static struct omap_hwmod omap3xxx_timer6_hwmod;
  740. static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
  741. {
  742. .pa_start = 0x4903A000,
  743. .pa_end = 0x4903A000 + SZ_1K - 1,
  744. .flags = ADDR_TYPE_RT
  745. },
  746. { }
  747. };
  748. /* l4_per -> timer6 */
  749. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
  750. .master = &omap3xxx_l4_per_hwmod,
  751. .slave = &omap3xxx_timer6_hwmod,
  752. .clk = "gpt6_ick",
  753. .addr = omap3xxx_timer6_addrs,
  754. .user = OCP_USER_MPU | OCP_USER_SDMA,
  755. };
  756. /* timer6 slave port */
  757. static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
  758. &omap3xxx_l4_per__timer6,
  759. };
  760. /* timer6 hwmod */
  761. static struct omap_hwmod omap3xxx_timer6_hwmod = {
  762. .name = "timer6",
  763. .mpu_irqs = omap2_timer6_mpu_irqs,
  764. .main_clk = "gpt6_fck",
  765. .prcm = {
  766. .omap2 = {
  767. .prcm_reg_id = 1,
  768. .module_bit = OMAP3430_EN_GPT6_SHIFT,
  769. .module_offs = OMAP3430_PER_MOD,
  770. .idlest_reg_id = 1,
  771. .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
  772. },
  773. },
  774. .dev_attr = &capability_alwon_dev_attr,
  775. .slaves = omap3xxx_timer6_slaves,
  776. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
  777. .class = &omap3xxx_timer_hwmod_class,
  778. };
  779. /* timer7 */
  780. static struct omap_hwmod omap3xxx_timer7_hwmod;
  781. static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
  782. {
  783. .pa_start = 0x4903C000,
  784. .pa_end = 0x4903C000 + SZ_1K - 1,
  785. .flags = ADDR_TYPE_RT
  786. },
  787. { }
  788. };
  789. /* l4_per -> timer7 */
  790. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
  791. .master = &omap3xxx_l4_per_hwmod,
  792. .slave = &omap3xxx_timer7_hwmod,
  793. .clk = "gpt7_ick",
  794. .addr = omap3xxx_timer7_addrs,
  795. .user = OCP_USER_MPU | OCP_USER_SDMA,
  796. };
  797. /* timer7 slave port */
  798. static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
  799. &omap3xxx_l4_per__timer7,
  800. };
  801. /* timer7 hwmod */
  802. static struct omap_hwmod omap3xxx_timer7_hwmod = {
  803. .name = "timer7",
  804. .mpu_irqs = omap2_timer7_mpu_irqs,
  805. .main_clk = "gpt7_fck",
  806. .prcm = {
  807. .omap2 = {
  808. .prcm_reg_id = 1,
  809. .module_bit = OMAP3430_EN_GPT7_SHIFT,
  810. .module_offs = OMAP3430_PER_MOD,
  811. .idlest_reg_id = 1,
  812. .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
  813. },
  814. },
  815. .dev_attr = &capability_alwon_dev_attr,
  816. .slaves = omap3xxx_timer7_slaves,
  817. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
  818. .class = &omap3xxx_timer_hwmod_class,
  819. };
  820. /* timer8 */
  821. static struct omap_hwmod omap3xxx_timer8_hwmod;
  822. static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
  823. {
  824. .pa_start = 0x4903E000,
  825. .pa_end = 0x4903E000 + SZ_1K - 1,
  826. .flags = ADDR_TYPE_RT
  827. },
  828. { }
  829. };
  830. /* l4_per -> timer8 */
  831. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
  832. .master = &omap3xxx_l4_per_hwmod,
  833. .slave = &omap3xxx_timer8_hwmod,
  834. .clk = "gpt8_ick",
  835. .addr = omap3xxx_timer8_addrs,
  836. .user = OCP_USER_MPU | OCP_USER_SDMA,
  837. };
  838. /* timer8 slave port */
  839. static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
  840. &omap3xxx_l4_per__timer8,
  841. };
  842. /* timer8 hwmod */
  843. static struct omap_hwmod omap3xxx_timer8_hwmod = {
  844. .name = "timer8",
  845. .mpu_irqs = omap2_timer8_mpu_irqs,
  846. .main_clk = "gpt8_fck",
  847. .prcm = {
  848. .omap2 = {
  849. .prcm_reg_id = 1,
  850. .module_bit = OMAP3430_EN_GPT8_SHIFT,
  851. .module_offs = OMAP3430_PER_MOD,
  852. .idlest_reg_id = 1,
  853. .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
  854. },
  855. },
  856. .dev_attr = &capability_pwm_dev_attr,
  857. .slaves = omap3xxx_timer8_slaves,
  858. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
  859. .class = &omap3xxx_timer_hwmod_class,
  860. };
  861. /* timer9 */
  862. static struct omap_hwmod omap3xxx_timer9_hwmod;
  863. static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
  864. {
  865. .pa_start = 0x49040000,
  866. .pa_end = 0x49040000 + SZ_1K - 1,
  867. .flags = ADDR_TYPE_RT
  868. },
  869. { }
  870. };
  871. /* l4_per -> timer9 */
  872. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
  873. .master = &omap3xxx_l4_per_hwmod,
  874. .slave = &omap3xxx_timer9_hwmod,
  875. .clk = "gpt9_ick",
  876. .addr = omap3xxx_timer9_addrs,
  877. .user = OCP_USER_MPU | OCP_USER_SDMA,
  878. };
  879. /* timer9 slave port */
  880. static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
  881. &omap3xxx_l4_per__timer9,
  882. };
  883. /* timer9 hwmod */
  884. static struct omap_hwmod omap3xxx_timer9_hwmod = {
  885. .name = "timer9",
  886. .mpu_irqs = omap2_timer9_mpu_irqs,
  887. .main_clk = "gpt9_fck",
  888. .prcm = {
  889. .omap2 = {
  890. .prcm_reg_id = 1,
  891. .module_bit = OMAP3430_EN_GPT9_SHIFT,
  892. .module_offs = OMAP3430_PER_MOD,
  893. .idlest_reg_id = 1,
  894. .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
  895. },
  896. },
  897. .dev_attr = &capability_pwm_dev_attr,
  898. .slaves = omap3xxx_timer9_slaves,
  899. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
  900. .class = &omap3xxx_timer_hwmod_class,
  901. };
  902. /* timer10 */
  903. static struct omap_hwmod omap3xxx_timer10_hwmod;
  904. /* l4_core -> timer10 */
  905. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
  906. .master = &omap3xxx_l4_core_hwmod,
  907. .slave = &omap3xxx_timer10_hwmod,
  908. .clk = "gpt10_ick",
  909. .addr = omap2_timer10_addrs,
  910. .user = OCP_USER_MPU | OCP_USER_SDMA,
  911. };
  912. /* timer10 slave port */
  913. static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
  914. &omap3xxx_l4_core__timer10,
  915. };
  916. /* timer10 hwmod */
  917. static struct omap_hwmod omap3xxx_timer10_hwmod = {
  918. .name = "timer10",
  919. .mpu_irqs = omap2_timer10_mpu_irqs,
  920. .main_clk = "gpt10_fck",
  921. .prcm = {
  922. .omap2 = {
  923. .prcm_reg_id = 1,
  924. .module_bit = OMAP3430_EN_GPT10_SHIFT,
  925. .module_offs = CORE_MOD,
  926. .idlest_reg_id = 1,
  927. .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
  928. },
  929. },
  930. .dev_attr = &capability_pwm_dev_attr,
  931. .slaves = omap3xxx_timer10_slaves,
  932. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
  933. .class = &omap3xxx_timer_1ms_hwmod_class,
  934. };
  935. /* timer11 */
  936. static struct omap_hwmod omap3xxx_timer11_hwmod;
  937. /* l4_core -> timer11 */
  938. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
  939. .master = &omap3xxx_l4_core_hwmod,
  940. .slave = &omap3xxx_timer11_hwmod,
  941. .clk = "gpt11_ick",
  942. .addr = omap2_timer11_addrs,
  943. .user = OCP_USER_MPU | OCP_USER_SDMA,
  944. };
  945. /* timer11 slave port */
  946. static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
  947. &omap3xxx_l4_core__timer11,
  948. };
  949. /* timer11 hwmod */
  950. static struct omap_hwmod omap3xxx_timer11_hwmod = {
  951. .name = "timer11",
  952. .mpu_irqs = omap2_timer11_mpu_irqs,
  953. .main_clk = "gpt11_fck",
  954. .prcm = {
  955. .omap2 = {
  956. .prcm_reg_id = 1,
  957. .module_bit = OMAP3430_EN_GPT11_SHIFT,
  958. .module_offs = CORE_MOD,
  959. .idlest_reg_id = 1,
  960. .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
  961. },
  962. },
  963. .dev_attr = &capability_pwm_dev_attr,
  964. .slaves = omap3xxx_timer11_slaves,
  965. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
  966. .class = &omap3xxx_timer_hwmod_class,
  967. };
  968. /* timer12*/
  969. static struct omap_hwmod omap3xxx_timer12_hwmod;
  970. static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
  971. { .irq = 95, },
  972. { .irq = -1 }
  973. };
  974. static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
  975. {
  976. .pa_start = 0x48304000,
  977. .pa_end = 0x48304000 + SZ_1K - 1,
  978. .flags = ADDR_TYPE_RT
  979. },
  980. { }
  981. };
  982. /* l4_core -> timer12 */
  983. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
  984. .master = &omap3xxx_l4_core_hwmod,
  985. .slave = &omap3xxx_timer12_hwmod,
  986. .clk = "gpt12_ick",
  987. .addr = omap3xxx_timer12_addrs,
  988. .user = OCP_USER_MPU | OCP_USER_SDMA,
  989. };
  990. /* timer12 slave port */
  991. static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
  992. &omap3xxx_l4_core__timer12,
  993. };
  994. /* timer12 hwmod */
  995. static struct omap_hwmod omap3xxx_timer12_hwmod = {
  996. .name = "timer12",
  997. .mpu_irqs = omap3xxx_timer12_mpu_irqs,
  998. .main_clk = "gpt12_fck",
  999. .prcm = {
  1000. .omap2 = {
  1001. .prcm_reg_id = 1,
  1002. .module_bit = OMAP3430_EN_GPT12_SHIFT,
  1003. .module_offs = WKUP_MOD,
  1004. .idlest_reg_id = 1,
  1005. .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
  1006. },
  1007. },
  1008. .dev_attr = &capability_secure_dev_attr,
  1009. .slaves = omap3xxx_timer12_slaves,
  1010. .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
  1011. .class = &omap3xxx_timer_hwmod_class,
  1012. };
  1013. /* l4_wkup -> wd_timer2 */
  1014. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  1015. {
  1016. .pa_start = 0x48314000,
  1017. .pa_end = 0x4831407f,
  1018. .flags = ADDR_TYPE_RT
  1019. },
  1020. { }
  1021. };
  1022. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  1023. .master = &omap3xxx_l4_wkup_hwmod,
  1024. .slave = &omap3xxx_wd_timer2_hwmod,
  1025. .clk = "wdt2_ick",
  1026. .addr = omap3xxx_wd_timer2_addrs,
  1027. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1028. };
  1029. /*
  1030. * 'wd_timer' class
  1031. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  1032. * overflow condition
  1033. */
  1034. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  1035. .rev_offs = 0x0000,
  1036. .sysc_offs = 0x0010,
  1037. .syss_offs = 0x0014,
  1038. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  1039. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1040. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  1041. SYSS_HAS_RESET_STATUS),
  1042. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1043. .sysc_fields = &omap_hwmod_sysc_type1,
  1044. };
  1045. /* I2C common */
  1046. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1047. .rev_offs = 0x00,
  1048. .sysc_offs = 0x20,
  1049. .syss_offs = 0x10,
  1050. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1051. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1052. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1053. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1054. .clockact = CLOCKACT_TEST_ICLK,
  1055. .sysc_fields = &omap_hwmod_sysc_type1,
  1056. };
  1057. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  1058. .name = "wd_timer",
  1059. .sysc = &omap3xxx_wd_timer_sysc,
  1060. .pre_shutdown = &omap2_wd_timer_disable
  1061. };
  1062. /* wd_timer2 */
  1063. static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
  1064. &omap3xxx_l4_wkup__wd_timer2,
  1065. };
  1066. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  1067. .name = "wd_timer2",
  1068. .class = &omap3xxx_wd_timer_hwmod_class,
  1069. .main_clk = "wdt2_fck",
  1070. .prcm = {
  1071. .omap2 = {
  1072. .prcm_reg_id = 1,
  1073. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  1074. .module_offs = WKUP_MOD,
  1075. .idlest_reg_id = 1,
  1076. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  1077. },
  1078. },
  1079. .slaves = omap3xxx_wd_timer2_slaves,
  1080. .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
  1081. /*
  1082. * XXX: Use software supervised mode, HW supervised smartidle seems to
  1083. * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
  1084. */
  1085. .flags = HWMOD_SWSUP_SIDLE,
  1086. };
  1087. /* UART1 */
  1088. static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
  1089. &omap3_l4_core__uart1,
  1090. };
  1091. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  1092. .name = "uart1",
  1093. .mpu_irqs = omap2_uart1_mpu_irqs,
  1094. .sdma_reqs = omap2_uart1_sdma_reqs,
  1095. .main_clk = "uart1_fck",
  1096. .prcm = {
  1097. .omap2 = {
  1098. .module_offs = CORE_MOD,
  1099. .prcm_reg_id = 1,
  1100. .module_bit = OMAP3430_EN_UART1_SHIFT,
  1101. .idlest_reg_id = 1,
  1102. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  1103. },
  1104. },
  1105. .slaves = omap3xxx_uart1_slaves,
  1106. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
  1107. .class = &omap2_uart_class,
  1108. };
  1109. /* UART2 */
  1110. static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
  1111. &omap3_l4_core__uart2,
  1112. };
  1113. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  1114. .name = "uart2",
  1115. .mpu_irqs = omap2_uart2_mpu_irqs,
  1116. .sdma_reqs = omap2_uart2_sdma_reqs,
  1117. .main_clk = "uart2_fck",
  1118. .prcm = {
  1119. .omap2 = {
  1120. .module_offs = CORE_MOD,
  1121. .prcm_reg_id = 1,
  1122. .module_bit = OMAP3430_EN_UART2_SHIFT,
  1123. .idlest_reg_id = 1,
  1124. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  1125. },
  1126. },
  1127. .slaves = omap3xxx_uart2_slaves,
  1128. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
  1129. .class = &omap2_uart_class,
  1130. };
  1131. /* UART3 */
  1132. static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
  1133. &omap3_l4_per__uart3,
  1134. };
  1135. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  1136. .name = "uart3",
  1137. .mpu_irqs = omap2_uart3_mpu_irqs,
  1138. .sdma_reqs = omap2_uart3_sdma_reqs,
  1139. .main_clk = "uart3_fck",
  1140. .prcm = {
  1141. .omap2 = {
  1142. .module_offs = OMAP3430_PER_MOD,
  1143. .prcm_reg_id = 1,
  1144. .module_bit = OMAP3430_EN_UART3_SHIFT,
  1145. .idlest_reg_id = 1,
  1146. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  1147. },
  1148. },
  1149. .slaves = omap3xxx_uart3_slaves,
  1150. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
  1151. .class = &omap2_uart_class,
  1152. };
  1153. /* UART4 */
  1154. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  1155. { .irq = INT_36XX_UART4_IRQ, },
  1156. { .irq = -1 }
  1157. };
  1158. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  1159. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  1160. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  1161. { .dma_req = -1 }
  1162. };
  1163. static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
  1164. &omap3_l4_per__uart4,
  1165. };
  1166. static struct omap_hwmod omap3xxx_uart4_hwmod = {
  1167. .name = "uart4",
  1168. .mpu_irqs = uart4_mpu_irqs,
  1169. .sdma_reqs = uart4_sdma_reqs,
  1170. .main_clk = "uart4_fck",
  1171. .prcm = {
  1172. .omap2 = {
  1173. .module_offs = OMAP3430_PER_MOD,
  1174. .prcm_reg_id = 1,
  1175. .module_bit = OMAP3630_EN_UART4_SHIFT,
  1176. .idlest_reg_id = 1,
  1177. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  1178. },
  1179. },
  1180. .slaves = omap3xxx_uart4_slaves,
  1181. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
  1182. .class = &omap2_uart_class,
  1183. };
  1184. static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
  1185. { .irq = INT_35XX_UART4_IRQ, },
  1186. };
  1187. static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
  1188. { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
  1189. { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
  1190. };
  1191. static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = {
  1192. &am35xx_l4_core__uart4,
  1193. };
  1194. static struct omap_hwmod am35xx_uart4_hwmod = {
  1195. .name = "uart4",
  1196. .mpu_irqs = am35xx_uart4_mpu_irqs,
  1197. .sdma_reqs = am35xx_uart4_sdma_reqs,
  1198. .main_clk = "uart4_fck",
  1199. .prcm = {
  1200. .omap2 = {
  1201. .module_offs = CORE_MOD,
  1202. .prcm_reg_id = 1,
  1203. .module_bit = OMAP3430_EN_UART4_SHIFT,
  1204. .idlest_reg_id = 1,
  1205. .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
  1206. },
  1207. },
  1208. .slaves = am35xx_uart4_slaves,
  1209. .slaves_cnt = ARRAY_SIZE(am35xx_uart4_slaves),
  1210. .class = &omap2_uart_class,
  1211. };
  1212. static struct omap_hwmod_class i2c_class = {
  1213. .name = "i2c",
  1214. .sysc = &i2c_sysc,
  1215. .rev = OMAP_I2C_IP_VERSION_1,
  1216. .reset = &omap_i2c_reset,
  1217. };
  1218. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  1219. { .name = "dispc", .dma_req = 5 },
  1220. { .name = "dsi1", .dma_req = 74 },
  1221. { .dma_req = -1 }
  1222. };
  1223. /* dss */
  1224. /* dss master ports */
  1225. static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
  1226. &omap3xxx_dss__l3,
  1227. };
  1228. /* l4_core -> dss */
  1229. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  1230. .master = &omap3xxx_l4_core_hwmod,
  1231. .slave = &omap3430es1_dss_core_hwmod,
  1232. .clk = "dss_ick",
  1233. .addr = omap2_dss_addrs,
  1234. .fw = {
  1235. .omap2 = {
  1236. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  1237. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1238. .flags = OMAP_FIREWALL_L4,
  1239. }
  1240. },
  1241. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1242. };
  1243. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  1244. .master = &omap3xxx_l4_core_hwmod,
  1245. .slave = &omap3xxx_dss_core_hwmod,
  1246. .clk = "dss_ick",
  1247. .addr = omap2_dss_addrs,
  1248. .fw = {
  1249. .omap2 = {
  1250. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  1251. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1252. .flags = OMAP_FIREWALL_L4,
  1253. }
  1254. },
  1255. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1256. };
  1257. /* dss slave ports */
  1258. static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
  1259. &omap3430es1_l4_core__dss,
  1260. };
  1261. static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
  1262. &omap3xxx_l4_core__dss,
  1263. };
  1264. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  1265. /*
  1266. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  1267. * driver does not use these clocks.
  1268. */
  1269. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  1270. { .role = "tv_clk", .clk = "dss_tv_fck" },
  1271. /* required only on OMAP3430 */
  1272. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  1273. };
  1274. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  1275. .name = "dss_core",
  1276. .class = &omap2_dss_hwmod_class,
  1277. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  1278. .sdma_reqs = omap3xxx_dss_sdma_chs,
  1279. .prcm = {
  1280. .omap2 = {
  1281. .prcm_reg_id = 1,
  1282. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1283. .module_offs = OMAP3430_DSS_MOD,
  1284. .idlest_reg_id = 1,
  1285. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  1286. },
  1287. },
  1288. .opt_clks = dss_opt_clks,
  1289. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1290. .slaves = omap3430es1_dss_slaves,
  1291. .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
  1292. .masters = omap3xxx_dss_masters,
  1293. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  1294. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1295. };
  1296. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  1297. .name = "dss_core",
  1298. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1299. .class = &omap2_dss_hwmod_class,
  1300. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  1301. .sdma_reqs = omap3xxx_dss_sdma_chs,
  1302. .prcm = {
  1303. .omap2 = {
  1304. .prcm_reg_id = 1,
  1305. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1306. .module_offs = OMAP3430_DSS_MOD,
  1307. .idlest_reg_id = 1,
  1308. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  1309. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  1310. },
  1311. },
  1312. .opt_clks = dss_opt_clks,
  1313. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1314. .slaves = omap3xxx_dss_slaves,
  1315. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
  1316. .masters = omap3xxx_dss_masters,
  1317. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  1318. };
  1319. /* l4_core -> dss_dispc */
  1320. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  1321. .master = &omap3xxx_l4_core_hwmod,
  1322. .slave = &omap3xxx_dss_dispc_hwmod,
  1323. .clk = "dss_ick",
  1324. .addr = omap2_dss_dispc_addrs,
  1325. .fw = {
  1326. .omap2 = {
  1327. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  1328. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1329. .flags = OMAP_FIREWALL_L4,
  1330. }
  1331. },
  1332. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1333. };
  1334. /* dss_dispc slave ports */
  1335. static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
  1336. &omap3xxx_l4_core__dss_dispc,
  1337. };
  1338. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  1339. .name = "dss_dispc",
  1340. .class = &omap2_dispc_hwmod_class,
  1341. .mpu_irqs = omap2_dispc_irqs,
  1342. .main_clk = "dss1_alwon_fck",
  1343. .prcm = {
  1344. .omap2 = {
  1345. .prcm_reg_id = 1,
  1346. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1347. .module_offs = OMAP3430_DSS_MOD,
  1348. },
  1349. },
  1350. .slaves = omap3xxx_dss_dispc_slaves,
  1351. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
  1352. .flags = HWMOD_NO_IDLEST,
  1353. .dev_attr = &omap2_3_dss_dispc_dev_attr
  1354. };
  1355. /*
  1356. * 'dsi' class
  1357. * display serial interface controller
  1358. */
  1359. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  1360. .name = "dsi",
  1361. };
  1362. static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
  1363. { .irq = 25 },
  1364. { .irq = -1 }
  1365. };
  1366. /* dss_dsi1 */
  1367. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  1368. {
  1369. .pa_start = 0x4804FC00,
  1370. .pa_end = 0x4804FFFF,
  1371. .flags = ADDR_TYPE_RT
  1372. },
  1373. { }
  1374. };
  1375. /* l4_core -> dss_dsi1 */
  1376. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  1377. .master = &omap3xxx_l4_core_hwmod,
  1378. .slave = &omap3xxx_dss_dsi1_hwmod,
  1379. .clk = "dss_ick",
  1380. .addr = omap3xxx_dss_dsi1_addrs,
  1381. .fw = {
  1382. .omap2 = {
  1383. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  1384. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1385. .flags = OMAP_FIREWALL_L4,
  1386. }
  1387. },
  1388. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1389. };
  1390. /* dss_dsi1 slave ports */
  1391. static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
  1392. &omap3xxx_l4_core__dss_dsi1,
  1393. };
  1394. static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
  1395. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  1396. };
  1397. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  1398. .name = "dss_dsi1",
  1399. .class = &omap3xxx_dsi_hwmod_class,
  1400. .mpu_irqs = omap3xxx_dsi1_irqs,
  1401. .main_clk = "dss1_alwon_fck",
  1402. .prcm = {
  1403. .omap2 = {
  1404. .prcm_reg_id = 1,
  1405. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1406. .module_offs = OMAP3430_DSS_MOD,
  1407. },
  1408. },
  1409. .opt_clks = dss_dsi1_opt_clks,
  1410. .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
  1411. .slaves = omap3xxx_dss_dsi1_slaves,
  1412. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
  1413. .flags = HWMOD_NO_IDLEST,
  1414. };
  1415. /* l4_core -> dss_rfbi */
  1416. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  1417. .master = &omap3xxx_l4_core_hwmod,
  1418. .slave = &omap3xxx_dss_rfbi_hwmod,
  1419. .clk = "dss_ick",
  1420. .addr = omap2_dss_rfbi_addrs,
  1421. .fw = {
  1422. .omap2 = {
  1423. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  1424. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  1425. .flags = OMAP_FIREWALL_L4,
  1426. }
  1427. },
  1428. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1429. };
  1430. /* dss_rfbi slave ports */
  1431. static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
  1432. &omap3xxx_l4_core__dss_rfbi,
  1433. };
  1434. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  1435. { .role = "ick", .clk = "dss_ick" },
  1436. };
  1437. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  1438. .name = "dss_rfbi",
  1439. .class = &omap2_rfbi_hwmod_class,
  1440. .main_clk = "dss1_alwon_fck",
  1441. .prcm = {
  1442. .omap2 = {
  1443. .prcm_reg_id = 1,
  1444. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1445. .module_offs = OMAP3430_DSS_MOD,
  1446. },
  1447. },
  1448. .opt_clks = dss_rfbi_opt_clks,
  1449. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  1450. .slaves = omap3xxx_dss_rfbi_slaves,
  1451. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
  1452. .flags = HWMOD_NO_IDLEST,
  1453. };
  1454. /* l4_core -> dss_venc */
  1455. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  1456. .master = &omap3xxx_l4_core_hwmod,
  1457. .slave = &omap3xxx_dss_venc_hwmod,
  1458. .clk = "dss_ick",
  1459. .addr = omap2_dss_venc_addrs,
  1460. .fw = {
  1461. .omap2 = {
  1462. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  1463. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1464. .flags = OMAP_FIREWALL_L4,
  1465. }
  1466. },
  1467. .flags = OCPIF_SWSUP_IDLE,
  1468. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1469. };
  1470. /* dss_venc slave ports */
  1471. static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
  1472. &omap3xxx_l4_core__dss_venc,
  1473. };
  1474. static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
  1475. /* required only on OMAP3430 */
  1476. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  1477. };
  1478. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  1479. .name = "dss_venc",
  1480. .class = &omap2_venc_hwmod_class,
  1481. .main_clk = "dss_tv_fck",
  1482. .prcm = {
  1483. .omap2 = {
  1484. .prcm_reg_id = 1,
  1485. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1486. .module_offs = OMAP3430_DSS_MOD,
  1487. },
  1488. },
  1489. .opt_clks = dss_venc_opt_clks,
  1490. .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
  1491. .slaves = omap3xxx_dss_venc_slaves,
  1492. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
  1493. .flags = HWMOD_NO_IDLEST,
  1494. };
  1495. /* I2C1 */
  1496. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  1497. .fifo_depth = 8, /* bytes */
  1498. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  1499. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  1500. OMAP_I2C_FLAG_BUS_SHIFT_2,
  1501. };
  1502. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  1503. &omap3_l4_core__i2c1,
  1504. };
  1505. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  1506. .name = "i2c1",
  1507. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1508. .mpu_irqs = omap2_i2c1_mpu_irqs,
  1509. .sdma_reqs = omap2_i2c1_sdma_reqs,
  1510. .main_clk = "i2c1_fck",
  1511. .prcm = {
  1512. .omap2 = {
  1513. .module_offs = CORE_MOD,
  1514. .prcm_reg_id = 1,
  1515. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  1516. .idlest_reg_id = 1,
  1517. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  1518. },
  1519. },
  1520. .slaves = omap3xxx_i2c1_slaves,
  1521. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  1522. .class = &i2c_class,
  1523. .dev_attr = &i2c1_dev_attr,
  1524. };
  1525. /* I2C2 */
  1526. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  1527. .fifo_depth = 8, /* bytes */
  1528. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  1529. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  1530. OMAP_I2C_FLAG_BUS_SHIFT_2,
  1531. };
  1532. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  1533. &omap3_l4_core__i2c2,
  1534. };
  1535. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  1536. .name = "i2c2",
  1537. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1538. .mpu_irqs = omap2_i2c2_mpu_irqs,
  1539. .sdma_reqs = omap2_i2c2_sdma_reqs,
  1540. .main_clk = "i2c2_fck",
  1541. .prcm = {
  1542. .omap2 = {
  1543. .module_offs = CORE_MOD,
  1544. .prcm_reg_id = 1,
  1545. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  1546. .idlest_reg_id = 1,
  1547. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  1548. },
  1549. },
  1550. .slaves = omap3xxx_i2c2_slaves,
  1551. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  1552. .class = &i2c_class,
  1553. .dev_attr = &i2c2_dev_attr,
  1554. };
  1555. /* I2C3 */
  1556. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  1557. .fifo_depth = 64, /* bytes */
  1558. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  1559. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  1560. OMAP_I2C_FLAG_BUS_SHIFT_2,
  1561. };
  1562. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1563. { .irq = INT_34XX_I2C3_IRQ, },
  1564. { .irq = -1 }
  1565. };
  1566. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  1567. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  1568. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  1569. { .dma_req = -1 }
  1570. };
  1571. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  1572. &omap3_l4_core__i2c3,
  1573. };
  1574. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  1575. .name = "i2c3",
  1576. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1577. .mpu_irqs = i2c3_mpu_irqs,
  1578. .sdma_reqs = i2c3_sdma_reqs,
  1579. .main_clk = "i2c3_fck",
  1580. .prcm = {
  1581. .omap2 = {
  1582. .module_offs = CORE_MOD,
  1583. .prcm_reg_id = 1,
  1584. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  1585. .idlest_reg_id = 1,
  1586. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  1587. },
  1588. },
  1589. .slaves = omap3xxx_i2c3_slaves,
  1590. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  1591. .class = &i2c_class,
  1592. .dev_attr = &i2c3_dev_attr,
  1593. };
  1594. /* l4_wkup -> gpio1 */
  1595. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  1596. {
  1597. .pa_start = 0x48310000,
  1598. .pa_end = 0x483101ff,
  1599. .flags = ADDR_TYPE_RT
  1600. },
  1601. { }
  1602. };
  1603. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  1604. .master = &omap3xxx_l4_wkup_hwmod,
  1605. .slave = &omap3xxx_gpio1_hwmod,
  1606. .addr = omap3xxx_gpio1_addrs,
  1607. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1608. };
  1609. /* l4_per -> gpio2 */
  1610. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  1611. {
  1612. .pa_start = 0x49050000,
  1613. .pa_end = 0x490501ff,
  1614. .flags = ADDR_TYPE_RT
  1615. },
  1616. { }
  1617. };
  1618. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  1619. .master = &omap3xxx_l4_per_hwmod,
  1620. .slave = &omap3xxx_gpio2_hwmod,
  1621. .addr = omap3xxx_gpio2_addrs,
  1622. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1623. };
  1624. /* l4_per -> gpio3 */
  1625. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  1626. {
  1627. .pa_start = 0x49052000,
  1628. .pa_end = 0x490521ff,
  1629. .flags = ADDR_TYPE_RT
  1630. },
  1631. { }
  1632. };
  1633. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  1634. .master = &omap3xxx_l4_per_hwmod,
  1635. .slave = &omap3xxx_gpio3_hwmod,
  1636. .addr = omap3xxx_gpio3_addrs,
  1637. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1638. };
  1639. /* l4_per -> gpio4 */
  1640. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  1641. {
  1642. .pa_start = 0x49054000,
  1643. .pa_end = 0x490541ff,
  1644. .flags = ADDR_TYPE_RT
  1645. },
  1646. { }
  1647. };
  1648. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  1649. .master = &omap3xxx_l4_per_hwmod,
  1650. .slave = &omap3xxx_gpio4_hwmod,
  1651. .addr = omap3xxx_gpio4_addrs,
  1652. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1653. };
  1654. /* l4_per -> gpio5 */
  1655. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  1656. {
  1657. .pa_start = 0x49056000,
  1658. .pa_end = 0x490561ff,
  1659. .flags = ADDR_TYPE_RT
  1660. },
  1661. { }
  1662. };
  1663. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  1664. .master = &omap3xxx_l4_per_hwmod,
  1665. .slave = &omap3xxx_gpio5_hwmod,
  1666. .addr = omap3xxx_gpio5_addrs,
  1667. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1668. };
  1669. /* l4_per -> gpio6 */
  1670. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  1671. {
  1672. .pa_start = 0x49058000,
  1673. .pa_end = 0x490581ff,
  1674. .flags = ADDR_TYPE_RT
  1675. },
  1676. { }
  1677. };
  1678. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  1679. .master = &omap3xxx_l4_per_hwmod,
  1680. .slave = &omap3xxx_gpio6_hwmod,
  1681. .addr = omap3xxx_gpio6_addrs,
  1682. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1683. };
  1684. /*
  1685. * 'gpio' class
  1686. * general purpose io module
  1687. */
  1688. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  1689. .rev_offs = 0x0000,
  1690. .sysc_offs = 0x0010,
  1691. .syss_offs = 0x0014,
  1692. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1693. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1694. SYSS_HAS_RESET_STATUS),
  1695. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1696. .sysc_fields = &omap_hwmod_sysc_type1,
  1697. };
  1698. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  1699. .name = "gpio",
  1700. .sysc = &omap3xxx_gpio_sysc,
  1701. .rev = 1,
  1702. };
  1703. /* gpio_dev_attr*/
  1704. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1705. .bank_width = 32,
  1706. .dbck_flag = true,
  1707. };
  1708. /* gpio1 */
  1709. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  1710. { .role = "dbclk", .clk = "gpio1_dbck", },
  1711. };
  1712. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  1713. &omap3xxx_l4_wkup__gpio1,
  1714. };
  1715. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  1716. .name = "gpio1",
  1717. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1718. .mpu_irqs = omap2_gpio1_irqs,
  1719. .main_clk = "gpio1_ick",
  1720. .opt_clks = gpio1_opt_clks,
  1721. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1722. .prcm = {
  1723. .omap2 = {
  1724. .prcm_reg_id = 1,
  1725. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  1726. .module_offs = WKUP_MOD,
  1727. .idlest_reg_id = 1,
  1728. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  1729. },
  1730. },
  1731. .slaves = omap3xxx_gpio1_slaves,
  1732. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  1733. .class = &omap3xxx_gpio_hwmod_class,
  1734. .dev_attr = &gpio_dev_attr,
  1735. };
  1736. /* gpio2 */
  1737. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1738. { .role = "dbclk", .clk = "gpio2_dbck", },
  1739. };
  1740. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  1741. &omap3xxx_l4_per__gpio2,
  1742. };
  1743. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  1744. .name = "gpio2",
  1745. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1746. .mpu_irqs = omap2_gpio2_irqs,
  1747. .main_clk = "gpio2_ick",
  1748. .opt_clks = gpio2_opt_clks,
  1749. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1750. .prcm = {
  1751. .omap2 = {
  1752. .prcm_reg_id = 1,
  1753. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  1754. .module_offs = OMAP3430_PER_MOD,
  1755. .idlest_reg_id = 1,
  1756. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  1757. },
  1758. },
  1759. .slaves = omap3xxx_gpio2_slaves,
  1760. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  1761. .class = &omap3xxx_gpio_hwmod_class,
  1762. .dev_attr = &gpio_dev_attr,
  1763. };
  1764. /* gpio3 */
  1765. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1766. { .role = "dbclk", .clk = "gpio3_dbck", },
  1767. };
  1768. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  1769. &omap3xxx_l4_per__gpio3,
  1770. };
  1771. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  1772. .name = "gpio3",
  1773. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1774. .mpu_irqs = omap2_gpio3_irqs,
  1775. .main_clk = "gpio3_ick",
  1776. .opt_clks = gpio3_opt_clks,
  1777. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1778. .prcm = {
  1779. .omap2 = {
  1780. .prcm_reg_id = 1,
  1781. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  1782. .module_offs = OMAP3430_PER_MOD,
  1783. .idlest_reg_id = 1,
  1784. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  1785. },
  1786. },
  1787. .slaves = omap3xxx_gpio3_slaves,
  1788. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  1789. .class = &omap3xxx_gpio_hwmod_class,
  1790. .dev_attr = &gpio_dev_attr,
  1791. };
  1792. /* gpio4 */
  1793. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1794. { .role = "dbclk", .clk = "gpio4_dbck", },
  1795. };
  1796. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  1797. &omap3xxx_l4_per__gpio4,
  1798. };
  1799. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  1800. .name = "gpio4",
  1801. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1802. .mpu_irqs = omap2_gpio4_irqs,
  1803. .main_clk = "gpio4_ick",
  1804. .opt_clks = gpio4_opt_clks,
  1805. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  1806. .prcm = {
  1807. .omap2 = {
  1808. .prcm_reg_id = 1,
  1809. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  1810. .module_offs = OMAP3430_PER_MOD,
  1811. .idlest_reg_id = 1,
  1812. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  1813. },
  1814. },
  1815. .slaves = omap3xxx_gpio4_slaves,
  1816. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  1817. .class = &omap3xxx_gpio_hwmod_class,
  1818. .dev_attr = &gpio_dev_attr,
  1819. };
  1820. /* gpio5 */
  1821. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  1822. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  1823. { .irq = -1 }
  1824. };
  1825. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  1826. { .role = "dbclk", .clk = "gpio5_dbck", },
  1827. };
  1828. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  1829. &omap3xxx_l4_per__gpio5,
  1830. };
  1831. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  1832. .name = "gpio5",
  1833. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1834. .mpu_irqs = omap3xxx_gpio5_irqs,
  1835. .main_clk = "gpio5_ick",
  1836. .opt_clks = gpio5_opt_clks,
  1837. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  1838. .prcm = {
  1839. .omap2 = {
  1840. .prcm_reg_id = 1,
  1841. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  1842. .module_offs = OMAP3430_PER_MOD,
  1843. .idlest_reg_id = 1,
  1844. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  1845. },
  1846. },
  1847. .slaves = omap3xxx_gpio5_slaves,
  1848. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  1849. .class = &omap3xxx_gpio_hwmod_class,
  1850. .dev_attr = &gpio_dev_attr,
  1851. };
  1852. /* gpio6 */
  1853. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  1854. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  1855. { .irq = -1 }
  1856. };
  1857. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  1858. { .role = "dbclk", .clk = "gpio6_dbck", },
  1859. };
  1860. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  1861. &omap3xxx_l4_per__gpio6,
  1862. };
  1863. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  1864. .name = "gpio6",
  1865. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1866. .mpu_irqs = omap3xxx_gpio6_irqs,
  1867. .main_clk = "gpio6_ick",
  1868. .opt_clks = gpio6_opt_clks,
  1869. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  1870. .prcm = {
  1871. .omap2 = {
  1872. .prcm_reg_id = 1,
  1873. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  1874. .module_offs = OMAP3430_PER_MOD,
  1875. .idlest_reg_id = 1,
  1876. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  1877. },
  1878. },
  1879. .slaves = omap3xxx_gpio6_slaves,
  1880. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  1881. .class = &omap3xxx_gpio_hwmod_class,
  1882. .dev_attr = &gpio_dev_attr,
  1883. };
  1884. /* dma_system -> L3 */
  1885. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  1886. .master = &omap3xxx_dma_system_hwmod,
  1887. .slave = &omap3xxx_l3_main_hwmod,
  1888. .clk = "core_l3_ick",
  1889. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1890. };
  1891. /* dma attributes */
  1892. static struct omap_dma_dev_attr dma_dev_attr = {
  1893. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1894. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1895. .lch_count = 32,
  1896. };
  1897. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  1898. .rev_offs = 0x0000,
  1899. .sysc_offs = 0x002c,
  1900. .syss_offs = 0x0028,
  1901. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1902. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1903. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  1904. SYSS_HAS_RESET_STATUS),
  1905. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1906. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1907. .sysc_fields = &omap_hwmod_sysc_type1,
  1908. };
  1909. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  1910. .name = "dma",
  1911. .sysc = &omap3xxx_dma_sysc,
  1912. };
  1913. /* dma_system */
  1914. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  1915. {
  1916. .pa_start = 0x48056000,
  1917. .pa_end = 0x48056fff,
  1918. .flags = ADDR_TYPE_RT
  1919. },
  1920. { }
  1921. };
  1922. /* dma_system master ports */
  1923. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  1924. &omap3xxx_dma_system__l3,
  1925. };
  1926. /* l4_cfg -> dma_system */
  1927. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  1928. .master = &omap3xxx_l4_core_hwmod,
  1929. .slave = &omap3xxx_dma_system_hwmod,
  1930. .clk = "core_l4_ick",
  1931. .addr = omap3xxx_dma_system_addrs,
  1932. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1933. };
  1934. /* dma_system slave ports */
  1935. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  1936. &omap3xxx_l4_core__dma_system,
  1937. };
  1938. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  1939. .name = "dma",
  1940. .class = &omap3xxx_dma_hwmod_class,
  1941. .mpu_irqs = omap2_dma_system_irqs,
  1942. .main_clk = "core_l3_ick",
  1943. .prcm = {
  1944. .omap2 = {
  1945. .module_offs = CORE_MOD,
  1946. .prcm_reg_id = 1,
  1947. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1948. .idlest_reg_id = 1,
  1949. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1950. },
  1951. },
  1952. .slaves = omap3xxx_dma_system_slaves,
  1953. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  1954. .masters = omap3xxx_dma_system_masters,
  1955. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  1956. .dev_attr = &dma_dev_attr,
  1957. .flags = HWMOD_NO_IDLEST,
  1958. };
  1959. /*
  1960. * 'mcbsp' class
  1961. * multi channel buffered serial port controller
  1962. */
  1963. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
  1964. .sysc_offs = 0x008c,
  1965. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
  1966. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1967. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1968. .sysc_fields = &omap_hwmod_sysc_type1,
  1969. .clockact = 0x2,
  1970. };
  1971. static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
  1972. .name = "mcbsp",
  1973. .sysc = &omap3xxx_mcbsp_sysc,
  1974. .rev = MCBSP_CONFIG_TYPE3,
  1975. };
  1976. /* mcbsp1 */
  1977. static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
  1978. { .name = "irq", .irq = 16 },
  1979. { .name = "tx", .irq = 59 },
  1980. { .name = "rx", .irq = 60 },
  1981. { .irq = -1 }
  1982. };
  1983. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  1984. {
  1985. .name = "mpu",
  1986. .pa_start = 0x48074000,
  1987. .pa_end = 0x480740ff,
  1988. .flags = ADDR_TYPE_RT
  1989. },
  1990. { }
  1991. };
  1992. /* l4_core -> mcbsp1 */
  1993. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  1994. .master = &omap3xxx_l4_core_hwmod,
  1995. .slave = &omap3xxx_mcbsp1_hwmod,
  1996. .clk = "mcbsp1_ick",
  1997. .addr = omap3xxx_mcbsp1_addrs,
  1998. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1999. };
  2000. /* mcbsp1 slave ports */
  2001. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
  2002. &omap3xxx_l4_core__mcbsp1,
  2003. };
  2004. static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  2005. .name = "mcbsp1",
  2006. .class = &omap3xxx_mcbsp_hwmod_class,
  2007. .mpu_irqs = omap3xxx_mcbsp1_irqs,
  2008. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  2009. .main_clk = "mcbsp1_fck",
  2010. .prcm = {
  2011. .omap2 = {
  2012. .prcm_reg_id = 1,
  2013. .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
  2014. .module_offs = CORE_MOD,
  2015. .idlest_reg_id = 1,
  2016. .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
  2017. },
  2018. },
  2019. .slaves = omap3xxx_mcbsp1_slaves,
  2020. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
  2021. };
  2022. /* mcbsp2 */
  2023. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
  2024. { .name = "irq", .irq = 17 },
  2025. { .name = "tx", .irq = 62 },
  2026. { .name = "rx", .irq = 63 },
  2027. { .irq = -1 }
  2028. };
  2029. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  2030. {
  2031. .name = "mpu",
  2032. .pa_start = 0x49022000,
  2033. .pa_end = 0x490220ff,
  2034. .flags = ADDR_TYPE_RT
  2035. },
  2036. { }
  2037. };
  2038. /* l4_per -> mcbsp2 */
  2039. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  2040. .master = &omap3xxx_l4_per_hwmod,
  2041. .slave = &omap3xxx_mcbsp2_hwmod,
  2042. .clk = "mcbsp2_ick",
  2043. .addr = omap3xxx_mcbsp2_addrs,
  2044. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2045. };
  2046. /* mcbsp2 slave ports */
  2047. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
  2048. &omap3xxx_l4_per__mcbsp2,
  2049. };
  2050. static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
  2051. .sidetone = "mcbsp2_sidetone",
  2052. };
  2053. static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
  2054. .name = "mcbsp2",
  2055. .class = &omap3xxx_mcbsp_hwmod_class,
  2056. .mpu_irqs = omap3xxx_mcbsp2_irqs,
  2057. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  2058. .main_clk = "mcbsp2_fck",
  2059. .prcm = {
  2060. .omap2 = {
  2061. .prcm_reg_id = 1,
  2062. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2063. .module_offs = OMAP3430_PER_MOD,
  2064. .idlest_reg_id = 1,
  2065. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2066. },
  2067. },
  2068. .slaves = omap3xxx_mcbsp2_slaves,
  2069. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
  2070. .dev_attr = &omap34xx_mcbsp2_dev_attr,
  2071. };
  2072. /* mcbsp3 */
  2073. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
  2074. { .name = "irq", .irq = 22 },
  2075. { .name = "tx", .irq = 89 },
  2076. { .name = "rx", .irq = 90 },
  2077. { .irq = -1 }
  2078. };
  2079. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2080. {
  2081. .name = "mpu",
  2082. .pa_start = 0x49024000,
  2083. .pa_end = 0x490240ff,
  2084. .flags = ADDR_TYPE_RT
  2085. },
  2086. { }
  2087. };
  2088. /* l4_per -> mcbsp3 */
  2089. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2090. .master = &omap3xxx_l4_per_hwmod,
  2091. .slave = &omap3xxx_mcbsp3_hwmod,
  2092. .clk = "mcbsp3_ick",
  2093. .addr = omap3xxx_mcbsp3_addrs,
  2094. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2095. };
  2096. /* mcbsp3 slave ports */
  2097. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
  2098. &omap3xxx_l4_per__mcbsp3,
  2099. };
  2100. static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
  2101. .sidetone = "mcbsp3_sidetone",
  2102. };
  2103. static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
  2104. .name = "mcbsp3",
  2105. .class = &omap3xxx_mcbsp_hwmod_class,
  2106. .mpu_irqs = omap3xxx_mcbsp3_irqs,
  2107. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  2108. .main_clk = "mcbsp3_fck",
  2109. .prcm = {
  2110. .omap2 = {
  2111. .prcm_reg_id = 1,
  2112. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2113. .module_offs = OMAP3430_PER_MOD,
  2114. .idlest_reg_id = 1,
  2115. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2116. },
  2117. },
  2118. .slaves = omap3xxx_mcbsp3_slaves,
  2119. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
  2120. .dev_attr = &omap34xx_mcbsp3_dev_attr,
  2121. };
  2122. /* mcbsp4 */
  2123. static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
  2124. { .name = "irq", .irq = 23 },
  2125. { .name = "tx", .irq = 54 },
  2126. { .name = "rx", .irq = 55 },
  2127. { .irq = -1 }
  2128. };
  2129. static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
  2130. { .name = "rx", .dma_req = 20 },
  2131. { .name = "tx", .dma_req = 19 },
  2132. { .dma_req = -1 }
  2133. };
  2134. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2135. {
  2136. .name = "mpu",
  2137. .pa_start = 0x49026000,
  2138. .pa_end = 0x490260ff,
  2139. .flags = ADDR_TYPE_RT
  2140. },
  2141. { }
  2142. };
  2143. /* l4_per -> mcbsp4 */
  2144. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2145. .master = &omap3xxx_l4_per_hwmod,
  2146. .slave = &omap3xxx_mcbsp4_hwmod,
  2147. .clk = "mcbsp4_ick",
  2148. .addr = omap3xxx_mcbsp4_addrs,
  2149. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2150. };
  2151. /* mcbsp4 slave ports */
  2152. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
  2153. &omap3xxx_l4_per__mcbsp4,
  2154. };
  2155. static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
  2156. .name = "mcbsp4",
  2157. .class = &omap3xxx_mcbsp_hwmod_class,
  2158. .mpu_irqs = omap3xxx_mcbsp4_irqs,
  2159. .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
  2160. .main_clk = "mcbsp4_fck",
  2161. .prcm = {
  2162. .omap2 = {
  2163. .prcm_reg_id = 1,
  2164. .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
  2165. .module_offs = OMAP3430_PER_MOD,
  2166. .idlest_reg_id = 1,
  2167. .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
  2168. },
  2169. },
  2170. .slaves = omap3xxx_mcbsp4_slaves,
  2171. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
  2172. };
  2173. /* mcbsp5 */
  2174. static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
  2175. { .name = "irq", .irq = 27 },
  2176. { .name = "tx", .irq = 81 },
  2177. { .name = "rx", .irq = 82 },
  2178. { .irq = -1 }
  2179. };
  2180. static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
  2181. { .name = "rx", .dma_req = 22 },
  2182. { .name = "tx", .dma_req = 21 },
  2183. { .dma_req = -1 }
  2184. };
  2185. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2186. {
  2187. .name = "mpu",
  2188. .pa_start = 0x48096000,
  2189. .pa_end = 0x480960ff,
  2190. .flags = ADDR_TYPE_RT
  2191. },
  2192. { }
  2193. };
  2194. /* l4_core -> mcbsp5 */
  2195. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2196. .master = &omap3xxx_l4_core_hwmod,
  2197. .slave = &omap3xxx_mcbsp5_hwmod,
  2198. .clk = "mcbsp5_ick",
  2199. .addr = omap3xxx_mcbsp5_addrs,
  2200. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2201. };
  2202. /* mcbsp5 slave ports */
  2203. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
  2204. &omap3xxx_l4_core__mcbsp5,
  2205. };
  2206. static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
  2207. .name = "mcbsp5",
  2208. .class = &omap3xxx_mcbsp_hwmod_class,
  2209. .mpu_irqs = omap3xxx_mcbsp5_irqs,
  2210. .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
  2211. .main_clk = "mcbsp5_fck",
  2212. .prcm = {
  2213. .omap2 = {
  2214. .prcm_reg_id = 1,
  2215. .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
  2216. .module_offs = CORE_MOD,
  2217. .idlest_reg_id = 1,
  2218. .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
  2219. },
  2220. },
  2221. .slaves = omap3xxx_mcbsp5_slaves,
  2222. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
  2223. };
  2224. /* 'mcbsp sidetone' class */
  2225. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
  2226. .sysc_offs = 0x0010,
  2227. .sysc_flags = SYSC_HAS_AUTOIDLE,
  2228. .sysc_fields = &omap_hwmod_sysc_type1,
  2229. };
  2230. static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
  2231. .name = "mcbsp_sidetone",
  2232. .sysc = &omap3xxx_mcbsp_sidetone_sysc,
  2233. };
  2234. /* mcbsp2_sidetone */
  2235. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
  2236. { .name = "irq", .irq = 4 },
  2237. { .irq = -1 }
  2238. };
  2239. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2240. {
  2241. .name = "sidetone",
  2242. .pa_start = 0x49028000,
  2243. .pa_end = 0x490280ff,
  2244. .flags = ADDR_TYPE_RT
  2245. },
  2246. { }
  2247. };
  2248. /* l4_per -> mcbsp2_sidetone */
  2249. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2250. .master = &omap3xxx_l4_per_hwmod,
  2251. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2252. .clk = "mcbsp2_ick",
  2253. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2254. .user = OCP_USER_MPU,
  2255. };
  2256. /* mcbsp2_sidetone slave ports */
  2257. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
  2258. &omap3xxx_l4_per__mcbsp2_sidetone,
  2259. };
  2260. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  2261. .name = "mcbsp2_sidetone",
  2262. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2263. .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
  2264. .main_clk = "mcbsp2_fck",
  2265. .prcm = {
  2266. .omap2 = {
  2267. .prcm_reg_id = 1,
  2268. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2269. .module_offs = OMAP3430_PER_MOD,
  2270. .idlest_reg_id = 1,
  2271. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2272. },
  2273. },
  2274. .slaves = omap3xxx_mcbsp2_sidetone_slaves,
  2275. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
  2276. };
  2277. /* mcbsp3_sidetone */
  2278. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
  2279. { .name = "irq", .irq = 5 },
  2280. { .irq = -1 }
  2281. };
  2282. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2283. {
  2284. .name = "sidetone",
  2285. .pa_start = 0x4902A000,
  2286. .pa_end = 0x4902A0ff,
  2287. .flags = ADDR_TYPE_RT
  2288. },
  2289. { }
  2290. };
  2291. /* l4_per -> mcbsp3_sidetone */
  2292. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2293. .master = &omap3xxx_l4_per_hwmod,
  2294. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2295. .clk = "mcbsp3_ick",
  2296. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2297. .user = OCP_USER_MPU,
  2298. };
  2299. /* mcbsp3_sidetone slave ports */
  2300. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
  2301. &omap3xxx_l4_per__mcbsp3_sidetone,
  2302. };
  2303. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
  2304. .name = "mcbsp3_sidetone",
  2305. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2306. .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
  2307. .main_clk = "mcbsp3_fck",
  2308. .prcm = {
  2309. .omap2 = {
  2310. .prcm_reg_id = 1,
  2311. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2312. .module_offs = OMAP3430_PER_MOD,
  2313. .idlest_reg_id = 1,
  2314. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2315. },
  2316. },
  2317. .slaves = omap3xxx_mcbsp3_sidetone_slaves,
  2318. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
  2319. };
  2320. /* SR common */
  2321. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  2322. .clkact_shift = 20,
  2323. };
  2324. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  2325. .sysc_offs = 0x24,
  2326. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  2327. .clockact = CLOCKACT_TEST_ICLK,
  2328. .sysc_fields = &omap34xx_sr_sysc_fields,
  2329. };
  2330. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  2331. .name = "smartreflex",
  2332. .sysc = &omap34xx_sr_sysc,
  2333. .rev = 1,
  2334. };
  2335. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  2336. .sidle_shift = 24,
  2337. .enwkup_shift = 26
  2338. };
  2339. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  2340. .sysc_offs = 0x38,
  2341. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2342. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  2343. SYSC_NO_CACHE),
  2344. .sysc_fields = &omap36xx_sr_sysc_fields,
  2345. };
  2346. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  2347. .name = "smartreflex",
  2348. .sysc = &omap36xx_sr_sysc,
  2349. .rev = 2,
  2350. };
  2351. /* SR1 */
  2352. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  2353. &omap3_l4_core__sr1,
  2354. };
  2355. static struct omap_hwmod omap34xx_sr1_hwmod = {
  2356. .name = "sr1_hwmod",
  2357. .class = &omap34xx_smartreflex_hwmod_class,
  2358. .main_clk = "sr1_fck",
  2359. .vdd_name = "mpu_iva",
  2360. .prcm = {
  2361. .omap2 = {
  2362. .prcm_reg_id = 1,
  2363. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2364. .module_offs = WKUP_MOD,
  2365. .idlest_reg_id = 1,
  2366. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2367. },
  2368. },
  2369. .slaves = omap3_sr1_slaves,
  2370. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2371. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2372. };
  2373. static struct omap_hwmod omap36xx_sr1_hwmod = {
  2374. .name = "sr1_hwmod",
  2375. .class = &omap36xx_smartreflex_hwmod_class,
  2376. .main_clk = "sr1_fck",
  2377. .vdd_name = "mpu_iva",
  2378. .prcm = {
  2379. .omap2 = {
  2380. .prcm_reg_id = 1,
  2381. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2382. .module_offs = WKUP_MOD,
  2383. .idlest_reg_id = 1,
  2384. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2385. },
  2386. },
  2387. .slaves = omap3_sr1_slaves,
  2388. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2389. };
  2390. /* SR2 */
  2391. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  2392. &omap3_l4_core__sr2,
  2393. };
  2394. static struct omap_hwmod omap34xx_sr2_hwmod = {
  2395. .name = "sr2_hwmod",
  2396. .class = &omap34xx_smartreflex_hwmod_class,
  2397. .main_clk = "sr2_fck",
  2398. .vdd_name = "core",
  2399. .prcm = {
  2400. .omap2 = {
  2401. .prcm_reg_id = 1,
  2402. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2403. .module_offs = WKUP_MOD,
  2404. .idlest_reg_id = 1,
  2405. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2406. },
  2407. },
  2408. .slaves = omap3_sr2_slaves,
  2409. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2410. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2411. };
  2412. static struct omap_hwmod omap36xx_sr2_hwmod = {
  2413. .name = "sr2_hwmod",
  2414. .class = &omap36xx_smartreflex_hwmod_class,
  2415. .main_clk = "sr2_fck",
  2416. .vdd_name = "core",
  2417. .prcm = {
  2418. .omap2 = {
  2419. .prcm_reg_id = 1,
  2420. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2421. .module_offs = WKUP_MOD,
  2422. .idlest_reg_id = 1,
  2423. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2424. },
  2425. },
  2426. .slaves = omap3_sr2_slaves,
  2427. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2428. };
  2429. /*
  2430. * 'mailbox' class
  2431. * mailbox module allowing communication between the on-chip processors
  2432. * using a queued mailbox-interrupt mechanism.
  2433. */
  2434. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  2435. .rev_offs = 0x000,
  2436. .sysc_offs = 0x010,
  2437. .syss_offs = 0x014,
  2438. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2439. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2440. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2441. .sysc_fields = &omap_hwmod_sysc_type1,
  2442. };
  2443. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  2444. .name = "mailbox",
  2445. .sysc = &omap3xxx_mailbox_sysc,
  2446. };
  2447. static struct omap_hwmod omap3xxx_mailbox_hwmod;
  2448. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  2449. { .irq = 26 },
  2450. { .irq = -1 }
  2451. };
  2452. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2453. {
  2454. .pa_start = 0x48094000,
  2455. .pa_end = 0x480941ff,
  2456. .flags = ADDR_TYPE_RT,
  2457. },
  2458. { }
  2459. };
  2460. /* l4_core -> mailbox */
  2461. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2462. .master = &omap3xxx_l4_core_hwmod,
  2463. .slave = &omap3xxx_mailbox_hwmod,
  2464. .addr = omap3xxx_mailbox_addrs,
  2465. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2466. };
  2467. /* mailbox slave ports */
  2468. static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
  2469. &omap3xxx_l4_core__mailbox,
  2470. };
  2471. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  2472. .name = "mailbox",
  2473. .class = &omap3xxx_mailbox_hwmod_class,
  2474. .mpu_irqs = omap3xxx_mailbox_irqs,
  2475. .main_clk = "mailboxes_ick",
  2476. .prcm = {
  2477. .omap2 = {
  2478. .prcm_reg_id = 1,
  2479. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  2480. .module_offs = CORE_MOD,
  2481. .idlest_reg_id = 1,
  2482. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  2483. },
  2484. },
  2485. .slaves = omap3xxx_mailbox_slaves,
  2486. .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
  2487. };
  2488. /* l4 core -> mcspi1 interface */
  2489. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2490. .master = &omap3xxx_l4_core_hwmod,
  2491. .slave = &omap34xx_mcspi1,
  2492. .clk = "mcspi1_ick",
  2493. .addr = omap2_mcspi1_addr_space,
  2494. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2495. };
  2496. /* l4 core -> mcspi2 interface */
  2497. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2498. .master = &omap3xxx_l4_core_hwmod,
  2499. .slave = &omap34xx_mcspi2,
  2500. .clk = "mcspi2_ick",
  2501. .addr = omap2_mcspi2_addr_space,
  2502. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2503. };
  2504. /* l4 core -> mcspi3 interface */
  2505. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2506. .master = &omap3xxx_l4_core_hwmod,
  2507. .slave = &omap34xx_mcspi3,
  2508. .clk = "mcspi3_ick",
  2509. .addr = omap2430_mcspi3_addr_space,
  2510. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2511. };
  2512. /* l4 core -> mcspi4 interface */
  2513. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2514. {
  2515. .pa_start = 0x480ba000,
  2516. .pa_end = 0x480ba0ff,
  2517. .flags = ADDR_TYPE_RT,
  2518. },
  2519. { }
  2520. };
  2521. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2522. .master = &omap3xxx_l4_core_hwmod,
  2523. .slave = &omap34xx_mcspi4,
  2524. .clk = "mcspi4_ick",
  2525. .addr = omap34xx_mcspi4_addr_space,
  2526. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2527. };
  2528. /*
  2529. * 'mcspi' class
  2530. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  2531. * bus
  2532. */
  2533. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  2534. .rev_offs = 0x0000,
  2535. .sysc_offs = 0x0010,
  2536. .syss_offs = 0x0014,
  2537. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2538. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2539. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2540. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2541. .sysc_fields = &omap_hwmod_sysc_type1,
  2542. };
  2543. static struct omap_hwmod_class omap34xx_mcspi_class = {
  2544. .name = "mcspi",
  2545. .sysc = &omap34xx_mcspi_sysc,
  2546. .rev = OMAP3_MCSPI_REV,
  2547. };
  2548. /* mcspi1 */
  2549. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  2550. &omap34xx_l4_core__mcspi1,
  2551. };
  2552. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  2553. .num_chipselect = 4,
  2554. };
  2555. static struct omap_hwmod omap34xx_mcspi1 = {
  2556. .name = "mcspi1",
  2557. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  2558. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  2559. .main_clk = "mcspi1_fck",
  2560. .prcm = {
  2561. .omap2 = {
  2562. .module_offs = CORE_MOD,
  2563. .prcm_reg_id = 1,
  2564. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  2565. .idlest_reg_id = 1,
  2566. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  2567. },
  2568. },
  2569. .slaves = omap34xx_mcspi1_slaves,
  2570. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  2571. .class = &omap34xx_mcspi_class,
  2572. .dev_attr = &omap_mcspi1_dev_attr,
  2573. };
  2574. /* mcspi2 */
  2575. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  2576. &omap34xx_l4_core__mcspi2,
  2577. };
  2578. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  2579. .num_chipselect = 2,
  2580. };
  2581. static struct omap_hwmod omap34xx_mcspi2 = {
  2582. .name = "mcspi2",
  2583. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  2584. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  2585. .main_clk = "mcspi2_fck",
  2586. .prcm = {
  2587. .omap2 = {
  2588. .module_offs = CORE_MOD,
  2589. .prcm_reg_id = 1,
  2590. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  2591. .idlest_reg_id = 1,
  2592. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  2593. },
  2594. },
  2595. .slaves = omap34xx_mcspi2_slaves,
  2596. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  2597. .class = &omap34xx_mcspi_class,
  2598. .dev_attr = &omap_mcspi2_dev_attr,
  2599. };
  2600. /* mcspi3 */
  2601. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  2602. { .name = "irq", .irq = 91 }, /* 91 */
  2603. { .irq = -1 }
  2604. };
  2605. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  2606. { .name = "tx0", .dma_req = 15 },
  2607. { .name = "rx0", .dma_req = 16 },
  2608. { .name = "tx1", .dma_req = 23 },
  2609. { .name = "rx1", .dma_req = 24 },
  2610. { .dma_req = -1 }
  2611. };
  2612. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  2613. &omap34xx_l4_core__mcspi3,
  2614. };
  2615. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  2616. .num_chipselect = 2,
  2617. };
  2618. static struct omap_hwmod omap34xx_mcspi3 = {
  2619. .name = "mcspi3",
  2620. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  2621. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  2622. .main_clk = "mcspi3_fck",
  2623. .prcm = {
  2624. .omap2 = {
  2625. .module_offs = CORE_MOD,
  2626. .prcm_reg_id = 1,
  2627. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  2628. .idlest_reg_id = 1,
  2629. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  2630. },
  2631. },
  2632. .slaves = omap34xx_mcspi3_slaves,
  2633. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  2634. .class = &omap34xx_mcspi_class,
  2635. .dev_attr = &omap_mcspi3_dev_attr,
  2636. };
  2637. /* SPI4 */
  2638. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  2639. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  2640. { .irq = -1 }
  2641. };
  2642. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  2643. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  2644. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  2645. { .dma_req = -1 }
  2646. };
  2647. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  2648. &omap34xx_l4_core__mcspi4,
  2649. };
  2650. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  2651. .num_chipselect = 1,
  2652. };
  2653. static struct omap_hwmod omap34xx_mcspi4 = {
  2654. .name = "mcspi4",
  2655. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  2656. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  2657. .main_clk = "mcspi4_fck",
  2658. .prcm = {
  2659. .omap2 = {
  2660. .module_offs = CORE_MOD,
  2661. .prcm_reg_id = 1,
  2662. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  2663. .idlest_reg_id = 1,
  2664. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  2665. },
  2666. },
  2667. .slaves = omap34xx_mcspi4_slaves,
  2668. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  2669. .class = &omap34xx_mcspi_class,
  2670. .dev_attr = &omap_mcspi4_dev_attr,
  2671. };
  2672. /*
  2673. * usbhsotg
  2674. */
  2675. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  2676. .rev_offs = 0x0400,
  2677. .sysc_offs = 0x0404,
  2678. .syss_offs = 0x0408,
  2679. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  2680. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2681. SYSC_HAS_AUTOIDLE),
  2682. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2683. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2684. .sysc_fields = &omap_hwmod_sysc_type1,
  2685. };
  2686. static struct omap_hwmod_class usbotg_class = {
  2687. .name = "usbotg",
  2688. .sysc = &omap3xxx_usbhsotg_sysc,
  2689. };
  2690. /* usb_otg_hs */
  2691. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  2692. { .name = "mc", .irq = 92 },
  2693. { .name = "dma", .irq = 93 },
  2694. { .irq = -1 }
  2695. };
  2696. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  2697. .name = "usb_otg_hs",
  2698. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  2699. .main_clk = "hsotgusb_ick",
  2700. .prcm = {
  2701. .omap2 = {
  2702. .prcm_reg_id = 1,
  2703. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  2704. .module_offs = CORE_MOD,
  2705. .idlest_reg_id = 1,
  2706. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  2707. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  2708. },
  2709. },
  2710. .masters = omap3xxx_usbhsotg_masters,
  2711. .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
  2712. .slaves = omap3xxx_usbhsotg_slaves,
  2713. .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
  2714. .class = &usbotg_class,
  2715. /*
  2716. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  2717. * broken when autoidle is enabled
  2718. * workaround is to disable the autoidle bit at module level.
  2719. */
  2720. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  2721. | HWMOD_SWSUP_MSTANDBY,
  2722. };
  2723. /* usb_otg_hs */
  2724. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  2725. { .name = "mc", .irq = 71 },
  2726. { .irq = -1 }
  2727. };
  2728. static struct omap_hwmod_class am35xx_usbotg_class = {
  2729. .name = "am35xx_usbotg",
  2730. .sysc = NULL,
  2731. };
  2732. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  2733. .name = "am35x_otg_hs",
  2734. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  2735. .main_clk = NULL,
  2736. .prcm = {
  2737. .omap2 = {
  2738. },
  2739. },
  2740. .masters = am35xx_usbhsotg_masters,
  2741. .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
  2742. .slaves = am35xx_usbhsotg_slaves,
  2743. .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
  2744. .class = &am35xx_usbotg_class,
  2745. };
  2746. /* MMC/SD/SDIO common */
  2747. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  2748. .rev_offs = 0x1fc,
  2749. .sysc_offs = 0x10,
  2750. .syss_offs = 0x14,
  2751. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2752. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2753. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2754. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2755. .sysc_fields = &omap_hwmod_sysc_type1,
  2756. };
  2757. static struct omap_hwmod_class omap34xx_mmc_class = {
  2758. .name = "mmc",
  2759. .sysc = &omap34xx_mmc_sysc,
  2760. };
  2761. /* MMC/SD/SDIO1 */
  2762. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  2763. { .irq = 83, },
  2764. { .irq = -1 }
  2765. };
  2766. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  2767. { .name = "tx", .dma_req = 61, },
  2768. { .name = "rx", .dma_req = 62, },
  2769. { .dma_req = -1 }
  2770. };
  2771. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  2772. { .role = "dbck", .clk = "omap_32k_fck", },
  2773. };
  2774. static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
  2775. &omap3xxx_l4_core__mmc1,
  2776. };
  2777. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  2778. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  2779. };
  2780. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  2781. static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
  2782. .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
  2783. OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
  2784. };
  2785. static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
  2786. .name = "mmc1",
  2787. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  2788. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  2789. .opt_clks = omap34xx_mmc1_opt_clks,
  2790. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  2791. .main_clk = "mmchs1_fck",
  2792. .prcm = {
  2793. .omap2 = {
  2794. .module_offs = CORE_MOD,
  2795. .prcm_reg_id = 1,
  2796. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  2797. .idlest_reg_id = 1,
  2798. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  2799. },
  2800. },
  2801. .dev_attr = &mmc1_pre_es3_dev_attr,
  2802. .slaves = omap3xxx_mmc1_slaves,
  2803. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
  2804. .class = &omap34xx_mmc_class,
  2805. };
  2806. static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
  2807. .name = "mmc1",
  2808. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  2809. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  2810. .opt_clks = omap34xx_mmc1_opt_clks,
  2811. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  2812. .main_clk = "mmchs1_fck",
  2813. .prcm = {
  2814. .omap2 = {
  2815. .module_offs = CORE_MOD,
  2816. .prcm_reg_id = 1,
  2817. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  2818. .idlest_reg_id = 1,
  2819. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  2820. },
  2821. },
  2822. .dev_attr = &mmc1_dev_attr,
  2823. .slaves = omap3xxx_mmc1_slaves,
  2824. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
  2825. .class = &omap34xx_mmc_class,
  2826. };
  2827. /* MMC/SD/SDIO2 */
  2828. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  2829. { .irq = INT_24XX_MMC2_IRQ, },
  2830. { .irq = -1 }
  2831. };
  2832. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  2833. { .name = "tx", .dma_req = 47, },
  2834. { .name = "rx", .dma_req = 48, },
  2835. { .dma_req = -1 }
  2836. };
  2837. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  2838. { .role = "dbck", .clk = "omap_32k_fck", },
  2839. };
  2840. static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
  2841. &omap3xxx_l4_core__mmc2,
  2842. };
  2843. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  2844. static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
  2845. .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
  2846. };
  2847. static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
  2848. .name = "mmc2",
  2849. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  2850. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  2851. .opt_clks = omap34xx_mmc2_opt_clks,
  2852. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  2853. .main_clk = "mmchs2_fck",
  2854. .prcm = {
  2855. .omap2 = {
  2856. .module_offs = CORE_MOD,
  2857. .prcm_reg_id = 1,
  2858. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  2859. .idlest_reg_id = 1,
  2860. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  2861. },
  2862. },
  2863. .dev_attr = &mmc2_pre_es3_dev_attr,
  2864. .slaves = omap3xxx_mmc2_slaves,
  2865. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
  2866. .class = &omap34xx_mmc_class,
  2867. };
  2868. static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
  2869. .name = "mmc2",
  2870. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  2871. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  2872. .opt_clks = omap34xx_mmc2_opt_clks,
  2873. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  2874. .main_clk = "mmchs2_fck",
  2875. .prcm = {
  2876. .omap2 = {
  2877. .module_offs = CORE_MOD,
  2878. .prcm_reg_id = 1,
  2879. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  2880. .idlest_reg_id = 1,
  2881. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  2882. },
  2883. },
  2884. .slaves = omap3xxx_mmc2_slaves,
  2885. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
  2886. .class = &omap34xx_mmc_class,
  2887. };
  2888. /* MMC/SD/SDIO3 */
  2889. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  2890. { .irq = 94, },
  2891. { .irq = -1 }
  2892. };
  2893. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  2894. { .name = "tx", .dma_req = 77, },
  2895. { .name = "rx", .dma_req = 78, },
  2896. { .dma_req = -1 }
  2897. };
  2898. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  2899. { .role = "dbck", .clk = "omap_32k_fck", },
  2900. };
  2901. static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
  2902. &omap3xxx_l4_core__mmc3,
  2903. };
  2904. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  2905. .name = "mmc3",
  2906. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  2907. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  2908. .opt_clks = omap34xx_mmc3_opt_clks,
  2909. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  2910. .main_clk = "mmchs3_fck",
  2911. .prcm = {
  2912. .omap2 = {
  2913. .prcm_reg_id = 1,
  2914. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  2915. .idlest_reg_id = 1,
  2916. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  2917. },
  2918. },
  2919. .slaves = omap3xxx_mmc3_slaves,
  2920. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
  2921. .class = &omap34xx_mmc_class,
  2922. };
  2923. /*
  2924. * 'usb_host_hs' class
  2925. * high-speed multi-port usb host controller
  2926. */
  2927. static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
  2928. .master = &omap3xxx_usb_host_hs_hwmod,
  2929. .slave = &omap3xxx_l3_main_hwmod,
  2930. .clk = "core_l3_ick",
  2931. .user = OCP_USER_MPU,
  2932. };
  2933. static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
  2934. .rev_offs = 0x0000,
  2935. .sysc_offs = 0x0010,
  2936. .syss_offs = 0x0014,
  2937. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  2938. SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  2939. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2940. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2941. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2942. .sysc_fields = &omap_hwmod_sysc_type1,
  2943. };
  2944. static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
  2945. .name = "usb_host_hs",
  2946. .sysc = &omap3xxx_usb_host_hs_sysc,
  2947. };
  2948. static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_masters[] = {
  2949. &omap3xxx_usb_host_hs__l3_main_2,
  2950. };
  2951. static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
  2952. {
  2953. .name = "uhh",
  2954. .pa_start = 0x48064000,
  2955. .pa_end = 0x480643ff,
  2956. .flags = ADDR_TYPE_RT
  2957. },
  2958. {
  2959. .name = "ohci",
  2960. .pa_start = 0x48064400,
  2961. .pa_end = 0x480647ff,
  2962. },
  2963. {
  2964. .name = "ehci",
  2965. .pa_start = 0x48064800,
  2966. .pa_end = 0x48064cff,
  2967. },
  2968. {}
  2969. };
  2970. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
  2971. .master = &omap3xxx_l4_core_hwmod,
  2972. .slave = &omap3xxx_usb_host_hs_hwmod,
  2973. .clk = "usbhost_ick",
  2974. .addr = omap3xxx_usb_host_hs_addrs,
  2975. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2976. };
  2977. static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_slaves[] = {
  2978. &omap3xxx_l4_core__usb_host_hs,
  2979. };
  2980. static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
  2981. { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
  2982. };
  2983. static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
  2984. { .name = "ohci-irq", .irq = 76 },
  2985. { .name = "ehci-irq", .irq = 77 },
  2986. { .irq = -1 }
  2987. };
  2988. static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
  2989. .name = "usb_host_hs",
  2990. .class = &omap3xxx_usb_host_hs_hwmod_class,
  2991. .clkdm_name = "l3_init_clkdm",
  2992. .mpu_irqs = omap3xxx_usb_host_hs_irqs,
  2993. .main_clk = "usbhost_48m_fck",
  2994. .prcm = {
  2995. .omap2 = {
  2996. .module_offs = OMAP3430ES2_USBHOST_MOD,
  2997. .prcm_reg_id = 1,
  2998. .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
  2999. .idlest_reg_id = 1,
  3000. .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
  3001. .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
  3002. },
  3003. },
  3004. .opt_clks = omap3xxx_usb_host_hs_opt_clks,
  3005. .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
  3006. .slaves = omap3xxx_usb_host_hs_slaves,
  3007. .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_slaves),
  3008. .masters = omap3xxx_usb_host_hs_masters,
  3009. .masters_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_masters),
  3010. /*
  3011. * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
  3012. * id: i660
  3013. *
  3014. * Description:
  3015. * In the following configuration :
  3016. * - USBHOST module is set to smart-idle mode
  3017. * - PRCM asserts idle_req to the USBHOST module ( This typically
  3018. * happens when the system is going to a low power mode : all ports
  3019. * have been suspended, the master part of the USBHOST module has
  3020. * entered the standby state, and SW has cut the functional clocks)
  3021. * - an USBHOST interrupt occurs before the module is able to answer
  3022. * idle_ack, typically a remote wakeup IRQ.
  3023. * Then the USB HOST module will enter a deadlock situation where it
  3024. * is no more accessible nor functional.
  3025. *
  3026. * Workaround:
  3027. * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
  3028. */
  3029. /*
  3030. * Errata: USB host EHCI may stall when entering smart-standby mode
  3031. * Id: i571
  3032. *
  3033. * Description:
  3034. * When the USBHOST module is set to smart-standby mode, and when it is
  3035. * ready to enter the standby state (i.e. all ports are suspended and
  3036. * all attached devices are in suspend mode), then it can wrongly assert
  3037. * the Mstandby signal too early while there are still some residual OCP
  3038. * transactions ongoing. If this condition occurs, the internal state
  3039. * machine may go to an undefined state and the USB link may be stuck
  3040. * upon the next resume.
  3041. *
  3042. * Workaround:
  3043. * Don't use smart standby; use only force standby,
  3044. * hence HWMOD_SWSUP_MSTANDBY
  3045. */
  3046. /*
  3047. * During system boot; If the hwmod framework resets the module
  3048. * the module will have smart idle settings; which can lead to deadlock
  3049. * (above Errata Id:i660); so, dont reset the module during boot;
  3050. * Use HWMOD_INIT_NO_RESET.
  3051. */
  3052. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  3053. HWMOD_INIT_NO_RESET,
  3054. };
  3055. /*
  3056. * 'usb_tll_hs' class
  3057. * usb_tll_hs module is the adapter on the usb_host_hs ports
  3058. */
  3059. static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
  3060. .rev_offs = 0x0000,
  3061. .sysc_offs = 0x0010,
  3062. .syss_offs = 0x0014,
  3063. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  3064. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  3065. SYSC_HAS_AUTOIDLE),
  3066. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  3067. .sysc_fields = &omap_hwmod_sysc_type1,
  3068. };
  3069. static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
  3070. .name = "usb_tll_hs",
  3071. .sysc = &omap3xxx_usb_tll_hs_sysc,
  3072. };
  3073. static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
  3074. { .name = "tll-irq", .irq = 78 },
  3075. { .irq = -1 }
  3076. };
  3077. static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
  3078. {
  3079. .name = "tll",
  3080. .pa_start = 0x48062000,
  3081. .pa_end = 0x48062fff,
  3082. .flags = ADDR_TYPE_RT
  3083. },
  3084. {}
  3085. };
  3086. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
  3087. .master = &omap3xxx_l4_core_hwmod,
  3088. .slave = &omap3xxx_usb_tll_hs_hwmod,
  3089. .clk = "usbtll_ick",
  3090. .addr = omap3xxx_usb_tll_hs_addrs,
  3091. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3092. };
  3093. static struct omap_hwmod_ocp_if *omap3xxx_usb_tll_hs_slaves[] = {
  3094. &omap3xxx_l4_core__usb_tll_hs,
  3095. };
  3096. static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
  3097. .name = "usb_tll_hs",
  3098. .class = &omap3xxx_usb_tll_hs_hwmod_class,
  3099. .clkdm_name = "l3_init_clkdm",
  3100. .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
  3101. .main_clk = "usbtll_fck",
  3102. .prcm = {
  3103. .omap2 = {
  3104. .module_offs = CORE_MOD,
  3105. .prcm_reg_id = 3,
  3106. .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
  3107. .idlest_reg_id = 3,
  3108. .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
  3109. },
  3110. },
  3111. .slaves = omap3xxx_usb_tll_hs_slaves,
  3112. .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_tll_hs_slaves),
  3113. };
  3114. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  3115. &omap3xxx_l3_main_hwmod,
  3116. &omap3xxx_l4_core_hwmod,
  3117. &omap3xxx_l4_per_hwmod,
  3118. &omap3xxx_l4_wkup_hwmod,
  3119. &omap3xxx_mmc3_hwmod,
  3120. &omap3xxx_mpu_hwmod,
  3121. &omap3xxx_timer1_hwmod,
  3122. &omap3xxx_timer2_hwmod,
  3123. &omap3xxx_timer3_hwmod,
  3124. &omap3xxx_timer4_hwmod,
  3125. &omap3xxx_timer5_hwmod,
  3126. &omap3xxx_timer6_hwmod,
  3127. &omap3xxx_timer7_hwmod,
  3128. &omap3xxx_timer8_hwmod,
  3129. &omap3xxx_timer9_hwmod,
  3130. &omap3xxx_timer10_hwmod,
  3131. &omap3xxx_timer11_hwmod,
  3132. &omap3xxx_wd_timer2_hwmod,
  3133. &omap3xxx_uart1_hwmod,
  3134. &omap3xxx_uart2_hwmod,
  3135. &omap3xxx_uart3_hwmod,
  3136. /* dss class */
  3137. &omap3xxx_dss_dispc_hwmod,
  3138. &omap3xxx_dss_dsi1_hwmod,
  3139. &omap3xxx_dss_rfbi_hwmod,
  3140. &omap3xxx_dss_venc_hwmod,
  3141. /* i2c class */
  3142. &omap3xxx_i2c1_hwmod,
  3143. &omap3xxx_i2c2_hwmod,
  3144. &omap3xxx_i2c3_hwmod,
  3145. /* gpio class */
  3146. &omap3xxx_gpio1_hwmod,
  3147. &omap3xxx_gpio2_hwmod,
  3148. &omap3xxx_gpio3_hwmod,
  3149. &omap3xxx_gpio4_hwmod,
  3150. &omap3xxx_gpio5_hwmod,
  3151. &omap3xxx_gpio6_hwmod,
  3152. /* dma_system class*/
  3153. &omap3xxx_dma_system_hwmod,
  3154. /* mcbsp class */
  3155. &omap3xxx_mcbsp1_hwmod,
  3156. &omap3xxx_mcbsp2_hwmod,
  3157. &omap3xxx_mcbsp3_hwmod,
  3158. &omap3xxx_mcbsp4_hwmod,
  3159. &omap3xxx_mcbsp5_hwmod,
  3160. &omap3xxx_mcbsp2_sidetone_hwmod,
  3161. &omap3xxx_mcbsp3_sidetone_hwmod,
  3162. /* mcspi class */
  3163. &omap34xx_mcspi1,
  3164. &omap34xx_mcspi2,
  3165. &omap34xx_mcspi3,
  3166. &omap34xx_mcspi4,
  3167. NULL,
  3168. };
  3169. /* GP-only hwmods */
  3170. static __initdata struct omap_hwmod *omap3xxx_gp_hwmods[] = {
  3171. &omap3xxx_timer12_hwmod,
  3172. NULL
  3173. };
  3174. /* 3430ES1-only hwmods */
  3175. static __initdata struct omap_hwmod *omap3430es1_hwmods[] = {
  3176. &omap3430es1_dss_core_hwmod,
  3177. NULL
  3178. };
  3179. /* 3430ES2+-only hwmods */
  3180. static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = {
  3181. &omap3xxx_dss_core_hwmod,
  3182. &omap3xxx_usbhsotg_hwmod,
  3183. &omap3xxx_usb_host_hs_hwmod,
  3184. &omap3xxx_usb_tll_hs_hwmod,
  3185. NULL
  3186. };
  3187. /* <= 3430ES3-only hwmods */
  3188. static struct omap_hwmod *omap3430_pre_es3_hwmods[] __initdata = {
  3189. &omap3xxx_pre_es3_mmc1_hwmod,
  3190. &omap3xxx_pre_es3_mmc2_hwmod,
  3191. NULL
  3192. };
  3193. /* 3430ES3+-only hwmods */
  3194. static struct omap_hwmod *omap3430_es3plus_hwmods[] __initdata = {
  3195. &omap3xxx_es3plus_mmc1_hwmod,
  3196. &omap3xxx_es3plus_mmc2_hwmod,
  3197. NULL
  3198. };
  3199. /* 34xx-only hwmods (all ES revisions) */
  3200. static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
  3201. &omap3xxx_iva_hwmod,
  3202. &omap34xx_sr1_hwmod,
  3203. &omap34xx_sr2_hwmod,
  3204. &omap3xxx_mailbox_hwmod,
  3205. NULL
  3206. };
  3207. /* 36xx-only hwmods (all ES revisions) */
  3208. static __initdata struct omap_hwmod *omap36xx_hwmods[] = {
  3209. &omap3xxx_iva_hwmod,
  3210. &omap3xxx_uart4_hwmod,
  3211. &omap3xxx_dss_core_hwmod,
  3212. &omap36xx_sr1_hwmod,
  3213. &omap36xx_sr2_hwmod,
  3214. &omap3xxx_usbhsotg_hwmod,
  3215. &omap3xxx_mailbox_hwmod,
  3216. &omap3xxx_usb_host_hs_hwmod,
  3217. &omap3xxx_usb_tll_hs_hwmod,
  3218. &omap3xxx_es3plus_mmc1_hwmod,
  3219. &omap3xxx_es3plus_mmc2_hwmod,
  3220. NULL
  3221. };
  3222. static __initdata struct omap_hwmod *am35xx_hwmods[] = {
  3223. &omap3xxx_dss_core_hwmod, /* XXX ??? */
  3224. &am35xx_usbhsotg_hwmod,
  3225. &am35xx_uart4_hwmod,
  3226. &omap3xxx_usb_host_hs_hwmod,
  3227. &omap3xxx_usb_tll_hs_hwmod,
  3228. &omap3xxx_es3plus_mmc1_hwmod,
  3229. &omap3xxx_es3plus_mmc2_hwmod,
  3230. NULL
  3231. };
  3232. int __init omap3xxx_hwmod_init(void)
  3233. {
  3234. int r;
  3235. struct omap_hwmod **h = NULL;
  3236. unsigned int rev;
  3237. /* Register hwmods common to all OMAP3 */
  3238. r = omap_hwmod_register(omap3xxx_hwmods);
  3239. if (r < 0)
  3240. return r;
  3241. /* Register GP-only hwmods. */
  3242. if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
  3243. r = omap_hwmod_register(omap3xxx_gp_hwmods);
  3244. if (r < 0)
  3245. return r;
  3246. }
  3247. rev = omap_rev();
  3248. /*
  3249. * Register hwmods common to individual OMAP3 families, all
  3250. * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
  3251. * All possible revisions should be included in this conditional.
  3252. */
  3253. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3254. rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
  3255. rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
  3256. h = omap34xx_hwmods;
  3257. } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) {
  3258. h = am35xx_hwmods;
  3259. } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
  3260. rev == OMAP3630_REV_ES1_2) {
  3261. h = omap36xx_hwmods;
  3262. } else {
  3263. WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
  3264. return -EINVAL;
  3265. };
  3266. r = omap_hwmod_register(h);
  3267. if (r < 0)
  3268. return r;
  3269. /*
  3270. * Register hwmods specific to certain ES levels of a
  3271. * particular family of silicon (e.g., 34xx ES1.0)
  3272. */
  3273. h = NULL;
  3274. if (rev == OMAP3430_REV_ES1_0) {
  3275. h = omap3430es1_hwmods;
  3276. } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
  3277. rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3278. rev == OMAP3430_REV_ES3_1_2) {
  3279. h = omap3430es2plus_hwmods;
  3280. };
  3281. if (h) {
  3282. r = omap_hwmod_register(h);
  3283. if (r < 0)
  3284. return r;
  3285. }
  3286. h = NULL;
  3287. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3288. rev == OMAP3430_REV_ES2_1) {
  3289. h = omap3430_pre_es3_hwmods;
  3290. } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3291. rev == OMAP3430_REV_ES3_1_2) {
  3292. h = omap3430_es3plus_hwmods;
  3293. };
  3294. if (h)
  3295. r = omap_hwmod_register(h);
  3296. return r;
  3297. }