omap_hwmod_3xxx_data.c 101 KB

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