omap_hwmod_3xxx_data.c 100 KB

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