omap_hwmod_3xxx_data.c 96 KB

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