omap_hwmod_3xxx_data.c 84 KB

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