omap_hwmod_3xxx_data.c 88 KB

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