omap_hwmod_3xxx_data.c 96 KB

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