omap_hwmod_3xxx_data.c 83 KB

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