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