omap_hwmod_3xxx_data.c 97 KB

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