omap_hwmod_3xxx_data.c 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659
  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. .mpu_irqs = omap3xxx_gpio1_irqs,
  1904. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
  1905. .main_clk = "gpio1_ick",
  1906. .opt_clks = gpio1_opt_clks,
  1907. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1908. .prcm = {
  1909. .omap2 = {
  1910. .prcm_reg_id = 1,
  1911. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  1912. .module_offs = WKUP_MOD,
  1913. .idlest_reg_id = 1,
  1914. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  1915. },
  1916. },
  1917. .slaves = omap3xxx_gpio1_slaves,
  1918. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  1919. .class = &omap3xxx_gpio_hwmod_class,
  1920. .dev_attr = &gpio_dev_attr,
  1921. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1922. };
  1923. /* gpio2 */
  1924. static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
  1925. { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
  1926. };
  1927. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1928. { .role = "dbclk", .clk = "gpio2_dbck", },
  1929. };
  1930. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  1931. &omap3xxx_l4_per__gpio2,
  1932. };
  1933. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  1934. .name = "gpio2",
  1935. .mpu_irqs = omap3xxx_gpio2_irqs,
  1936. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
  1937. .main_clk = "gpio2_ick",
  1938. .opt_clks = gpio2_opt_clks,
  1939. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1940. .prcm = {
  1941. .omap2 = {
  1942. .prcm_reg_id = 1,
  1943. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  1944. .module_offs = OMAP3430_PER_MOD,
  1945. .idlest_reg_id = 1,
  1946. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  1947. },
  1948. },
  1949. .slaves = omap3xxx_gpio2_slaves,
  1950. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  1951. .class = &omap3xxx_gpio_hwmod_class,
  1952. .dev_attr = &gpio_dev_attr,
  1953. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1954. };
  1955. /* gpio3 */
  1956. static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
  1957. { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
  1958. };
  1959. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1960. { .role = "dbclk", .clk = "gpio3_dbck", },
  1961. };
  1962. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  1963. &omap3xxx_l4_per__gpio3,
  1964. };
  1965. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  1966. .name = "gpio3",
  1967. .mpu_irqs = omap3xxx_gpio3_irqs,
  1968. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
  1969. .main_clk = "gpio3_ick",
  1970. .opt_clks = gpio3_opt_clks,
  1971. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1972. .prcm = {
  1973. .omap2 = {
  1974. .prcm_reg_id = 1,
  1975. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  1976. .module_offs = OMAP3430_PER_MOD,
  1977. .idlest_reg_id = 1,
  1978. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  1979. },
  1980. },
  1981. .slaves = omap3xxx_gpio3_slaves,
  1982. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  1983. .class = &omap3xxx_gpio_hwmod_class,
  1984. .dev_attr = &gpio_dev_attr,
  1985. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1986. };
  1987. /* gpio4 */
  1988. static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
  1989. { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
  1990. };
  1991. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1992. { .role = "dbclk", .clk = "gpio4_dbck", },
  1993. };
  1994. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  1995. &omap3xxx_l4_per__gpio4,
  1996. };
  1997. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  1998. .name = "gpio4",
  1999. .mpu_irqs = omap3xxx_gpio4_irqs,
  2000. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
  2001. .main_clk = "gpio4_ick",
  2002. .opt_clks = gpio4_opt_clks,
  2003. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  2004. .prcm = {
  2005. .omap2 = {
  2006. .prcm_reg_id = 1,
  2007. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  2008. .module_offs = OMAP3430_PER_MOD,
  2009. .idlest_reg_id = 1,
  2010. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  2011. },
  2012. },
  2013. .slaves = omap3xxx_gpio4_slaves,
  2014. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  2015. .class = &omap3xxx_gpio_hwmod_class,
  2016. .dev_attr = &gpio_dev_attr,
  2017. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2018. };
  2019. /* gpio5 */
  2020. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  2021. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  2022. };
  2023. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  2024. { .role = "dbclk", .clk = "gpio5_dbck", },
  2025. };
  2026. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  2027. &omap3xxx_l4_per__gpio5,
  2028. };
  2029. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  2030. .name = "gpio5",
  2031. .mpu_irqs = omap3xxx_gpio5_irqs,
  2032. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
  2033. .main_clk = "gpio5_ick",
  2034. .opt_clks = gpio5_opt_clks,
  2035. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  2036. .prcm = {
  2037. .omap2 = {
  2038. .prcm_reg_id = 1,
  2039. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  2040. .module_offs = OMAP3430_PER_MOD,
  2041. .idlest_reg_id = 1,
  2042. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  2043. },
  2044. },
  2045. .slaves = omap3xxx_gpio5_slaves,
  2046. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  2047. .class = &omap3xxx_gpio_hwmod_class,
  2048. .dev_attr = &gpio_dev_attr,
  2049. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2050. };
  2051. /* gpio6 */
  2052. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  2053. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  2054. };
  2055. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  2056. { .role = "dbclk", .clk = "gpio6_dbck", },
  2057. };
  2058. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  2059. &omap3xxx_l4_per__gpio6,
  2060. };
  2061. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  2062. .name = "gpio6",
  2063. .mpu_irqs = omap3xxx_gpio6_irqs,
  2064. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
  2065. .main_clk = "gpio6_ick",
  2066. .opt_clks = gpio6_opt_clks,
  2067. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  2068. .prcm = {
  2069. .omap2 = {
  2070. .prcm_reg_id = 1,
  2071. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  2072. .module_offs = OMAP3430_PER_MOD,
  2073. .idlest_reg_id = 1,
  2074. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  2075. },
  2076. },
  2077. .slaves = omap3xxx_gpio6_slaves,
  2078. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  2079. .class = &omap3xxx_gpio_hwmod_class,
  2080. .dev_attr = &gpio_dev_attr,
  2081. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2082. };
  2083. /* dma_system -> L3 */
  2084. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  2085. .master = &omap3xxx_dma_system_hwmod,
  2086. .slave = &omap3xxx_l3_main_hwmod,
  2087. .clk = "core_l3_ick",
  2088. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2089. };
  2090. /* dma attributes */
  2091. static struct omap_dma_dev_attr dma_dev_attr = {
  2092. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  2093. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  2094. .lch_count = 32,
  2095. };
  2096. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  2097. .rev_offs = 0x0000,
  2098. .sysc_offs = 0x002c,
  2099. .syss_offs = 0x0028,
  2100. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  2101. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  2102. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  2103. SYSS_HAS_RESET_STATUS),
  2104. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2105. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2106. .sysc_fields = &omap_hwmod_sysc_type1,
  2107. };
  2108. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  2109. .name = "dma",
  2110. .sysc = &omap3xxx_dma_sysc,
  2111. };
  2112. /* dma_system */
  2113. static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
  2114. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  2115. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  2116. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  2117. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  2118. };
  2119. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  2120. {
  2121. .pa_start = 0x48056000,
  2122. .pa_end = 0x4a0560ff,
  2123. .flags = ADDR_TYPE_RT
  2124. },
  2125. };
  2126. /* dma_system master ports */
  2127. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  2128. &omap3xxx_dma_system__l3,
  2129. };
  2130. /* l4_cfg -> dma_system */
  2131. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  2132. .master = &omap3xxx_l4_core_hwmod,
  2133. .slave = &omap3xxx_dma_system_hwmod,
  2134. .clk = "core_l4_ick",
  2135. .addr = omap3xxx_dma_system_addrs,
  2136. .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
  2137. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2138. };
  2139. /* dma_system slave ports */
  2140. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  2141. &omap3xxx_l4_core__dma_system,
  2142. };
  2143. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  2144. .name = "dma",
  2145. .class = &omap3xxx_dma_hwmod_class,
  2146. .mpu_irqs = omap3xxx_dma_system_irqs,
  2147. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
  2148. .main_clk = "core_l3_ick",
  2149. .prcm = {
  2150. .omap2 = {
  2151. .module_offs = CORE_MOD,
  2152. .prcm_reg_id = 1,
  2153. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  2154. .idlest_reg_id = 1,
  2155. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  2156. },
  2157. },
  2158. .slaves = omap3xxx_dma_system_slaves,
  2159. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  2160. .masters = omap3xxx_dma_system_masters,
  2161. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  2162. .dev_attr = &dma_dev_attr,
  2163. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2164. .flags = HWMOD_NO_IDLEST,
  2165. };
  2166. /*
  2167. * 'mcbsp' class
  2168. * multi channel buffered serial port controller
  2169. */
  2170. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
  2171. .sysc_offs = 0x008c,
  2172. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
  2173. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  2174. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2175. .sysc_fields = &omap_hwmod_sysc_type1,
  2176. .clockact = 0x2,
  2177. };
  2178. static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
  2179. .name = "mcbsp",
  2180. .sysc = &omap3xxx_mcbsp_sysc,
  2181. .rev = MCBSP_CONFIG_TYPE3,
  2182. };
  2183. /* mcbsp1 */
  2184. static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
  2185. { .name = "irq", .irq = 16 },
  2186. { .name = "tx", .irq = 59 },
  2187. { .name = "rx", .irq = 60 },
  2188. };
  2189. static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = {
  2190. { .name = "rx", .dma_req = 32 },
  2191. { .name = "tx", .dma_req = 31 },
  2192. };
  2193. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  2194. {
  2195. .name = "mpu",
  2196. .pa_start = 0x48074000,
  2197. .pa_end = 0x480740ff,
  2198. .flags = ADDR_TYPE_RT
  2199. },
  2200. };
  2201. /* l4_core -> mcbsp1 */
  2202. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  2203. .master = &omap3xxx_l4_core_hwmod,
  2204. .slave = &omap3xxx_mcbsp1_hwmod,
  2205. .clk = "mcbsp1_ick",
  2206. .addr = omap3xxx_mcbsp1_addrs,
  2207. .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_addrs),
  2208. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2209. };
  2210. /* mcbsp1 slave ports */
  2211. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
  2212. &omap3xxx_l4_core__mcbsp1,
  2213. };
  2214. static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  2215. .name = "mcbsp1",
  2216. .class = &omap3xxx_mcbsp_hwmod_class,
  2217. .mpu_irqs = omap3xxx_mcbsp1_irqs,
  2218. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_irqs),
  2219. .sdma_reqs = omap3xxx_mcbsp1_sdma_chs,
  2220. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs),
  2221. .main_clk = "mcbsp1_fck",
  2222. .prcm = {
  2223. .omap2 = {
  2224. .prcm_reg_id = 1,
  2225. .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
  2226. .module_offs = CORE_MOD,
  2227. .idlest_reg_id = 1,
  2228. .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
  2229. },
  2230. },
  2231. .slaves = omap3xxx_mcbsp1_slaves,
  2232. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
  2233. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2234. };
  2235. /* mcbsp2 */
  2236. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
  2237. { .name = "irq", .irq = 17 },
  2238. { .name = "tx", .irq = 62 },
  2239. { .name = "rx", .irq = 63 },
  2240. };
  2241. static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = {
  2242. { .name = "rx", .dma_req = 34 },
  2243. { .name = "tx", .dma_req = 33 },
  2244. };
  2245. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  2246. {
  2247. .name = "mpu",
  2248. .pa_start = 0x49022000,
  2249. .pa_end = 0x490220ff,
  2250. .flags = ADDR_TYPE_RT
  2251. },
  2252. };
  2253. /* l4_per -> mcbsp2 */
  2254. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  2255. .master = &omap3xxx_l4_per_hwmod,
  2256. .slave = &omap3xxx_mcbsp2_hwmod,
  2257. .clk = "mcbsp2_ick",
  2258. .addr = omap3xxx_mcbsp2_addrs,
  2259. .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_addrs),
  2260. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2261. };
  2262. /* mcbsp2 slave ports */
  2263. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
  2264. &omap3xxx_l4_per__mcbsp2,
  2265. };
  2266. static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
  2267. .sidetone = "mcbsp2_sidetone",
  2268. };
  2269. static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
  2270. .name = "mcbsp2",
  2271. .class = &omap3xxx_mcbsp_hwmod_class,
  2272. .mpu_irqs = omap3xxx_mcbsp2_irqs,
  2273. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_irqs),
  2274. .sdma_reqs = omap3xxx_mcbsp2_sdma_chs,
  2275. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs),
  2276. .main_clk = "mcbsp2_fck",
  2277. .prcm = {
  2278. .omap2 = {
  2279. .prcm_reg_id = 1,
  2280. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2281. .module_offs = OMAP3430_PER_MOD,
  2282. .idlest_reg_id = 1,
  2283. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2284. },
  2285. },
  2286. .slaves = omap3xxx_mcbsp2_slaves,
  2287. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
  2288. .dev_attr = &omap34xx_mcbsp2_dev_attr,
  2289. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2290. };
  2291. /* mcbsp3 */
  2292. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
  2293. { .name = "irq", .irq = 22 },
  2294. { .name = "tx", .irq = 89 },
  2295. { .name = "rx", .irq = 90 },
  2296. };
  2297. static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = {
  2298. { .name = "rx", .dma_req = 18 },
  2299. { .name = "tx", .dma_req = 17 },
  2300. };
  2301. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2302. {
  2303. .name = "mpu",
  2304. .pa_start = 0x49024000,
  2305. .pa_end = 0x490240ff,
  2306. .flags = ADDR_TYPE_RT
  2307. },
  2308. };
  2309. /* l4_per -> mcbsp3 */
  2310. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2311. .master = &omap3xxx_l4_per_hwmod,
  2312. .slave = &omap3xxx_mcbsp3_hwmod,
  2313. .clk = "mcbsp3_ick",
  2314. .addr = omap3xxx_mcbsp3_addrs,
  2315. .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_addrs),
  2316. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2317. };
  2318. /* mcbsp3 slave ports */
  2319. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
  2320. &omap3xxx_l4_per__mcbsp3,
  2321. };
  2322. static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
  2323. .sidetone = "mcbsp3_sidetone",
  2324. };
  2325. static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
  2326. .name = "mcbsp3",
  2327. .class = &omap3xxx_mcbsp_hwmod_class,
  2328. .mpu_irqs = omap3xxx_mcbsp3_irqs,
  2329. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_irqs),
  2330. .sdma_reqs = omap3xxx_mcbsp3_sdma_chs,
  2331. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs),
  2332. .main_clk = "mcbsp3_fck",
  2333. .prcm = {
  2334. .omap2 = {
  2335. .prcm_reg_id = 1,
  2336. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2337. .module_offs = OMAP3430_PER_MOD,
  2338. .idlest_reg_id = 1,
  2339. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2340. },
  2341. },
  2342. .slaves = omap3xxx_mcbsp3_slaves,
  2343. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
  2344. .dev_attr = &omap34xx_mcbsp3_dev_attr,
  2345. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2346. };
  2347. /* mcbsp4 */
  2348. static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
  2349. { .name = "irq", .irq = 23 },
  2350. { .name = "tx", .irq = 54 },
  2351. { .name = "rx", .irq = 55 },
  2352. };
  2353. static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
  2354. { .name = "rx", .dma_req = 20 },
  2355. { .name = "tx", .dma_req = 19 },
  2356. };
  2357. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2358. {
  2359. .name = "mpu",
  2360. .pa_start = 0x49026000,
  2361. .pa_end = 0x490260ff,
  2362. .flags = ADDR_TYPE_RT
  2363. },
  2364. };
  2365. /* l4_per -> mcbsp4 */
  2366. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2367. .master = &omap3xxx_l4_per_hwmod,
  2368. .slave = &omap3xxx_mcbsp4_hwmod,
  2369. .clk = "mcbsp4_ick",
  2370. .addr = omap3xxx_mcbsp4_addrs,
  2371. .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_addrs),
  2372. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2373. };
  2374. /* mcbsp4 slave ports */
  2375. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
  2376. &omap3xxx_l4_per__mcbsp4,
  2377. };
  2378. static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
  2379. .name = "mcbsp4",
  2380. .class = &omap3xxx_mcbsp_hwmod_class,
  2381. .mpu_irqs = omap3xxx_mcbsp4_irqs,
  2382. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_irqs),
  2383. .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
  2384. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs),
  2385. .main_clk = "mcbsp4_fck",
  2386. .prcm = {
  2387. .omap2 = {
  2388. .prcm_reg_id = 1,
  2389. .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
  2390. .module_offs = OMAP3430_PER_MOD,
  2391. .idlest_reg_id = 1,
  2392. .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
  2393. },
  2394. },
  2395. .slaves = omap3xxx_mcbsp4_slaves,
  2396. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
  2397. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2398. };
  2399. /* mcbsp5 */
  2400. static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
  2401. { .name = "irq", .irq = 27 },
  2402. { .name = "tx", .irq = 81 },
  2403. { .name = "rx", .irq = 82 },
  2404. };
  2405. static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
  2406. { .name = "rx", .dma_req = 22 },
  2407. { .name = "tx", .dma_req = 21 },
  2408. };
  2409. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2410. {
  2411. .name = "mpu",
  2412. .pa_start = 0x48096000,
  2413. .pa_end = 0x480960ff,
  2414. .flags = ADDR_TYPE_RT
  2415. },
  2416. };
  2417. /* l4_core -> mcbsp5 */
  2418. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2419. .master = &omap3xxx_l4_core_hwmod,
  2420. .slave = &omap3xxx_mcbsp5_hwmod,
  2421. .clk = "mcbsp5_ick",
  2422. .addr = omap3xxx_mcbsp5_addrs,
  2423. .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_addrs),
  2424. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2425. };
  2426. /* mcbsp5 slave ports */
  2427. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
  2428. &omap3xxx_l4_core__mcbsp5,
  2429. };
  2430. static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
  2431. .name = "mcbsp5",
  2432. .class = &omap3xxx_mcbsp_hwmod_class,
  2433. .mpu_irqs = omap3xxx_mcbsp5_irqs,
  2434. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_irqs),
  2435. .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
  2436. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs),
  2437. .main_clk = "mcbsp5_fck",
  2438. .prcm = {
  2439. .omap2 = {
  2440. .prcm_reg_id = 1,
  2441. .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
  2442. .module_offs = CORE_MOD,
  2443. .idlest_reg_id = 1,
  2444. .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
  2445. },
  2446. },
  2447. .slaves = omap3xxx_mcbsp5_slaves,
  2448. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
  2449. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2450. };
  2451. /* 'mcbsp sidetone' class */
  2452. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
  2453. .sysc_offs = 0x0010,
  2454. .sysc_flags = SYSC_HAS_AUTOIDLE,
  2455. .sysc_fields = &omap_hwmod_sysc_type1,
  2456. };
  2457. static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
  2458. .name = "mcbsp_sidetone",
  2459. .sysc = &omap3xxx_mcbsp_sidetone_sysc,
  2460. };
  2461. /* mcbsp2_sidetone */
  2462. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
  2463. { .name = "irq", .irq = 4 },
  2464. };
  2465. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2466. {
  2467. .name = "sidetone",
  2468. .pa_start = 0x49028000,
  2469. .pa_end = 0x490280ff,
  2470. .flags = ADDR_TYPE_RT
  2471. },
  2472. };
  2473. /* l4_per -> mcbsp2_sidetone */
  2474. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2475. .master = &omap3xxx_l4_per_hwmod,
  2476. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2477. .clk = "mcbsp2_ick",
  2478. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2479. .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs),
  2480. .user = OCP_USER_MPU,
  2481. };
  2482. /* mcbsp2_sidetone slave ports */
  2483. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
  2484. &omap3xxx_l4_per__mcbsp2_sidetone,
  2485. };
  2486. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  2487. .name = "mcbsp2_sidetone",
  2488. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2489. .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
  2490. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs),
  2491. .main_clk = "mcbsp2_fck",
  2492. .prcm = {
  2493. .omap2 = {
  2494. .prcm_reg_id = 1,
  2495. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  2496. .module_offs = OMAP3430_PER_MOD,
  2497. .idlest_reg_id = 1,
  2498. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  2499. },
  2500. },
  2501. .slaves = omap3xxx_mcbsp2_sidetone_slaves,
  2502. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
  2503. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2504. };
  2505. /* mcbsp3_sidetone */
  2506. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
  2507. { .name = "irq", .irq = 5 },
  2508. };
  2509. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2510. {
  2511. .name = "sidetone",
  2512. .pa_start = 0x4902A000,
  2513. .pa_end = 0x4902A0ff,
  2514. .flags = ADDR_TYPE_RT
  2515. },
  2516. };
  2517. /* l4_per -> mcbsp3_sidetone */
  2518. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2519. .master = &omap3xxx_l4_per_hwmod,
  2520. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2521. .clk = "mcbsp3_ick",
  2522. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2523. .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs),
  2524. .user = OCP_USER_MPU,
  2525. };
  2526. /* mcbsp3_sidetone slave ports */
  2527. static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
  2528. &omap3xxx_l4_per__mcbsp3_sidetone,
  2529. };
  2530. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
  2531. .name = "mcbsp3_sidetone",
  2532. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  2533. .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
  2534. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs),
  2535. .main_clk = "mcbsp3_fck",
  2536. .prcm = {
  2537. .omap2 = {
  2538. .prcm_reg_id = 1,
  2539. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  2540. .module_offs = OMAP3430_PER_MOD,
  2541. .idlest_reg_id = 1,
  2542. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  2543. },
  2544. },
  2545. .slaves = omap3xxx_mcbsp3_sidetone_slaves,
  2546. .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
  2547. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2548. };
  2549. /* SR common */
  2550. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  2551. .clkact_shift = 20,
  2552. };
  2553. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  2554. .sysc_offs = 0x24,
  2555. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  2556. .clockact = CLOCKACT_TEST_ICLK,
  2557. .sysc_fields = &omap34xx_sr_sysc_fields,
  2558. };
  2559. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  2560. .name = "smartreflex",
  2561. .sysc = &omap34xx_sr_sysc,
  2562. .rev = 1,
  2563. };
  2564. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  2565. .sidle_shift = 24,
  2566. .enwkup_shift = 26
  2567. };
  2568. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  2569. .sysc_offs = 0x38,
  2570. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2571. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  2572. SYSC_NO_CACHE),
  2573. .sysc_fields = &omap36xx_sr_sysc_fields,
  2574. };
  2575. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  2576. .name = "smartreflex",
  2577. .sysc = &omap36xx_sr_sysc,
  2578. .rev = 2,
  2579. };
  2580. /* SR1 */
  2581. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  2582. &omap3_l4_core__sr1,
  2583. };
  2584. static struct omap_hwmod omap34xx_sr1_hwmod = {
  2585. .name = "sr1_hwmod",
  2586. .class = &omap34xx_smartreflex_hwmod_class,
  2587. .main_clk = "sr1_fck",
  2588. .vdd_name = "mpu",
  2589. .prcm = {
  2590. .omap2 = {
  2591. .prcm_reg_id = 1,
  2592. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2593. .module_offs = WKUP_MOD,
  2594. .idlest_reg_id = 1,
  2595. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2596. },
  2597. },
  2598. .slaves = omap3_sr1_slaves,
  2599. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2600. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  2601. CHIP_IS_OMAP3430ES3_0 |
  2602. CHIP_IS_OMAP3430ES3_1),
  2603. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2604. };
  2605. static struct omap_hwmod omap36xx_sr1_hwmod = {
  2606. .name = "sr1_hwmod",
  2607. .class = &omap36xx_smartreflex_hwmod_class,
  2608. .main_clk = "sr1_fck",
  2609. .vdd_name = "mpu",
  2610. .prcm = {
  2611. .omap2 = {
  2612. .prcm_reg_id = 1,
  2613. .module_bit = OMAP3430_EN_SR1_SHIFT,
  2614. .module_offs = WKUP_MOD,
  2615. .idlest_reg_id = 1,
  2616. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  2617. },
  2618. },
  2619. .slaves = omap3_sr1_slaves,
  2620. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  2621. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  2622. };
  2623. /* SR2 */
  2624. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  2625. &omap3_l4_core__sr2,
  2626. };
  2627. static struct omap_hwmod omap34xx_sr2_hwmod = {
  2628. .name = "sr2_hwmod",
  2629. .class = &omap34xx_smartreflex_hwmod_class,
  2630. .main_clk = "sr2_fck",
  2631. .vdd_name = "core",
  2632. .prcm = {
  2633. .omap2 = {
  2634. .prcm_reg_id = 1,
  2635. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2636. .module_offs = WKUP_MOD,
  2637. .idlest_reg_id = 1,
  2638. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2639. },
  2640. },
  2641. .slaves = omap3_sr2_slaves,
  2642. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2643. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  2644. CHIP_IS_OMAP3430ES3_0 |
  2645. CHIP_IS_OMAP3430ES3_1),
  2646. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  2647. };
  2648. static struct omap_hwmod omap36xx_sr2_hwmod = {
  2649. .name = "sr2_hwmod",
  2650. .class = &omap36xx_smartreflex_hwmod_class,
  2651. .main_clk = "sr2_fck",
  2652. .vdd_name = "core",
  2653. .prcm = {
  2654. .omap2 = {
  2655. .prcm_reg_id = 1,
  2656. .module_bit = OMAP3430_EN_SR2_SHIFT,
  2657. .module_offs = WKUP_MOD,
  2658. .idlest_reg_id = 1,
  2659. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  2660. },
  2661. },
  2662. .slaves = omap3_sr2_slaves,
  2663. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  2664. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  2665. };
  2666. /*
  2667. * 'mailbox' class
  2668. * mailbox module allowing communication between the on-chip processors
  2669. * using a queued mailbox-interrupt mechanism.
  2670. */
  2671. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  2672. .rev_offs = 0x000,
  2673. .sysc_offs = 0x010,
  2674. .syss_offs = 0x014,
  2675. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2676. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2677. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2678. .sysc_fields = &omap_hwmod_sysc_type1,
  2679. };
  2680. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  2681. .name = "mailbox",
  2682. .sysc = &omap3xxx_mailbox_sysc,
  2683. };
  2684. static struct omap_hwmod omap3xxx_mailbox_hwmod;
  2685. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  2686. { .irq = 26 },
  2687. };
  2688. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2689. {
  2690. .pa_start = 0x48094000,
  2691. .pa_end = 0x480941ff,
  2692. .flags = ADDR_TYPE_RT,
  2693. },
  2694. };
  2695. /* l4_core -> mailbox */
  2696. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2697. .master = &omap3xxx_l4_core_hwmod,
  2698. .slave = &omap3xxx_mailbox_hwmod,
  2699. .addr = omap3xxx_mailbox_addrs,
  2700. .addr_cnt = ARRAY_SIZE(omap3xxx_mailbox_addrs),
  2701. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2702. };
  2703. /* mailbox slave ports */
  2704. static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
  2705. &omap3xxx_l4_core__mailbox,
  2706. };
  2707. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  2708. .name = "mailbox",
  2709. .class = &omap3xxx_mailbox_hwmod_class,
  2710. .mpu_irqs = omap3xxx_mailbox_irqs,
  2711. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mailbox_irqs),
  2712. .main_clk = "mailboxes_ick",
  2713. .prcm = {
  2714. .omap2 = {
  2715. .prcm_reg_id = 1,
  2716. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  2717. .module_offs = CORE_MOD,
  2718. .idlest_reg_id = 1,
  2719. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  2720. },
  2721. },
  2722. .slaves = omap3xxx_mailbox_slaves,
  2723. .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
  2724. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2725. };
  2726. /* l4 core -> mcspi1 interface */
  2727. static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
  2728. {
  2729. .pa_start = 0x48098000,
  2730. .pa_end = 0x480980ff,
  2731. .flags = ADDR_TYPE_RT,
  2732. },
  2733. };
  2734. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2735. .master = &omap3xxx_l4_core_hwmod,
  2736. .slave = &omap34xx_mcspi1,
  2737. .clk = "mcspi1_ick",
  2738. .addr = omap34xx_mcspi1_addr_space,
  2739. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
  2740. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2741. };
  2742. /* l4 core -> mcspi2 interface */
  2743. static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
  2744. {
  2745. .pa_start = 0x4809a000,
  2746. .pa_end = 0x4809a0ff,
  2747. .flags = ADDR_TYPE_RT,
  2748. },
  2749. };
  2750. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2751. .master = &omap3xxx_l4_core_hwmod,
  2752. .slave = &omap34xx_mcspi2,
  2753. .clk = "mcspi2_ick",
  2754. .addr = omap34xx_mcspi2_addr_space,
  2755. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
  2756. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2757. };
  2758. /* l4 core -> mcspi3 interface */
  2759. static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
  2760. {
  2761. .pa_start = 0x480b8000,
  2762. .pa_end = 0x480b80ff,
  2763. .flags = ADDR_TYPE_RT,
  2764. },
  2765. };
  2766. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2767. .master = &omap3xxx_l4_core_hwmod,
  2768. .slave = &omap34xx_mcspi3,
  2769. .clk = "mcspi3_ick",
  2770. .addr = omap34xx_mcspi3_addr_space,
  2771. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
  2772. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2773. };
  2774. /* l4 core -> mcspi4 interface */
  2775. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2776. {
  2777. .pa_start = 0x480ba000,
  2778. .pa_end = 0x480ba0ff,
  2779. .flags = ADDR_TYPE_RT,
  2780. },
  2781. };
  2782. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2783. .master = &omap3xxx_l4_core_hwmod,
  2784. .slave = &omap34xx_mcspi4,
  2785. .clk = "mcspi4_ick",
  2786. .addr = omap34xx_mcspi4_addr_space,
  2787. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
  2788. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2789. };
  2790. /*
  2791. * 'mcspi' class
  2792. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  2793. * bus
  2794. */
  2795. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  2796. .rev_offs = 0x0000,
  2797. .sysc_offs = 0x0010,
  2798. .syss_offs = 0x0014,
  2799. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2800. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2801. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2802. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2803. .sysc_fields = &omap_hwmod_sysc_type1,
  2804. };
  2805. static struct omap_hwmod_class omap34xx_mcspi_class = {
  2806. .name = "mcspi",
  2807. .sysc = &omap34xx_mcspi_sysc,
  2808. .rev = OMAP3_MCSPI_REV,
  2809. };
  2810. /* mcspi1 */
  2811. static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
  2812. { .name = "irq", .irq = 65 },
  2813. };
  2814. static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
  2815. { .name = "tx0", .dma_req = 35 },
  2816. { .name = "rx0", .dma_req = 36 },
  2817. { .name = "tx1", .dma_req = 37 },
  2818. { .name = "rx1", .dma_req = 38 },
  2819. { .name = "tx2", .dma_req = 39 },
  2820. { .name = "rx2", .dma_req = 40 },
  2821. { .name = "tx3", .dma_req = 41 },
  2822. { .name = "rx3", .dma_req = 42 },
  2823. };
  2824. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  2825. &omap34xx_l4_core__mcspi1,
  2826. };
  2827. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  2828. .num_chipselect = 4,
  2829. };
  2830. static struct omap_hwmod omap34xx_mcspi1 = {
  2831. .name = "mcspi1",
  2832. .mpu_irqs = omap34xx_mcspi1_mpu_irqs,
  2833. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs),
  2834. .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
  2835. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
  2836. .main_clk = "mcspi1_fck",
  2837. .prcm = {
  2838. .omap2 = {
  2839. .module_offs = CORE_MOD,
  2840. .prcm_reg_id = 1,
  2841. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  2842. .idlest_reg_id = 1,
  2843. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  2844. },
  2845. },
  2846. .slaves = omap34xx_mcspi1_slaves,
  2847. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  2848. .class = &omap34xx_mcspi_class,
  2849. .dev_attr = &omap_mcspi1_dev_attr,
  2850. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2851. };
  2852. /* mcspi2 */
  2853. static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
  2854. { .name = "irq", .irq = 66 },
  2855. };
  2856. static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
  2857. { .name = "tx0", .dma_req = 43 },
  2858. { .name = "rx0", .dma_req = 44 },
  2859. { .name = "tx1", .dma_req = 45 },
  2860. { .name = "rx1", .dma_req = 46 },
  2861. };
  2862. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  2863. &omap34xx_l4_core__mcspi2,
  2864. };
  2865. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  2866. .num_chipselect = 2,
  2867. };
  2868. static struct omap_hwmod omap34xx_mcspi2 = {
  2869. .name = "mcspi2",
  2870. .mpu_irqs = omap34xx_mcspi2_mpu_irqs,
  2871. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs),
  2872. .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
  2873. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
  2874. .main_clk = "mcspi2_fck",
  2875. .prcm = {
  2876. .omap2 = {
  2877. .module_offs = CORE_MOD,
  2878. .prcm_reg_id = 1,
  2879. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  2880. .idlest_reg_id = 1,
  2881. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  2882. },
  2883. },
  2884. .slaves = omap34xx_mcspi2_slaves,
  2885. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  2886. .class = &omap34xx_mcspi_class,
  2887. .dev_attr = &omap_mcspi2_dev_attr,
  2888. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2889. };
  2890. /* mcspi3 */
  2891. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  2892. { .name = "irq", .irq = 91 }, /* 91 */
  2893. };
  2894. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  2895. { .name = "tx0", .dma_req = 15 },
  2896. { .name = "rx0", .dma_req = 16 },
  2897. { .name = "tx1", .dma_req = 23 },
  2898. { .name = "rx1", .dma_req = 24 },
  2899. };
  2900. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  2901. &omap34xx_l4_core__mcspi3,
  2902. };
  2903. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  2904. .num_chipselect = 2,
  2905. };
  2906. static struct omap_hwmod omap34xx_mcspi3 = {
  2907. .name = "mcspi3",
  2908. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  2909. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
  2910. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  2911. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
  2912. .main_clk = "mcspi3_fck",
  2913. .prcm = {
  2914. .omap2 = {
  2915. .module_offs = CORE_MOD,
  2916. .prcm_reg_id = 1,
  2917. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  2918. .idlest_reg_id = 1,
  2919. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  2920. },
  2921. },
  2922. .slaves = omap34xx_mcspi3_slaves,
  2923. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  2924. .class = &omap34xx_mcspi_class,
  2925. .dev_attr = &omap_mcspi3_dev_attr,
  2926. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2927. };
  2928. /* SPI4 */
  2929. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  2930. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  2931. };
  2932. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  2933. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  2934. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  2935. };
  2936. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  2937. &omap34xx_l4_core__mcspi4,
  2938. };
  2939. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  2940. .num_chipselect = 1,
  2941. };
  2942. static struct omap_hwmod omap34xx_mcspi4 = {
  2943. .name = "mcspi4",
  2944. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  2945. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
  2946. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  2947. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
  2948. .main_clk = "mcspi4_fck",
  2949. .prcm = {
  2950. .omap2 = {
  2951. .module_offs = CORE_MOD,
  2952. .prcm_reg_id = 1,
  2953. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  2954. .idlest_reg_id = 1,
  2955. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  2956. },
  2957. },
  2958. .slaves = omap34xx_mcspi4_slaves,
  2959. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  2960. .class = &omap34xx_mcspi_class,
  2961. .dev_attr = &omap_mcspi4_dev_attr,
  2962. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  2963. };
  2964. /*
  2965. * usbhsotg
  2966. */
  2967. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  2968. .rev_offs = 0x0400,
  2969. .sysc_offs = 0x0404,
  2970. .syss_offs = 0x0408,
  2971. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  2972. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2973. SYSC_HAS_AUTOIDLE),
  2974. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2975. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  2976. .sysc_fields = &omap_hwmod_sysc_type1,
  2977. };
  2978. static struct omap_hwmod_class usbotg_class = {
  2979. .name = "usbotg",
  2980. .sysc = &omap3xxx_usbhsotg_sysc,
  2981. };
  2982. /* usb_otg_hs */
  2983. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  2984. { .name = "mc", .irq = 92 },
  2985. { .name = "dma", .irq = 93 },
  2986. };
  2987. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  2988. .name = "usb_otg_hs",
  2989. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  2990. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
  2991. .main_clk = "hsotgusb_ick",
  2992. .prcm = {
  2993. .omap2 = {
  2994. .prcm_reg_id = 1,
  2995. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  2996. .module_offs = CORE_MOD,
  2997. .idlest_reg_id = 1,
  2998. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  2999. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  3000. },
  3001. },
  3002. .masters = omap3xxx_usbhsotg_masters,
  3003. .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
  3004. .slaves = omap3xxx_usbhsotg_slaves,
  3005. .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
  3006. .class = &usbotg_class,
  3007. /*
  3008. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  3009. * broken when autoidle is enabled
  3010. * workaround is to disable the autoidle bit at module level.
  3011. */
  3012. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  3013. | HWMOD_SWSUP_MSTANDBY,
  3014. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  3015. };
  3016. /* usb_otg_hs */
  3017. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  3018. { .name = "mc", .irq = 71 },
  3019. };
  3020. static struct omap_hwmod_class am35xx_usbotg_class = {
  3021. .name = "am35xx_usbotg",
  3022. .sysc = NULL,
  3023. };
  3024. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  3025. .name = "am35x_otg_hs",
  3026. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  3027. .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs),
  3028. .main_clk = NULL,
  3029. .prcm = {
  3030. .omap2 = {
  3031. },
  3032. },
  3033. .masters = am35xx_usbhsotg_masters,
  3034. .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
  3035. .slaves = am35xx_usbhsotg_slaves,
  3036. .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
  3037. .class = &am35xx_usbotg_class,
  3038. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
  3039. };
  3040. /* MMC/SD/SDIO common */
  3041. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  3042. .rev_offs = 0x1fc,
  3043. .sysc_offs = 0x10,
  3044. .syss_offs = 0x14,
  3045. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  3046. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  3047. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  3048. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  3049. .sysc_fields = &omap_hwmod_sysc_type1,
  3050. };
  3051. static struct omap_hwmod_class omap34xx_mmc_class = {
  3052. .name = "mmc",
  3053. .sysc = &omap34xx_mmc_sysc,
  3054. };
  3055. /* MMC/SD/SDIO1 */
  3056. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  3057. { .irq = 83, },
  3058. };
  3059. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  3060. { .name = "tx", .dma_req = 61, },
  3061. { .name = "rx", .dma_req = 62, },
  3062. };
  3063. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  3064. { .role = "dbck", .clk = "omap_32k_fck", },
  3065. };
  3066. static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
  3067. &omap3xxx_l4_core__mmc1,
  3068. };
  3069. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  3070. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  3071. };
  3072. static struct omap_hwmod omap3xxx_mmc1_hwmod = {
  3073. .name = "mmc1",
  3074. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  3075. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs),
  3076. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  3077. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs),
  3078. .opt_clks = omap34xx_mmc1_opt_clks,
  3079. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  3080. .main_clk = "mmchs1_fck",
  3081. .prcm = {
  3082. .omap2 = {
  3083. .module_offs = CORE_MOD,
  3084. .prcm_reg_id = 1,
  3085. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  3086. .idlest_reg_id = 1,
  3087. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  3088. },
  3089. },
  3090. .dev_attr = &mmc1_dev_attr,
  3091. .slaves = omap3xxx_mmc1_slaves,
  3092. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
  3093. .class = &omap34xx_mmc_class,
  3094. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  3095. };
  3096. /* MMC/SD/SDIO2 */
  3097. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  3098. { .irq = INT_24XX_MMC2_IRQ, },
  3099. };
  3100. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  3101. { .name = "tx", .dma_req = 47, },
  3102. { .name = "rx", .dma_req = 48, },
  3103. };
  3104. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  3105. { .role = "dbck", .clk = "omap_32k_fck", },
  3106. };
  3107. static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
  3108. &omap3xxx_l4_core__mmc2,
  3109. };
  3110. static struct omap_hwmod omap3xxx_mmc2_hwmod = {
  3111. .name = "mmc2",
  3112. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  3113. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs),
  3114. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  3115. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs),
  3116. .opt_clks = omap34xx_mmc2_opt_clks,
  3117. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  3118. .main_clk = "mmchs2_fck",
  3119. .prcm = {
  3120. .omap2 = {
  3121. .module_offs = CORE_MOD,
  3122. .prcm_reg_id = 1,
  3123. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  3124. .idlest_reg_id = 1,
  3125. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  3126. },
  3127. },
  3128. .slaves = omap3xxx_mmc2_slaves,
  3129. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
  3130. .class = &omap34xx_mmc_class,
  3131. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  3132. };
  3133. /* MMC/SD/SDIO3 */
  3134. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  3135. { .irq = 94, },
  3136. };
  3137. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  3138. { .name = "tx", .dma_req = 77, },
  3139. { .name = "rx", .dma_req = 78, },
  3140. };
  3141. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  3142. { .role = "dbck", .clk = "omap_32k_fck", },
  3143. };
  3144. static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
  3145. &omap3xxx_l4_core__mmc3,
  3146. };
  3147. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  3148. .name = "mmc3",
  3149. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  3150. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs),
  3151. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  3152. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs),
  3153. .opt_clks = omap34xx_mmc3_opt_clks,
  3154. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  3155. .main_clk = "mmchs3_fck",
  3156. .prcm = {
  3157. .omap2 = {
  3158. .prcm_reg_id = 1,
  3159. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  3160. .idlest_reg_id = 1,
  3161. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  3162. },
  3163. },
  3164. .slaves = omap3xxx_mmc3_slaves,
  3165. .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
  3166. .class = &omap34xx_mmc_class,
  3167. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  3168. };
  3169. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  3170. &omap3xxx_l3_main_hwmod,
  3171. &omap3xxx_l4_core_hwmod,
  3172. &omap3xxx_l4_per_hwmod,
  3173. &omap3xxx_l4_wkup_hwmod,
  3174. &omap3xxx_mmc1_hwmod,
  3175. &omap3xxx_mmc2_hwmod,
  3176. &omap3xxx_mmc3_hwmod,
  3177. &omap3xxx_mpu_hwmod,
  3178. &omap3xxx_iva_hwmod,
  3179. &omap3xxx_timer1_hwmod,
  3180. &omap3xxx_timer2_hwmod,
  3181. &omap3xxx_timer3_hwmod,
  3182. &omap3xxx_timer4_hwmod,
  3183. &omap3xxx_timer5_hwmod,
  3184. &omap3xxx_timer6_hwmod,
  3185. &omap3xxx_timer7_hwmod,
  3186. &omap3xxx_timer8_hwmod,
  3187. &omap3xxx_timer9_hwmod,
  3188. &omap3xxx_timer10_hwmod,
  3189. &omap3xxx_timer11_hwmod,
  3190. &omap3xxx_timer12_hwmod,
  3191. &omap3xxx_wd_timer2_hwmod,
  3192. &omap3xxx_uart1_hwmod,
  3193. &omap3xxx_uart2_hwmod,
  3194. &omap3xxx_uart3_hwmod,
  3195. &omap3xxx_uart4_hwmod,
  3196. /* dss class */
  3197. &omap3430es1_dss_core_hwmod,
  3198. &omap3xxx_dss_core_hwmod,
  3199. &omap3xxx_dss_dispc_hwmod,
  3200. &omap3xxx_dss_dsi1_hwmod,
  3201. &omap3xxx_dss_rfbi_hwmod,
  3202. &omap3xxx_dss_venc_hwmod,
  3203. /* i2c class */
  3204. &omap3xxx_i2c1_hwmod,
  3205. &omap3xxx_i2c2_hwmod,
  3206. &omap3xxx_i2c3_hwmod,
  3207. &omap34xx_sr1_hwmod,
  3208. &omap34xx_sr2_hwmod,
  3209. &omap36xx_sr1_hwmod,
  3210. &omap36xx_sr2_hwmod,
  3211. /* gpio class */
  3212. &omap3xxx_gpio1_hwmod,
  3213. &omap3xxx_gpio2_hwmod,
  3214. &omap3xxx_gpio3_hwmod,
  3215. &omap3xxx_gpio4_hwmod,
  3216. &omap3xxx_gpio5_hwmod,
  3217. &omap3xxx_gpio6_hwmod,
  3218. /* dma_system class*/
  3219. &omap3xxx_dma_system_hwmod,
  3220. /* mcbsp class */
  3221. &omap3xxx_mcbsp1_hwmod,
  3222. &omap3xxx_mcbsp2_hwmod,
  3223. &omap3xxx_mcbsp3_hwmod,
  3224. &omap3xxx_mcbsp4_hwmod,
  3225. &omap3xxx_mcbsp5_hwmod,
  3226. &omap3xxx_mcbsp2_sidetone_hwmod,
  3227. &omap3xxx_mcbsp3_sidetone_hwmod,
  3228. /* mailbox class */
  3229. &omap3xxx_mailbox_hwmod,
  3230. /* mcspi class */
  3231. &omap34xx_mcspi1,
  3232. &omap34xx_mcspi2,
  3233. &omap34xx_mcspi3,
  3234. &omap34xx_mcspi4,
  3235. /* usbotg class */
  3236. &omap3xxx_usbhsotg_hwmod,
  3237. /* usbotg for am35x */
  3238. &am35xx_usbhsotg_hwmod,
  3239. NULL,
  3240. };
  3241. int __init omap3xxx_hwmod_init(void)
  3242. {
  3243. return omap_hwmod_register(omap3xxx_hwmods);
  3244. }