omap_hwmod_3xxx_data.c 95 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734
  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. /*
  1320. * 'dispc' class
  1321. * display controller
  1322. */
  1323. static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
  1324. .rev_offs = 0x0000,
  1325. .sysc_offs = 0x0010,
  1326. .syss_offs = 0x0014,
  1327. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  1328. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1329. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1330. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1331. .sysc_fields = &omap_hwmod_sysc_type1,
  1332. };
  1333. static struct omap_hwmod_class omap3_dispc_hwmod_class = {
  1334. .name = "dispc",
  1335. .sysc = &omap3_dispc_sysc,
  1336. };
  1337. /* l4_core -> dss_dispc */
  1338. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  1339. .master = &omap3xxx_l4_core_hwmod,
  1340. .slave = &omap3xxx_dss_dispc_hwmod,
  1341. .clk = "dss_ick",
  1342. .addr = omap2_dss_dispc_addrs,
  1343. .fw = {
  1344. .omap2 = {
  1345. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  1346. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1347. .flags = OMAP_FIREWALL_L4,
  1348. }
  1349. },
  1350. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1351. };
  1352. /* dss_dispc slave ports */
  1353. static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
  1354. &omap3xxx_l4_core__dss_dispc,
  1355. };
  1356. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  1357. .name = "dss_dispc",
  1358. .class = &omap3_dispc_hwmod_class,
  1359. .mpu_irqs = omap2_dispc_irqs,
  1360. .main_clk = "dss1_alwon_fck",
  1361. .prcm = {
  1362. .omap2 = {
  1363. .prcm_reg_id = 1,
  1364. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1365. .module_offs = OMAP3430_DSS_MOD,
  1366. },
  1367. },
  1368. .slaves = omap3xxx_dss_dispc_slaves,
  1369. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
  1370. .flags = HWMOD_NO_IDLEST,
  1371. .dev_attr = &omap2_3_dss_dispc_dev_attr
  1372. };
  1373. /*
  1374. * 'dsi' class
  1375. * display serial interface controller
  1376. */
  1377. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  1378. .name = "dsi",
  1379. };
  1380. static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
  1381. { .irq = 25 },
  1382. { .irq = -1 }
  1383. };
  1384. /* dss_dsi1 */
  1385. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  1386. {
  1387. .pa_start = 0x4804FC00,
  1388. .pa_end = 0x4804FFFF,
  1389. .flags = ADDR_TYPE_RT
  1390. },
  1391. { }
  1392. };
  1393. /* l4_core -> dss_dsi1 */
  1394. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  1395. .master = &omap3xxx_l4_core_hwmod,
  1396. .slave = &omap3xxx_dss_dsi1_hwmod,
  1397. .clk = "dss_ick",
  1398. .addr = omap3xxx_dss_dsi1_addrs,
  1399. .fw = {
  1400. .omap2 = {
  1401. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  1402. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1403. .flags = OMAP_FIREWALL_L4,
  1404. }
  1405. },
  1406. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1407. };
  1408. /* dss_dsi1 slave ports */
  1409. static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
  1410. &omap3xxx_l4_core__dss_dsi1,
  1411. };
  1412. static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
  1413. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  1414. };
  1415. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  1416. .name = "dss_dsi1",
  1417. .class = &omap3xxx_dsi_hwmod_class,
  1418. .mpu_irqs = omap3xxx_dsi1_irqs,
  1419. .main_clk = "dss1_alwon_fck",
  1420. .prcm = {
  1421. .omap2 = {
  1422. .prcm_reg_id = 1,
  1423. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1424. .module_offs = OMAP3430_DSS_MOD,
  1425. },
  1426. },
  1427. .opt_clks = dss_dsi1_opt_clks,
  1428. .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
  1429. .slaves = omap3xxx_dss_dsi1_slaves,
  1430. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
  1431. .flags = HWMOD_NO_IDLEST,
  1432. };
  1433. /* l4_core -> dss_rfbi */
  1434. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  1435. .master = &omap3xxx_l4_core_hwmod,
  1436. .slave = &omap3xxx_dss_rfbi_hwmod,
  1437. .clk = "dss_ick",
  1438. .addr = omap2_dss_rfbi_addrs,
  1439. .fw = {
  1440. .omap2 = {
  1441. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  1442. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  1443. .flags = OMAP_FIREWALL_L4,
  1444. }
  1445. },
  1446. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1447. };
  1448. /* dss_rfbi slave ports */
  1449. static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
  1450. &omap3xxx_l4_core__dss_rfbi,
  1451. };
  1452. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  1453. { .role = "ick", .clk = "dss_ick" },
  1454. };
  1455. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  1456. .name = "dss_rfbi",
  1457. .class = &omap2_rfbi_hwmod_class,
  1458. .main_clk = "dss1_alwon_fck",
  1459. .prcm = {
  1460. .omap2 = {
  1461. .prcm_reg_id = 1,
  1462. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1463. .module_offs = OMAP3430_DSS_MOD,
  1464. },
  1465. },
  1466. .opt_clks = dss_rfbi_opt_clks,
  1467. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  1468. .slaves = omap3xxx_dss_rfbi_slaves,
  1469. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
  1470. .flags = HWMOD_NO_IDLEST,
  1471. };
  1472. /* l4_core -> dss_venc */
  1473. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  1474. .master = &omap3xxx_l4_core_hwmod,
  1475. .slave = &omap3xxx_dss_venc_hwmod,
  1476. .clk = "dss_ick",
  1477. .addr = omap2_dss_venc_addrs,
  1478. .fw = {
  1479. .omap2 = {
  1480. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  1481. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1482. .flags = OMAP_FIREWALL_L4,
  1483. }
  1484. },
  1485. .flags = OCPIF_SWSUP_IDLE,
  1486. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1487. };
  1488. /* dss_venc slave ports */
  1489. static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
  1490. &omap3xxx_l4_core__dss_venc,
  1491. };
  1492. static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
  1493. /* required only on OMAP3430 */
  1494. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  1495. };
  1496. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  1497. .name = "dss_venc",
  1498. .class = &omap2_venc_hwmod_class,
  1499. .main_clk = "dss_tv_fck",
  1500. .prcm = {
  1501. .omap2 = {
  1502. .prcm_reg_id = 1,
  1503. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1504. .module_offs = OMAP3430_DSS_MOD,
  1505. },
  1506. },
  1507. .opt_clks = dss_venc_opt_clks,
  1508. .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
  1509. .slaves = omap3xxx_dss_venc_slaves,
  1510. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
  1511. .flags = HWMOD_NO_IDLEST,
  1512. };
  1513. /* I2C1 */
  1514. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  1515. .fifo_depth = 8, /* bytes */
  1516. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  1517. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  1518. OMAP_I2C_FLAG_BUS_SHIFT_2,
  1519. };
  1520. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  1521. &omap3_l4_core__i2c1,
  1522. };
  1523. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  1524. .name = "i2c1",
  1525. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1526. .mpu_irqs = omap2_i2c1_mpu_irqs,
  1527. .sdma_reqs = omap2_i2c1_sdma_reqs,
  1528. .main_clk = "i2c1_fck",
  1529. .prcm = {
  1530. .omap2 = {
  1531. .module_offs = CORE_MOD,
  1532. .prcm_reg_id = 1,
  1533. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  1534. .idlest_reg_id = 1,
  1535. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  1536. },
  1537. },
  1538. .slaves = omap3xxx_i2c1_slaves,
  1539. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  1540. .class = &i2c_class,
  1541. .dev_attr = &i2c1_dev_attr,
  1542. };
  1543. /* I2C2 */
  1544. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  1545. .fifo_depth = 8, /* bytes */
  1546. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  1547. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  1548. OMAP_I2C_FLAG_BUS_SHIFT_2,
  1549. };
  1550. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  1551. &omap3_l4_core__i2c2,
  1552. };
  1553. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  1554. .name = "i2c2",
  1555. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1556. .mpu_irqs = omap2_i2c2_mpu_irqs,
  1557. .sdma_reqs = omap2_i2c2_sdma_reqs,
  1558. .main_clk = "i2c2_fck",
  1559. .prcm = {
  1560. .omap2 = {
  1561. .module_offs = CORE_MOD,
  1562. .prcm_reg_id = 1,
  1563. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  1564. .idlest_reg_id = 1,
  1565. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  1566. },
  1567. },
  1568. .slaves = omap3xxx_i2c2_slaves,
  1569. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  1570. .class = &i2c_class,
  1571. .dev_attr = &i2c2_dev_attr,
  1572. };
  1573. /* I2C3 */
  1574. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  1575. .fifo_depth = 64, /* bytes */
  1576. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  1577. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  1578. OMAP_I2C_FLAG_BUS_SHIFT_2,
  1579. };
  1580. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1581. { .irq = INT_34XX_I2C3_IRQ, },
  1582. { .irq = -1 }
  1583. };
  1584. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  1585. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  1586. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  1587. { .dma_req = -1 }
  1588. };
  1589. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  1590. &omap3_l4_core__i2c3,
  1591. };
  1592. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  1593. .name = "i2c3",
  1594. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1595. .mpu_irqs = i2c3_mpu_irqs,
  1596. .sdma_reqs = i2c3_sdma_reqs,
  1597. .main_clk = "i2c3_fck",
  1598. .prcm = {
  1599. .omap2 = {
  1600. .module_offs = CORE_MOD,
  1601. .prcm_reg_id = 1,
  1602. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  1603. .idlest_reg_id = 1,
  1604. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  1605. },
  1606. },
  1607. .slaves = omap3xxx_i2c3_slaves,
  1608. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  1609. .class = &i2c_class,
  1610. .dev_attr = &i2c3_dev_attr,
  1611. };
  1612. /* l4_wkup -> gpio1 */
  1613. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  1614. {
  1615. .pa_start = 0x48310000,
  1616. .pa_end = 0x483101ff,
  1617. .flags = ADDR_TYPE_RT
  1618. },
  1619. { }
  1620. };
  1621. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  1622. .master = &omap3xxx_l4_wkup_hwmod,
  1623. .slave = &omap3xxx_gpio1_hwmod,
  1624. .addr = omap3xxx_gpio1_addrs,
  1625. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1626. };
  1627. /* l4_per -> gpio2 */
  1628. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  1629. {
  1630. .pa_start = 0x49050000,
  1631. .pa_end = 0x490501ff,
  1632. .flags = ADDR_TYPE_RT
  1633. },
  1634. { }
  1635. };
  1636. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  1637. .master = &omap3xxx_l4_per_hwmod,
  1638. .slave = &omap3xxx_gpio2_hwmod,
  1639. .addr = omap3xxx_gpio2_addrs,
  1640. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1641. };
  1642. /* l4_per -> gpio3 */
  1643. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  1644. {
  1645. .pa_start = 0x49052000,
  1646. .pa_end = 0x490521ff,
  1647. .flags = ADDR_TYPE_RT
  1648. },
  1649. { }
  1650. };
  1651. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  1652. .master = &omap3xxx_l4_per_hwmod,
  1653. .slave = &omap3xxx_gpio3_hwmod,
  1654. .addr = omap3xxx_gpio3_addrs,
  1655. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1656. };
  1657. /* l4_per -> gpio4 */
  1658. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  1659. {
  1660. .pa_start = 0x49054000,
  1661. .pa_end = 0x490541ff,
  1662. .flags = ADDR_TYPE_RT
  1663. },
  1664. { }
  1665. };
  1666. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  1667. .master = &omap3xxx_l4_per_hwmod,
  1668. .slave = &omap3xxx_gpio4_hwmod,
  1669. .addr = omap3xxx_gpio4_addrs,
  1670. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1671. };
  1672. /* l4_per -> gpio5 */
  1673. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  1674. {
  1675. .pa_start = 0x49056000,
  1676. .pa_end = 0x490561ff,
  1677. .flags = ADDR_TYPE_RT
  1678. },
  1679. { }
  1680. };
  1681. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  1682. .master = &omap3xxx_l4_per_hwmod,
  1683. .slave = &omap3xxx_gpio5_hwmod,
  1684. .addr = omap3xxx_gpio5_addrs,
  1685. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1686. };
  1687. /* l4_per -> gpio6 */
  1688. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  1689. {
  1690. .pa_start = 0x49058000,
  1691. .pa_end = 0x490581ff,
  1692. .flags = ADDR_TYPE_RT
  1693. },
  1694. { }
  1695. };
  1696. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  1697. .master = &omap3xxx_l4_per_hwmod,
  1698. .slave = &omap3xxx_gpio6_hwmod,
  1699. .addr = omap3xxx_gpio6_addrs,
  1700. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1701. };
  1702. /*
  1703. * 'gpio' class
  1704. * general purpose io module
  1705. */
  1706. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  1707. .rev_offs = 0x0000,
  1708. .sysc_offs = 0x0010,
  1709. .syss_offs = 0x0014,
  1710. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1711. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1712. SYSS_HAS_RESET_STATUS),
  1713. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1714. .sysc_fields = &omap_hwmod_sysc_type1,
  1715. };
  1716. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  1717. .name = "gpio",
  1718. .sysc = &omap3xxx_gpio_sysc,
  1719. .rev = 1,
  1720. };
  1721. /* gpio_dev_attr*/
  1722. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1723. .bank_width = 32,
  1724. .dbck_flag = true,
  1725. };
  1726. /* gpio1 */
  1727. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  1728. { .role = "dbclk", .clk = "gpio1_dbck", },
  1729. };
  1730. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  1731. &omap3xxx_l4_wkup__gpio1,
  1732. };
  1733. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  1734. .name = "gpio1",
  1735. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1736. .mpu_irqs = omap2_gpio1_irqs,
  1737. .main_clk = "gpio1_ick",
  1738. .opt_clks = gpio1_opt_clks,
  1739. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1740. .prcm = {
  1741. .omap2 = {
  1742. .prcm_reg_id = 1,
  1743. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  1744. .module_offs = WKUP_MOD,
  1745. .idlest_reg_id = 1,
  1746. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  1747. },
  1748. },
  1749. .slaves = omap3xxx_gpio1_slaves,
  1750. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  1751. .class = &omap3xxx_gpio_hwmod_class,
  1752. .dev_attr = &gpio_dev_attr,
  1753. };
  1754. /* gpio2 */
  1755. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1756. { .role = "dbclk", .clk = "gpio2_dbck", },
  1757. };
  1758. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  1759. &omap3xxx_l4_per__gpio2,
  1760. };
  1761. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  1762. .name = "gpio2",
  1763. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1764. .mpu_irqs = omap2_gpio2_irqs,
  1765. .main_clk = "gpio2_ick",
  1766. .opt_clks = gpio2_opt_clks,
  1767. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1768. .prcm = {
  1769. .omap2 = {
  1770. .prcm_reg_id = 1,
  1771. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  1772. .module_offs = OMAP3430_PER_MOD,
  1773. .idlest_reg_id = 1,
  1774. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  1775. },
  1776. },
  1777. .slaves = omap3xxx_gpio2_slaves,
  1778. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  1779. .class = &omap3xxx_gpio_hwmod_class,
  1780. .dev_attr = &gpio_dev_attr,
  1781. };
  1782. /* gpio3 */
  1783. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1784. { .role = "dbclk", .clk = "gpio3_dbck", },
  1785. };
  1786. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  1787. &omap3xxx_l4_per__gpio3,
  1788. };
  1789. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  1790. .name = "gpio3",
  1791. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1792. .mpu_irqs = omap2_gpio3_irqs,
  1793. .main_clk = "gpio3_ick",
  1794. .opt_clks = gpio3_opt_clks,
  1795. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1796. .prcm = {
  1797. .omap2 = {
  1798. .prcm_reg_id = 1,
  1799. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  1800. .module_offs = OMAP3430_PER_MOD,
  1801. .idlest_reg_id = 1,
  1802. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  1803. },
  1804. },
  1805. .slaves = omap3xxx_gpio3_slaves,
  1806. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  1807. .class = &omap3xxx_gpio_hwmod_class,
  1808. .dev_attr = &gpio_dev_attr,
  1809. };
  1810. /* gpio4 */
  1811. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1812. { .role = "dbclk", .clk = "gpio4_dbck", },
  1813. };
  1814. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  1815. &omap3xxx_l4_per__gpio4,
  1816. };
  1817. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  1818. .name = "gpio4",
  1819. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1820. .mpu_irqs = omap2_gpio4_irqs,
  1821. .main_clk = "gpio4_ick",
  1822. .opt_clks = gpio4_opt_clks,
  1823. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  1824. .prcm = {
  1825. .omap2 = {
  1826. .prcm_reg_id = 1,
  1827. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  1828. .module_offs = OMAP3430_PER_MOD,
  1829. .idlest_reg_id = 1,
  1830. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  1831. },
  1832. },
  1833. .slaves = omap3xxx_gpio4_slaves,
  1834. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  1835. .class = &omap3xxx_gpio_hwmod_class,
  1836. .dev_attr = &gpio_dev_attr,
  1837. };
  1838. /* gpio5 */
  1839. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  1840. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  1841. { .irq = -1 }
  1842. };
  1843. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  1844. { .role = "dbclk", .clk = "gpio5_dbck", },
  1845. };
  1846. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  1847. &omap3xxx_l4_per__gpio5,
  1848. };
  1849. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  1850. .name = "gpio5",
  1851. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1852. .mpu_irqs = omap3xxx_gpio5_irqs,
  1853. .main_clk = "gpio5_ick",
  1854. .opt_clks = gpio5_opt_clks,
  1855. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  1856. .prcm = {
  1857. .omap2 = {
  1858. .prcm_reg_id = 1,
  1859. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  1860. .module_offs = OMAP3430_PER_MOD,
  1861. .idlest_reg_id = 1,
  1862. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  1863. },
  1864. },
  1865. .slaves = omap3xxx_gpio5_slaves,
  1866. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  1867. .class = &omap3xxx_gpio_hwmod_class,
  1868. .dev_attr = &gpio_dev_attr,
  1869. };
  1870. /* gpio6 */
  1871. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  1872. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  1873. { .irq = -1 }
  1874. };
  1875. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  1876. { .role = "dbclk", .clk = "gpio6_dbck", },
  1877. };
  1878. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  1879. &omap3xxx_l4_per__gpio6,
  1880. };
  1881. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  1882. .name = "gpio6",
  1883. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1884. .mpu_irqs = omap3xxx_gpio6_irqs,
  1885. .main_clk = "gpio6_ick",
  1886. .opt_clks = gpio6_opt_clks,
  1887. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  1888. .prcm = {
  1889. .omap2 = {
  1890. .prcm_reg_id = 1,
  1891. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  1892. .module_offs = OMAP3430_PER_MOD,
  1893. .idlest_reg_id = 1,
  1894. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  1895. },
  1896. },
  1897. .slaves = omap3xxx_gpio6_slaves,
  1898. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  1899. .class = &omap3xxx_gpio_hwmod_class,
  1900. .dev_attr = &gpio_dev_attr,
  1901. };
  1902. /* dma_system -> L3 */
  1903. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  1904. .master = &omap3xxx_dma_system_hwmod,
  1905. .slave = &omap3xxx_l3_main_hwmod,
  1906. .clk = "core_l3_ick",
  1907. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1908. };
  1909. /* dma attributes */
  1910. static struct omap_dma_dev_attr dma_dev_attr = {
  1911. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1912. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1913. .lch_count = 32,
  1914. };
  1915. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  1916. .rev_offs = 0x0000,
  1917. .sysc_offs = 0x002c,
  1918. .syss_offs = 0x0028,
  1919. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1920. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1921. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  1922. SYSS_HAS_RESET_STATUS),
  1923. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1924. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1925. .sysc_fields = &omap_hwmod_sysc_type1,
  1926. };
  1927. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  1928. .name = "dma",
  1929. .sysc = &omap3xxx_dma_sysc,
  1930. };
  1931. /* dma_system */
  1932. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  1933. {
  1934. .pa_start = 0x48056000,
  1935. .pa_end = 0x48056fff,
  1936. .flags = ADDR_TYPE_RT
  1937. },
  1938. { }
  1939. };
  1940. /* dma_system master ports */
  1941. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  1942. &omap3xxx_dma_system__l3,
  1943. };
  1944. /* l4_cfg -> dma_system */
  1945. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  1946. .master = &omap3xxx_l4_core_hwmod,
  1947. .slave = &omap3xxx_dma_system_hwmod,
  1948. .clk = "core_l4_ick",
  1949. .addr = omap3xxx_dma_system_addrs,
  1950. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1951. };
  1952. /* dma_system slave ports */
  1953. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  1954. &omap3xxx_l4_core__dma_system,
  1955. };
  1956. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  1957. .name = "dma",
  1958. .class = &omap3xxx_dma_hwmod_class,
  1959. .mpu_irqs = omap2_dma_system_irqs,
  1960. .main_clk = "core_l3_ick",
  1961. .prcm = {
  1962. .omap2 = {
  1963. .module_offs = CORE_MOD,
  1964. .prcm_reg_id = 1,
  1965. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1966. .idlest_reg_id = 1,
  1967. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1968. },
  1969. },
  1970. .slaves = omap3xxx_dma_system_slaves,
  1971. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  1972. .masters = omap3xxx_dma_system_masters,
  1973. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  1974. .dev_attr = &dma_dev_attr,
  1975. .flags = HWMOD_NO_IDLEST,
  1976. };
  1977. /*
  1978. * 'mcbsp' class
  1979. * multi channel buffered serial port controller
  1980. */
  1981. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
  1982. .sysc_offs = 0x008c,
  1983. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
  1984. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1985. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1986. .sysc_fields = &omap_hwmod_sysc_type1,
  1987. .clockact = 0x2,
  1988. };
  1989. static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
  1990. .name = "mcbsp",
  1991. .sysc = &omap3xxx_mcbsp_sysc,
  1992. .rev = MCBSP_CONFIG_TYPE3,
  1993. };
  1994. /* mcbsp1 */
  1995. static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
  1996. { .name = "irq", .irq = 16 },
  1997. { .name = "tx", .irq = 59 },
  1998. { .name = "rx", .irq = 60 },
  1999. { .irq = -1 }
  2000. };
  2001. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  2002. {
  2003. .name = "mpu",
  2004. .pa_start = 0x48074000,
  2005. .pa_end = 0x480740ff,
  2006. .flags = ADDR_TYPE_RT
  2007. },
  2008. { }
  2009. };
  2010. /* l4_core -> mcbsp1 */
  2011. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  2012. .master = &omap3xxx_l4_core_hwmod,
  2013. .slave = &omap3xxx_mcbsp1_hwmod,
  2014. .clk = "mcbsp1_ick",
  2015. .addr = omap3xxx_mcbsp1_addrs,
  2016. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2017. };
  2018. /* mcbsp1 slave ports */
  2019. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
  2020. &omap3xxx_l4_core__mcbsp1,
  2021. };
  2022. static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  2023. .name = "mcbsp1",
  2024. .class = &omap3xxx_mcbsp_hwmod_class,
  2025. .mpu_irqs = omap3xxx_mcbsp1_irqs,
  2026. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  2027. .main_clk = "mcbsp1_fck",
  2028. .prcm = {
  2029. .omap2 = {
  2030. .prcm_reg_id = 1,
  2031. .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
  2032. .module_offs = CORE_MOD,
  2033. .idlest_reg_id = 1,
  2034. .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
  2035. },
  2036. },
  2037. .slaves = omap3xxx_mcbsp1_slaves,
  2038. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
  2039. };
  2040. /* mcbsp2 */
  2041. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
  2042. { .name = "irq", .irq = 17 },
  2043. { .name = "tx", .irq = 62 },
  2044. { .name = "rx", .irq = 63 },
  2045. { .irq = -1 }
  2046. };
  2047. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  2048. {
  2049. .name = "mpu",
  2050. .pa_start = 0x49022000,
  2051. .pa_end = 0x490220ff,
  2052. .flags = ADDR_TYPE_RT
  2053. },
  2054. { }
  2055. };
  2056. /* l4_per -> mcbsp2 */
  2057. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  2058. .master = &omap3xxx_l4_per_hwmod,
  2059. .slave = &omap3xxx_mcbsp2_hwmod,
  2060. .clk = "mcbsp2_ick",
  2061. .addr = omap3xxx_mcbsp2_addrs,
  2062. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2063. };
  2064. /* mcbsp2 slave ports */
  2065. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
  2066. &omap3xxx_l4_per__mcbsp2,
  2067. };
  2068. static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
  2069. .sidetone = "mcbsp2_sidetone",
  2070. };
  2071. static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
  2072. .name = "mcbsp2",
  2073. .class = &omap3xxx_mcbsp_hwmod_class,
  2074. .mpu_irqs = omap3xxx_mcbsp2_irqs,
  2075. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  2076. .main_clk = "mcbsp2_fck",
  2077. .prcm = {
  2078. .omap2 = {
  2079. .prcm_reg_id = 1,
  2080. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2081. .module_offs = OMAP3430_PER_MOD,
  2082. .idlest_reg_id = 1,
  2083. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2084. },
  2085. },
  2086. .slaves = omap3xxx_mcbsp2_slaves,
  2087. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
  2088. .dev_attr = &omap34xx_mcbsp2_dev_attr,
  2089. };
  2090. /* mcbsp3 */
  2091. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
  2092. { .name = "irq", .irq = 22 },
  2093. { .name = "tx", .irq = 89 },
  2094. { .name = "rx", .irq = 90 },
  2095. { .irq = -1 }
  2096. };
  2097. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2098. {
  2099. .name = "mpu",
  2100. .pa_start = 0x49024000,
  2101. .pa_end = 0x490240ff,
  2102. .flags = ADDR_TYPE_RT
  2103. },
  2104. { }
  2105. };
  2106. /* l4_per -> mcbsp3 */
  2107. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2108. .master = &omap3xxx_l4_per_hwmod,
  2109. .slave = &omap3xxx_mcbsp3_hwmod,
  2110. .clk = "mcbsp3_ick",
  2111. .addr = omap3xxx_mcbsp3_addrs,
  2112. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2113. };
  2114. /* mcbsp3 slave ports */
  2115. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
  2116. &omap3xxx_l4_per__mcbsp3,
  2117. };
  2118. static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
  2119. .sidetone = "mcbsp3_sidetone",
  2120. };
  2121. static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
  2122. .name = "mcbsp3",
  2123. .class = &omap3xxx_mcbsp_hwmod_class,
  2124. .mpu_irqs = omap3xxx_mcbsp3_irqs,
  2125. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  2126. .main_clk = "mcbsp3_fck",
  2127. .prcm = {
  2128. .omap2 = {
  2129. .prcm_reg_id = 1,
  2130. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2131. .module_offs = OMAP3430_PER_MOD,
  2132. .idlest_reg_id = 1,
  2133. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2134. },
  2135. },
  2136. .slaves = omap3xxx_mcbsp3_slaves,
  2137. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
  2138. .dev_attr = &omap34xx_mcbsp3_dev_attr,
  2139. };
  2140. /* mcbsp4 */
  2141. static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
  2142. { .name = "irq", .irq = 23 },
  2143. { .name = "tx", .irq = 54 },
  2144. { .name = "rx", .irq = 55 },
  2145. { .irq = -1 }
  2146. };
  2147. static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
  2148. { .name = "rx", .dma_req = 20 },
  2149. { .name = "tx", .dma_req = 19 },
  2150. { .dma_req = -1 }
  2151. };
  2152. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2153. {
  2154. .name = "mpu",
  2155. .pa_start = 0x49026000,
  2156. .pa_end = 0x490260ff,
  2157. .flags = ADDR_TYPE_RT
  2158. },
  2159. { }
  2160. };
  2161. /* l4_per -> mcbsp4 */
  2162. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2163. .master = &omap3xxx_l4_per_hwmod,
  2164. .slave = &omap3xxx_mcbsp4_hwmod,
  2165. .clk = "mcbsp4_ick",
  2166. .addr = omap3xxx_mcbsp4_addrs,
  2167. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2168. };
  2169. /* mcbsp4 slave ports */
  2170. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
  2171. &omap3xxx_l4_per__mcbsp4,
  2172. };
  2173. static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
  2174. .name = "mcbsp4",
  2175. .class = &omap3xxx_mcbsp_hwmod_class,
  2176. .mpu_irqs = omap3xxx_mcbsp4_irqs,
  2177. .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
  2178. .main_clk = "mcbsp4_fck",
  2179. .prcm = {
  2180. .omap2 = {
  2181. .prcm_reg_id = 1,
  2182. .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
  2183. .module_offs = OMAP3430_PER_MOD,
  2184. .idlest_reg_id = 1,
  2185. .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
  2186. },
  2187. },
  2188. .slaves = omap3xxx_mcbsp4_slaves,
  2189. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
  2190. };
  2191. /* mcbsp5 */
  2192. static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
  2193. { .name = "irq", .irq = 27 },
  2194. { .name = "tx", .irq = 81 },
  2195. { .name = "rx", .irq = 82 },
  2196. { .irq = -1 }
  2197. };
  2198. static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
  2199. { .name = "rx", .dma_req = 22 },
  2200. { .name = "tx", .dma_req = 21 },
  2201. { .dma_req = -1 }
  2202. };
  2203. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2204. {
  2205. .name = "mpu",
  2206. .pa_start = 0x48096000,
  2207. .pa_end = 0x480960ff,
  2208. .flags = ADDR_TYPE_RT
  2209. },
  2210. { }
  2211. };
  2212. /* l4_core -> mcbsp5 */
  2213. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2214. .master = &omap3xxx_l4_core_hwmod,
  2215. .slave = &omap3xxx_mcbsp5_hwmod,
  2216. .clk = "mcbsp5_ick",
  2217. .addr = omap3xxx_mcbsp5_addrs,
  2218. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2219. };
  2220. /* mcbsp5 slave ports */
  2221. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
  2222. &omap3xxx_l4_core__mcbsp5,
  2223. };
  2224. static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
  2225. .name = "mcbsp5",
  2226. .class = &omap3xxx_mcbsp_hwmod_class,
  2227. .mpu_irqs = omap3xxx_mcbsp5_irqs,
  2228. .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
  2229. .main_clk = "mcbsp5_fck",
  2230. .prcm = {
  2231. .omap2 = {
  2232. .prcm_reg_id = 1,
  2233. .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
  2234. .module_offs = CORE_MOD,
  2235. .idlest_reg_id = 1,
  2236. .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
  2237. },
  2238. },
  2239. .slaves = omap3xxx_mcbsp5_slaves,
  2240. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
  2241. };
  2242. /* 'mcbsp sidetone' class */
  2243. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
  2244. .sysc_offs = 0x0010,
  2245. .sysc_flags = SYSC_HAS_AUTOIDLE,
  2246. .sysc_fields = &omap_hwmod_sysc_type1,
  2247. };
  2248. static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
  2249. .name = "mcbsp_sidetone",
  2250. .sysc = &omap3xxx_mcbsp_sidetone_sysc,
  2251. };
  2252. /* mcbsp2_sidetone */
  2253. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
  2254. { .name = "irq", .irq = 4 },
  2255. { .irq = -1 }
  2256. };
  2257. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2258. {
  2259. .name = "sidetone",
  2260. .pa_start = 0x49028000,
  2261. .pa_end = 0x490280ff,
  2262. .flags = ADDR_TYPE_RT
  2263. },
  2264. { }
  2265. };
  2266. /* l4_per -> mcbsp2_sidetone */
  2267. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2268. .master = &omap3xxx_l4_per_hwmod,
  2269. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2270. .clk = "mcbsp2_ick",
  2271. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2272. .user = OCP_USER_MPU,
  2273. };
  2274. /* mcbsp2_sidetone slave ports */
  2275. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
  2276. &omap3xxx_l4_per__mcbsp2_sidetone,
  2277. };
  2278. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  2279. .name = "mcbsp2_sidetone",
  2280. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2281. .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
  2282. .main_clk = "mcbsp2_fck",
  2283. .prcm = {
  2284. .omap2 = {
  2285. .prcm_reg_id = 1,
  2286. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2287. .module_offs = OMAP3430_PER_MOD,
  2288. .idlest_reg_id = 1,
  2289. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2290. },
  2291. },
  2292. .slaves = omap3xxx_mcbsp2_sidetone_slaves,
  2293. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
  2294. };
  2295. /* mcbsp3_sidetone */
  2296. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
  2297. { .name = "irq", .irq = 5 },
  2298. { .irq = -1 }
  2299. };
  2300. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2301. {
  2302. .name = "sidetone",
  2303. .pa_start = 0x4902A000,
  2304. .pa_end = 0x4902A0ff,
  2305. .flags = ADDR_TYPE_RT
  2306. },
  2307. { }
  2308. };
  2309. /* l4_per -> mcbsp3_sidetone */
  2310. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2311. .master = &omap3xxx_l4_per_hwmod,
  2312. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2313. .clk = "mcbsp3_ick",
  2314. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2315. .user = OCP_USER_MPU,
  2316. };
  2317. /* mcbsp3_sidetone slave ports */
  2318. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
  2319. &omap3xxx_l4_per__mcbsp3_sidetone,
  2320. };
  2321. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
  2322. .name = "mcbsp3_sidetone",
  2323. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2324. .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
  2325. .main_clk = "mcbsp3_fck",
  2326. .prcm = {
  2327. .omap2 = {
  2328. .prcm_reg_id = 1,
  2329. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2330. .module_offs = OMAP3430_PER_MOD,
  2331. .idlest_reg_id = 1,
  2332. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2333. },
  2334. },
  2335. .slaves = omap3xxx_mcbsp3_sidetone_slaves,
  2336. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
  2337. };
  2338. /* SR common */
  2339. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  2340. .clkact_shift = 20,
  2341. };
  2342. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  2343. .sysc_offs = 0x24,
  2344. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  2345. .clockact = CLOCKACT_TEST_ICLK,
  2346. .sysc_fields = &omap34xx_sr_sysc_fields,
  2347. };
  2348. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  2349. .name = "smartreflex",
  2350. .sysc = &omap34xx_sr_sysc,
  2351. .rev = 1,
  2352. };
  2353. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  2354. .sidle_shift = 24,
  2355. .enwkup_shift = 26
  2356. };
  2357. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  2358. .sysc_offs = 0x38,
  2359. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2360. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  2361. SYSC_NO_CACHE),
  2362. .sysc_fields = &omap36xx_sr_sysc_fields,
  2363. };
  2364. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  2365. .name = "smartreflex",
  2366. .sysc = &omap36xx_sr_sysc,
  2367. .rev = 2,
  2368. };
  2369. /* SR1 */
  2370. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  2371. &omap3_l4_core__sr1,
  2372. };
  2373. static struct omap_hwmod omap34xx_sr1_hwmod = {
  2374. .name = "sr1_hwmod",
  2375. .class = &omap34xx_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. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2390. };
  2391. static struct omap_hwmod omap36xx_sr1_hwmod = {
  2392. .name = "sr1_hwmod",
  2393. .class = &omap36xx_smartreflex_hwmod_class,
  2394. .main_clk = "sr1_fck",
  2395. .vdd_name = "mpu_iva",
  2396. .prcm = {
  2397. .omap2 = {
  2398. .prcm_reg_id = 1,
  2399. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2400. .module_offs = WKUP_MOD,
  2401. .idlest_reg_id = 1,
  2402. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2403. },
  2404. },
  2405. .slaves = omap3_sr1_slaves,
  2406. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2407. };
  2408. /* SR2 */
  2409. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  2410. &omap3_l4_core__sr2,
  2411. };
  2412. static struct omap_hwmod omap34xx_sr2_hwmod = {
  2413. .name = "sr2_hwmod",
  2414. .class = &omap34xx_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. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2429. };
  2430. static struct omap_hwmod omap36xx_sr2_hwmod = {
  2431. .name = "sr2_hwmod",
  2432. .class = &omap36xx_smartreflex_hwmod_class,
  2433. .main_clk = "sr2_fck",
  2434. .vdd_name = "core",
  2435. .prcm = {
  2436. .omap2 = {
  2437. .prcm_reg_id = 1,
  2438. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2439. .module_offs = WKUP_MOD,
  2440. .idlest_reg_id = 1,
  2441. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2442. },
  2443. },
  2444. .slaves = omap3_sr2_slaves,
  2445. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2446. };
  2447. /*
  2448. * 'mailbox' class
  2449. * mailbox module allowing communication between the on-chip processors
  2450. * using a queued mailbox-interrupt mechanism.
  2451. */
  2452. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  2453. .rev_offs = 0x000,
  2454. .sysc_offs = 0x010,
  2455. .syss_offs = 0x014,
  2456. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2457. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2458. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2459. .sysc_fields = &omap_hwmod_sysc_type1,
  2460. };
  2461. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  2462. .name = "mailbox",
  2463. .sysc = &omap3xxx_mailbox_sysc,
  2464. };
  2465. static struct omap_hwmod omap3xxx_mailbox_hwmod;
  2466. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  2467. { .irq = 26 },
  2468. { .irq = -1 }
  2469. };
  2470. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2471. {
  2472. .pa_start = 0x48094000,
  2473. .pa_end = 0x480941ff,
  2474. .flags = ADDR_TYPE_RT,
  2475. },
  2476. { }
  2477. };
  2478. /* l4_core -> mailbox */
  2479. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2480. .master = &omap3xxx_l4_core_hwmod,
  2481. .slave = &omap3xxx_mailbox_hwmod,
  2482. .addr = omap3xxx_mailbox_addrs,
  2483. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2484. };
  2485. /* mailbox slave ports */
  2486. static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
  2487. &omap3xxx_l4_core__mailbox,
  2488. };
  2489. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  2490. .name = "mailbox",
  2491. .class = &omap3xxx_mailbox_hwmod_class,
  2492. .mpu_irqs = omap3xxx_mailbox_irqs,
  2493. .main_clk = "mailboxes_ick",
  2494. .prcm = {
  2495. .omap2 = {
  2496. .prcm_reg_id = 1,
  2497. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  2498. .module_offs = CORE_MOD,
  2499. .idlest_reg_id = 1,
  2500. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  2501. },
  2502. },
  2503. .slaves = omap3xxx_mailbox_slaves,
  2504. .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
  2505. };
  2506. /* l4 core -> mcspi1 interface */
  2507. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2508. .master = &omap3xxx_l4_core_hwmod,
  2509. .slave = &omap34xx_mcspi1,
  2510. .clk = "mcspi1_ick",
  2511. .addr = omap2_mcspi1_addr_space,
  2512. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2513. };
  2514. /* l4 core -> mcspi2 interface */
  2515. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2516. .master = &omap3xxx_l4_core_hwmod,
  2517. .slave = &omap34xx_mcspi2,
  2518. .clk = "mcspi2_ick",
  2519. .addr = omap2_mcspi2_addr_space,
  2520. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2521. };
  2522. /* l4 core -> mcspi3 interface */
  2523. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2524. .master = &omap3xxx_l4_core_hwmod,
  2525. .slave = &omap34xx_mcspi3,
  2526. .clk = "mcspi3_ick",
  2527. .addr = omap2430_mcspi3_addr_space,
  2528. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2529. };
  2530. /* l4 core -> mcspi4 interface */
  2531. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2532. {
  2533. .pa_start = 0x480ba000,
  2534. .pa_end = 0x480ba0ff,
  2535. .flags = ADDR_TYPE_RT,
  2536. },
  2537. { }
  2538. };
  2539. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2540. .master = &omap3xxx_l4_core_hwmod,
  2541. .slave = &omap34xx_mcspi4,
  2542. .clk = "mcspi4_ick",
  2543. .addr = omap34xx_mcspi4_addr_space,
  2544. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2545. };
  2546. /*
  2547. * 'mcspi' class
  2548. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  2549. * bus
  2550. */
  2551. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  2552. .rev_offs = 0x0000,
  2553. .sysc_offs = 0x0010,
  2554. .syss_offs = 0x0014,
  2555. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2556. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2557. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2558. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2559. .sysc_fields = &omap_hwmod_sysc_type1,
  2560. };
  2561. static struct omap_hwmod_class omap34xx_mcspi_class = {
  2562. .name = "mcspi",
  2563. .sysc = &omap34xx_mcspi_sysc,
  2564. .rev = OMAP3_MCSPI_REV,
  2565. };
  2566. /* mcspi1 */
  2567. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  2568. &omap34xx_l4_core__mcspi1,
  2569. };
  2570. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  2571. .num_chipselect = 4,
  2572. };
  2573. static struct omap_hwmod omap34xx_mcspi1 = {
  2574. .name = "mcspi1",
  2575. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  2576. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  2577. .main_clk = "mcspi1_fck",
  2578. .prcm = {
  2579. .omap2 = {
  2580. .module_offs = CORE_MOD,
  2581. .prcm_reg_id = 1,
  2582. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  2583. .idlest_reg_id = 1,
  2584. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  2585. },
  2586. },
  2587. .slaves = omap34xx_mcspi1_slaves,
  2588. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  2589. .class = &omap34xx_mcspi_class,
  2590. .dev_attr = &omap_mcspi1_dev_attr,
  2591. };
  2592. /* mcspi2 */
  2593. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  2594. &omap34xx_l4_core__mcspi2,
  2595. };
  2596. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  2597. .num_chipselect = 2,
  2598. };
  2599. static struct omap_hwmod omap34xx_mcspi2 = {
  2600. .name = "mcspi2",
  2601. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  2602. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  2603. .main_clk = "mcspi2_fck",
  2604. .prcm = {
  2605. .omap2 = {
  2606. .module_offs = CORE_MOD,
  2607. .prcm_reg_id = 1,
  2608. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  2609. .idlest_reg_id = 1,
  2610. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  2611. },
  2612. },
  2613. .slaves = omap34xx_mcspi2_slaves,
  2614. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  2615. .class = &omap34xx_mcspi_class,
  2616. .dev_attr = &omap_mcspi2_dev_attr,
  2617. };
  2618. /* mcspi3 */
  2619. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  2620. { .name = "irq", .irq = 91 }, /* 91 */
  2621. { .irq = -1 }
  2622. };
  2623. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  2624. { .name = "tx0", .dma_req = 15 },
  2625. { .name = "rx0", .dma_req = 16 },
  2626. { .name = "tx1", .dma_req = 23 },
  2627. { .name = "rx1", .dma_req = 24 },
  2628. { .dma_req = -1 }
  2629. };
  2630. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  2631. &omap34xx_l4_core__mcspi3,
  2632. };
  2633. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  2634. .num_chipselect = 2,
  2635. };
  2636. static struct omap_hwmod omap34xx_mcspi3 = {
  2637. .name = "mcspi3",
  2638. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  2639. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  2640. .main_clk = "mcspi3_fck",
  2641. .prcm = {
  2642. .omap2 = {
  2643. .module_offs = CORE_MOD,
  2644. .prcm_reg_id = 1,
  2645. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  2646. .idlest_reg_id = 1,
  2647. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  2648. },
  2649. },
  2650. .slaves = omap34xx_mcspi3_slaves,
  2651. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  2652. .class = &omap34xx_mcspi_class,
  2653. .dev_attr = &omap_mcspi3_dev_attr,
  2654. };
  2655. /* SPI4 */
  2656. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  2657. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  2658. { .irq = -1 }
  2659. };
  2660. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  2661. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  2662. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  2663. { .dma_req = -1 }
  2664. };
  2665. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  2666. &omap34xx_l4_core__mcspi4,
  2667. };
  2668. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  2669. .num_chipselect = 1,
  2670. };
  2671. static struct omap_hwmod omap34xx_mcspi4 = {
  2672. .name = "mcspi4",
  2673. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  2674. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  2675. .main_clk = "mcspi4_fck",
  2676. .prcm = {
  2677. .omap2 = {
  2678. .module_offs = CORE_MOD,
  2679. .prcm_reg_id = 1,
  2680. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  2681. .idlest_reg_id = 1,
  2682. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  2683. },
  2684. },
  2685. .slaves = omap34xx_mcspi4_slaves,
  2686. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  2687. .class = &omap34xx_mcspi_class,
  2688. .dev_attr = &omap_mcspi4_dev_attr,
  2689. };
  2690. /*
  2691. * usbhsotg
  2692. */
  2693. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  2694. .rev_offs = 0x0400,
  2695. .sysc_offs = 0x0404,
  2696. .syss_offs = 0x0408,
  2697. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  2698. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2699. SYSC_HAS_AUTOIDLE),
  2700. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2701. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2702. .sysc_fields = &omap_hwmod_sysc_type1,
  2703. };
  2704. static struct omap_hwmod_class usbotg_class = {
  2705. .name = "usbotg",
  2706. .sysc = &omap3xxx_usbhsotg_sysc,
  2707. };
  2708. /* usb_otg_hs */
  2709. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  2710. { .name = "mc", .irq = 92 },
  2711. { .name = "dma", .irq = 93 },
  2712. { .irq = -1 }
  2713. };
  2714. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  2715. .name = "usb_otg_hs",
  2716. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  2717. .main_clk = "hsotgusb_ick",
  2718. .prcm = {
  2719. .omap2 = {
  2720. .prcm_reg_id = 1,
  2721. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  2722. .module_offs = CORE_MOD,
  2723. .idlest_reg_id = 1,
  2724. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  2725. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  2726. },
  2727. },
  2728. .masters = omap3xxx_usbhsotg_masters,
  2729. .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
  2730. .slaves = omap3xxx_usbhsotg_slaves,
  2731. .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
  2732. .class = &usbotg_class,
  2733. /*
  2734. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  2735. * broken when autoidle is enabled
  2736. * workaround is to disable the autoidle bit at module level.
  2737. */
  2738. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  2739. | HWMOD_SWSUP_MSTANDBY,
  2740. };
  2741. /* usb_otg_hs */
  2742. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  2743. { .name = "mc", .irq = 71 },
  2744. { .irq = -1 }
  2745. };
  2746. static struct omap_hwmod_class am35xx_usbotg_class = {
  2747. .name = "am35xx_usbotg",
  2748. .sysc = NULL,
  2749. };
  2750. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  2751. .name = "am35x_otg_hs",
  2752. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  2753. .main_clk = NULL,
  2754. .prcm = {
  2755. .omap2 = {
  2756. },
  2757. },
  2758. .masters = am35xx_usbhsotg_masters,
  2759. .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
  2760. .slaves = am35xx_usbhsotg_slaves,
  2761. .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
  2762. .class = &am35xx_usbotg_class,
  2763. };
  2764. /* MMC/SD/SDIO common */
  2765. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  2766. .rev_offs = 0x1fc,
  2767. .sysc_offs = 0x10,
  2768. .syss_offs = 0x14,
  2769. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2770. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2771. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2772. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2773. .sysc_fields = &omap_hwmod_sysc_type1,
  2774. };
  2775. static struct omap_hwmod_class omap34xx_mmc_class = {
  2776. .name = "mmc",
  2777. .sysc = &omap34xx_mmc_sysc,
  2778. };
  2779. /* MMC/SD/SDIO1 */
  2780. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  2781. { .irq = 83, },
  2782. { .irq = -1 }
  2783. };
  2784. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  2785. { .name = "tx", .dma_req = 61, },
  2786. { .name = "rx", .dma_req = 62, },
  2787. { .dma_req = -1 }
  2788. };
  2789. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  2790. { .role = "dbck", .clk = "omap_32k_fck", },
  2791. };
  2792. static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
  2793. &omap3xxx_l4_core__mmc1,
  2794. };
  2795. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  2796. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  2797. };
  2798. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  2799. static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
  2800. .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
  2801. OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
  2802. };
  2803. static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
  2804. .name = "mmc1",
  2805. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  2806. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  2807. .opt_clks = omap34xx_mmc1_opt_clks,
  2808. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  2809. .main_clk = "mmchs1_fck",
  2810. .prcm = {
  2811. .omap2 = {
  2812. .module_offs = CORE_MOD,
  2813. .prcm_reg_id = 1,
  2814. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  2815. .idlest_reg_id = 1,
  2816. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  2817. },
  2818. },
  2819. .dev_attr = &mmc1_pre_es3_dev_attr,
  2820. .slaves = omap3xxx_mmc1_slaves,
  2821. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
  2822. .class = &omap34xx_mmc_class,
  2823. };
  2824. static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
  2825. .name = "mmc1",
  2826. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  2827. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  2828. .opt_clks = omap34xx_mmc1_opt_clks,
  2829. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  2830. .main_clk = "mmchs1_fck",
  2831. .prcm = {
  2832. .omap2 = {
  2833. .module_offs = CORE_MOD,
  2834. .prcm_reg_id = 1,
  2835. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  2836. .idlest_reg_id = 1,
  2837. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  2838. },
  2839. },
  2840. .dev_attr = &mmc1_dev_attr,
  2841. .slaves = omap3xxx_mmc1_slaves,
  2842. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
  2843. .class = &omap34xx_mmc_class,
  2844. };
  2845. /* MMC/SD/SDIO2 */
  2846. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  2847. { .irq = INT_24XX_MMC2_IRQ, },
  2848. { .irq = -1 }
  2849. };
  2850. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  2851. { .name = "tx", .dma_req = 47, },
  2852. { .name = "rx", .dma_req = 48, },
  2853. { .dma_req = -1 }
  2854. };
  2855. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  2856. { .role = "dbck", .clk = "omap_32k_fck", },
  2857. };
  2858. static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
  2859. &omap3xxx_l4_core__mmc2,
  2860. };
  2861. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  2862. static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
  2863. .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
  2864. };
  2865. static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
  2866. .name = "mmc2",
  2867. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  2868. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  2869. .opt_clks = omap34xx_mmc2_opt_clks,
  2870. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  2871. .main_clk = "mmchs2_fck",
  2872. .prcm = {
  2873. .omap2 = {
  2874. .module_offs = CORE_MOD,
  2875. .prcm_reg_id = 1,
  2876. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  2877. .idlest_reg_id = 1,
  2878. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  2879. },
  2880. },
  2881. .dev_attr = &mmc2_pre_es3_dev_attr,
  2882. .slaves = omap3xxx_mmc2_slaves,
  2883. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
  2884. .class = &omap34xx_mmc_class,
  2885. };
  2886. static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
  2887. .name = "mmc2",
  2888. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  2889. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  2890. .opt_clks = omap34xx_mmc2_opt_clks,
  2891. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  2892. .main_clk = "mmchs2_fck",
  2893. .prcm = {
  2894. .omap2 = {
  2895. .module_offs = CORE_MOD,
  2896. .prcm_reg_id = 1,
  2897. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  2898. .idlest_reg_id = 1,
  2899. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  2900. },
  2901. },
  2902. .slaves = omap3xxx_mmc2_slaves,
  2903. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
  2904. .class = &omap34xx_mmc_class,
  2905. };
  2906. /* MMC/SD/SDIO3 */
  2907. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  2908. { .irq = 94, },
  2909. { .irq = -1 }
  2910. };
  2911. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  2912. { .name = "tx", .dma_req = 77, },
  2913. { .name = "rx", .dma_req = 78, },
  2914. { .dma_req = -1 }
  2915. };
  2916. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  2917. { .role = "dbck", .clk = "omap_32k_fck", },
  2918. };
  2919. static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
  2920. &omap3xxx_l4_core__mmc3,
  2921. };
  2922. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  2923. .name = "mmc3",
  2924. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  2925. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  2926. .opt_clks = omap34xx_mmc3_opt_clks,
  2927. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  2928. .main_clk = "mmchs3_fck",
  2929. .prcm = {
  2930. .omap2 = {
  2931. .prcm_reg_id = 1,
  2932. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  2933. .idlest_reg_id = 1,
  2934. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  2935. },
  2936. },
  2937. .slaves = omap3xxx_mmc3_slaves,
  2938. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
  2939. .class = &omap34xx_mmc_class,
  2940. };
  2941. /*
  2942. * 'usb_host_hs' class
  2943. * high-speed multi-port usb host controller
  2944. */
  2945. static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
  2946. .master = &omap3xxx_usb_host_hs_hwmod,
  2947. .slave = &omap3xxx_l3_main_hwmod,
  2948. .clk = "core_l3_ick",
  2949. .user = OCP_USER_MPU,
  2950. };
  2951. static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
  2952. .rev_offs = 0x0000,
  2953. .sysc_offs = 0x0010,
  2954. .syss_offs = 0x0014,
  2955. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  2956. SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  2957. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2958. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2959. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2960. .sysc_fields = &omap_hwmod_sysc_type1,
  2961. };
  2962. static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
  2963. .name = "usb_host_hs",
  2964. .sysc = &omap3xxx_usb_host_hs_sysc,
  2965. };
  2966. static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_masters[] = {
  2967. &omap3xxx_usb_host_hs__l3_main_2,
  2968. };
  2969. static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
  2970. {
  2971. .name = "uhh",
  2972. .pa_start = 0x48064000,
  2973. .pa_end = 0x480643ff,
  2974. .flags = ADDR_TYPE_RT
  2975. },
  2976. {
  2977. .name = "ohci",
  2978. .pa_start = 0x48064400,
  2979. .pa_end = 0x480647ff,
  2980. },
  2981. {
  2982. .name = "ehci",
  2983. .pa_start = 0x48064800,
  2984. .pa_end = 0x48064cff,
  2985. },
  2986. {}
  2987. };
  2988. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
  2989. .master = &omap3xxx_l4_core_hwmod,
  2990. .slave = &omap3xxx_usb_host_hs_hwmod,
  2991. .clk = "usbhost_ick",
  2992. .addr = omap3xxx_usb_host_hs_addrs,
  2993. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2994. };
  2995. static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_slaves[] = {
  2996. &omap3xxx_l4_core__usb_host_hs,
  2997. };
  2998. static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
  2999. { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
  3000. };
  3001. static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
  3002. { .name = "ohci-irq", .irq = 76 },
  3003. { .name = "ehci-irq", .irq = 77 },
  3004. { .irq = -1 }
  3005. };
  3006. static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
  3007. .name = "usb_host_hs",
  3008. .class = &omap3xxx_usb_host_hs_hwmod_class,
  3009. .clkdm_name = "l3_init_clkdm",
  3010. .mpu_irqs = omap3xxx_usb_host_hs_irqs,
  3011. .main_clk = "usbhost_48m_fck",
  3012. .prcm = {
  3013. .omap2 = {
  3014. .module_offs = OMAP3430ES2_USBHOST_MOD,
  3015. .prcm_reg_id = 1,
  3016. .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
  3017. .idlest_reg_id = 1,
  3018. .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
  3019. .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
  3020. },
  3021. },
  3022. .opt_clks = omap3xxx_usb_host_hs_opt_clks,
  3023. .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
  3024. .slaves = omap3xxx_usb_host_hs_slaves,
  3025. .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_slaves),
  3026. .masters = omap3xxx_usb_host_hs_masters,
  3027. .masters_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_masters),
  3028. /*
  3029. * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
  3030. * id: i660
  3031. *
  3032. * Description:
  3033. * In the following configuration :
  3034. * - USBHOST module is set to smart-idle mode
  3035. * - PRCM asserts idle_req to the USBHOST module ( This typically
  3036. * happens when the system is going to a low power mode : all ports
  3037. * have been suspended, the master part of the USBHOST module has
  3038. * entered the standby state, and SW has cut the functional clocks)
  3039. * - an USBHOST interrupt occurs before the module is able to answer
  3040. * idle_ack, typically a remote wakeup IRQ.
  3041. * Then the USB HOST module will enter a deadlock situation where it
  3042. * is no more accessible nor functional.
  3043. *
  3044. * Workaround:
  3045. * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
  3046. */
  3047. /*
  3048. * Errata: USB host EHCI may stall when entering smart-standby mode
  3049. * Id: i571
  3050. *
  3051. * Description:
  3052. * When the USBHOST module is set to smart-standby mode, and when it is
  3053. * ready to enter the standby state (i.e. all ports are suspended and
  3054. * all attached devices are in suspend mode), then it can wrongly assert
  3055. * the Mstandby signal too early while there are still some residual OCP
  3056. * transactions ongoing. If this condition occurs, the internal state
  3057. * machine may go to an undefined state and the USB link may be stuck
  3058. * upon the next resume.
  3059. *
  3060. * Workaround:
  3061. * Don't use smart standby; use only force standby,
  3062. * hence HWMOD_SWSUP_MSTANDBY
  3063. */
  3064. /*
  3065. * During system boot; If the hwmod framework resets the module
  3066. * the module will have smart idle settings; which can lead to deadlock
  3067. * (above Errata Id:i660); so, dont reset the module during boot;
  3068. * Use HWMOD_INIT_NO_RESET.
  3069. */
  3070. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  3071. HWMOD_INIT_NO_RESET,
  3072. };
  3073. /*
  3074. * 'usb_tll_hs' class
  3075. * usb_tll_hs module is the adapter on the usb_host_hs ports
  3076. */
  3077. static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
  3078. .rev_offs = 0x0000,
  3079. .sysc_offs = 0x0010,
  3080. .syss_offs = 0x0014,
  3081. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  3082. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  3083. SYSC_HAS_AUTOIDLE),
  3084. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  3085. .sysc_fields = &omap_hwmod_sysc_type1,
  3086. };
  3087. static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
  3088. .name = "usb_tll_hs",
  3089. .sysc = &omap3xxx_usb_tll_hs_sysc,
  3090. };
  3091. static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
  3092. { .name = "tll-irq", .irq = 78 },
  3093. { .irq = -1 }
  3094. };
  3095. static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
  3096. {
  3097. .name = "tll",
  3098. .pa_start = 0x48062000,
  3099. .pa_end = 0x48062fff,
  3100. .flags = ADDR_TYPE_RT
  3101. },
  3102. {}
  3103. };
  3104. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
  3105. .master = &omap3xxx_l4_core_hwmod,
  3106. .slave = &omap3xxx_usb_tll_hs_hwmod,
  3107. .clk = "usbtll_ick",
  3108. .addr = omap3xxx_usb_tll_hs_addrs,
  3109. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3110. };
  3111. static struct omap_hwmod_ocp_if *omap3xxx_usb_tll_hs_slaves[] = {
  3112. &omap3xxx_l4_core__usb_tll_hs,
  3113. };
  3114. static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
  3115. .name = "usb_tll_hs",
  3116. .class = &omap3xxx_usb_tll_hs_hwmod_class,
  3117. .clkdm_name = "l3_init_clkdm",
  3118. .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
  3119. .main_clk = "usbtll_fck",
  3120. .prcm = {
  3121. .omap2 = {
  3122. .module_offs = CORE_MOD,
  3123. .prcm_reg_id = 3,
  3124. .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
  3125. .idlest_reg_id = 3,
  3126. .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
  3127. },
  3128. },
  3129. .slaves = omap3xxx_usb_tll_hs_slaves,
  3130. .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_tll_hs_slaves),
  3131. };
  3132. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  3133. &omap3xxx_l3_main_hwmod,
  3134. &omap3xxx_l4_core_hwmod,
  3135. &omap3xxx_l4_per_hwmod,
  3136. &omap3xxx_l4_wkup_hwmod,
  3137. &omap3xxx_mmc3_hwmod,
  3138. &omap3xxx_mpu_hwmod,
  3139. &omap3xxx_timer1_hwmod,
  3140. &omap3xxx_timer2_hwmod,
  3141. &omap3xxx_timer3_hwmod,
  3142. &omap3xxx_timer4_hwmod,
  3143. &omap3xxx_timer5_hwmod,
  3144. &omap3xxx_timer6_hwmod,
  3145. &omap3xxx_timer7_hwmod,
  3146. &omap3xxx_timer8_hwmod,
  3147. &omap3xxx_timer9_hwmod,
  3148. &omap3xxx_timer10_hwmod,
  3149. &omap3xxx_timer11_hwmod,
  3150. &omap3xxx_wd_timer2_hwmod,
  3151. &omap3xxx_uart1_hwmod,
  3152. &omap3xxx_uart2_hwmod,
  3153. &omap3xxx_uart3_hwmod,
  3154. /* dss class */
  3155. &omap3xxx_dss_dispc_hwmod,
  3156. &omap3xxx_dss_dsi1_hwmod,
  3157. &omap3xxx_dss_rfbi_hwmod,
  3158. &omap3xxx_dss_venc_hwmod,
  3159. /* i2c class */
  3160. &omap3xxx_i2c1_hwmod,
  3161. &omap3xxx_i2c2_hwmod,
  3162. &omap3xxx_i2c3_hwmod,
  3163. /* gpio class */
  3164. &omap3xxx_gpio1_hwmod,
  3165. &omap3xxx_gpio2_hwmod,
  3166. &omap3xxx_gpio3_hwmod,
  3167. &omap3xxx_gpio4_hwmod,
  3168. &omap3xxx_gpio5_hwmod,
  3169. &omap3xxx_gpio6_hwmod,
  3170. /* dma_system class*/
  3171. &omap3xxx_dma_system_hwmod,
  3172. /* mcbsp class */
  3173. &omap3xxx_mcbsp1_hwmod,
  3174. &omap3xxx_mcbsp2_hwmod,
  3175. &omap3xxx_mcbsp3_hwmod,
  3176. &omap3xxx_mcbsp4_hwmod,
  3177. &omap3xxx_mcbsp5_hwmod,
  3178. &omap3xxx_mcbsp2_sidetone_hwmod,
  3179. &omap3xxx_mcbsp3_sidetone_hwmod,
  3180. /* mcspi class */
  3181. &omap34xx_mcspi1,
  3182. &omap34xx_mcspi2,
  3183. &omap34xx_mcspi3,
  3184. &omap34xx_mcspi4,
  3185. NULL,
  3186. };
  3187. /* GP-only hwmods */
  3188. static __initdata struct omap_hwmod *omap3xxx_gp_hwmods[] = {
  3189. &omap3xxx_timer12_hwmod,
  3190. NULL
  3191. };
  3192. /* 3430ES1-only hwmods */
  3193. static __initdata struct omap_hwmod *omap3430es1_hwmods[] = {
  3194. &omap3430es1_dss_core_hwmod,
  3195. NULL
  3196. };
  3197. /* 3430ES2+-only hwmods */
  3198. static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = {
  3199. &omap3xxx_dss_core_hwmod,
  3200. &omap3xxx_usbhsotg_hwmod,
  3201. &omap3xxx_usb_host_hs_hwmod,
  3202. &omap3xxx_usb_tll_hs_hwmod,
  3203. NULL
  3204. };
  3205. /* <= 3430ES3-only hwmods */
  3206. static struct omap_hwmod *omap3430_pre_es3_hwmods[] __initdata = {
  3207. &omap3xxx_pre_es3_mmc1_hwmod,
  3208. &omap3xxx_pre_es3_mmc2_hwmod,
  3209. NULL
  3210. };
  3211. /* 3430ES3+-only hwmods */
  3212. static struct omap_hwmod *omap3430_es3plus_hwmods[] __initdata = {
  3213. &omap3xxx_es3plus_mmc1_hwmod,
  3214. &omap3xxx_es3plus_mmc2_hwmod,
  3215. NULL
  3216. };
  3217. /* 34xx-only hwmods (all ES revisions) */
  3218. static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
  3219. &omap3xxx_iva_hwmod,
  3220. &omap34xx_sr1_hwmod,
  3221. &omap34xx_sr2_hwmod,
  3222. &omap3xxx_mailbox_hwmod,
  3223. NULL
  3224. };
  3225. /* 36xx-only hwmods (all ES revisions) */
  3226. static __initdata struct omap_hwmod *omap36xx_hwmods[] = {
  3227. &omap3xxx_iva_hwmod,
  3228. &omap3xxx_uart4_hwmod,
  3229. &omap3xxx_dss_core_hwmod,
  3230. &omap36xx_sr1_hwmod,
  3231. &omap36xx_sr2_hwmod,
  3232. &omap3xxx_usbhsotg_hwmod,
  3233. &omap3xxx_mailbox_hwmod,
  3234. &omap3xxx_usb_host_hs_hwmod,
  3235. &omap3xxx_usb_tll_hs_hwmod,
  3236. &omap3xxx_es3plus_mmc1_hwmod,
  3237. &omap3xxx_es3plus_mmc2_hwmod,
  3238. NULL
  3239. };
  3240. static __initdata struct omap_hwmod *am35xx_hwmods[] = {
  3241. &omap3xxx_dss_core_hwmod, /* XXX ??? */
  3242. &am35xx_usbhsotg_hwmod,
  3243. &am35xx_uart4_hwmod,
  3244. &omap3xxx_usb_host_hs_hwmod,
  3245. &omap3xxx_usb_tll_hs_hwmod,
  3246. &omap3xxx_es3plus_mmc1_hwmod,
  3247. &omap3xxx_es3plus_mmc2_hwmod,
  3248. NULL
  3249. };
  3250. int __init omap3xxx_hwmod_init(void)
  3251. {
  3252. int r;
  3253. struct omap_hwmod **h = NULL;
  3254. unsigned int rev;
  3255. /* Register hwmods common to all OMAP3 */
  3256. r = omap_hwmod_register(omap3xxx_hwmods);
  3257. if (r < 0)
  3258. return r;
  3259. /* Register GP-only hwmods. */
  3260. if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
  3261. r = omap_hwmod_register(omap3xxx_gp_hwmods);
  3262. if (r < 0)
  3263. return r;
  3264. }
  3265. rev = omap_rev();
  3266. /*
  3267. * Register hwmods common to individual OMAP3 families, all
  3268. * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
  3269. * All possible revisions should be included in this conditional.
  3270. */
  3271. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3272. rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
  3273. rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
  3274. h = omap34xx_hwmods;
  3275. } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) {
  3276. h = am35xx_hwmods;
  3277. } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
  3278. rev == OMAP3630_REV_ES1_2) {
  3279. h = omap36xx_hwmods;
  3280. } else {
  3281. WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
  3282. return -EINVAL;
  3283. };
  3284. r = omap_hwmod_register(h);
  3285. if (r < 0)
  3286. return r;
  3287. /*
  3288. * Register hwmods specific to certain ES levels of a
  3289. * particular family of silicon (e.g., 34xx ES1.0)
  3290. */
  3291. h = NULL;
  3292. if (rev == OMAP3430_REV_ES1_0) {
  3293. h = omap3430es1_hwmods;
  3294. } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
  3295. rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3296. rev == OMAP3430_REV_ES3_1_2) {
  3297. h = omap3430es2plus_hwmods;
  3298. };
  3299. if (h) {
  3300. r = omap_hwmod_register(h);
  3301. if (r < 0)
  3302. return r;
  3303. }
  3304. h = NULL;
  3305. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3306. rev == OMAP3430_REV_ES2_1) {
  3307. h = omap3430_pre_es3_hwmods;
  3308. } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3309. rev == OMAP3430_REV_ES3_1_2) {
  3310. h = omap3430_es3plus_hwmods;
  3311. };
  3312. if (h)
  3313. r = omap_hwmod_register(h);
  3314. return r;
  3315. }