omap_hwmod_7xx_data.c 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295
  1. /*
  2. * Hardware modules present on the DRA7xx chips
  3. *
  4. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
  5. *
  6. * Paul Walmsley
  7. * Benoit Cousson
  8. *
  9. * This file is automatically generated from the OMAP hardware databases.
  10. * We respectfully ask that any modifications to this file be coordinated
  11. * with the public linux-omap@vger.kernel.org mailing list and the
  12. * authors above to ensure that the autogeneration scripts are kept
  13. * up-to-date with the file contents.
  14. *
  15. * This program is free software; you can redistribute it and/or modify
  16. * it under the terms of the GNU General Public License version 2 as
  17. * published by the Free Software Foundation.
  18. */
  19. #include <linux/io.h>
  20. #include <linux/platform_data/gpio-omap.h>
  21. #include <linux/power/smartreflex.h>
  22. #include <linux/i2c-omap.h>
  23. #include <linux/omap-dma.h>
  24. #include <linux/platform_data/spi-omap2-mcspi.h>
  25. #include <linux/platform_data/asoc-ti-mcbsp.h>
  26. #include <plat/dmtimer.h>
  27. #include "omap_hwmod.h"
  28. #include "omap_hwmod_common_data.h"
  29. #include "cm1_7xx.h"
  30. #include "cm2_7xx.h"
  31. #include "prm7xx.h"
  32. #include "i2c.h"
  33. #include "mmc.h"
  34. #include "wd_timer.h"
  35. #include "soc.h"
  36. /* Base offset for all DRA7XX interrupts external to MPUSS */
  37. #define DRA7XX_IRQ_GIC_START 32
  38. /* Base offset for all DRA7XX dma requests */
  39. #define DRA7XX_DMA_REQ_START 1
  40. /*
  41. * IP blocks
  42. */
  43. /*
  44. * 'l3' class
  45. * instance(s): l3_instr, l3_main_1, l3_main_2
  46. */
  47. static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
  48. .name = "l3",
  49. };
  50. /* l3_instr */
  51. static struct omap_hwmod dra7xx_l3_instr_hwmod = {
  52. .name = "l3_instr",
  53. .class = &dra7xx_l3_hwmod_class,
  54. .clkdm_name = "l3instr_clkdm",
  55. .prcm = {
  56. .omap4 = {
  57. .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
  58. .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
  59. .modulemode = MODULEMODE_HWCTRL,
  60. },
  61. },
  62. };
  63. /* l3_main_1 */
  64. static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
  65. .name = "l3_main_1",
  66. .class = &dra7xx_l3_hwmod_class,
  67. .clkdm_name = "l3main1_clkdm",
  68. .prcm = {
  69. .omap4 = {
  70. .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
  71. .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
  72. },
  73. },
  74. };
  75. /* l3_main_2 */
  76. static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
  77. .name = "l3_main_2",
  78. .class = &dra7xx_l3_hwmod_class,
  79. .clkdm_name = "l3instr_clkdm",
  80. .prcm = {
  81. .omap4 = {
  82. .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
  83. .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
  84. .modulemode = MODULEMODE_HWCTRL,
  85. },
  86. },
  87. };
  88. /*
  89. * 'l4' class
  90. * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
  91. */
  92. static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
  93. .name = "l4",
  94. };
  95. /* l4_cfg */
  96. static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
  97. .name = "l4_cfg",
  98. .class = &dra7xx_l4_hwmod_class,
  99. .clkdm_name = "l4cfg_clkdm",
  100. .prcm = {
  101. .omap4 = {
  102. .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
  103. .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
  104. },
  105. },
  106. };
  107. /* l4_per1 */
  108. static struct omap_hwmod dra7xx_l4_per1_hwmod = {
  109. .name = "l4_per1",
  110. .class = &dra7xx_l4_hwmod_class,
  111. .clkdm_name = "l4per_clkdm",
  112. .prcm = {
  113. .omap4 = {
  114. .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
  115. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  116. },
  117. },
  118. };
  119. /* l4_per2 */
  120. static struct omap_hwmod dra7xx_l4_per2_hwmod = {
  121. .name = "l4_per2",
  122. .class = &dra7xx_l4_hwmod_class,
  123. .clkdm_name = "l4per2_clkdm",
  124. .prcm = {
  125. .omap4 = {
  126. .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
  127. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  128. },
  129. },
  130. };
  131. /* l4_per3 */
  132. static struct omap_hwmod dra7xx_l4_per3_hwmod = {
  133. .name = "l4_per3",
  134. .class = &dra7xx_l4_hwmod_class,
  135. .clkdm_name = "l4per3_clkdm",
  136. .prcm = {
  137. .omap4 = {
  138. .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
  139. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  140. },
  141. },
  142. };
  143. /* l4_wkup */
  144. static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
  145. .name = "l4_wkup",
  146. .class = &dra7xx_l4_hwmod_class,
  147. .clkdm_name = "wkupaon_clkdm",
  148. .prcm = {
  149. .omap4 = {
  150. .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
  151. .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
  152. },
  153. },
  154. };
  155. /*
  156. * 'atl' class
  157. *
  158. */
  159. static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
  160. .name = "atl",
  161. };
  162. /* atl */
  163. static struct omap_hwmod dra7xx_atl_hwmod = {
  164. .name = "atl",
  165. .class = &dra7xx_atl_hwmod_class,
  166. .clkdm_name = "atl_clkdm",
  167. .main_clk = "atl_gfclk_mux",
  168. .prcm = {
  169. .omap4 = {
  170. .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
  171. .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
  172. .modulemode = MODULEMODE_SWCTRL,
  173. },
  174. },
  175. };
  176. /*
  177. * 'bb2d' class
  178. *
  179. */
  180. static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
  181. .name = "bb2d",
  182. };
  183. /* bb2d */
  184. static struct omap_hwmod dra7xx_bb2d_hwmod = {
  185. .name = "bb2d",
  186. .class = &dra7xx_bb2d_hwmod_class,
  187. .clkdm_name = "dss_clkdm",
  188. .main_clk = "dpll_core_h24x2_ck",
  189. .prcm = {
  190. .omap4 = {
  191. .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
  192. .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
  193. .modulemode = MODULEMODE_SWCTRL,
  194. },
  195. },
  196. };
  197. /*
  198. * 'counter' class
  199. *
  200. */
  201. static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
  202. .rev_offs = 0x0000,
  203. .sysc_offs = 0x0010,
  204. .sysc_flags = SYSC_HAS_SIDLEMODE,
  205. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  206. SIDLE_SMART_WKUP),
  207. .sysc_fields = &omap_hwmod_sysc_type1,
  208. };
  209. static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
  210. .name = "counter",
  211. .sysc = &dra7xx_counter_sysc,
  212. };
  213. /* counter_32k */
  214. static struct omap_hwmod dra7xx_counter_32k_hwmod = {
  215. .name = "counter_32k",
  216. .class = &dra7xx_counter_hwmod_class,
  217. .clkdm_name = "wkupaon_clkdm",
  218. .flags = HWMOD_SWSUP_SIDLE,
  219. .main_clk = "wkupaon_iclk_mux",
  220. .prcm = {
  221. .omap4 = {
  222. .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
  223. .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
  224. },
  225. },
  226. };
  227. /*
  228. * 'ctrl_module' class
  229. *
  230. */
  231. static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
  232. .name = "ctrl_module",
  233. };
  234. /* ctrl_module_wkup */
  235. static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
  236. .name = "ctrl_module_wkup",
  237. .class = &dra7xx_ctrl_module_hwmod_class,
  238. .clkdm_name = "wkupaon_clkdm",
  239. .prcm = {
  240. .omap4 = {
  241. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  242. },
  243. },
  244. };
  245. /*
  246. * 'gmac' class
  247. * cpsw/gmac sub system
  248. */
  249. static struct omap_hwmod_class_sysconfig dra7xx_gmac_sysc = {
  250. .rev_offs = 0x0,
  251. .sysc_offs = 0x8,
  252. .syss_offs = 0x4,
  253. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  254. SYSS_HAS_RESET_STATUS),
  255. .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  256. MSTANDBY_NO),
  257. .sysc_fields = &omap_hwmod_sysc_type3,
  258. };
  259. static struct omap_hwmod_class dra7xx_gmac_hwmod_class = {
  260. .name = "gmac",
  261. .sysc = &dra7xx_gmac_sysc,
  262. };
  263. static struct omap_hwmod dra7xx_gmac_hwmod = {
  264. .name = "gmac",
  265. .class = &dra7xx_gmac_hwmod_class,
  266. .clkdm_name = "gmac_clkdm",
  267. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  268. .main_clk = "dpll_gmac_ck",
  269. .mpu_rt_idx = 1,
  270. .prcm = {
  271. .omap4 = {
  272. .clkctrl_offs = DRA7XX_CM_GMAC_GMAC_CLKCTRL_OFFSET,
  273. .context_offs = DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET,
  274. .modulemode = MODULEMODE_SWCTRL,
  275. },
  276. },
  277. };
  278. /*
  279. * 'mdio' class
  280. */
  281. static struct omap_hwmod_class dra7xx_mdio_hwmod_class = {
  282. .name = "davinci_mdio",
  283. };
  284. static struct omap_hwmod dra7xx_mdio_hwmod = {
  285. .name = "davinci_mdio",
  286. .class = &dra7xx_mdio_hwmod_class,
  287. .clkdm_name = "gmac_clkdm",
  288. .main_clk = "dpll_gmac_ck",
  289. };
  290. /*
  291. * 'dcan' class
  292. *
  293. */
  294. static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
  295. .name = "dcan",
  296. };
  297. /* dcan1 */
  298. static struct omap_hwmod dra7xx_dcan1_hwmod = {
  299. .name = "dcan1",
  300. .class = &dra7xx_dcan_hwmod_class,
  301. .clkdm_name = "wkupaon_clkdm",
  302. .main_clk = "dcan1_sys_clk_mux",
  303. .prcm = {
  304. .omap4 = {
  305. .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
  306. .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
  307. .modulemode = MODULEMODE_SWCTRL,
  308. },
  309. },
  310. };
  311. /* dcan2 */
  312. static struct omap_hwmod dra7xx_dcan2_hwmod = {
  313. .name = "dcan2",
  314. .class = &dra7xx_dcan_hwmod_class,
  315. .clkdm_name = "l4per2_clkdm",
  316. .main_clk = "sys_clkin1",
  317. .prcm = {
  318. .omap4 = {
  319. .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
  320. .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
  321. .modulemode = MODULEMODE_SWCTRL,
  322. },
  323. },
  324. };
  325. /*
  326. * 'dma' class
  327. *
  328. */
  329. static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
  330. .rev_offs = 0x0000,
  331. .sysc_offs = 0x002c,
  332. .syss_offs = 0x0028,
  333. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  334. SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  335. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  336. SYSS_HAS_RESET_STATUS),
  337. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  338. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  339. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  340. .sysc_fields = &omap_hwmod_sysc_type1,
  341. };
  342. static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
  343. .name = "dma",
  344. .sysc = &dra7xx_dma_sysc,
  345. };
  346. /* dma dev_attr */
  347. static struct omap_dma_dev_attr dma_dev_attr = {
  348. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  349. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  350. .lch_count = 32,
  351. };
  352. /* dma_system */
  353. static struct omap_hwmod dra7xx_dma_system_hwmod = {
  354. .name = "dma_system",
  355. .class = &dra7xx_dma_hwmod_class,
  356. .clkdm_name = "dma_clkdm",
  357. .main_clk = "l3_iclk_div",
  358. .prcm = {
  359. .omap4 = {
  360. .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
  361. .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
  362. },
  363. },
  364. .dev_attr = &dma_dev_attr,
  365. };
  366. /*
  367. * 'dss' class
  368. *
  369. */
  370. static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
  371. .rev_offs = 0x0000,
  372. .syss_offs = 0x0014,
  373. .sysc_flags = SYSS_HAS_RESET_STATUS,
  374. };
  375. static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
  376. .name = "dss",
  377. .sysc = &dra7xx_dss_sysc,
  378. .reset = omap_dss_reset,
  379. };
  380. /* dss */
  381. static struct omap_hwmod_dma_info dra7xx_dss_sdma_reqs[] = {
  382. { .dma_req = 75 + DRA7XX_DMA_REQ_START },
  383. { .dma_req = -1 }
  384. };
  385. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  386. { .role = "dss_clk", .clk = "dss_dss_clk" },
  387. { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
  388. { .role = "32khz_clk", .clk = "dss_32khz_clk" },
  389. { .role = "video2_clk", .clk = "dss_video2_clk" },
  390. { .role = "video1_clk", .clk = "dss_video1_clk" },
  391. { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
  392. };
  393. static struct omap_hwmod dra7xx_dss_hwmod = {
  394. .name = "dss_core",
  395. .class = &dra7xx_dss_hwmod_class,
  396. .clkdm_name = "dss_clkdm",
  397. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  398. .sdma_reqs = dra7xx_dss_sdma_reqs,
  399. .main_clk = "dss_dss_clk",
  400. .prcm = {
  401. .omap4 = {
  402. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  403. .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
  404. .modulemode = MODULEMODE_SWCTRL,
  405. },
  406. },
  407. .opt_clks = dss_opt_clks,
  408. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  409. };
  410. /*
  411. * 'dispc' class
  412. * display controller
  413. */
  414. static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
  415. .rev_offs = 0x0000,
  416. .sysc_offs = 0x0010,
  417. .syss_offs = 0x0014,
  418. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  419. SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
  420. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  421. SYSS_HAS_RESET_STATUS),
  422. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  423. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  424. .sysc_fields = &omap_hwmod_sysc_type1,
  425. };
  426. static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
  427. .name = "dispc",
  428. .sysc = &dra7xx_dispc_sysc,
  429. };
  430. /* dss_dispc */
  431. /* dss_dispc dev_attr */
  432. static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
  433. .has_framedonetv_irq = 1,
  434. .manager_count = 4,
  435. };
  436. static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
  437. .name = "dss_dispc",
  438. .class = &dra7xx_dispc_hwmod_class,
  439. .clkdm_name = "dss_clkdm",
  440. .main_clk = "dss_dss_clk",
  441. .prcm = {
  442. .omap4 = {
  443. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  444. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  445. },
  446. },
  447. .dev_attr = &dss_dispc_dev_attr,
  448. };
  449. /*
  450. * 'hdmi' class
  451. * hdmi controller
  452. */
  453. static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
  454. .rev_offs = 0x0000,
  455. .sysc_offs = 0x0010,
  456. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  457. SYSC_HAS_SOFTRESET),
  458. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  459. SIDLE_SMART_WKUP),
  460. .sysc_fields = &omap_hwmod_sysc_type2,
  461. };
  462. static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
  463. .name = "hdmi",
  464. .sysc = &dra7xx_hdmi_sysc,
  465. };
  466. /* dss_hdmi */
  467. static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
  468. { .role = "sys_clk", .clk = "dss_hdmi_clk" },
  469. };
  470. static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
  471. .name = "dss_hdmi",
  472. .class = &dra7xx_hdmi_hwmod_class,
  473. .clkdm_name = "dss_clkdm",
  474. .main_clk = "dss_48mhz_clk",
  475. .prcm = {
  476. .omap4 = {
  477. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  478. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  479. },
  480. },
  481. .opt_clks = dss_hdmi_opt_clks,
  482. .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
  483. };
  484. /*
  485. * 'elm' class
  486. *
  487. */
  488. static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
  489. .rev_offs = 0x0000,
  490. .sysc_offs = 0x0010,
  491. .syss_offs = 0x0014,
  492. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  493. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  494. SYSS_HAS_RESET_STATUS),
  495. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  496. SIDLE_SMART_WKUP),
  497. .sysc_fields = &omap_hwmod_sysc_type1,
  498. };
  499. static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
  500. .name = "elm",
  501. .sysc = &dra7xx_elm_sysc,
  502. };
  503. /* elm */
  504. static struct omap_hwmod dra7xx_elm_hwmod = {
  505. .name = "elm",
  506. .class = &dra7xx_elm_hwmod_class,
  507. .clkdm_name = "l4per_clkdm",
  508. .main_clk = "l3_iclk_div",
  509. .prcm = {
  510. .omap4 = {
  511. .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
  512. .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
  513. },
  514. },
  515. };
  516. /*
  517. * 'gpio' class
  518. *
  519. */
  520. static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
  521. .rev_offs = 0x0000,
  522. .sysc_offs = 0x0010,
  523. .syss_offs = 0x0114,
  524. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  525. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  526. SYSS_HAS_RESET_STATUS),
  527. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  528. SIDLE_SMART_WKUP),
  529. .sysc_fields = &omap_hwmod_sysc_type1,
  530. };
  531. static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
  532. .name = "gpio",
  533. .sysc = &dra7xx_gpio_sysc,
  534. .rev = 2,
  535. };
  536. /* gpio dev_attr */
  537. static struct omap_gpio_dev_attr gpio_dev_attr = {
  538. .bank_width = 32,
  539. .dbck_flag = true,
  540. };
  541. /* gpio1 */
  542. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  543. { .role = "dbclk", .clk = "gpio1_dbclk" },
  544. };
  545. static struct omap_hwmod dra7xx_gpio1_hwmod = {
  546. .name = "gpio1",
  547. .class = &dra7xx_gpio_hwmod_class,
  548. .clkdm_name = "wkupaon_clkdm",
  549. .main_clk = "wkupaon_iclk_mux",
  550. .prcm = {
  551. .omap4 = {
  552. .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
  553. .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
  554. .modulemode = MODULEMODE_HWCTRL,
  555. },
  556. },
  557. .opt_clks = gpio1_opt_clks,
  558. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  559. .dev_attr = &gpio_dev_attr,
  560. };
  561. /* gpio2 */
  562. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  563. { .role = "dbclk", .clk = "gpio2_dbclk" },
  564. };
  565. static struct omap_hwmod dra7xx_gpio2_hwmod = {
  566. .name = "gpio2",
  567. .class = &dra7xx_gpio_hwmod_class,
  568. .clkdm_name = "l4per_clkdm",
  569. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  570. .main_clk = "l3_iclk_div",
  571. .prcm = {
  572. .omap4 = {
  573. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
  574. .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
  575. .modulemode = MODULEMODE_HWCTRL,
  576. },
  577. },
  578. .opt_clks = gpio2_opt_clks,
  579. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  580. .dev_attr = &gpio_dev_attr,
  581. };
  582. /* gpio3 */
  583. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  584. { .role = "dbclk", .clk = "gpio3_dbclk" },
  585. };
  586. static struct omap_hwmod dra7xx_gpio3_hwmod = {
  587. .name = "gpio3",
  588. .class = &dra7xx_gpio_hwmod_class,
  589. .clkdm_name = "l4per_clkdm",
  590. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  591. .main_clk = "l3_iclk_div",
  592. .prcm = {
  593. .omap4 = {
  594. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
  595. .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
  596. .modulemode = MODULEMODE_HWCTRL,
  597. },
  598. },
  599. .opt_clks = gpio3_opt_clks,
  600. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  601. .dev_attr = &gpio_dev_attr,
  602. };
  603. /* gpio4 */
  604. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  605. { .role = "dbclk", .clk = "gpio4_dbclk" },
  606. };
  607. static struct omap_hwmod dra7xx_gpio4_hwmod = {
  608. .name = "gpio4",
  609. .class = &dra7xx_gpio_hwmod_class,
  610. .clkdm_name = "l4per_clkdm",
  611. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  612. .main_clk = "l3_iclk_div",
  613. .prcm = {
  614. .omap4 = {
  615. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
  616. .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
  617. .modulemode = MODULEMODE_HWCTRL,
  618. },
  619. },
  620. .opt_clks = gpio4_opt_clks,
  621. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  622. .dev_attr = &gpio_dev_attr,
  623. };
  624. /* gpio5 */
  625. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  626. { .role = "dbclk", .clk = "gpio5_dbclk" },
  627. };
  628. static struct omap_hwmod dra7xx_gpio5_hwmod = {
  629. .name = "gpio5",
  630. .class = &dra7xx_gpio_hwmod_class,
  631. .clkdm_name = "l4per_clkdm",
  632. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  633. .main_clk = "l3_iclk_div",
  634. .prcm = {
  635. .omap4 = {
  636. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
  637. .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
  638. .modulemode = MODULEMODE_HWCTRL,
  639. },
  640. },
  641. .opt_clks = gpio5_opt_clks,
  642. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  643. .dev_attr = &gpio_dev_attr,
  644. };
  645. /* gpio6 */
  646. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  647. { .role = "dbclk", .clk = "gpio6_dbclk" },
  648. };
  649. static struct omap_hwmod dra7xx_gpio6_hwmod = {
  650. .name = "gpio6",
  651. .class = &dra7xx_gpio_hwmod_class,
  652. .clkdm_name = "l4per_clkdm",
  653. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  654. .main_clk = "l3_iclk_div",
  655. .prcm = {
  656. .omap4 = {
  657. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
  658. .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
  659. .modulemode = MODULEMODE_HWCTRL,
  660. },
  661. },
  662. .opt_clks = gpio6_opt_clks,
  663. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  664. .dev_attr = &gpio_dev_attr,
  665. };
  666. /* gpio7 */
  667. static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
  668. { .role = "dbclk", .clk = "gpio7_dbclk" },
  669. };
  670. static struct omap_hwmod dra7xx_gpio7_hwmod = {
  671. .name = "gpio7",
  672. .class = &dra7xx_gpio_hwmod_class,
  673. .clkdm_name = "l4per_clkdm",
  674. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  675. .main_clk = "l3_iclk_div",
  676. .prcm = {
  677. .omap4 = {
  678. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
  679. .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
  680. .modulemode = MODULEMODE_HWCTRL,
  681. },
  682. },
  683. .opt_clks = gpio7_opt_clks,
  684. .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
  685. .dev_attr = &gpio_dev_attr,
  686. };
  687. /* gpio8 */
  688. static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
  689. { .role = "dbclk", .clk = "gpio8_dbclk" },
  690. };
  691. static struct omap_hwmod dra7xx_gpio8_hwmod = {
  692. .name = "gpio8",
  693. .class = &dra7xx_gpio_hwmod_class,
  694. .clkdm_name = "l4per_clkdm",
  695. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  696. .main_clk = "l3_iclk_div",
  697. .prcm = {
  698. .omap4 = {
  699. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
  700. .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
  701. .modulemode = MODULEMODE_HWCTRL,
  702. },
  703. },
  704. .opt_clks = gpio8_opt_clks,
  705. .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
  706. .dev_attr = &gpio_dev_attr,
  707. };
  708. /*
  709. * 'gpmc' class
  710. *
  711. */
  712. static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
  713. .rev_offs = 0x0000,
  714. .sysc_offs = 0x0010,
  715. .syss_offs = 0x0014,
  716. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  717. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  718. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  719. SIDLE_SMART_WKUP),
  720. .sysc_fields = &omap_hwmod_sysc_type1,
  721. };
  722. static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
  723. .name = "gpmc",
  724. .sysc = &dra7xx_gpmc_sysc,
  725. };
  726. /* gpmc */
  727. static struct omap_hwmod dra7xx_gpmc_hwmod = {
  728. .name = "gpmc",
  729. .class = &dra7xx_gpmc_hwmod_class,
  730. .clkdm_name = "l3main1_clkdm",
  731. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  732. .main_clk = "l3_iclk_div",
  733. .prcm = {
  734. .omap4 = {
  735. .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
  736. .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
  737. .modulemode = MODULEMODE_HWCTRL,
  738. },
  739. },
  740. };
  741. /*
  742. * 'hdq1w' class
  743. *
  744. */
  745. static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
  746. .rev_offs = 0x0000,
  747. .sysc_offs = 0x0014,
  748. .syss_offs = 0x0018,
  749. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
  750. SYSS_HAS_RESET_STATUS),
  751. .sysc_fields = &omap_hwmod_sysc_type1,
  752. };
  753. static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
  754. .name = "hdq1w",
  755. .sysc = &dra7xx_hdq1w_sysc,
  756. };
  757. /* hdq1w */
  758. static struct omap_hwmod dra7xx_hdq1w_hwmod = {
  759. .name = "hdq1w",
  760. .class = &dra7xx_hdq1w_hwmod_class,
  761. .clkdm_name = "l4per_clkdm",
  762. .flags = HWMOD_INIT_NO_RESET,
  763. .main_clk = "func_12m_fclk",
  764. .prcm = {
  765. .omap4 = {
  766. .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
  767. .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
  768. .modulemode = MODULEMODE_SWCTRL,
  769. },
  770. },
  771. };
  772. /*
  773. * 'i2c' class
  774. *
  775. */
  776. static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
  777. .sysc_offs = 0x0010,
  778. .syss_offs = 0x0090,
  779. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  780. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  781. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  782. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  783. SIDLE_SMART_WKUP),
  784. .clockact = CLOCKACT_TEST_ICLK,
  785. .sysc_fields = &omap_hwmod_sysc_type1,
  786. };
  787. static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
  788. .name = "i2c",
  789. .sysc = &dra7xx_i2c_sysc,
  790. .reset = &omap_i2c_reset,
  791. .rev = OMAP_I2C_IP_VERSION_2,
  792. };
  793. /* i2c dev_attr */
  794. static struct omap_i2c_dev_attr i2c_dev_attr = {
  795. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  796. };
  797. /* i2c1 */
  798. static struct omap_hwmod dra7xx_i2c1_hwmod = {
  799. .name = "i2c1",
  800. .class = &dra7xx_i2c_hwmod_class,
  801. .clkdm_name = "l4per_clkdm",
  802. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  803. .main_clk = "func_96m_fclk",
  804. .prcm = {
  805. .omap4 = {
  806. .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
  807. .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
  808. .modulemode = MODULEMODE_SWCTRL,
  809. },
  810. },
  811. .dev_attr = &i2c_dev_attr,
  812. };
  813. /* i2c2 */
  814. static struct omap_hwmod dra7xx_i2c2_hwmod = {
  815. .name = "i2c2",
  816. .class = &dra7xx_i2c_hwmod_class,
  817. .clkdm_name = "l4per_clkdm",
  818. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  819. .main_clk = "func_96m_fclk",
  820. .prcm = {
  821. .omap4 = {
  822. .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
  823. .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
  824. .modulemode = MODULEMODE_SWCTRL,
  825. },
  826. },
  827. .dev_attr = &i2c_dev_attr,
  828. };
  829. /* i2c3 */
  830. static struct omap_hwmod dra7xx_i2c3_hwmod = {
  831. .name = "i2c3",
  832. .class = &dra7xx_i2c_hwmod_class,
  833. .clkdm_name = "l4per_clkdm",
  834. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  835. .main_clk = "func_96m_fclk",
  836. .prcm = {
  837. .omap4 = {
  838. .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
  839. .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
  840. .modulemode = MODULEMODE_SWCTRL,
  841. },
  842. },
  843. .dev_attr = &i2c_dev_attr,
  844. };
  845. /* i2c4 */
  846. static struct omap_hwmod dra7xx_i2c4_hwmod = {
  847. .name = "i2c4",
  848. .class = &dra7xx_i2c_hwmod_class,
  849. .clkdm_name = "l4per_clkdm",
  850. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  851. .main_clk = "func_96m_fclk",
  852. .prcm = {
  853. .omap4 = {
  854. .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
  855. .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
  856. .modulemode = MODULEMODE_SWCTRL,
  857. },
  858. },
  859. .dev_attr = &i2c_dev_attr,
  860. };
  861. /* i2c5 */
  862. static struct omap_hwmod dra7xx_i2c5_hwmod = {
  863. .name = "i2c5",
  864. .class = &dra7xx_i2c_hwmod_class,
  865. .clkdm_name = "ipu_clkdm",
  866. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  867. .main_clk = "func_96m_fclk",
  868. .prcm = {
  869. .omap4 = {
  870. .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
  871. .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
  872. .modulemode = MODULEMODE_SWCTRL,
  873. },
  874. },
  875. .dev_attr = &i2c_dev_attr,
  876. };
  877. /*
  878. * 'mailbox' class
  879. *
  880. */
  881. static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
  882. .rev_offs = 0x0000,
  883. .sysc_offs = 0x0010,
  884. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  885. SYSC_HAS_SOFTRESET),
  886. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  887. .sysc_fields = &omap_hwmod_sysc_type2,
  888. };
  889. static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
  890. .name = "mailbox",
  891. .sysc = &dra7xx_mailbox_sysc,
  892. };
  893. /* mailbox1 */
  894. static struct omap_hwmod dra7xx_mailbox1_hwmod = {
  895. .name = "mailbox1",
  896. .class = &dra7xx_mailbox_hwmod_class,
  897. .clkdm_name = "l4cfg_clkdm",
  898. .prcm = {
  899. .omap4 = {
  900. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
  901. .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
  902. },
  903. },
  904. };
  905. /* mailbox2 */
  906. static struct omap_hwmod dra7xx_mailbox2_hwmod = {
  907. .name = "mailbox2",
  908. .class = &dra7xx_mailbox_hwmod_class,
  909. .clkdm_name = "l4cfg_clkdm",
  910. .prcm = {
  911. .omap4 = {
  912. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
  913. .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
  914. },
  915. },
  916. };
  917. /* mailbox3 */
  918. static struct omap_hwmod dra7xx_mailbox3_hwmod = {
  919. .name = "mailbox3",
  920. .class = &dra7xx_mailbox_hwmod_class,
  921. .clkdm_name = "l4cfg_clkdm",
  922. .prcm = {
  923. .omap4 = {
  924. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
  925. .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
  926. },
  927. },
  928. };
  929. /* mailbox4 */
  930. static struct omap_hwmod dra7xx_mailbox4_hwmod = {
  931. .name = "mailbox4",
  932. .class = &dra7xx_mailbox_hwmod_class,
  933. .clkdm_name = "l4cfg_clkdm",
  934. .prcm = {
  935. .omap4 = {
  936. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
  937. .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
  938. },
  939. },
  940. };
  941. /* mailbox5 */
  942. static struct omap_hwmod dra7xx_mailbox5_hwmod = {
  943. .name = "mailbox5",
  944. .class = &dra7xx_mailbox_hwmod_class,
  945. .clkdm_name = "l4cfg_clkdm",
  946. .prcm = {
  947. .omap4 = {
  948. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
  949. .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
  950. },
  951. },
  952. };
  953. /* mailbox6 */
  954. static struct omap_hwmod dra7xx_mailbox6_hwmod = {
  955. .name = "mailbox6",
  956. .class = &dra7xx_mailbox_hwmod_class,
  957. .clkdm_name = "l4cfg_clkdm",
  958. .prcm = {
  959. .omap4 = {
  960. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
  961. .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
  962. },
  963. },
  964. };
  965. /* mailbox7 */
  966. static struct omap_hwmod dra7xx_mailbox7_hwmod = {
  967. .name = "mailbox7",
  968. .class = &dra7xx_mailbox_hwmod_class,
  969. .clkdm_name = "l4cfg_clkdm",
  970. .prcm = {
  971. .omap4 = {
  972. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
  973. .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
  974. },
  975. },
  976. };
  977. /* mailbox8 */
  978. static struct omap_hwmod dra7xx_mailbox8_hwmod = {
  979. .name = "mailbox8",
  980. .class = &dra7xx_mailbox_hwmod_class,
  981. .clkdm_name = "l4cfg_clkdm",
  982. .prcm = {
  983. .omap4 = {
  984. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
  985. .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
  986. },
  987. },
  988. };
  989. /* mailbox9 */
  990. static struct omap_hwmod dra7xx_mailbox9_hwmod = {
  991. .name = "mailbox9",
  992. .class = &dra7xx_mailbox_hwmod_class,
  993. .clkdm_name = "l4cfg_clkdm",
  994. .prcm = {
  995. .omap4 = {
  996. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
  997. .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
  998. },
  999. },
  1000. };
  1001. /* mailbox10 */
  1002. static struct omap_hwmod dra7xx_mailbox10_hwmod = {
  1003. .name = "mailbox10",
  1004. .class = &dra7xx_mailbox_hwmod_class,
  1005. .clkdm_name = "l4cfg_clkdm",
  1006. .prcm = {
  1007. .omap4 = {
  1008. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
  1009. .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
  1010. },
  1011. },
  1012. };
  1013. /* mailbox11 */
  1014. static struct omap_hwmod dra7xx_mailbox11_hwmod = {
  1015. .name = "mailbox11",
  1016. .class = &dra7xx_mailbox_hwmod_class,
  1017. .clkdm_name = "l4cfg_clkdm",
  1018. .prcm = {
  1019. .omap4 = {
  1020. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
  1021. .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
  1022. },
  1023. },
  1024. };
  1025. /* mailbox12 */
  1026. static struct omap_hwmod dra7xx_mailbox12_hwmod = {
  1027. .name = "mailbox12",
  1028. .class = &dra7xx_mailbox_hwmod_class,
  1029. .clkdm_name = "l4cfg_clkdm",
  1030. .prcm = {
  1031. .omap4 = {
  1032. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
  1033. .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
  1034. },
  1035. },
  1036. };
  1037. /* mailbox13 */
  1038. static struct omap_hwmod dra7xx_mailbox13_hwmod = {
  1039. .name = "mailbox13",
  1040. .class = &dra7xx_mailbox_hwmod_class,
  1041. .clkdm_name = "l4cfg_clkdm",
  1042. .prcm = {
  1043. .omap4 = {
  1044. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
  1045. .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
  1046. },
  1047. },
  1048. };
  1049. /*
  1050. * 'mcspi' class
  1051. *
  1052. */
  1053. static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
  1054. .rev_offs = 0x0000,
  1055. .sysc_offs = 0x0010,
  1056. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1057. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1058. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1059. SIDLE_SMART_WKUP),
  1060. .sysc_fields = &omap_hwmod_sysc_type2,
  1061. };
  1062. static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
  1063. .name = "mcspi",
  1064. .sysc = &dra7xx_mcspi_sysc,
  1065. .rev = OMAP4_MCSPI_REV,
  1066. };
  1067. /* mcspi1 */
  1068. /* mcspi1 dev_attr */
  1069. static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
  1070. .num_chipselect = 4,
  1071. };
  1072. static struct omap_hwmod dra7xx_mcspi1_hwmod = {
  1073. .name = "mcspi1",
  1074. .class = &dra7xx_mcspi_hwmod_class,
  1075. .clkdm_name = "l4per_clkdm",
  1076. .main_clk = "func_48m_fclk",
  1077. .prcm = {
  1078. .omap4 = {
  1079. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
  1080. .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
  1081. .modulemode = MODULEMODE_SWCTRL,
  1082. },
  1083. },
  1084. .dev_attr = &mcspi1_dev_attr,
  1085. };
  1086. /* mcspi2 */
  1087. /* mcspi2 dev_attr */
  1088. static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
  1089. .num_chipselect = 2,
  1090. };
  1091. static struct omap_hwmod dra7xx_mcspi2_hwmod = {
  1092. .name = "mcspi2",
  1093. .class = &dra7xx_mcspi_hwmod_class,
  1094. .clkdm_name = "l4per_clkdm",
  1095. .main_clk = "func_48m_fclk",
  1096. .prcm = {
  1097. .omap4 = {
  1098. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
  1099. .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
  1100. .modulemode = MODULEMODE_SWCTRL,
  1101. },
  1102. },
  1103. .dev_attr = &mcspi2_dev_attr,
  1104. };
  1105. /* mcspi3 */
  1106. /* mcspi3 dev_attr */
  1107. static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
  1108. .num_chipselect = 2,
  1109. };
  1110. static struct omap_hwmod dra7xx_mcspi3_hwmod = {
  1111. .name = "mcspi3",
  1112. .class = &dra7xx_mcspi_hwmod_class,
  1113. .clkdm_name = "l4per_clkdm",
  1114. .main_clk = "func_48m_fclk",
  1115. .prcm = {
  1116. .omap4 = {
  1117. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
  1118. .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
  1119. .modulemode = MODULEMODE_SWCTRL,
  1120. },
  1121. },
  1122. .dev_attr = &mcspi3_dev_attr,
  1123. };
  1124. /* mcspi4 */
  1125. /* mcspi4 dev_attr */
  1126. static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
  1127. .num_chipselect = 1,
  1128. };
  1129. static struct omap_hwmod dra7xx_mcspi4_hwmod = {
  1130. .name = "mcspi4",
  1131. .class = &dra7xx_mcspi_hwmod_class,
  1132. .clkdm_name = "l4per_clkdm",
  1133. .main_clk = "func_48m_fclk",
  1134. .prcm = {
  1135. .omap4 = {
  1136. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
  1137. .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
  1138. .modulemode = MODULEMODE_SWCTRL,
  1139. },
  1140. },
  1141. .dev_attr = &mcspi4_dev_attr,
  1142. };
  1143. /*
  1144. * 'mmc' class
  1145. *
  1146. */
  1147. static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
  1148. .rev_offs = 0x0000,
  1149. .sysc_offs = 0x0010,
  1150. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  1151. SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1152. SYSC_HAS_SOFTRESET),
  1153. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1154. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1155. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1156. .sysc_fields = &omap_hwmod_sysc_type2,
  1157. };
  1158. static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
  1159. .name = "mmc",
  1160. .sysc = &dra7xx_mmc_sysc,
  1161. };
  1162. /* mmc1 */
  1163. static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
  1164. { .role = "clk32k", .clk = "mmc1_clk32k" },
  1165. };
  1166. /* mmc1 dev_attr */
  1167. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  1168. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1169. };
  1170. static struct omap_hwmod dra7xx_mmc1_hwmod = {
  1171. .name = "mmc1",
  1172. .class = &dra7xx_mmc_hwmod_class,
  1173. .clkdm_name = "l3init_clkdm",
  1174. .main_clk = "mmc1_fclk_div",
  1175. .prcm = {
  1176. .omap4 = {
  1177. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
  1178. .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
  1179. .modulemode = MODULEMODE_SWCTRL,
  1180. },
  1181. },
  1182. .opt_clks = mmc1_opt_clks,
  1183. .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
  1184. .dev_attr = &mmc1_dev_attr,
  1185. };
  1186. /* mmc2 */
  1187. static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
  1188. { .role = "clk32k", .clk = "mmc2_clk32k" },
  1189. };
  1190. static struct omap_hwmod dra7xx_mmc2_hwmod = {
  1191. .name = "mmc2",
  1192. .class = &dra7xx_mmc_hwmod_class,
  1193. .clkdm_name = "l3init_clkdm",
  1194. .main_clk = "mmc2_fclk_div",
  1195. .prcm = {
  1196. .omap4 = {
  1197. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
  1198. .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
  1199. .modulemode = MODULEMODE_SWCTRL,
  1200. },
  1201. },
  1202. .opt_clks = mmc2_opt_clks,
  1203. .opt_clks_cnt = ARRAY_SIZE(mmc2_opt_clks),
  1204. };
  1205. /* mmc3 */
  1206. static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
  1207. { .role = "clk32k", .clk = "mmc3_clk32k" },
  1208. };
  1209. static struct omap_hwmod dra7xx_mmc3_hwmod = {
  1210. .name = "mmc3",
  1211. .class = &dra7xx_mmc_hwmod_class,
  1212. .clkdm_name = "l4per_clkdm",
  1213. .main_clk = "mmc3_gfclk_div",
  1214. .prcm = {
  1215. .omap4 = {
  1216. .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
  1217. .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
  1218. .modulemode = MODULEMODE_SWCTRL,
  1219. },
  1220. },
  1221. .opt_clks = mmc3_opt_clks,
  1222. .opt_clks_cnt = ARRAY_SIZE(mmc3_opt_clks),
  1223. };
  1224. /* mmc4 */
  1225. static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
  1226. { .role = "clk32k", .clk = "mmc4_clk32k" },
  1227. };
  1228. static struct omap_hwmod dra7xx_mmc4_hwmod = {
  1229. .name = "mmc4",
  1230. .class = &dra7xx_mmc_hwmod_class,
  1231. .clkdm_name = "l4per_clkdm",
  1232. .main_clk = "mmc4_gfclk_div",
  1233. .prcm = {
  1234. .omap4 = {
  1235. .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
  1236. .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
  1237. .modulemode = MODULEMODE_SWCTRL,
  1238. },
  1239. },
  1240. .opt_clks = mmc4_opt_clks,
  1241. .opt_clks_cnt = ARRAY_SIZE(mmc4_opt_clks),
  1242. };
  1243. /*
  1244. * 'mpu' class
  1245. *
  1246. */
  1247. static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
  1248. .name = "mpu",
  1249. };
  1250. /* mpu */
  1251. static struct omap_hwmod dra7xx_mpu_hwmod = {
  1252. .name = "mpu",
  1253. .class = &dra7xx_mpu_hwmod_class,
  1254. .clkdm_name = "mpu_clkdm",
  1255. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  1256. .main_clk = "dpll_mpu_m2_ck",
  1257. .prcm = {
  1258. .omap4 = {
  1259. .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  1260. .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
  1261. },
  1262. },
  1263. };
  1264. /*
  1265. * 'ocp2scp' class
  1266. *
  1267. */
  1268. static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
  1269. .rev_offs = 0x0000,
  1270. .sysc_offs = 0x0010,
  1271. .syss_offs = 0x0014,
  1272. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1273. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1274. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1275. SIDLE_SMART_WKUP),
  1276. .sysc_fields = &omap_hwmod_sysc_type1,
  1277. };
  1278. static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
  1279. .name = "ocp2scp",
  1280. .sysc = &dra7xx_ocp2scp_sysc,
  1281. };
  1282. /* ocp2scp1 */
  1283. static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
  1284. .name = "ocp2scp1",
  1285. .class = &dra7xx_ocp2scp_hwmod_class,
  1286. .clkdm_name = "l3init_clkdm",
  1287. .main_clk = "l4_root_clk_div",
  1288. .prcm = {
  1289. .omap4 = {
  1290. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
  1291. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
  1292. .modulemode = MODULEMODE_HWCTRL,
  1293. },
  1294. },
  1295. };
  1296. /* ocp2scp3 */
  1297. static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
  1298. .name = "ocp2scp3",
  1299. .class = &dra7xx_ocp2scp_hwmod_class,
  1300. .clkdm_name = "l3init_clkdm",
  1301. .main_clk = "l4_root_clk_div",
  1302. .prcm = {
  1303. .omap4 = {
  1304. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
  1305. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
  1306. .modulemode = MODULEMODE_HWCTRL,
  1307. },
  1308. },
  1309. };
  1310. /*
  1311. * 'PCIE' class
  1312. *
  1313. */
  1314. static struct omap_hwmod_class dra7xx_pcie_hwmod_class = {
  1315. .name = "pcie",
  1316. };
  1317. /* pcie1 */
  1318. static struct omap_hwmod dra7xx_pcie1_hwmod = {
  1319. .name = "pcie1",
  1320. .class = &dra7xx_pcie_hwmod_class,
  1321. .clkdm_name = "pcie_clkdm",
  1322. .main_clk = "l4_root_clk_div",
  1323. .prcm = {
  1324. .omap4 = {
  1325. .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET,
  1326. .modulemode = MODULEMODE_SWCTRL,
  1327. },
  1328. },
  1329. };
  1330. /* pcie2 */
  1331. static struct omap_hwmod dra7xx_pcie2_hwmod = {
  1332. .name = "pcie2",
  1333. .class = &dra7xx_pcie_hwmod_class,
  1334. .clkdm_name = "pcie_clkdm",
  1335. .main_clk = "l4_root_clk_div",
  1336. .prcm = {
  1337. .omap4 = {
  1338. .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET,
  1339. .modulemode = MODULEMODE_SWCTRL,
  1340. },
  1341. },
  1342. };
  1343. /*
  1344. * 'PCIE PHY' class
  1345. *
  1346. */
  1347. static struct omap_hwmod_class dra7xx_pcie_phy_hwmod_class = {
  1348. .name = "pcie-phy",
  1349. };
  1350. /* pcie1 phy */
  1351. static struct omap_hwmod dra7xx_pcie1_phy_hwmod = {
  1352. .name = "pcie1-phy",
  1353. .class = &dra7xx_pcie_phy_hwmod_class,
  1354. .clkdm_name = "l3init_clkdm",
  1355. .main_clk = "l4_root_clk_div",
  1356. .prcm = {
  1357. .omap4 = {
  1358. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
  1359. .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
  1360. .modulemode = MODULEMODE_SWCTRL,
  1361. },
  1362. },
  1363. };
  1364. /* pcie2 phy */
  1365. static struct omap_hwmod dra7xx_pcie2_phy_hwmod = {
  1366. .name = "pcie2-phy",
  1367. .class = &dra7xx_pcie_phy_hwmod_class,
  1368. .clkdm_name = "l3init_clkdm",
  1369. .main_clk = "l4_root_clk_div",
  1370. .prcm = {
  1371. .omap4 = {
  1372. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
  1373. .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
  1374. .modulemode = MODULEMODE_SWCTRL,
  1375. },
  1376. },
  1377. };
  1378. /*
  1379. * 'qspi' class
  1380. *
  1381. */
  1382. static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
  1383. .sysc_offs = 0x0010,
  1384. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1385. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1386. SIDLE_SMART_WKUP),
  1387. .sysc_fields = &omap_hwmod_sysc_type2,
  1388. };
  1389. static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
  1390. .name = "qspi",
  1391. .sysc = &dra7xx_qspi_sysc,
  1392. };
  1393. /* qspi */
  1394. static struct omap_hwmod dra7xx_qspi_hwmod = {
  1395. .name = "qspi",
  1396. .class = &dra7xx_qspi_hwmod_class,
  1397. .clkdm_name = "l4per2_clkdm",
  1398. .main_clk = "qspi_gfclk_div",
  1399. .prcm = {
  1400. .omap4 = {
  1401. .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
  1402. .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
  1403. .modulemode = MODULEMODE_SWCTRL,
  1404. },
  1405. },
  1406. };
  1407. /*
  1408. * 'rtcss' class
  1409. *
  1410. */
  1411. static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
  1412. .sysc_offs = 0x0078,
  1413. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1414. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1415. SIDLE_SMART_WKUP),
  1416. .sysc_fields = &omap_hwmod_sysc_type3,
  1417. };
  1418. static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
  1419. .name = "rtcss",
  1420. .sysc = &dra7xx_rtcss_sysc,
  1421. };
  1422. /* rtcss */
  1423. static struct omap_hwmod dra7xx_rtcss_hwmod = {
  1424. .name = "rtcss",
  1425. .class = &dra7xx_rtcss_hwmod_class,
  1426. .clkdm_name = "rtc_clkdm",
  1427. .main_clk = "sys_32k_ck",
  1428. .prcm = {
  1429. .omap4 = {
  1430. .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
  1431. .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
  1432. .modulemode = MODULEMODE_SWCTRL,
  1433. },
  1434. },
  1435. };
  1436. /*
  1437. * 'sata' class
  1438. *
  1439. */
  1440. static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
  1441. .sysc_offs = 0x0000,
  1442. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
  1443. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1444. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1445. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1446. .sysc_fields = &omap_hwmod_sysc_type2,
  1447. };
  1448. static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
  1449. .name = "sata",
  1450. .sysc = &dra7xx_sata_sysc,
  1451. };
  1452. /* sata */
  1453. static struct omap_hwmod dra7xx_sata_hwmod = {
  1454. .name = "sata",
  1455. .class = &dra7xx_sata_hwmod_class,
  1456. .clkdm_name = "l3init_clkdm",
  1457. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1458. .main_clk = "func_48m_fclk",
  1459. .mpu_rt_idx = 1,
  1460. .prcm = {
  1461. .omap4 = {
  1462. .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
  1463. .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
  1464. .modulemode = MODULEMODE_SWCTRL,
  1465. },
  1466. },
  1467. };
  1468. /*
  1469. * 'smartreflex' class
  1470. *
  1471. */
  1472. /* The IP is not compliant to type1 / type2 scheme */
  1473. static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
  1474. .sidle_shift = 24,
  1475. .enwkup_shift = 26,
  1476. };
  1477. static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
  1478. .sysc_offs = 0x0038,
  1479. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
  1480. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1481. SIDLE_SMART_WKUP),
  1482. .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
  1483. };
  1484. static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
  1485. .name = "smartreflex",
  1486. .sysc = &dra7xx_smartreflex_sysc,
  1487. .rev = 2,
  1488. };
  1489. /* smartreflex_core */
  1490. /* smartreflex_core dev_attr */
  1491. static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
  1492. .sensor_voltdm_name = "core",
  1493. };
  1494. static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
  1495. .name = "smartreflex_core",
  1496. .class = &dra7xx_smartreflex_hwmod_class,
  1497. .clkdm_name = "coreaon_clkdm",
  1498. .main_clk = "wkupaon_iclk_mux",
  1499. .prcm = {
  1500. .omap4 = {
  1501. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
  1502. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
  1503. .modulemode = MODULEMODE_SWCTRL,
  1504. },
  1505. },
  1506. .dev_attr = &smartreflex_core_dev_attr,
  1507. };
  1508. /* smartreflex_mpu */
  1509. /* smartreflex_mpu dev_attr */
  1510. static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
  1511. .sensor_voltdm_name = "mpu",
  1512. };
  1513. static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
  1514. .name = "smartreflex_mpu",
  1515. .class = &dra7xx_smartreflex_hwmod_class,
  1516. .clkdm_name = "coreaon_clkdm",
  1517. .main_clk = "wkupaon_iclk_mux",
  1518. .prcm = {
  1519. .omap4 = {
  1520. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
  1521. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
  1522. .modulemode = MODULEMODE_SWCTRL,
  1523. },
  1524. },
  1525. .dev_attr = &smartreflex_mpu_dev_attr,
  1526. };
  1527. /*
  1528. * 'spinlock' class
  1529. *
  1530. */
  1531. static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
  1532. .rev_offs = 0x0000,
  1533. .sysc_offs = 0x0010,
  1534. .syss_offs = 0x0014,
  1535. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  1536. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1537. SYSS_HAS_RESET_STATUS),
  1538. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1539. .sysc_fields = &omap_hwmod_sysc_type1,
  1540. };
  1541. static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
  1542. .name = "spinlock",
  1543. .sysc = &dra7xx_spinlock_sysc,
  1544. };
  1545. /* spinlock */
  1546. static struct omap_hwmod dra7xx_spinlock_hwmod = {
  1547. .name = "spinlock",
  1548. .class = &dra7xx_spinlock_hwmod_class,
  1549. .clkdm_name = "l4cfg_clkdm",
  1550. .main_clk = "l3_iclk_div",
  1551. .prcm = {
  1552. .omap4 = {
  1553. .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
  1554. .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
  1555. },
  1556. },
  1557. };
  1558. /*
  1559. * 'timer' class
  1560. *
  1561. * This class contains several variants: ['timer_1ms', 'timer_secure',
  1562. * 'timer']
  1563. */
  1564. static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
  1565. .rev_offs = 0x0000,
  1566. .sysc_offs = 0x0010,
  1567. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1568. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1569. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1570. SIDLE_SMART_WKUP),
  1571. .sysc_fields = &omap_hwmod_sysc_type2,
  1572. };
  1573. static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
  1574. .name = "timer",
  1575. .sysc = &dra7xx_timer_1ms_sysc,
  1576. };
  1577. static struct omap_hwmod_class_sysconfig dra7xx_timer_secure_sysc = {
  1578. .rev_offs = 0x0000,
  1579. .sysc_offs = 0x0010,
  1580. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1581. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1582. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1583. SIDLE_SMART_WKUP),
  1584. .sysc_fields = &omap_hwmod_sysc_type2,
  1585. };
  1586. static struct omap_hwmod_class dra7xx_timer_secure_hwmod_class = {
  1587. .name = "timer",
  1588. .sysc = &dra7xx_timer_secure_sysc,
  1589. };
  1590. static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
  1591. .rev_offs = 0x0000,
  1592. .sysc_offs = 0x0010,
  1593. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1594. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1595. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1596. SIDLE_SMART_WKUP),
  1597. .sysc_fields = &omap_hwmod_sysc_type2,
  1598. };
  1599. static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
  1600. .name = "timer",
  1601. .sysc = &dra7xx_timer_sysc,
  1602. };
  1603. /* timer1 */
  1604. static struct omap_hwmod dra7xx_timer1_hwmod = {
  1605. .name = "timer1",
  1606. .class = &dra7xx_timer_1ms_hwmod_class,
  1607. .clkdm_name = "wkupaon_clkdm",
  1608. .main_clk = "timer1_gfclk_mux",
  1609. .prcm = {
  1610. .omap4 = {
  1611. .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
  1612. .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
  1613. .modulemode = MODULEMODE_SWCTRL,
  1614. },
  1615. },
  1616. };
  1617. /* timer2 */
  1618. static struct omap_hwmod dra7xx_timer2_hwmod = {
  1619. .name = "timer2",
  1620. .class = &dra7xx_timer_1ms_hwmod_class,
  1621. .clkdm_name = "l4per_clkdm",
  1622. .main_clk = "timer2_gfclk_mux",
  1623. .prcm = {
  1624. .omap4 = {
  1625. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
  1626. .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
  1627. .modulemode = MODULEMODE_SWCTRL,
  1628. },
  1629. },
  1630. };
  1631. /* timer3 */
  1632. static struct omap_hwmod dra7xx_timer3_hwmod = {
  1633. .name = "timer3",
  1634. .class = &dra7xx_timer_hwmod_class,
  1635. .clkdm_name = "l4per_clkdm",
  1636. .main_clk = "timer3_gfclk_mux",
  1637. .prcm = {
  1638. .omap4 = {
  1639. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
  1640. .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
  1641. .modulemode = MODULEMODE_SWCTRL,
  1642. },
  1643. },
  1644. };
  1645. /* timer4 */
  1646. static struct omap_hwmod dra7xx_timer4_hwmod = {
  1647. .name = "timer4",
  1648. .class = &dra7xx_timer_secure_hwmod_class,
  1649. .clkdm_name = "l4per_clkdm",
  1650. .main_clk = "timer4_gfclk_mux",
  1651. .prcm = {
  1652. .omap4 = {
  1653. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
  1654. .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
  1655. .modulemode = MODULEMODE_SWCTRL,
  1656. },
  1657. },
  1658. };
  1659. /* timer5 */
  1660. static struct omap_hwmod dra7xx_timer5_hwmod = {
  1661. .name = "timer5",
  1662. .class = &dra7xx_timer_hwmod_class,
  1663. .clkdm_name = "ipu_clkdm",
  1664. .main_clk = "timer5_gfclk_mux",
  1665. .prcm = {
  1666. .omap4 = {
  1667. .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
  1668. .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
  1669. .modulemode = MODULEMODE_SWCTRL,
  1670. },
  1671. },
  1672. };
  1673. /* timer6 */
  1674. static struct omap_hwmod dra7xx_timer6_hwmod = {
  1675. .name = "timer6",
  1676. .class = &dra7xx_timer_hwmod_class,
  1677. .clkdm_name = "ipu_clkdm",
  1678. .main_clk = "timer6_gfclk_mux",
  1679. .prcm = {
  1680. .omap4 = {
  1681. .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
  1682. .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
  1683. .modulemode = MODULEMODE_SWCTRL,
  1684. },
  1685. },
  1686. };
  1687. /* timer7 */
  1688. static struct omap_hwmod dra7xx_timer7_hwmod = {
  1689. .name = "timer7",
  1690. .class = &dra7xx_timer_hwmod_class,
  1691. .clkdm_name = "ipu_clkdm",
  1692. .main_clk = "timer7_gfclk_mux",
  1693. .prcm = {
  1694. .omap4 = {
  1695. .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
  1696. .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
  1697. .modulemode = MODULEMODE_SWCTRL,
  1698. },
  1699. },
  1700. };
  1701. /* timer8 */
  1702. static struct omap_hwmod dra7xx_timer8_hwmod = {
  1703. .name = "timer8",
  1704. .class = &dra7xx_timer_hwmod_class,
  1705. .clkdm_name = "ipu_clkdm",
  1706. .main_clk = "timer8_gfclk_mux",
  1707. .prcm = {
  1708. .omap4 = {
  1709. .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
  1710. .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
  1711. .modulemode = MODULEMODE_SWCTRL,
  1712. },
  1713. },
  1714. };
  1715. /* timer9 */
  1716. static struct omap_hwmod dra7xx_timer9_hwmod = {
  1717. .name = "timer9",
  1718. .class = &dra7xx_timer_hwmod_class,
  1719. .clkdm_name = "l4per_clkdm",
  1720. .main_clk = "timer9_gfclk_mux",
  1721. .prcm = {
  1722. .omap4 = {
  1723. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
  1724. .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
  1725. .modulemode = MODULEMODE_SWCTRL,
  1726. },
  1727. },
  1728. };
  1729. /* timer10 */
  1730. static struct omap_hwmod dra7xx_timer10_hwmod = {
  1731. .name = "timer10",
  1732. .class = &dra7xx_timer_1ms_hwmod_class,
  1733. .clkdm_name = "l4per_clkdm",
  1734. .main_clk = "timer10_gfclk_mux",
  1735. .prcm = {
  1736. .omap4 = {
  1737. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
  1738. .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
  1739. .modulemode = MODULEMODE_SWCTRL,
  1740. },
  1741. },
  1742. };
  1743. /* timer11 */
  1744. static struct omap_hwmod dra7xx_timer11_hwmod = {
  1745. .name = "timer11",
  1746. .class = &dra7xx_timer_hwmod_class,
  1747. .clkdm_name = "l4per_clkdm",
  1748. .main_clk = "timer11_gfclk_mux",
  1749. .prcm = {
  1750. .omap4 = {
  1751. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
  1752. .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
  1753. .modulemode = MODULEMODE_SWCTRL,
  1754. },
  1755. },
  1756. };
  1757. /*
  1758. * 'uart' class
  1759. *
  1760. */
  1761. static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
  1762. .rev_offs = 0x0050,
  1763. .sysc_offs = 0x0054,
  1764. .syss_offs = 0x0058,
  1765. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  1766. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1767. SYSS_HAS_RESET_STATUS),
  1768. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1769. SIDLE_SMART_WKUP),
  1770. .sysc_fields = &omap_hwmod_sysc_type1,
  1771. };
  1772. static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
  1773. .name = "uart",
  1774. .sysc = &dra7xx_uart_sysc,
  1775. };
  1776. /* uart1 */
  1777. static struct omap_hwmod dra7xx_uart1_hwmod = {
  1778. .name = "uart1",
  1779. .class = &dra7xx_uart_hwmod_class,
  1780. .clkdm_name = "l4per_clkdm",
  1781. .main_clk = "uart1_gfclk_mux",
  1782. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
  1783. .prcm = {
  1784. .omap4 = {
  1785. .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
  1786. .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
  1787. .modulemode = MODULEMODE_SWCTRL,
  1788. },
  1789. },
  1790. };
  1791. /* uart2 */
  1792. static struct omap_hwmod dra7xx_uart2_hwmod = {
  1793. .name = "uart2",
  1794. .class = &dra7xx_uart_hwmod_class,
  1795. .clkdm_name = "l4per_clkdm",
  1796. .main_clk = "uart2_gfclk_mux",
  1797. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1798. .prcm = {
  1799. .omap4 = {
  1800. .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
  1801. .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
  1802. .modulemode = MODULEMODE_SWCTRL,
  1803. },
  1804. },
  1805. };
  1806. /* uart3 */
  1807. static struct omap_hwmod dra7xx_uart3_hwmod = {
  1808. .name = "uart3",
  1809. .class = &dra7xx_uart_hwmod_class,
  1810. .clkdm_name = "l4per_clkdm",
  1811. .main_clk = "uart3_gfclk_mux",
  1812. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1813. .prcm = {
  1814. .omap4 = {
  1815. .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
  1816. .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
  1817. .modulemode = MODULEMODE_SWCTRL,
  1818. },
  1819. },
  1820. };
  1821. /* uart4 */
  1822. static struct omap_hwmod dra7xx_uart4_hwmod = {
  1823. .name = "uart4",
  1824. .class = &dra7xx_uart_hwmod_class,
  1825. .clkdm_name = "l4per_clkdm",
  1826. .main_clk = "uart4_gfclk_mux",
  1827. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1828. .prcm = {
  1829. .omap4 = {
  1830. .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
  1831. .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
  1832. .modulemode = MODULEMODE_SWCTRL,
  1833. },
  1834. },
  1835. };
  1836. /* uart5 */
  1837. static struct omap_hwmod dra7xx_uart5_hwmod = {
  1838. .name = "uart5",
  1839. .class = &dra7xx_uart_hwmod_class,
  1840. .clkdm_name = "l4per_clkdm",
  1841. .main_clk = "uart5_gfclk_mux",
  1842. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1843. .prcm = {
  1844. .omap4 = {
  1845. .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
  1846. .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
  1847. .modulemode = MODULEMODE_SWCTRL,
  1848. },
  1849. },
  1850. };
  1851. /* uart6 */
  1852. static struct omap_hwmod dra7xx_uart6_hwmod = {
  1853. .name = "uart6",
  1854. .class = &dra7xx_uart_hwmod_class,
  1855. .clkdm_name = "ipu_clkdm",
  1856. .main_clk = "uart6_gfclk_mux",
  1857. .flags = HWMOD_SWSUP_SIDLE_ACT,
  1858. .prcm = {
  1859. .omap4 = {
  1860. .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
  1861. .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
  1862. .modulemode = MODULEMODE_SWCTRL,
  1863. },
  1864. },
  1865. };
  1866. /*
  1867. * 'usb_otg_ss' class
  1868. *
  1869. */
  1870. static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
  1871. .rev_offs = 0x0000,
  1872. .sysc_offs = 0x0010,
  1873. .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
  1874. SYSC_HAS_SIDLEMODE),
  1875. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1876. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1877. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1878. .sysc_fields = &omap_hwmod_sysc_type2,
  1879. };
  1880. static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
  1881. .name = "usb_otg_ss",
  1882. .sysc = &dra7xx_usb_otg_ss_sysc,
  1883. };
  1884. /* usb_otg_ss1 */
  1885. static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
  1886. { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
  1887. };
  1888. static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
  1889. .name = "usb_otg_ss1",
  1890. .class = &dra7xx_usb_otg_ss_hwmod_class,
  1891. .clkdm_name = "l3init_clkdm",
  1892. .main_clk = "dpll_core_h13x2_ck",
  1893. .prcm = {
  1894. .omap4 = {
  1895. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
  1896. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
  1897. .modulemode = MODULEMODE_HWCTRL,
  1898. },
  1899. },
  1900. .opt_clks = usb_otg_ss1_opt_clks,
  1901. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
  1902. };
  1903. /* usb_otg_ss2 */
  1904. static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
  1905. { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
  1906. };
  1907. static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
  1908. .name = "usb_otg_ss2",
  1909. .class = &dra7xx_usb_otg_ss_hwmod_class,
  1910. .clkdm_name = "l3init_clkdm",
  1911. .main_clk = "dpll_core_h13x2_ck",
  1912. .prcm = {
  1913. .omap4 = {
  1914. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
  1915. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
  1916. .modulemode = MODULEMODE_HWCTRL,
  1917. },
  1918. },
  1919. .opt_clks = usb_otg_ss2_opt_clks,
  1920. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
  1921. };
  1922. /* usb_otg_ss3 */
  1923. static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
  1924. .name = "usb_otg_ss3",
  1925. .class = &dra7xx_usb_otg_ss_hwmod_class,
  1926. .clkdm_name = "l3init_clkdm",
  1927. .main_clk = "dpll_core_h13x2_ck",
  1928. .prcm = {
  1929. .omap4 = {
  1930. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
  1931. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
  1932. .modulemode = MODULEMODE_HWCTRL,
  1933. },
  1934. },
  1935. };
  1936. /* usb_otg_ss4 */
  1937. static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
  1938. .name = "usb_otg_ss4",
  1939. .class = &dra7xx_usb_otg_ss_hwmod_class,
  1940. .clkdm_name = "l3init_clkdm",
  1941. .main_clk = "dpll_core_h13x2_ck",
  1942. .prcm = {
  1943. .omap4 = {
  1944. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
  1945. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
  1946. .modulemode = MODULEMODE_HWCTRL,
  1947. },
  1948. },
  1949. };
  1950. /*
  1951. * 'vcp' class
  1952. *
  1953. */
  1954. static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
  1955. .name = "vcp",
  1956. };
  1957. /* vcp1 */
  1958. static struct omap_hwmod dra7xx_vcp1_hwmod = {
  1959. .name = "vcp1",
  1960. .class = &dra7xx_vcp_hwmod_class,
  1961. .clkdm_name = "l3main1_clkdm",
  1962. .main_clk = "l3_iclk_div",
  1963. .prcm = {
  1964. .omap4 = {
  1965. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
  1966. .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
  1967. },
  1968. },
  1969. };
  1970. /* vcp2 */
  1971. static struct omap_hwmod dra7xx_vcp2_hwmod = {
  1972. .name = "vcp2",
  1973. .class = &dra7xx_vcp_hwmod_class,
  1974. .clkdm_name = "l3main1_clkdm",
  1975. .main_clk = "l3_iclk_div",
  1976. .prcm = {
  1977. .omap4 = {
  1978. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
  1979. .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
  1980. },
  1981. },
  1982. };
  1983. /*
  1984. * 'wd_timer' class
  1985. *
  1986. */
  1987. static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
  1988. .rev_offs = 0x0000,
  1989. .sysc_offs = 0x0010,
  1990. .syss_offs = 0x0014,
  1991. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  1992. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1993. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1994. SIDLE_SMART_WKUP),
  1995. .sysc_fields = &omap_hwmod_sysc_type1,
  1996. };
  1997. static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
  1998. .name = "wd_timer",
  1999. .sysc = &dra7xx_wd_timer_sysc,
  2000. .pre_shutdown = &omap2_wd_timer_disable,
  2001. .reset = &omap2_wd_timer_reset,
  2002. };
  2003. /* wd_timer2 */
  2004. static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
  2005. .name = "wd_timer2",
  2006. .class = &dra7xx_wd_timer_hwmod_class,
  2007. .clkdm_name = "wkupaon_clkdm",
  2008. .main_clk = "sys_32k_ck",
  2009. .prcm = {
  2010. .omap4 = {
  2011. .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
  2012. .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
  2013. .modulemode = MODULEMODE_SWCTRL,
  2014. },
  2015. },
  2016. };
  2017. /*
  2018. * Interfaces
  2019. */
  2020. /* l3_main_2 -> l3_instr */
  2021. static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
  2022. .master = &dra7xx_l3_main_2_hwmod,
  2023. .slave = &dra7xx_l3_instr_hwmod,
  2024. .clk = "l3_iclk_div",
  2025. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2026. };
  2027. /* l4_cfg -> l3_main_1 */
  2028. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
  2029. .master = &dra7xx_l4_cfg_hwmod,
  2030. .slave = &dra7xx_l3_main_1_hwmod,
  2031. .clk = "l3_iclk_div",
  2032. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2033. };
  2034. /* mpu -> l3_main_1 */
  2035. static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
  2036. .master = &dra7xx_mpu_hwmod,
  2037. .slave = &dra7xx_l3_main_1_hwmod,
  2038. .clk = "l3_iclk_div",
  2039. .user = OCP_USER_MPU,
  2040. };
  2041. /* l3_main_1 -> l3_main_2 */
  2042. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
  2043. .master = &dra7xx_l3_main_1_hwmod,
  2044. .slave = &dra7xx_l3_main_2_hwmod,
  2045. .clk = "l3_iclk_div",
  2046. .user = OCP_USER_MPU,
  2047. };
  2048. /* l4_cfg -> l3_main_2 */
  2049. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
  2050. .master = &dra7xx_l4_cfg_hwmod,
  2051. .slave = &dra7xx_l3_main_2_hwmod,
  2052. .clk = "l3_iclk_div",
  2053. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2054. };
  2055. /* l3_main_1 -> l4_cfg */
  2056. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
  2057. .master = &dra7xx_l3_main_1_hwmod,
  2058. .slave = &dra7xx_l4_cfg_hwmod,
  2059. .clk = "l3_iclk_div",
  2060. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2061. };
  2062. /* l3_main_1 -> l4_per1 */
  2063. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
  2064. .master = &dra7xx_l3_main_1_hwmod,
  2065. .slave = &dra7xx_l4_per1_hwmod,
  2066. .clk = "l3_iclk_div",
  2067. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2068. };
  2069. /* l3_main_1 -> l4_per2 */
  2070. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
  2071. .master = &dra7xx_l3_main_1_hwmod,
  2072. .slave = &dra7xx_l4_per2_hwmod,
  2073. .clk = "l3_iclk_div",
  2074. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2075. };
  2076. /* l3_main_1 -> l4_per3 */
  2077. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
  2078. .master = &dra7xx_l3_main_1_hwmod,
  2079. .slave = &dra7xx_l4_per3_hwmod,
  2080. .clk = "l3_iclk_div",
  2081. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2082. };
  2083. /* l3_main_1 -> l4_wkup */
  2084. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
  2085. .master = &dra7xx_l3_main_1_hwmod,
  2086. .slave = &dra7xx_l4_wkup_hwmod,
  2087. .clk = "wkupaon_iclk_mux",
  2088. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2089. };
  2090. /* l4_per2 -> atl */
  2091. static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
  2092. .master = &dra7xx_l4_per2_hwmod,
  2093. .slave = &dra7xx_atl_hwmod,
  2094. .clk = "l3_iclk_div",
  2095. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2096. };
  2097. /* l3_main_1 -> bb2d */
  2098. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
  2099. .master = &dra7xx_l3_main_1_hwmod,
  2100. .slave = &dra7xx_bb2d_hwmod,
  2101. .clk = "l3_iclk_div",
  2102. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2103. };
  2104. /* l4_wkup -> counter_32k */
  2105. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
  2106. .master = &dra7xx_l4_wkup_hwmod,
  2107. .slave = &dra7xx_counter_32k_hwmod,
  2108. .clk = "wkupaon_iclk_mux",
  2109. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2110. };
  2111. /* l4_wkup -> ctrl_module_wkup */
  2112. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
  2113. .master = &dra7xx_l4_wkup_hwmod,
  2114. .slave = &dra7xx_ctrl_module_wkup_hwmod,
  2115. .clk = "wkupaon_iclk_mux",
  2116. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2117. };
  2118. static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = {
  2119. .master = &dra7xx_l4_per2_hwmod,
  2120. .slave = &dra7xx_gmac_hwmod,
  2121. .clk = "dpll_gmac_ck",
  2122. .user = OCP_USER_MPU,
  2123. };
  2124. static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = {
  2125. .master = &dra7xx_gmac_hwmod,
  2126. .slave = &dra7xx_mdio_hwmod,
  2127. .user = OCP_USER_MPU,
  2128. };
  2129. /* l4_wkup -> dcan1 */
  2130. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
  2131. .master = &dra7xx_l4_wkup_hwmod,
  2132. .slave = &dra7xx_dcan1_hwmod,
  2133. .clk = "wkupaon_iclk_mux",
  2134. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2135. };
  2136. /* l4_per2 -> dcan2 */
  2137. static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
  2138. .master = &dra7xx_l4_per2_hwmod,
  2139. .slave = &dra7xx_dcan2_hwmod,
  2140. .clk = "l3_iclk_div",
  2141. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2142. };
  2143. static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
  2144. {
  2145. .pa_start = 0x4a056000,
  2146. .pa_end = 0x4a056fff,
  2147. .flags = ADDR_TYPE_RT
  2148. },
  2149. { }
  2150. };
  2151. /* l4_cfg -> dma_system */
  2152. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
  2153. .master = &dra7xx_l4_cfg_hwmod,
  2154. .slave = &dra7xx_dma_system_hwmod,
  2155. .clk = "l3_iclk_div",
  2156. .addr = dra7xx_dma_system_addrs,
  2157. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2158. };
  2159. static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
  2160. {
  2161. .name = "family",
  2162. .pa_start = 0x58000000,
  2163. .pa_end = 0x5800007f,
  2164. .flags = ADDR_TYPE_RT
  2165. },
  2166. };
  2167. /* l3_main_1 -> dss */
  2168. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
  2169. .master = &dra7xx_l3_main_1_hwmod,
  2170. .slave = &dra7xx_dss_hwmod,
  2171. .clk = "l3_iclk_div",
  2172. .addr = dra7xx_dss_addrs,
  2173. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2174. };
  2175. static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = {
  2176. {
  2177. .name = "dispc",
  2178. .pa_start = 0x58001000,
  2179. .pa_end = 0x58001fff,
  2180. .flags = ADDR_TYPE_RT
  2181. },
  2182. };
  2183. /* l3_main_1 -> dispc */
  2184. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
  2185. .master = &dra7xx_l3_main_1_hwmod,
  2186. .slave = &dra7xx_dss_dispc_hwmod,
  2187. .clk = "l3_iclk_div",
  2188. .addr = dra7xx_dss_dispc_addrs,
  2189. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2190. };
  2191. static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = {
  2192. {
  2193. .name = "hdmi_wp",
  2194. .pa_start = 0x58040000,
  2195. .pa_end = 0x580400ff,
  2196. .flags = ADDR_TYPE_RT
  2197. },
  2198. { }
  2199. };
  2200. /* l3_main_1 -> dispc */
  2201. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
  2202. .master = &dra7xx_l3_main_1_hwmod,
  2203. .slave = &dra7xx_dss_hdmi_hwmod,
  2204. .clk = "l3_iclk_div",
  2205. .addr = dra7xx_dss_hdmi_addrs,
  2206. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2207. };
  2208. static struct omap_hwmod_addr_space dra7xx_elm_addrs[] = {
  2209. {
  2210. .pa_start = 0x48078000,
  2211. .pa_end = 0x48078fff,
  2212. .flags = ADDR_TYPE_RT
  2213. },
  2214. { }
  2215. };
  2216. /* l4_per1 -> elm */
  2217. static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
  2218. .master = &dra7xx_l4_per1_hwmod,
  2219. .slave = &dra7xx_elm_hwmod,
  2220. .clk = "l3_iclk_div",
  2221. .addr = dra7xx_elm_addrs,
  2222. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2223. };
  2224. /* l4_wkup -> gpio1 */
  2225. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
  2226. .master = &dra7xx_l4_wkup_hwmod,
  2227. .slave = &dra7xx_gpio1_hwmod,
  2228. .clk = "wkupaon_iclk_mux",
  2229. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2230. };
  2231. /* l4_per1 -> gpio2 */
  2232. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
  2233. .master = &dra7xx_l4_per1_hwmod,
  2234. .slave = &dra7xx_gpio2_hwmod,
  2235. .clk = "l3_iclk_div",
  2236. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2237. };
  2238. /* l4_per1 -> gpio3 */
  2239. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
  2240. .master = &dra7xx_l4_per1_hwmod,
  2241. .slave = &dra7xx_gpio3_hwmod,
  2242. .clk = "l3_iclk_div",
  2243. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2244. };
  2245. /* l4_per1 -> gpio4 */
  2246. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
  2247. .master = &dra7xx_l4_per1_hwmod,
  2248. .slave = &dra7xx_gpio4_hwmod,
  2249. .clk = "l3_iclk_div",
  2250. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2251. };
  2252. /* l4_per1 -> gpio5 */
  2253. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
  2254. .master = &dra7xx_l4_per1_hwmod,
  2255. .slave = &dra7xx_gpio5_hwmod,
  2256. .clk = "l3_iclk_div",
  2257. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2258. };
  2259. /* l4_per1 -> gpio6 */
  2260. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
  2261. .master = &dra7xx_l4_per1_hwmod,
  2262. .slave = &dra7xx_gpio6_hwmod,
  2263. .clk = "l3_iclk_div",
  2264. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2265. };
  2266. /* l4_per1 -> gpio7 */
  2267. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
  2268. .master = &dra7xx_l4_per1_hwmod,
  2269. .slave = &dra7xx_gpio7_hwmod,
  2270. .clk = "l3_iclk_div",
  2271. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2272. };
  2273. /* l4_per1 -> gpio8 */
  2274. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
  2275. .master = &dra7xx_l4_per1_hwmod,
  2276. .slave = &dra7xx_gpio8_hwmod,
  2277. .clk = "l3_iclk_div",
  2278. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2279. };
  2280. static struct omap_hwmod_addr_space dra7xx_gpmc_addrs[] = {
  2281. {
  2282. .pa_start = 0x50000000,
  2283. .pa_end = 0x500003ff,
  2284. .flags = ADDR_TYPE_RT
  2285. },
  2286. { }
  2287. };
  2288. /* l3_main_1 -> gpmc */
  2289. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
  2290. .master = &dra7xx_l3_main_1_hwmod,
  2291. .slave = &dra7xx_gpmc_hwmod,
  2292. .clk = "l3_iclk_div",
  2293. .addr = dra7xx_gpmc_addrs,
  2294. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2295. };
  2296. static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
  2297. {
  2298. .pa_start = 0x480b2000,
  2299. .pa_end = 0x480b201f,
  2300. .flags = ADDR_TYPE_RT
  2301. },
  2302. { }
  2303. };
  2304. /* l4_per1 -> hdq1w */
  2305. static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
  2306. .master = &dra7xx_l4_per1_hwmod,
  2307. .slave = &dra7xx_hdq1w_hwmod,
  2308. .clk = "l3_iclk_div",
  2309. .addr = dra7xx_hdq1w_addrs,
  2310. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2311. };
  2312. /* l4_per1 -> i2c1 */
  2313. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
  2314. .master = &dra7xx_l4_per1_hwmod,
  2315. .slave = &dra7xx_i2c1_hwmod,
  2316. .clk = "l3_iclk_div",
  2317. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2318. };
  2319. /* l4_per1 -> i2c2 */
  2320. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
  2321. .master = &dra7xx_l4_per1_hwmod,
  2322. .slave = &dra7xx_i2c2_hwmod,
  2323. .clk = "l3_iclk_div",
  2324. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2325. };
  2326. /* l4_per1 -> i2c3 */
  2327. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
  2328. .master = &dra7xx_l4_per1_hwmod,
  2329. .slave = &dra7xx_i2c3_hwmod,
  2330. .clk = "l3_iclk_div",
  2331. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2332. };
  2333. /* l4_per1 -> i2c4 */
  2334. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
  2335. .master = &dra7xx_l4_per1_hwmod,
  2336. .slave = &dra7xx_i2c4_hwmod,
  2337. .clk = "l3_iclk_div",
  2338. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2339. };
  2340. /* l4_per1 -> i2c5 */
  2341. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
  2342. .master = &dra7xx_l4_per1_hwmod,
  2343. .slave = &dra7xx_i2c5_hwmod,
  2344. .clk = "l3_iclk_div",
  2345. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2346. };
  2347. /* l4_cfg -> mailbox1 */
  2348. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
  2349. .master = &dra7xx_l4_cfg_hwmod,
  2350. .slave = &dra7xx_mailbox1_hwmod,
  2351. .clk = "l3_iclk_div",
  2352. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2353. };
  2354. /* l4_per3 -> mailbox2 */
  2355. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
  2356. .master = &dra7xx_l4_per3_hwmod,
  2357. .slave = &dra7xx_mailbox2_hwmod,
  2358. .clk = "l3_iclk_div",
  2359. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2360. };
  2361. /* l4_per3 -> mailbox3 */
  2362. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
  2363. .master = &dra7xx_l4_per3_hwmod,
  2364. .slave = &dra7xx_mailbox3_hwmod,
  2365. .clk = "l3_iclk_div",
  2366. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2367. };
  2368. /* l4_per3 -> mailbox4 */
  2369. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
  2370. .master = &dra7xx_l4_per3_hwmod,
  2371. .slave = &dra7xx_mailbox4_hwmod,
  2372. .clk = "l3_iclk_div",
  2373. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2374. };
  2375. /* l4_per3 -> mailbox5 */
  2376. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
  2377. .master = &dra7xx_l4_per3_hwmod,
  2378. .slave = &dra7xx_mailbox5_hwmod,
  2379. .clk = "l3_iclk_div",
  2380. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2381. };
  2382. /* l4_per3 -> mailbox6 */
  2383. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
  2384. .master = &dra7xx_l4_per3_hwmod,
  2385. .slave = &dra7xx_mailbox6_hwmod,
  2386. .clk = "l3_iclk_div",
  2387. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2388. };
  2389. /* l4_per3 -> mailbox7 */
  2390. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
  2391. .master = &dra7xx_l4_per3_hwmod,
  2392. .slave = &dra7xx_mailbox7_hwmod,
  2393. .clk = "l3_iclk_div",
  2394. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2395. };
  2396. /* l4_per3 -> mailbox8 */
  2397. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
  2398. .master = &dra7xx_l4_per3_hwmod,
  2399. .slave = &dra7xx_mailbox8_hwmod,
  2400. .clk = "l3_iclk_div",
  2401. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2402. };
  2403. /* l4_per3 -> mailbox9 */
  2404. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
  2405. .master = &dra7xx_l4_per3_hwmod,
  2406. .slave = &dra7xx_mailbox9_hwmod,
  2407. .clk = "l3_iclk_div",
  2408. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2409. };
  2410. /* l4_per3 -> mailbox10 */
  2411. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
  2412. .master = &dra7xx_l4_per3_hwmod,
  2413. .slave = &dra7xx_mailbox10_hwmod,
  2414. .clk = "l3_iclk_div",
  2415. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2416. };
  2417. /* l4_per3 -> mailbox11 */
  2418. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
  2419. .master = &dra7xx_l4_per3_hwmod,
  2420. .slave = &dra7xx_mailbox11_hwmod,
  2421. .clk = "l3_iclk_div",
  2422. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2423. };
  2424. /* l4_per3 -> mailbox12 */
  2425. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
  2426. .master = &dra7xx_l4_per3_hwmod,
  2427. .slave = &dra7xx_mailbox12_hwmod,
  2428. .clk = "l3_iclk_div",
  2429. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2430. };
  2431. /* l4_per3 -> mailbox13 */
  2432. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
  2433. .master = &dra7xx_l4_per3_hwmod,
  2434. .slave = &dra7xx_mailbox13_hwmod,
  2435. .clk = "l3_iclk_div",
  2436. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2437. };
  2438. /* l4_per1 -> mcspi1 */
  2439. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
  2440. .master = &dra7xx_l4_per1_hwmod,
  2441. .slave = &dra7xx_mcspi1_hwmod,
  2442. .clk = "l3_iclk_div",
  2443. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2444. };
  2445. /* l4_per1 -> mcspi2 */
  2446. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
  2447. .master = &dra7xx_l4_per1_hwmod,
  2448. .slave = &dra7xx_mcspi2_hwmod,
  2449. .clk = "l3_iclk_div",
  2450. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2451. };
  2452. /* l4_per1 -> mcspi3 */
  2453. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
  2454. .master = &dra7xx_l4_per1_hwmod,
  2455. .slave = &dra7xx_mcspi3_hwmod,
  2456. .clk = "l3_iclk_div",
  2457. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2458. };
  2459. /* l4_per1 -> mcspi4 */
  2460. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
  2461. .master = &dra7xx_l4_per1_hwmod,
  2462. .slave = &dra7xx_mcspi4_hwmod,
  2463. .clk = "l3_iclk_div",
  2464. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2465. };
  2466. /* l4_per1 -> mmc1 */
  2467. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
  2468. .master = &dra7xx_l4_per1_hwmod,
  2469. .slave = &dra7xx_mmc1_hwmod,
  2470. .clk = "l3_iclk_div",
  2471. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2472. };
  2473. /* l4_per1 -> mmc2 */
  2474. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
  2475. .master = &dra7xx_l4_per1_hwmod,
  2476. .slave = &dra7xx_mmc2_hwmod,
  2477. .clk = "l3_iclk_div",
  2478. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2479. };
  2480. /* l4_per1 -> mmc3 */
  2481. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
  2482. .master = &dra7xx_l4_per1_hwmod,
  2483. .slave = &dra7xx_mmc3_hwmod,
  2484. .clk = "l3_iclk_div",
  2485. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2486. };
  2487. /* l4_per1 -> mmc4 */
  2488. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
  2489. .master = &dra7xx_l4_per1_hwmod,
  2490. .slave = &dra7xx_mmc4_hwmod,
  2491. .clk = "l3_iclk_div",
  2492. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2493. };
  2494. /* l4_cfg -> mpu */
  2495. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
  2496. .master = &dra7xx_l4_cfg_hwmod,
  2497. .slave = &dra7xx_mpu_hwmod,
  2498. .clk = "l3_iclk_div",
  2499. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2500. };
  2501. /* l4_cfg -> ocp2scp1 */
  2502. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
  2503. .master = &dra7xx_l4_cfg_hwmod,
  2504. .slave = &dra7xx_ocp2scp1_hwmod,
  2505. .clk = "l4_root_clk_div",
  2506. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2507. };
  2508. /* l4_cfg -> ocp2scp3 */
  2509. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
  2510. .master = &dra7xx_l4_cfg_hwmod,
  2511. .slave = &dra7xx_ocp2scp3_hwmod,
  2512. .clk = "l4_root_clk_div",
  2513. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2514. };
  2515. /* l3_main_1 -> pcie1 */
  2516. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie1 = {
  2517. .master = &dra7xx_l3_main_1_hwmod,
  2518. .slave = &dra7xx_pcie1_hwmod,
  2519. .clk = "l3_iclk_div",
  2520. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2521. };
  2522. /* l4_cfg -> pcie1 */
  2523. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1 = {
  2524. .master = &dra7xx_l4_cfg_hwmod,
  2525. .slave = &dra7xx_pcie1_hwmod,
  2526. .clk = "l4_root_clk_div",
  2527. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2528. };
  2529. /* l3_main_1 -> pcie2 */
  2530. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie2 = {
  2531. .master = &dra7xx_l3_main_1_hwmod,
  2532. .slave = &dra7xx_pcie2_hwmod,
  2533. .clk = "l3_iclk_div",
  2534. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2535. };
  2536. /* l4_cfg -> pcie2 */
  2537. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2 = {
  2538. .master = &dra7xx_l4_cfg_hwmod,
  2539. .slave = &dra7xx_pcie2_hwmod,
  2540. .clk = "l4_root_clk_div",
  2541. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2542. };
  2543. /* l4_cfg -> pcie1 phy */
  2544. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1_phy = {
  2545. .master = &dra7xx_l4_cfg_hwmod,
  2546. .slave = &dra7xx_pcie1_phy_hwmod,
  2547. .clk = "l4_root_clk_div",
  2548. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2549. };
  2550. /* l4_cfg -> pcie2 phy */
  2551. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2_phy = {
  2552. .master = &dra7xx_l4_cfg_hwmod,
  2553. .slave = &dra7xx_pcie2_phy_hwmod,
  2554. .clk = "l4_root_clk_div",
  2555. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2556. };
  2557. static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
  2558. {
  2559. .pa_start = 0x4b300000,
  2560. .pa_end = 0x4b30007f,
  2561. .flags = ADDR_TYPE_RT
  2562. },
  2563. { }
  2564. };
  2565. /* l3_main_1 -> qspi */
  2566. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
  2567. .master = &dra7xx_l3_main_1_hwmod,
  2568. .slave = &dra7xx_qspi_hwmod,
  2569. .clk = "l3_iclk_div",
  2570. .addr = dra7xx_qspi_addrs,
  2571. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2572. };
  2573. /* l4_per3 -> rtcss */
  2574. static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
  2575. .master = &dra7xx_l4_per3_hwmod,
  2576. .slave = &dra7xx_rtcss_hwmod,
  2577. .clk = "l4_root_clk_div",
  2578. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2579. };
  2580. static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
  2581. {
  2582. .name = "sysc",
  2583. .pa_start = 0x4a141100,
  2584. .pa_end = 0x4a141107,
  2585. .flags = ADDR_TYPE_RT
  2586. },
  2587. { }
  2588. };
  2589. /* l4_cfg -> sata */
  2590. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
  2591. .master = &dra7xx_l4_cfg_hwmod,
  2592. .slave = &dra7xx_sata_hwmod,
  2593. .clk = "l3_iclk_div",
  2594. .addr = dra7xx_sata_addrs,
  2595. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2596. };
  2597. static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
  2598. {
  2599. .pa_start = 0x4a0dd000,
  2600. .pa_end = 0x4a0dd07f,
  2601. .flags = ADDR_TYPE_RT
  2602. },
  2603. { }
  2604. };
  2605. /* l4_cfg -> smartreflex_core */
  2606. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
  2607. .master = &dra7xx_l4_cfg_hwmod,
  2608. .slave = &dra7xx_smartreflex_core_hwmod,
  2609. .clk = "l4_root_clk_div",
  2610. .addr = dra7xx_smartreflex_core_addrs,
  2611. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2612. };
  2613. static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
  2614. {
  2615. .pa_start = 0x4a0d9000,
  2616. .pa_end = 0x4a0d907f,
  2617. .flags = ADDR_TYPE_RT
  2618. },
  2619. { }
  2620. };
  2621. /* l4_cfg -> smartreflex_mpu */
  2622. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
  2623. .master = &dra7xx_l4_cfg_hwmod,
  2624. .slave = &dra7xx_smartreflex_mpu_hwmod,
  2625. .clk = "l4_root_clk_div",
  2626. .addr = dra7xx_smartreflex_mpu_addrs,
  2627. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2628. };
  2629. static struct omap_hwmod_addr_space dra7xx_spinlock_addrs[] = {
  2630. {
  2631. .pa_start = 0x4a0f6000,
  2632. .pa_end = 0x4a0f6fff,
  2633. .flags = ADDR_TYPE_RT
  2634. },
  2635. { }
  2636. };
  2637. /* l4_cfg -> spinlock */
  2638. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
  2639. .master = &dra7xx_l4_cfg_hwmod,
  2640. .slave = &dra7xx_spinlock_hwmod,
  2641. .clk = "l3_iclk_div",
  2642. .addr = dra7xx_spinlock_addrs,
  2643. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2644. };
  2645. /* l4_wkup -> timer1 */
  2646. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
  2647. .master = &dra7xx_l4_wkup_hwmod,
  2648. .slave = &dra7xx_timer1_hwmod,
  2649. .clk = "wkupaon_iclk_mux",
  2650. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2651. };
  2652. /* l4_per1 -> timer2 */
  2653. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
  2654. .master = &dra7xx_l4_per1_hwmod,
  2655. .slave = &dra7xx_timer2_hwmod,
  2656. .clk = "l3_iclk_div",
  2657. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2658. };
  2659. /* l4_per1 -> timer3 */
  2660. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
  2661. .master = &dra7xx_l4_per1_hwmod,
  2662. .slave = &dra7xx_timer3_hwmod,
  2663. .clk = "l3_iclk_div",
  2664. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2665. };
  2666. /* l4_per1 -> timer4 */
  2667. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
  2668. .master = &dra7xx_l4_per1_hwmod,
  2669. .slave = &dra7xx_timer4_hwmod,
  2670. .clk = "l3_iclk_div",
  2671. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2672. };
  2673. /* l4_per3 -> timer5 */
  2674. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
  2675. .master = &dra7xx_l4_per3_hwmod,
  2676. .slave = &dra7xx_timer5_hwmod,
  2677. .clk = "l3_iclk_div",
  2678. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2679. };
  2680. /* l4_per3 -> timer6 */
  2681. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
  2682. .master = &dra7xx_l4_per3_hwmod,
  2683. .slave = &dra7xx_timer6_hwmod,
  2684. .clk = "l3_iclk_div",
  2685. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2686. };
  2687. /* l4_per3 -> timer7 */
  2688. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
  2689. .master = &dra7xx_l4_per3_hwmod,
  2690. .slave = &dra7xx_timer7_hwmod,
  2691. .clk = "l3_iclk_div",
  2692. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2693. };
  2694. /* l4_per3 -> timer8 */
  2695. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
  2696. .master = &dra7xx_l4_per3_hwmod,
  2697. .slave = &dra7xx_timer8_hwmod,
  2698. .clk = "l3_iclk_div",
  2699. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2700. };
  2701. /* l4_per1 -> timer9 */
  2702. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
  2703. .master = &dra7xx_l4_per1_hwmod,
  2704. .slave = &dra7xx_timer9_hwmod,
  2705. .clk = "l3_iclk_div",
  2706. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2707. };
  2708. /* l4_per1 -> timer10 */
  2709. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
  2710. .master = &dra7xx_l4_per1_hwmod,
  2711. .slave = &dra7xx_timer10_hwmod,
  2712. .clk = "l3_iclk_div",
  2713. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2714. };
  2715. /* l4_per1 -> timer11 */
  2716. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
  2717. .master = &dra7xx_l4_per1_hwmod,
  2718. .slave = &dra7xx_timer11_hwmod,
  2719. .clk = "l3_iclk_div",
  2720. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2721. };
  2722. /* l4_per1 -> uart1 */
  2723. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
  2724. .master = &dra7xx_l4_per1_hwmod,
  2725. .slave = &dra7xx_uart1_hwmod,
  2726. .clk = "l3_iclk_div",
  2727. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2728. };
  2729. /* l4_per1 -> uart2 */
  2730. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
  2731. .master = &dra7xx_l4_per1_hwmod,
  2732. .slave = &dra7xx_uart2_hwmod,
  2733. .clk = "l3_iclk_div",
  2734. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2735. };
  2736. /* l4_per1 -> uart3 */
  2737. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
  2738. .master = &dra7xx_l4_per1_hwmod,
  2739. .slave = &dra7xx_uart3_hwmod,
  2740. .clk = "l3_iclk_div",
  2741. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2742. };
  2743. /* l4_per1 -> uart4 */
  2744. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
  2745. .master = &dra7xx_l4_per1_hwmod,
  2746. .slave = &dra7xx_uart4_hwmod,
  2747. .clk = "l3_iclk_div",
  2748. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2749. };
  2750. /* l4_per1 -> uart5 */
  2751. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
  2752. .master = &dra7xx_l4_per1_hwmod,
  2753. .slave = &dra7xx_uart5_hwmod,
  2754. .clk = "l3_iclk_div",
  2755. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2756. };
  2757. /* l4_per1 -> uart6 */
  2758. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
  2759. .master = &dra7xx_l4_per1_hwmod,
  2760. .slave = &dra7xx_uart6_hwmod,
  2761. .clk = "l3_iclk_div",
  2762. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2763. };
  2764. /* l4_per3 -> usb_otg_ss1 */
  2765. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
  2766. .master = &dra7xx_l4_per3_hwmod,
  2767. .slave = &dra7xx_usb_otg_ss1_hwmod,
  2768. .clk = "dpll_core_h13x2_ck",
  2769. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2770. };
  2771. /* l4_per3 -> usb_otg_ss2 */
  2772. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
  2773. .master = &dra7xx_l4_per3_hwmod,
  2774. .slave = &dra7xx_usb_otg_ss2_hwmod,
  2775. .clk = "dpll_core_h13x2_ck",
  2776. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2777. };
  2778. /* l4_per3 -> usb_otg_ss3 */
  2779. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
  2780. .master = &dra7xx_l4_per3_hwmod,
  2781. .slave = &dra7xx_usb_otg_ss3_hwmod,
  2782. .clk = "dpll_core_h13x2_ck",
  2783. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2784. };
  2785. /* l4_per3 -> usb_otg_ss4 */
  2786. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
  2787. .master = &dra7xx_l4_per3_hwmod,
  2788. .slave = &dra7xx_usb_otg_ss4_hwmod,
  2789. .clk = "dpll_core_h13x2_ck",
  2790. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2791. };
  2792. /* l3_main_1 -> vcp1 */
  2793. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
  2794. .master = &dra7xx_l3_main_1_hwmod,
  2795. .slave = &dra7xx_vcp1_hwmod,
  2796. .clk = "l3_iclk_div",
  2797. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2798. };
  2799. /* l4_per2 -> vcp1 */
  2800. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
  2801. .master = &dra7xx_l4_per2_hwmod,
  2802. .slave = &dra7xx_vcp1_hwmod,
  2803. .clk = "l3_iclk_div",
  2804. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2805. };
  2806. /* l3_main_1 -> vcp2 */
  2807. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
  2808. .master = &dra7xx_l3_main_1_hwmod,
  2809. .slave = &dra7xx_vcp2_hwmod,
  2810. .clk = "l3_iclk_div",
  2811. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2812. };
  2813. /* l4_per2 -> vcp2 */
  2814. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
  2815. .master = &dra7xx_l4_per2_hwmod,
  2816. .slave = &dra7xx_vcp2_hwmod,
  2817. .clk = "l3_iclk_div",
  2818. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2819. };
  2820. /* l4_wkup -> wd_timer2 */
  2821. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
  2822. .master = &dra7xx_l4_wkup_hwmod,
  2823. .slave = &dra7xx_wd_timer2_hwmod,
  2824. .clk = "wkupaon_iclk_mux",
  2825. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2826. };
  2827. static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
  2828. &dra7xx_l3_main_2__l3_instr,
  2829. &dra7xx_l4_cfg__l3_main_1,
  2830. &dra7xx_mpu__l3_main_1,
  2831. &dra7xx_l3_main_1__l3_main_2,
  2832. &dra7xx_l4_cfg__l3_main_2,
  2833. &dra7xx_l3_main_1__l4_cfg,
  2834. &dra7xx_l3_main_1__l4_per1,
  2835. &dra7xx_l3_main_1__l4_per2,
  2836. &dra7xx_l3_main_1__l4_per3,
  2837. &dra7xx_l3_main_1__l4_wkup,
  2838. &dra7xx_l4_per2__atl,
  2839. &dra7xx_l3_main_1__bb2d,
  2840. &dra7xx_l4_wkup__counter_32k,
  2841. &dra7xx_l4_wkup__ctrl_module_wkup,
  2842. &dra7xx_l4_wkup__dcan1,
  2843. &dra7xx_l4_per2__dcan2,
  2844. &dra7xx_l4_per2__cpgmac0,
  2845. &dra7xx_gmac__mdio,
  2846. &dra7xx_l4_cfg__dma_system,
  2847. &dra7xx_l3_main_1__dss,
  2848. &dra7xx_l3_main_1__dispc,
  2849. &dra7xx_l3_main_1__hdmi,
  2850. &dra7xx_l4_per1__elm,
  2851. &dra7xx_l4_wkup__gpio1,
  2852. &dra7xx_l4_per1__gpio2,
  2853. &dra7xx_l4_per1__gpio3,
  2854. &dra7xx_l4_per1__gpio4,
  2855. &dra7xx_l4_per1__gpio5,
  2856. &dra7xx_l4_per1__gpio6,
  2857. &dra7xx_l4_per1__gpio7,
  2858. &dra7xx_l4_per1__gpio8,
  2859. &dra7xx_l3_main_1__gpmc,
  2860. &dra7xx_l4_per1__hdq1w,
  2861. &dra7xx_l4_per1__i2c1,
  2862. &dra7xx_l4_per1__i2c2,
  2863. &dra7xx_l4_per1__i2c3,
  2864. &dra7xx_l4_per1__i2c4,
  2865. &dra7xx_l4_per1__i2c5,
  2866. &dra7xx_l4_cfg__mailbox1,
  2867. &dra7xx_l4_per3__mailbox2,
  2868. &dra7xx_l4_per3__mailbox3,
  2869. &dra7xx_l4_per3__mailbox4,
  2870. &dra7xx_l4_per3__mailbox5,
  2871. &dra7xx_l4_per3__mailbox6,
  2872. &dra7xx_l4_per3__mailbox7,
  2873. &dra7xx_l4_per3__mailbox8,
  2874. &dra7xx_l4_per3__mailbox9,
  2875. &dra7xx_l4_per3__mailbox10,
  2876. &dra7xx_l4_per3__mailbox11,
  2877. &dra7xx_l4_per3__mailbox12,
  2878. &dra7xx_l4_per3__mailbox13,
  2879. &dra7xx_l4_per1__mcspi1,
  2880. &dra7xx_l4_per1__mcspi2,
  2881. &dra7xx_l4_per1__mcspi3,
  2882. &dra7xx_l4_per1__mcspi4,
  2883. &dra7xx_l4_per1__mmc1,
  2884. &dra7xx_l4_per1__mmc2,
  2885. &dra7xx_l4_per1__mmc3,
  2886. &dra7xx_l4_per1__mmc4,
  2887. &dra7xx_l4_cfg__mpu,
  2888. &dra7xx_l4_cfg__ocp2scp1,
  2889. &dra7xx_l4_cfg__ocp2scp3,
  2890. &dra7xx_l3_main_1__pcie1,
  2891. &dra7xx_l4_cfg__pcie1,
  2892. &dra7xx_l3_main_1__pcie2,
  2893. &dra7xx_l4_cfg__pcie2,
  2894. &dra7xx_l4_cfg__pcie1_phy,
  2895. &dra7xx_l4_cfg__pcie2_phy,
  2896. &dra7xx_l3_main_1__qspi,
  2897. &dra7xx_l4_per3__rtcss,
  2898. &dra7xx_l4_cfg__sata,
  2899. &dra7xx_l4_cfg__smartreflex_core,
  2900. &dra7xx_l4_cfg__smartreflex_mpu,
  2901. &dra7xx_l4_cfg__spinlock,
  2902. &dra7xx_l4_wkup__timer1,
  2903. &dra7xx_l4_per1__timer2,
  2904. &dra7xx_l4_per1__timer3,
  2905. &dra7xx_l4_per1__timer4,
  2906. &dra7xx_l4_per3__timer5,
  2907. &dra7xx_l4_per3__timer6,
  2908. &dra7xx_l4_per3__timer7,
  2909. &dra7xx_l4_per3__timer8,
  2910. &dra7xx_l4_per1__timer9,
  2911. &dra7xx_l4_per1__timer10,
  2912. &dra7xx_l4_per1__timer11,
  2913. &dra7xx_l4_per1__uart1,
  2914. &dra7xx_l4_per1__uart2,
  2915. &dra7xx_l4_per1__uart3,
  2916. &dra7xx_l4_per1__uart4,
  2917. &dra7xx_l4_per1__uart5,
  2918. &dra7xx_l4_per1__uart6,
  2919. &dra7xx_l4_per3__usb_otg_ss1,
  2920. &dra7xx_l4_per3__usb_otg_ss2,
  2921. &dra7xx_l4_per3__usb_otg_ss3,
  2922. &dra7xx_l3_main_1__vcp1,
  2923. &dra7xx_l4_per2__vcp1,
  2924. &dra7xx_l3_main_1__vcp2,
  2925. &dra7xx_l4_per2__vcp2,
  2926. &dra7xx_l4_wkup__wd_timer2,
  2927. NULL,
  2928. };
  2929. static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
  2930. &dra7xx_l4_per3__usb_otg_ss4,
  2931. NULL,
  2932. };
  2933. static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
  2934. NULL,
  2935. };
  2936. int __init dra7xx_hwmod_init(void)
  2937. {
  2938. int ret;
  2939. omap_hwmod_init();
  2940. ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
  2941. if (!ret && soc_is_dra74x())
  2942. return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
  2943. else if (!ret && soc_is_dra72x())
  2944. return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
  2945. return ret;
  2946. }