omap_hwmod_3xxx_data.c 89 KB

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