omap_hwmod_3xxx_data.c 96 KB

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