omap_hwmod_3xxx_data.c 84 KB

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