omap_hwmod_3xxx_data.c 84 KB

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