omap_hwmod_3xxx_data.c 96 KB

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