realizationOfDataCalculation.c 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211
  1. /*
  2. * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
  3. *
  4. * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * This file is automatically generated from the AM33XX hardware databases.
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation version 2.
  10. *
  11. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  12. * kind, whether express or implied; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <linux/i2c-omap.h>
  17. #include "omap_hwmod.h"
  18. #include <linux/platform_data/gpio-omap.h>
  19. #include <linux/platform_data/spi-omap2-mcspi.h>
  20. #include "omap_hwmod_common_data.h"
  21. #include "control.h"
  22. #include "cm33xx.h"
  23. #include "prm33xx.h"
  24. #include "prm-regbits-33xx.h"
  25. #include "i2c.h"
  26. #include "mmc.h"
  27. /*
  28. * IP blocks
  29. */
  30. /*
  31. * 'emif_fw' class
  32. * instance(s): emif_fw
  33. */
  34. static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = {
  35. .name = "emif_fw",
  36. };
  37. /* emif_fw */
  38. static struct omap_hwmod am33xx_emif_fw_hwmod = {
  39. .name = "emif_fw",
  40. .class = &am33xx_emif_fw_hwmod_class,
  41. .clkdm_name = "l4fw_clkdm",
  42. .main_clk = "l4fw_gclk",
  43. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  44. .prcm = {
  45. .omap4 = {
  46. .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET,
  47. .modulemode = MODULEMODE_SWCTRL,
  48. },
  49. },
  50. };
  51. /*
  52. * 'emif' class
  53. * instance(s): emif
  54. */
  55. static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = {
  56. .rev_offs = 0x0000,
  57. };
  58. static struct omap_hwmod_class am33xx_emif_hwmod_class = {
  59. .name = "emif",
  60. .sysc = &am33xx_emif_sysc,
  61. };
  62. static struct omap_hwmod_irq_info am33xx_emif_irqs[] = {
  63. { .name = "ddrerr0", .irq = 101 + OMAP_INTC_START, },
  64. { .irq = -1 },
  65. };
  66. /* emif */
  67. static struct omap_hwmod am33xx_emif_hwmod = {
  68. .name = "emif",
  69. .class = &am33xx_emif_hwmod_class,
  70. .clkdm_name = "l3_clkdm",
  71. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  72. .mpu_irqs = am33xx_emif_irqs,
  73. .main_clk = "dpll_ddr_m2_div2_ck",
  74. .prcm = {
  75. .omap4 = {
  76. .clkctrl_offs = AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
  77. .modulemode = MODULEMODE_SWCTRL,
  78. },
  79. },
  80. };
  81. /*
  82. * 'l3' class
  83. * instance(s): l3_main, l3_s, l3_instr
  84. */
  85. static struct omap_hwmod_class am33xx_l3_hwmod_class = {
  86. .name = "l3",
  87. };
  88. /* l3_main (l3_fast) */
  89. static struct omap_hwmod_irq_info am33xx_l3_main_irqs[] = {
  90. { .name = "l3debug", .irq = 9 + OMAP_INTC_START, },
  91. { .name = "l3appint", .irq = 10 + OMAP_INTC_START, },
  92. { .irq = -1 },
  93. };
  94. static struct omap_hwmod am33xx_l3_main_hwmod = {
  95. .name = "l3_main",
  96. .class = &am33xx_l3_hwmod_class,
  97. .clkdm_name = "l3_clkdm",
  98. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  99. .mpu_irqs = am33xx_l3_main_irqs,
  100. .main_clk = "l3_gclk",
  101. .prcm = {
  102. .omap4 = {
  103. .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET,
  104. .modulemode = MODULEMODE_SWCTRL,
  105. },
  106. },
  107. };
  108. /* l3_s */
  109. static struct omap_hwmod am33xx_l3_s_hwmod = {
  110. .name = "l3_s",
  111. .class = &am33xx_l3_hwmod_class,
  112. .clkdm_name = "l3s_clkdm",
  113. };
  114. /* l3_instr */
  115. static struct omap_hwmod am33xx_l3_instr_hwmod = {
  116. .name = "l3_instr",
  117. .class = &am33xx_l3_hwmod_class,
  118. .clkdm_name = "l3_clkdm",
  119. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  120. .main_clk = "l3_gclk",
  121. .prcm = {
  122. .omap4 = {
  123. .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET,
  124. .modulemode = MODULEMODE_SWCTRL,
  125. },
  126. },
  127. };
  128. /*
  129. * 'l4' class
  130. * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
  131. */
  132. static struct omap_hwmod_class am33xx_l4_hwmod_class = {
  133. .name = "l4",
  134. };
  135. /* l4_ls */
  136. static struct omap_hwmod am33xx_l4_ls_hwmod = {
  137. .name = "l4_ls",
  138. .class = &am33xx_l4_hwmod_class,
  139. .clkdm_name = "l4ls_clkdm",
  140. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  141. .main_clk = "l4ls_gclk",
  142. .prcm = {
  143. .omap4 = {
  144. .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET,
  145. .modulemode = MODULEMODE_SWCTRL,
  146. },
  147. },
  148. };
  149. /* l4_hs */
  150. static struct omap_hwmod am33xx_l4_hs_hwmod = {
  151. .name = "l4_hs",
  152. .class = &am33xx_l4_hwmod_class,
  153. .clkdm_name = "l4hs_clkdm",
  154. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  155. .main_clk = "l4hs_gclk",
  156. .prcm = {
  157. .omap4 = {
  158. .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET,
  159. .modulemode = MODULEMODE_SWCTRL,
  160. },
  161. },
  162. };
  163. /* l4_wkup */
  164. static struct omap_hwmod am33xx_l4_wkup_hwmod = {
  165. .name = "l4_wkup",
  166. .class = &am33xx_l4_hwmod_class,
  167. .clkdm_name = "l4_wkup_clkdm",
  168. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  169. .prcm = {
  170. .omap4 = {
  171. .clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
  172. .modulemode = MODULEMODE_SWCTRL,
  173. },
  174. },
  175. };
  176. /* l4_fw */
  177. static struct omap_hwmod am33xx_l4_fw_hwmod = {
  178. .name = "l4_fw",
  179. .class = &am33xx_l4_hwmod_class,
  180. .clkdm_name = "l4fw_clkdm",
  181. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  182. .prcm = {
  183. .omap4 = {
  184. .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET,
  185. .modulemode = MODULEMODE_SWCTRL,
  186. },
  187. },
  188. };
  189. /*
  190. * 'mpu' class
  191. */
  192. static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
  193. .name = "mpu",
  194. };
  195. /* mpu */
  196. static struct omap_hwmod_irq_info am33xx_mpu_irqs[] = {
  197. { .name = "emuint", .irq = 0 + OMAP_INTC_START, },
  198. { .name = "commtx", .irq = 1 + OMAP_INTC_START, },
  199. { .name = "commrx", .irq = 2 + OMAP_INTC_START, },
  200. { .name = "bench", .irq = 3 + OMAP_INTC_START, },
  201. { .irq = -1 },
  202. };
  203. static struct omap_hwmod am33xx_mpu_hwmod = {
  204. .name = "mpu",
  205. .class = &am33xx_mpu_hwmod_class,
  206. .clkdm_name = "mpu_clkdm",
  207. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  208. .mpu_irqs = am33xx_mpu_irqs,
  209. .main_clk = "dpll_mpu_m2_ck",
  210. .prcm = {
  211. .omap4 = {
  212. .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  213. .modulemode = MODULEMODE_SWCTRL,
  214. },
  215. },
  216. };
  217. /*
  218. * 'wakeup m3' class
  219. * Wakeup controller sub-system under wakeup domain
  220. */
  221. static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
  222. .name = "wkup_m3",
  223. };
  224. static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
  225. { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
  226. };
  227. static struct omap_hwmod_irq_info am33xx_wkup_m3_irqs[] = {
  228. { .name = "txev", .irq = 78 + OMAP_INTC_START, },
  229. { .irq = -1 },
  230. };
  231. /* wkup_m3 */
  232. static struct omap_hwmod am33xx_wkup_m3_hwmod = {
  233. .name = "wkup_m3",
  234. .class = &am33xx_wkup_m3_hwmod_class,
  235. .clkdm_name = "l4_wkup_aon_clkdm",
  236. .flags = HWMOD_INIT_NO_RESET, /* Keep hardreset asserted */
  237. .mpu_irqs = am33xx_wkup_m3_irqs,
  238. .main_clk = "dpll_core_m4_div2_ck",
  239. .prcm = {
  240. .omap4 = {
  241. .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
  242. .rstctrl_offs = AM33XX_RM_WKUP_RSTCTRL_OFFSET,
  243. .modulemode = MODULEMODE_SWCTRL,
  244. },
  245. },
  246. .rst_lines = am33xx_wkup_m3_resets,
  247. .rst_lines_cnt = ARRAY_SIZE(am33xx_wkup_m3_resets),
  248. };
  249. /*
  250. * 'pru-icss' class
  251. * Programmable Real-Time Unit and Industrial Communication Subsystem
  252. */
  253. static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
  254. .name = "pruss",
  255. };
  256. static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
  257. { .name = "pruss", .rst_shift = 1 },
  258. };
  259. static struct omap_hwmod_irq_info am33xx_pruss_irqs[] = {
  260. { .name = "evtout0", .irq = 20 + OMAP_INTC_START, },
  261. { .name = "evtout1", .irq = 21 + OMAP_INTC_START, },
  262. { .name = "evtout2", .irq = 22 + OMAP_INTC_START, },
  263. { .name = "evtout3", .irq = 23 + OMAP_INTC_START, },
  264. { .name = "evtout4", .irq = 24 + OMAP_INTC_START, },
  265. { .name = "evtout5", .irq = 25 + OMAP_INTC_START, },
  266. { .name = "evtout6", .irq = 26 + OMAP_INTC_START, },
  267. { .name = "evtout7", .irq = 27 + OMAP_INTC_START, },
  268. { .irq = -1 },
  269. };
  270. /* pru-icss */
  271. /* Pseudo hwmod for reset control purpose only */
  272. static struct omap_hwmod am33xx_pruss_hwmod = {
  273. .name = "pruss",
  274. .class = &am33xx_pruss_hwmod_class,
  275. .clkdm_name = "pruss_ocp_clkdm",
  276. .mpu_irqs = am33xx_pruss_irqs,
  277. .main_clk = "pruss_ocp_gclk",
  278. .prcm = {
  279. .omap4 = {
  280. .clkctrl_offs = AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET,
  281. .rstctrl_offs = AM33XX_RM_PER_RSTCTRL_OFFSET,
  282. .modulemode = MODULEMODE_SWCTRL,
  283. },
  284. },
  285. .rst_lines = am33xx_pruss_resets,
  286. .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets),
  287. };
  288. /* gfx */
  289. /* Pseudo hwmod for reset control purpose only */
  290. static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
  291. .name = "gfx",
  292. };
  293. static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
  294. { .name = "gfx", .rst_shift = 0 },
  295. };
  296. static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
  297. { .name = "gfxint", .irq = 37 + OMAP_INTC_START, },
  298. { .irq = -1 },
  299. };
  300. static struct omap_hwmod am33xx_gfx_hwmod = {
  301. .name = "gfx",
  302. .class = &am33xx_gfx_hwmod_class,
  303. .clkdm_name = "gfx_l3_clkdm",
  304. .mpu_irqs = am33xx_gfx_irqs,
  305. .main_clk = "gfx_fck_div_ck",
  306. .prcm = {
  307. .omap4 = {
  308. .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
  309. .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
  310. .modulemode = MODULEMODE_SWCTRL,
  311. },
  312. },
  313. .rst_lines = am33xx_gfx_resets,
  314. .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets),
  315. };
  316. /*
  317. * 'prcm' class
  318. * power and reset manager (whole prcm infrastructure)
  319. */
  320. static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
  321. .name = "prcm",
  322. };
  323. /* prcm */
  324. static struct omap_hwmod am33xx_prcm_hwmod = {
  325. .name = "prcm",
  326. .class = &am33xx_prcm_hwmod_class,
  327. .clkdm_name = "l4_wkup_clkdm",
  328. };
  329. /*
  330. * 'adc/tsc' class
  331. * TouchScreen Controller (Anolog-To-Digital Converter)
  332. */
  333. static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
  334. .rev_offs = 0x00,
  335. .sysc_offs = 0x10,
  336. .sysc_flags = SYSC_HAS_SIDLEMODE,
  337. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  338. SIDLE_SMART_WKUP),
  339. .sysc_fields = &omap_hwmod_sysc_type2,
  340. };
  341. static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
  342. .name = "adc_tsc",
  343. .sysc = &am33xx_adc_tsc_sysc,
  344. };
  345. static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = {
  346. { .irq = 16 + OMAP_INTC_START, },
  347. { .irq = -1 },
  348. };
  349. static struct omap_hwmod am33xx_adc_tsc_hwmod = {
  350. .name = "adc_tsc",
  351. .class = &am33xx_adc_tsc_hwmod_class,
  352. .clkdm_name = "l4_wkup_clkdm",
  353. .mpu_irqs = am33xx_adc_tsc_irqs,
  354. .main_clk = "adc_tsc_fck",
  355. .prcm = {
  356. .omap4 = {
  357. .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
  358. .modulemode = MODULEMODE_SWCTRL,
  359. },
  360. },
  361. };
  362. /*
  363. * Modules omap_hwmod structures
  364. *
  365. * The following IPs are excluded for the moment because:
  366. * - They do not need an explicit SW control using omap_hwmod API.
  367. * - They still need to be validated with the driver
  368. * properly adapted to omap_hwmod / omap_device
  369. *
  370. * - cEFUSE (doesn't fall under any ocp_if)
  371. * - clkdiv32k
  372. * - debugss
  373. * - ocmc ram
  374. * - ocp watch point
  375. * - aes0
  376. * - sha0
  377. */
  378. #if 0
  379. /*
  380. * 'cefuse' class
  381. */
  382. static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
  383. .name = "cefuse",
  384. };
  385. static struct omap_hwmod am33xx_cefuse_hwmod = {
  386. .name = "cefuse",
  387. .class = &am33xx_cefuse_hwmod_class,
  388. .clkdm_name = "l4_cefuse_clkdm",
  389. .main_clk = "cefuse_fck",
  390. .prcm = {
  391. .omap4 = {
  392. .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
  393. .modulemode = MODULEMODE_SWCTRL,
  394. },
  395. },
  396. };
  397. /*
  398. * 'clkdiv32k' class
  399. */
  400. static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
  401. .name = "clkdiv32k",
  402. };
  403. static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
  404. .name = "clkdiv32k",
  405. .class = &am33xx_clkdiv32k_hwmod_class,
  406. .clkdm_name = "clk_24mhz_clkdm",
  407. .main_clk = "clkdiv32k_ick",
  408. .prcm = {
  409. .omap4 = {
  410. .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
  411. .modulemode = MODULEMODE_SWCTRL,
  412. },
  413. },
  414. };
  415. /*
  416. * 'debugss' class
  417. * debug sub system
  418. */
  419. static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
  420. .name = "debugss",
  421. };
  422. static struct omap_hwmod am33xx_debugss_hwmod = {
  423. .name = "debugss",
  424. .class = &am33xx_debugss_hwmod_class,
  425. .clkdm_name = "l3_aon_clkdm",
  426. .main_clk = "debugss_ick",
  427. .prcm = {
  428. .omap4 = {
  429. .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
  430. .modulemode = MODULEMODE_SWCTRL,
  431. },
  432. },
  433. };
  434. /* ocmcram */
  435. static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
  436. .name = "ocmcram",
  437. };
  438. static struct omap_hwmod am33xx_ocmcram_hwmod = {
  439. .name = "ocmcram",
  440. .class = &am33xx_ocmcram_hwmod_class,
  441. .clkdm_name = "l3_clkdm",
  442. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  443. .main_clk = "l3_gclk",
  444. .prcm = {
  445. .omap4 = {
  446. .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
  447. .modulemode = MODULEMODE_SWCTRL,
  448. },
  449. },
  450. };
  451. /* ocpwp */
  452. static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
  453. .name = "ocpwp",
  454. };
  455. static struct omap_hwmod am33xx_ocpwp_hwmod = {
  456. .name = "ocpwp",
  457. .class = &am33xx_ocpwp_hwmod_class,
  458. .clkdm_name = "l4ls_clkdm",
  459. .main_clk = "l4ls_gclk",
  460. .prcm = {
  461. .omap4 = {
  462. .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
  463. .modulemode = MODULEMODE_SWCTRL,
  464. },
  465. },
  466. };
  467. /*
  468. * 'aes' class
  469. */
  470. static struct omap_hwmod_class am33xx_aes_hwmod_class = {
  471. .name = "aes",
  472. };
  473. static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
  474. { .irq = 102 + OMAP_INTC_START, },
  475. { .irq = -1 },
  476. };
  477. static struct omap_hwmod am33xx_aes0_hwmod = {
  478. .name = "aes0",
  479. .class = &am33xx_aes_hwmod_class,
  480. .clkdm_name = "l3_clkdm",
  481. .mpu_irqs = am33xx_aes0_irqs,
  482. .main_clk = "l3_gclk",
  483. .prcm = {
  484. .omap4 = {
  485. .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
  486. .modulemode = MODULEMODE_SWCTRL,
  487. },
  488. },
  489. };
  490. /* sha0 */
  491. static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
  492. .name = "sha0",
  493. };
  494. static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
  495. { .irq = 108 + OMAP_INTC_START, },
  496. { .irq = -1 },
  497. };
  498. static struct omap_hwmod am33xx_sha0_hwmod = {
  499. .name = "sha0",
  500. .class = &am33xx_sha0_hwmod_class,
  501. .clkdm_name = "l3_clkdm",
  502. .mpu_irqs = am33xx_sha0_irqs,
  503. .main_clk = "l3_gclk",
  504. .prcm = {
  505. .omap4 = {
  506. .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET,
  507. .modulemode = MODULEMODE_SWCTRL,
  508. },
  509. },
  510. };
  511. #endif
  512. /* 'smartreflex' class */
  513. static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
  514. .name = "smartreflex",
  515. };
  516. /* smartreflex0 */
  517. static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = {
  518. { .irq = 120 + OMAP_INTC_START, },
  519. { .irq = -1 },
  520. };
  521. static struct omap_hwmod am33xx_smartreflex0_hwmod = {
  522. .name = "smartreflex0",
  523. .class = &am33xx_smartreflex_hwmod_class,
  524. .clkdm_name = "l4_wkup_clkdm",
  525. .mpu_irqs = am33xx_smartreflex0_irqs,
  526. .main_clk = "smartreflex0_fck",
  527. .prcm = {
  528. .omap4 = {
  529. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
  530. .modulemode = MODULEMODE_SWCTRL,
  531. },
  532. },
  533. };
  534. /* smartreflex1 */
  535. static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = {
  536. { .irq = 121 + OMAP_INTC_START, },
  537. { .irq = -1 },
  538. };
  539. static struct omap_hwmod am33xx_smartreflex1_hwmod = {
  540. .name = "smartreflex1",
  541. .class = &am33xx_smartreflex_hwmod_class,
  542. .clkdm_name = "l4_wkup_clkdm",
  543. .mpu_irqs = am33xx_smartreflex1_irqs,
  544. .main_clk = "smartreflex1_fck",
  545. .prcm = {
  546. .omap4 = {
  547. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
  548. .modulemode = MODULEMODE_SWCTRL,
  549. },
  550. },
  551. };
  552. /*
  553. * 'control' module class
  554. */
  555. static struct omap_hwmod_class am33xx_control_hwmod_class = {
  556. .name = "control",
  557. };
  558. static struct omap_hwmod_irq_info am33xx_control_irqs[] = {
  559. { .irq = 8 + OMAP_INTC_START, },
  560. { .irq = -1 },
  561. };
  562. static struct omap_hwmod am33xx_control_hwmod = {
  563. .name = "control",
  564. .class = &am33xx_control_hwmod_class,
  565. .clkdm_name = "l4_wkup_clkdm",
  566. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  567. .mpu_irqs = am33xx_control_irqs,
  568. .main_clk = "dpll_core_m4_div2_ck",
  569. .prcm = {
  570. .omap4 = {
  571. .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
  572. .modulemode = MODULEMODE_SWCTRL,
  573. },
  574. },
  575. };
  576. /*
  577. * 'cpgmac' class
  578. * cpsw/cpgmac sub system
  579. */
  580. static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
  581. .rev_offs = 0x0,
  582. .sysc_offs = 0x8,
  583. .syss_offs = 0x4,
  584. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  585. SYSS_HAS_RESET_STATUS),
  586. .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  587. MSTANDBY_NO),
  588. .sysc_fields = &omap_hwmod_sysc_type3,
  589. };
  590. static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
  591. .name = "cpgmac0",
  592. .sysc = &am33xx_cpgmac_sysc,
  593. };
  594. static struct omap_hwmod_irq_info am33xx_cpgmac0_irqs[] = {
  595. { .name = "c0_rx_thresh_pend", .irq = 40 + OMAP_INTC_START, },
  596. { .name = "c0_rx_pend", .irq = 41 + OMAP_INTC_START, },
  597. { .name = "c0_tx_pend", .irq = 42 + OMAP_INTC_START, },
  598. { .name = "c0_misc_pend", .irq = 43 + OMAP_INTC_START, },
  599. { .irq = -1 },
  600. };
  601. static struct omap_hwmod am33xx_cpgmac0_hwmod = {
  602. .name = "cpgmac0",
  603. .class = &am33xx_cpgmac0_hwmod_class,
  604. .clkdm_name = "cpsw_125mhz_clkdm",
  605. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  606. .mpu_irqs = am33xx_cpgmac0_irqs,
  607. .main_clk = "cpsw_125mhz_gclk",
  608. .prcm = {
  609. .omap4 = {
  610. .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
  611. .modulemode = MODULEMODE_SWCTRL,
  612. },
  613. },
  614. };
  615. /*
  616. * mdio class
  617. */
  618. static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
  619. .name = "davinci_mdio",
  620. };
  621. static struct omap_hwmod am33xx_mdio_hwmod = {
  622. .name = "davinci_mdio",
  623. .class = &am33xx_mdio_hwmod_class,
  624. .clkdm_name = "cpsw_125mhz_clkdm",
  625. .main_clk = "cpsw_125mhz_gclk",
  626. };
  627. /*
  628. * dcan class
  629. */
  630. static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
  631. .name = "d_can",
  632. };
  633. /* dcan0 */
  634. static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = {
  635. { .name = "d_can_ms", .irq = 52 + OMAP_INTC_START, },
  636. { .name = "d_can_mo", .irq = 53 + OMAP_INTC_START, },
  637. { .irq = -1 },
  638. };
  639. static struct omap_hwmod am33xx_dcan0_hwmod = {
  640. .name = "d_can0",
  641. .class = &am33xx_dcan_hwmod_class,
  642. .clkdm_name = "l4ls_clkdm",
  643. .mpu_irqs = am33xx_dcan0_irqs,
  644. .main_clk = "dcan0_fck",
  645. .prcm = {
  646. .omap4 = {
  647. .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET,
  648. .modulemode = MODULEMODE_SWCTRL,
  649. },
  650. },
  651. };
  652. /* dcan1 */
  653. static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = {
  654. { .name = "d_can_ms", .irq = 55 + OMAP_INTC_START, },
  655. { .name = "d_can_mo", .irq = 56 + OMAP_INTC_START, },
  656. { .irq = -1 },
  657. };
  658. static struct omap_hwmod am33xx_dcan1_hwmod = {
  659. .name = "d_can1",
  660. .class = &am33xx_dcan_hwmod_class,
  661. .clkdm_name = "l4ls_clkdm",
  662. .mpu_irqs = am33xx_dcan1_irqs,
  663. .main_clk = "dcan1_fck",
  664. .prcm = {
  665. .omap4 = {
  666. .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET,
  667. .modulemode = MODULEMODE_SWCTRL,
  668. },
  669. },
  670. };
  671. /* elm */
  672. static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
  673. .rev_offs = 0x0000,
  674. .sysc_offs = 0x0010,
  675. .syss_offs = 0x0014,
  676. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  677. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  678. SYSS_HAS_RESET_STATUS),
  679. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  680. .sysc_fields = &omap_hwmod_sysc_type1,
  681. };
  682. static struct omap_hwmod_class am33xx_elm_hwmod_class = {
  683. .name = "elm",
  684. .sysc = &am33xx_elm_sysc,
  685. };
  686. static struct omap_hwmod_irq_info am33xx_elm_irqs[] = {
  687. { .irq = 4 + OMAP_INTC_START, },
  688. { .irq = -1 },
  689. };
  690. static struct omap_hwmod am33xx_elm_hwmod = {
  691. .name = "elm",
  692. .class = &am33xx_elm_hwmod_class,
  693. .clkdm_name = "l4ls_clkdm",
  694. .mpu_irqs = am33xx_elm_irqs,
  695. .main_clk = "l4ls_gclk",
  696. .prcm = {
  697. .omap4 = {
  698. .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET,
  699. .modulemode = MODULEMODE_SWCTRL,
  700. },
  701. },
  702. };
  703. /*
  704. * 'epwmss' class: ecap0,1,2, ehrpwm0,1,2
  705. */
  706. static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
  707. .rev_offs = 0x0,
  708. .sysc_offs = 0x4,
  709. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  710. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  711. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  712. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  713. .sysc_fields = &omap_hwmod_sysc_type2,
  714. };
  715. static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
  716. .name = "epwmss",
  717. .sysc = &am33xx_epwmss_sysc,
  718. };
  719. /* ehrpwm0 */
  720. static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
  721. { .name = "int", .irq = 86 + OMAP_INTC_START, },
  722. { .name = "tzint", .irq = 58 + OMAP_INTC_START, },
  723. { .irq = -1 },
  724. };
  725. static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
  726. .name = "ehrpwm0",
  727. .class = &am33xx_epwmss_hwmod_class,
  728. .clkdm_name = "l4ls_clkdm",
  729. .mpu_irqs = am33xx_ehrpwm0_irqs,
  730. .main_clk = "l4ls_gclk",
  731. .prcm = {
  732. .omap4 = {
  733. .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
  734. .modulemode = MODULEMODE_SWCTRL,
  735. },
  736. },
  737. };
  738. /* ehrpwm1 */
  739. static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
  740. { .name = "int", .irq = 87 + OMAP_INTC_START, },
  741. { .name = "tzint", .irq = 59 + OMAP_INTC_START, },
  742. { .irq = -1 },
  743. };
  744. static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
  745. .name = "ehrpwm1",
  746. .class = &am33xx_epwmss_hwmod_class,
  747. .clkdm_name = "l4ls_clkdm",
  748. .mpu_irqs = am33xx_ehrpwm1_irqs,
  749. .main_clk = "l4ls_gclk",
  750. .prcm = {
  751. .omap4 = {
  752. .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
  753. .modulemode = MODULEMODE_SWCTRL,
  754. },
  755. },
  756. };
  757. /* ehrpwm2 */
  758. static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
  759. { .name = "int", .irq = 39 + OMAP_INTC_START, },
  760. { .name = "tzint", .irq = 60 + OMAP_INTC_START, },
  761. { .irq = -1 },
  762. };
  763. static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
  764. .name = "ehrpwm2",
  765. .class = &am33xx_epwmss_hwmod_class,
  766. .clkdm_name = "l4ls_clkdm",
  767. .mpu_irqs = am33xx_ehrpwm2_irqs,
  768. .main_clk = "l4ls_gclk",
  769. .prcm = {
  770. .omap4 = {
  771. .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
  772. .modulemode = MODULEMODE_SWCTRL,
  773. },
  774. },
  775. };
  776. /* ecap0 */
  777. static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
  778. { .irq = 31 + OMAP_INTC_START, },
  779. { .irq = -1 },
  780. };
  781. static struct omap_hwmod am33xx_ecap0_hwmod = {
  782. .name = "ecap0",
  783. .class = &am33xx_epwmss_hwmod_class,
  784. .clkdm_name = "l4ls_clkdm",
  785. .mpu_irqs = am33xx_ecap0_irqs,
  786. .main_clk = "l4ls_gclk",
  787. .prcm = {
  788. .omap4 = {
  789. .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
  790. .modulemode = MODULEMODE_SWCTRL,
  791. },
  792. },
  793. };
  794. /* ecap1 */
  795. static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
  796. { .irq = 47 + OMAP_INTC_START, },
  797. { .irq = -1 },
  798. };
  799. static struct omap_hwmod am33xx_ecap1_hwmod = {
  800. .name = "ecap1",
  801. .class = &am33xx_epwmss_hwmod_class,
  802. .clkdm_name = "l4ls_clkdm",
  803. .mpu_irqs = am33xx_ecap1_irqs,
  804. .main_clk = "l4ls_gclk",
  805. .prcm = {
  806. .omap4 = {
  807. .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
  808. .modulemode = MODULEMODE_SWCTRL,
  809. },
  810. },
  811. };
  812. /* ecap2 */
  813. static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
  814. { .irq = 61 + OMAP_INTC_START, },
  815. { .irq = -1 },
  816. };
  817. static struct omap_hwmod am33xx_ecap2_hwmod = {
  818. .name = "ecap2",
  819. .mpu_irqs = am33xx_ecap2_irqs,
  820. .class = &am33xx_epwmss_hwmod_class,
  821. .clkdm_name = "l4ls_clkdm",
  822. .main_clk = "l4ls_gclk",
  823. .prcm = {
  824. .omap4 = {
  825. .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
  826. .modulemode = MODULEMODE_SWCTRL,
  827. },
  828. },
  829. };
  830. /*
  831. * 'gpio' class: for gpio 0,1,2,3
  832. */
  833. static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
  834. .rev_offs = 0x0000,
  835. .sysc_offs = 0x0010,
  836. .syss_offs = 0x0114,
  837. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  838. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  839. SYSS_HAS_RESET_STATUS),
  840. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  841. SIDLE_SMART_WKUP),
  842. .sysc_fields = &omap_hwmod_sysc_type1,
  843. };
  844. static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
  845. .name = "gpio",
  846. .sysc = &am33xx_gpio_sysc,
  847. .rev = 2,
  848. };
  849. static struct omap_gpio_dev_attr gpio_dev_attr = {
  850. .bank_width = 32,
  851. .dbck_flag = true,
  852. };
  853. /* gpio0 */
  854. static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
  855. { .role = "dbclk", .clk = "gpio0_dbclk" },
  856. };
  857. static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = {
  858. { .irq = 96 + OMAP_INTC_START, },
  859. { .irq = -1 },
  860. };
  861. static struct omap_hwmod am33xx_gpio0_hwmod = {
  862. .name = "gpio1",
  863. .class = &am33xx_gpio_hwmod_class,
  864. .clkdm_name = "l4_wkup_clkdm",
  865. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  866. .mpu_irqs = am33xx_gpio0_irqs,
  867. .main_clk = "dpll_core_m4_div2_ck",
  868. .prcm = {
  869. .omap4 = {
  870. .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
  871. .modulemode = MODULEMODE_SWCTRL,
  872. },
  873. },
  874. .opt_clks = gpio0_opt_clks,
  875. .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks),
  876. .dev_attr = &gpio_dev_attr,
  877. };
  878. /* gpio1 */
  879. static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = {
  880. { .irq = 98 + OMAP_INTC_START, },
  881. { .irq = -1 },
  882. };
  883. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  884. { .role = "dbclk", .clk = "gpio1_dbclk" },
  885. };
  886. static struct omap_hwmod am33xx_gpio1_hwmod = {
  887. .name = "gpio2",
  888. .class = &am33xx_gpio_hwmod_class,
  889. .clkdm_name = "l4ls_clkdm",
  890. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  891. .mpu_irqs = am33xx_gpio1_irqs,
  892. .main_clk = "l4ls_gclk",
  893. .prcm = {
  894. .omap4 = {
  895. .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET,
  896. .modulemode = MODULEMODE_SWCTRL,
  897. },
  898. },
  899. .opt_clks = gpio1_opt_clks,
  900. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  901. .dev_attr = &gpio_dev_attr,
  902. };
  903. /* gpio2 */
  904. static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = {
  905. { .irq = 32 + OMAP_INTC_START, },
  906. { .irq = -1 },
  907. };
  908. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  909. { .role = "dbclk", .clk = "gpio2_dbclk" },
  910. };
  911. static struct omap_hwmod am33xx_gpio2_hwmod = {
  912. .name = "gpio3",
  913. .class = &am33xx_gpio_hwmod_class,
  914. .clkdm_name = "l4ls_clkdm",
  915. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  916. .mpu_irqs = am33xx_gpio2_irqs,
  917. .main_clk = "l4ls_gclk",
  918. .prcm = {
  919. .omap4 = {
  920. .clkctrl_offs = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
  921. .modulemode = MODULEMODE_SWCTRL,
  922. },
  923. },
  924. .opt_clks = gpio2_opt_clks,
  925. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  926. .dev_attr = &gpio_dev_attr,
  927. };
  928. /* gpio3 */
  929. static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = {
  930. { .irq = 62 + OMAP_INTC_START, },
  931. { .irq = -1 },
  932. };
  933. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  934. { .role = "dbclk", .clk = "gpio3_dbclk" },
  935. };
  936. static struct omap_hwmod am33xx_gpio3_hwmod = {
  937. .name = "gpio4",
  938. .class = &am33xx_gpio_hwmod_class,
  939. .clkdm_name = "l4ls_clkdm",
  940. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  941. .mpu_irqs = am33xx_gpio3_irqs,
  942. .main_clk = "l4ls_gclk",
  943. .prcm = {
  944. .omap4 = {
  945. .clkctrl_offs = AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET,
  946. .modulemode = MODULEMODE_SWCTRL,
  947. },
  948. },
  949. .opt_clks = gpio3_opt_clks,
  950. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  951. .dev_attr = &gpio_dev_attr,
  952. };
  953. /* gpmc */
  954. static struct omap_hwmod_class_sysconfig gpmc_sysc = {
  955. .rev_offs = 0x0,
  956. .sysc_offs = 0x10,
  957. .syss_offs = 0x14,
  958. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  959. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  960. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  961. .sysc_fields = &omap_hwmod_sysc_type1,
  962. };
  963. static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
  964. .name = "gpmc",
  965. .sysc = &gpmc_sysc,
  966. };
  967. static struct omap_hwmod_irq_info am33xx_gpmc_irqs[] = {
  968. { .irq = 100 + OMAP_INTC_START, },
  969. { .irq = -1 },
  970. };
  971. static struct omap_hwmod am33xx_gpmc_hwmod = {
  972. .name = "gpmc",
  973. .class = &am33xx_gpmc_hwmod_class,
  974. .clkdm_name = "l3s_clkdm",
  975. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  976. .mpu_irqs = am33xx_gpmc_irqs,
  977. .main_clk = "l3s_gclk",
  978. .prcm = {
  979. .omap4 = {
  980. .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET,
  981. .modulemode = MODULEMODE_SWCTRL,
  982. },
  983. },
  984. };
  985. /* 'i2c' class */
  986. static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
  987. .sysc_offs = 0x0010,
  988. .syss_offs = 0x0090,
  989. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  990. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  991. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  992. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  993. SIDLE_SMART_WKUP),
  994. .sysc_fields = &omap_hwmod_sysc_type1,
  995. };
  996. static struct omap_hwmod_class i2c_class = {
  997. .name = "i2c",
  998. .sysc = &am33xx_i2c_sysc,
  999. .rev = OMAP_I2C_IP_VERSION_2,
  1000. .reset = &omap_i2c_reset,
  1001. };
  1002. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1003. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  1004. };
  1005. /* i2c1 */
  1006. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1007. { .irq = 70 + OMAP_INTC_START, },
  1008. { .irq = -1 },
  1009. };
  1010. static struct omap_hwmod_dma_info i2c1_edma_reqs[] = {
  1011. { .name = "tx", .dma_req = 0, },
  1012. { .name = "rx", .dma_req = 0, },
  1013. { .dma_req = -1 }
  1014. };
  1015. static struct omap_hwmod am33xx_i2c1_hwmod = {
  1016. .name = "i2c1",
  1017. .class = &i2c_class,
  1018. .clkdm_name = "l4_wkup_clkdm",
  1019. .mpu_irqs = i2c1_mpu_irqs,
  1020. .sdma_reqs = i2c1_edma_reqs,
  1021. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1022. .main_clk = "dpll_per_m2_div4_wkupdm_ck",
  1023. .prcm = {
  1024. .omap4 = {
  1025. .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET,
  1026. .modulemode = MODULEMODE_SWCTRL,
  1027. },
  1028. },
  1029. .dev_attr = &i2c_dev_attr,
  1030. };
  1031. /* i2c1 */
  1032. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1033. { .irq = 71 + OMAP_INTC_START, },
  1034. { .irq = -1 },
  1035. };
  1036. static struct omap_hwmod_dma_info i2c2_edma_reqs[] = {
  1037. { .name = "tx", .dma_req = 0, },
  1038. { .name = "rx", .dma_req = 0, },
  1039. { .dma_req = -1 }
  1040. };
  1041. static struct omap_hwmod am33xx_i2c2_hwmod = {
  1042. .name = "i2c2",
  1043. .class = &i2c_class,
  1044. .clkdm_name = "l4ls_clkdm",
  1045. .mpu_irqs = i2c2_mpu_irqs,
  1046. .sdma_reqs = i2c2_edma_reqs,
  1047. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1048. .main_clk = "dpll_per_m2_div4_ck",
  1049. .prcm = {
  1050. .omap4 = {
  1051. .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET,
  1052. .modulemode = MODULEMODE_SWCTRL,
  1053. },
  1054. },
  1055. .dev_attr = &i2c_dev_attr,
  1056. };
  1057. /* i2c3 */
  1058. static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
  1059. { .name = "tx", .dma_req = 0, },
  1060. { .name = "rx", .dma_req = 0, },
  1061. { .dma_req = -1 }
  1062. };
  1063. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1064. { .irq = 30 + OMAP_INTC_START, },
  1065. { .irq = -1 },
  1066. };
  1067. static struct omap_hwmod am33xx_i2c3_hwmod = {
  1068. .name = "i2c3",
  1069. .class = &i2c_class,
  1070. .clkdm_name = "l4ls_clkdm",
  1071. .mpu_irqs = i2c3_mpu_irqs,
  1072. .sdma_reqs = i2c3_edma_reqs,
  1073. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1074. .main_clk = "dpll_per_m2_div4_ck",
  1075. .prcm = {
  1076. .omap4 = {
  1077. .clkctrl_offs = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
  1078. .modulemode = MODULEMODE_SWCTRL,
  1079. },
  1080. },
  1081. .dev_attr = &i2c_dev_attr,
  1082. };
  1083. /* lcdc */
  1084. static struct omap_hwmod_class_sysconfig lcdc_sysc = {
  1085. .rev_offs = 0x0,
  1086. .sysc_offs = 0x54,
  1087. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  1088. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1089. .sysc_fields = &omap_hwmod_sysc_type2,
  1090. };
  1091. static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
  1092. .name = "lcdc",
  1093. .sysc = &lcdc_sysc,
  1094. };
  1095. static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = {
  1096. { .irq = 36 + OMAP_INTC_START, },
  1097. { .irq = -1 },
  1098. };
  1099. static struct omap_hwmod am33xx_lcdc_hwmod = {
  1100. .name = "lcdc",
  1101. .class = &am33xx_lcdc_hwmod_class,
  1102. .clkdm_name = "lcdc_clkdm",
  1103. .mpu_irqs = am33xx_lcdc_irqs,
  1104. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1105. .main_clk = "lcd_gclk",
  1106. .prcm = {
  1107. .omap4 = {
  1108. .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
  1109. .modulemode = MODULEMODE_SWCTRL,
  1110. },
  1111. },
  1112. };
  1113. /*
  1114. * 'mailbox' class
  1115. * mailbox module allowing communication between the on-chip processors using a
  1116. * queued mailbox-interrupt mechanism.
  1117. */
  1118. static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
  1119. .rev_offs = 0x0000,
  1120. .sysc_offs = 0x0010,
  1121. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1122. SYSC_HAS_SOFTRESET),
  1123. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1124. .sysc_fields = &omap_hwmod_sysc_type2,
  1125. };
  1126. static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
  1127. .name = "mailbox",
  1128. .sysc = &am33xx_mailbox_sysc,
  1129. };
  1130. static struct omap_hwmod_irq_info am33xx_mailbox_irqs[] = {
  1131. { .irq = 77 + OMAP_INTC_START, },
  1132. { .irq = -1 },
  1133. };
  1134. static struct omap_hwmod am33xx_mailbox_hwmod = {
  1135. .name = "mailbox",
  1136. .class = &am33xx_mailbox_hwmod_class,
  1137. .clkdm_name = "l4ls_clkdm",
  1138. .mpu_irqs = am33xx_mailbox_irqs,
  1139. .main_clk = "l4ls_gclk",
  1140. .prcm = {
  1141. .omap4 = {
  1142. .clkctrl_offs = AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET,
  1143. .modulemode = MODULEMODE_SWCTRL,
  1144. },
  1145. },
  1146. };
  1147. /*
  1148. * 'mcasp' class
  1149. */
  1150. static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
  1151. .rev_offs = 0x0,
  1152. .sysc_offs = 0x4,
  1153. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1154. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1155. .sysc_fields = &omap_hwmod_sysc_type3,
  1156. };
  1157. static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
  1158. .name = "mcasp",
  1159. .sysc = &am33xx_mcasp_sysc,
  1160. };
  1161. /* mcasp0 */
  1162. static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = {
  1163. { .name = "ax", .irq = 80 + OMAP_INTC_START, },
  1164. { .name = "ar", .irq = 81 + OMAP_INTC_START, },
  1165. { .irq = -1 },
  1166. };
  1167. static struct omap_hwmod_dma_info am33xx_mcasp0_edma_reqs[] = {
  1168. { .name = "tx", .dma_req = 8, },
  1169. { .name = "rx", .dma_req = 9, },
  1170. { .dma_req = -1 }
  1171. };
  1172. static struct omap_hwmod am33xx_mcasp0_hwmod = {
  1173. .name = "mcasp0",
  1174. .class = &am33xx_mcasp_hwmod_class,
  1175. .clkdm_name = "l3s_clkdm",
  1176. .mpu_irqs = am33xx_mcasp0_irqs,
  1177. .sdma_reqs = am33xx_mcasp0_edma_reqs,
  1178. .main_clk = "mcasp0_fck",
  1179. .prcm = {
  1180. .omap4 = {
  1181. .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET,
  1182. .modulemode = MODULEMODE_SWCTRL,
  1183. },
  1184. },
  1185. };
  1186. /* mcasp1 */
  1187. static struct omap_hwmod_irq_info am33xx_mcasp1_irqs[] = {
  1188. { .name = "ax", .irq = 82 + OMAP_INTC_START, },
  1189. { .name = "ar", .irq = 83 + OMAP_INTC_START, },
  1190. { .irq = -1 },
  1191. };
  1192. static struct omap_hwmod_dma_info am33xx_mcasp1_edma_reqs[] = {
  1193. { .name = "tx", .dma_req = 10, },
  1194. { .name = "rx", .dma_req = 11, },
  1195. { .dma_req = -1 }
  1196. };
  1197. static struct omap_hwmod am33xx_mcasp1_hwmod = {
  1198. .name = "mcasp1",
  1199. .class = &am33xx_mcasp_hwmod_class,
  1200. .clkdm_name = "l3s_clkdm",
  1201. .mpu_irqs = am33xx_mcasp1_irqs,
  1202. .sdma_reqs = am33xx_mcasp1_edma_reqs,
  1203. .main_clk = "mcasp1_fck",
  1204. .prcm = {
  1205. .omap4 = {
  1206. .clkctrl_offs = AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET,
  1207. .modulemode = MODULEMODE_SWCTRL,
  1208. },
  1209. },
  1210. };
  1211. /* 'mmc' class */
  1212. static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
  1213. .rev_offs = 0x1fc,
  1214. .sysc_offs = 0x10,
  1215. .syss_offs = 0x14,
  1216. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1217. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1218. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1219. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1220. .sysc_fields = &omap_hwmod_sysc_type1,
  1221. };
  1222. static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
  1223. .name = "mmc",
  1224. .sysc = &am33xx_mmc_sysc,
  1225. };
  1226. /* mmc0 */
  1227. static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = {
  1228. { .irq = 64 + OMAP_INTC_START, },
  1229. { .irq = -1 },
  1230. };
  1231. static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = {
  1232. { .name = "tx", .dma_req = 24, },
  1233. { .name = "rx", .dma_req = 25, },
  1234. { .dma_req = -1 }
  1235. };
  1236. static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
  1237. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1238. };
  1239. static struct omap_hwmod am33xx_mmc0_hwmod = {
  1240. .name = "mmc1",
  1241. .class = &am33xx_mmc_hwmod_class,
  1242. .clkdm_name = "l4ls_clkdm",
  1243. .mpu_irqs = am33xx_mmc0_irqs,
  1244. .sdma_reqs = am33xx_mmc0_edma_reqs,
  1245. .main_clk = "mmc_clk",
  1246. .prcm = {
  1247. .omap4 = {
  1248. .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET,
  1249. .modulemode = MODULEMODE_SWCTRL,
  1250. },
  1251. },
  1252. .dev_attr = &am33xx_mmc0_dev_attr,
  1253. };
  1254. /* mmc1 */
  1255. static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = {
  1256. { .irq = 28 + OMAP_INTC_START, },
  1257. { .irq = -1 },
  1258. };
  1259. static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = {
  1260. { .name = "tx", .dma_req = 2, },
  1261. { .name = "rx", .dma_req = 3, },
  1262. { .dma_req = -1 }
  1263. };
  1264. static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
  1265. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1266. };
  1267. static struct omap_hwmod am33xx_mmc1_hwmod = {
  1268. .name = "mmc2",
  1269. .class = &am33xx_mmc_hwmod_class,
  1270. .clkdm_name = "l4ls_clkdm",
  1271. .mpu_irqs = am33xx_mmc1_irqs,
  1272. .sdma_reqs = am33xx_mmc1_edma_reqs,
  1273. .main_clk = "mmc_clk",
  1274. .prcm = {
  1275. .omap4 = {
  1276. .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET,
  1277. .modulemode = MODULEMODE_SWCTRL,
  1278. },
  1279. },
  1280. .dev_attr = &am33xx_mmc1_dev_attr,
  1281. };
  1282. /* mmc2 */
  1283. static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = {
  1284. { .irq = 29 + OMAP_INTC_START, },
  1285. { .irq = -1 },
  1286. };
  1287. static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = {
  1288. { .name = "tx", .dma_req = 64, },
  1289. { .name = "rx", .dma_req = 65, },
  1290. { .dma_req = -1 }
  1291. };
  1292. static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
  1293. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1294. };
  1295. static struct omap_hwmod am33xx_mmc2_hwmod = {
  1296. .name = "mmc3",
  1297. .class = &am33xx_mmc_hwmod_class,
  1298. .clkdm_name = "l3s_clkdm",
  1299. .mpu_irqs = am33xx_mmc2_irqs,
  1300. .sdma_reqs = am33xx_mmc2_edma_reqs,
  1301. .main_clk = "mmc_clk",
  1302. .prcm = {
  1303. .omap4 = {
  1304. .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET,
  1305. .modulemode = MODULEMODE_SWCTRL,
  1306. },
  1307. },
  1308. .dev_attr = &am33xx_mmc2_dev_attr,
  1309. };
  1310. /*
  1311. * 'rtc' class
  1312. * rtc subsystem
  1313. */
  1314. static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
  1315. .rev_offs = 0x0074,
  1316. .sysc_offs = 0x0078,
  1317. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1318. .idlemodes = (SIDLE_FORCE | SIDLE_NO |
  1319. SIDLE_SMART | SIDLE_SMART_WKUP),
  1320. .sysc_fields = &omap_hwmod_sysc_type3,
  1321. };
  1322. static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
  1323. .name = "rtc",
  1324. .sysc = &am33xx_rtc_sysc,
  1325. };
  1326. static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = {
  1327. { .name = "rtcint", .irq = 75 + OMAP_INTC_START, },
  1328. { .name = "rtcalarmint", .irq = 76 + OMAP_INTC_START, },
  1329. { .irq = -1 },
  1330. };
  1331. static struct omap_hwmod am33xx_rtc_hwmod = {
  1332. .name = "rtc",
  1333. .class = &am33xx_rtc_hwmod_class,
  1334. .clkdm_name = "l4_rtc_clkdm",
  1335. .mpu_irqs = am33xx_rtc_irqs,
  1336. .main_clk = "clk_32768_ck",
  1337. .prcm = {
  1338. .omap4 = {
  1339. .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET,
  1340. .modulemode = MODULEMODE_SWCTRL,
  1341. },
  1342. },
  1343. };
  1344. /* 'spi' class */
  1345. static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
  1346. .rev_offs = 0x0000,
  1347. .sysc_offs = 0x0110,
  1348. .syss_offs = 0x0114,
  1349. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1350. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1351. SYSS_HAS_RESET_STATUS),
  1352. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1353. .sysc_fields = &omap_hwmod_sysc_type1,
  1354. };
  1355. static struct omap_hwmod_class am33xx_spi_hwmod_class = {
  1356. .name = "mcspi",
  1357. .sysc = &am33xx_mcspi_sysc,
  1358. .rev = OMAP4_MCSPI_REV,
  1359. };
  1360. /* spi0 */
  1361. static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = {
  1362. { .irq = 65 + OMAP_INTC_START, },
  1363. { .irq = -1 },
  1364. };
  1365. static struct omap_hwmod_dma_info am33xx_mcspi0_edma_reqs[] = {
  1366. { .name = "rx0", .dma_req = 17 },
  1367. { .name = "tx0", .dma_req = 16 },
  1368. { .name = "rx1", .dma_req = 19 },
  1369. { .name = "tx1", .dma_req = 18 },
  1370. { .dma_req = -1 }
  1371. };
  1372. static struct omap2_mcspi_dev_attr mcspi_attrib = {
  1373. .num_chipselect = 2,
  1374. };
  1375. static struct omap_hwmod am33xx_spi0_hwmod = {
  1376. .name = "spi0",
  1377. .class = &am33xx_spi_hwmod_class,
  1378. .clkdm_name = "l4ls_clkdm",
  1379. .mpu_irqs = am33xx_spi0_irqs,
  1380. .sdma_reqs = am33xx_mcspi0_edma_reqs,
  1381. .main_clk = "dpll_per_m2_div4_ck",
  1382. .prcm = {
  1383. .omap4 = {
  1384. .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET,
  1385. .modulemode = MODULEMODE_SWCTRL,
  1386. },
  1387. },
  1388. .dev_attr = &mcspi_attrib,
  1389. };
  1390. /* spi1 */
  1391. static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = {
  1392. { .irq = 125 + OMAP_INTC_START, },
  1393. { .irq = -1 },
  1394. };
  1395. static struct omap_hwmod_dma_info am33xx_mcspi1_edma_reqs[] = {
  1396. { .name = "rx0", .dma_req = 43 },
  1397. { .name = "tx0", .dma_req = 42 },
  1398. { .name = "rx1", .dma_req = 45 },
  1399. { .name = "tx1", .dma_req = 44 },
  1400. { .dma_req = -1 }
  1401. };
  1402. static struct omap_hwmod am33xx_spi1_hwmod = {
  1403. .name = "spi1",
  1404. .class = &am33xx_spi_hwmod_class,
  1405. .clkdm_name = "l4ls_clkdm",
  1406. .mpu_irqs = am33xx_spi1_irqs,
  1407. .sdma_reqs = am33xx_mcspi1_edma_reqs,
  1408. .main_clk = "dpll_per_m2_div4_ck",
  1409. .prcm = {
  1410. .omap4 = {
  1411. .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET,
  1412. .modulemode = MODULEMODE_SWCTRL,
  1413. },
  1414. },
  1415. .dev_attr = &mcspi_attrib,
  1416. };
  1417. /*
  1418. * 'spinlock' class
  1419. * spinlock provides hardware assistance for synchronizing the
  1420. * processes running on multiple processors
  1421. */
  1422. static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
  1423. .name = "spinlock",
  1424. };
  1425. static struct omap_hwmod am33xx_spinlock_hwmod = {
  1426. .name = "spinlock",
  1427. .class = &am33xx_spinlock_hwmod_class,
  1428. .clkdm_name = "l4ls_clkdm",
  1429. .main_clk = "l4ls_gclk",
  1430. .prcm = {
  1431. .omap4 = {
  1432. .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET,
  1433. .modulemode = MODULEMODE_SWCTRL,
  1434. },
  1435. },
  1436. };
  1437. /* 'timer 2-7' class */
  1438. static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
  1439. .rev_offs = 0x0000,
  1440. .sysc_offs = 0x0010,
  1441. .syss_offs = 0x0014,
  1442. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1443. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1444. SIDLE_SMART_WKUP),
  1445. .sysc_fields = &omap_hwmod_sysc_type2,
  1446. };
  1447. static struct omap_hwmod_class am33xx_timer_hwmod_class = {
  1448. .name = "timer",
  1449. .sysc = &am33xx_timer_sysc,
  1450. };
  1451. /* timer1 1ms */
  1452. static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
  1453. .rev_offs = 0x0000,
  1454. .sysc_offs = 0x0010,
  1455. .syss_offs = 0x0014,
  1456. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1457. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1458. SYSS_HAS_RESET_STATUS),
  1459. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1460. .sysc_fields = &omap_hwmod_sysc_type1,
  1461. };
  1462. static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
  1463. .name = "timer",
  1464. .sysc = &am33xx_timer1ms_sysc,
  1465. };
  1466. static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = {
  1467. { .irq = 67 + OMAP_INTC_START, },
  1468. { .irq = -1 },
  1469. };
  1470. static struct omap_hwmod am33xx_timer1_hwmod = {
  1471. .name = "timer1",
  1472. .class = &am33xx_timer1ms_hwmod_class,
  1473. .clkdm_name = "l4_wkup_clkdm",
  1474. .mpu_irqs = am33xx_timer1_irqs,
  1475. .main_clk = "timer1_fck",
  1476. .prcm = {
  1477. .omap4 = {
  1478. .clkctrl_offs = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
  1479. .modulemode = MODULEMODE_SWCTRL,
  1480. },
  1481. },
  1482. };
  1483. static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = {
  1484. { .irq = 68 + OMAP_INTC_START, },
  1485. { .irq = -1 },
  1486. };
  1487. static struct omap_hwmod am33xx_timer2_hwmod = {
  1488. .name = "timer2",
  1489. .class = &am33xx_timer_hwmod_class,
  1490. .clkdm_name = "l4ls_clkdm",
  1491. .mpu_irqs = am33xx_timer2_irqs,
  1492. .main_clk = "timer2_fck",
  1493. .prcm = {
  1494. .omap4 = {
  1495. .clkctrl_offs = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET,
  1496. .modulemode = MODULEMODE_SWCTRL,
  1497. },
  1498. },
  1499. };
  1500. static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = {
  1501. { .irq = 69 + OMAP_INTC_START, },
  1502. { .irq = -1 },
  1503. };
  1504. static struct omap_hwmod am33xx_timer3_hwmod = {
  1505. .name = "timer3",
  1506. .class = &am33xx_timer_hwmod_class,
  1507. .clkdm_name = "l4ls_clkdm",
  1508. .mpu_irqs = am33xx_timer3_irqs,
  1509. .main_clk = "timer3_fck",
  1510. .prcm = {
  1511. .omap4 = {
  1512. .clkctrl_offs = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET,
  1513. .modulemode = MODULEMODE_SWCTRL,
  1514. },
  1515. },
  1516. };
  1517. static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = {
  1518. { .irq = 92 + OMAP_INTC_START, },
  1519. { .irq = -1 },
  1520. };
  1521. static struct omap_hwmod am33xx_timer4_hwmod = {
  1522. .name = "timer4",
  1523. .class = &am33xx_timer_hwmod_class,
  1524. .clkdm_name = "l4ls_clkdm",
  1525. .mpu_irqs = am33xx_timer4_irqs,
  1526. .main_clk = "timer4_fck",
  1527. .prcm = {
  1528. .omap4 = {
  1529. .clkctrl_offs = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET,
  1530. .modulemode = MODULEMODE_SWCTRL,
  1531. },
  1532. },
  1533. };
  1534. static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = {
  1535. { .irq = 93 + OMAP_INTC_START, },
  1536. { .irq = -1 },
  1537. };
  1538. static struct omap_hwmod am33xx_timer5_hwmod = {
  1539. .name = "timer5",
  1540. .class = &am33xx_timer_hwmod_class,
  1541. .clkdm_name = "l4ls_clkdm",
  1542. .mpu_irqs = am33xx_timer5_irqs,
  1543. .main_clk = "timer5_fck",
  1544. .prcm = {
  1545. .omap4 = {
  1546. .clkctrl_offs = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET,
  1547. .modulemode = MODULEMODE_SWCTRL,
  1548. },
  1549. },
  1550. };
  1551. static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = {
  1552. { .irq = 94 + OMAP_INTC_START, },
  1553. { .irq = -1 },
  1554. };
  1555. static struct omap_hwmod am33xx_timer6_hwmod = {
  1556. .name = "timer6",
  1557. .class = &am33xx_timer_hwmod_class,
  1558. .clkdm_name = "l4ls_clkdm",
  1559. .mpu_irqs = am33xx_timer6_irqs,
  1560. .main_clk = "timer6_fck",
  1561. .prcm = {
  1562. .omap4 = {
  1563. .clkctrl_offs = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET,
  1564. .modulemode = MODULEMODE_SWCTRL,
  1565. },
  1566. },
  1567. };
  1568. static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = {
  1569. { .irq = 95 + OMAP_INTC_START, },
  1570. { .irq = -1 },
  1571. };
  1572. static struct omap_hwmod am33xx_timer7_hwmod = {
  1573. .name = "timer7",
  1574. .class = &am33xx_timer_hwmod_class,
  1575. .clkdm_name = "l4ls_clkdm",
  1576. .mpu_irqs = am33xx_timer7_irqs,
  1577. .main_clk = "timer7_fck",
  1578. .prcm = {
  1579. .omap4 = {
  1580. .clkctrl_offs = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET,
  1581. .modulemode = MODULEMODE_SWCTRL,
  1582. },
  1583. },
  1584. };
  1585. /* tpcc */
  1586. static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
  1587. .name = "tpcc",
  1588. };
  1589. static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = {
  1590. { .name = "edma0", .irq = 12 + OMAP_INTC_START, },
  1591. { .name = "edma0_mperr", .irq = 13 + OMAP_INTC_START, },
  1592. { .name = "edma0_err", .irq = 14 + OMAP_INTC_START, },
  1593. { .irq = -1 },
  1594. };
  1595. static struct omap_hwmod am33xx_tpcc_hwmod = {
  1596. .name = "tpcc",
  1597. .class = &am33xx_tpcc_hwmod_class,
  1598. .clkdm_name = "l3_clkdm",
  1599. .mpu_irqs = am33xx_tpcc_irqs,
  1600. .main_clk = "l3_gclk",
  1601. .prcm = {
  1602. .omap4 = {
  1603. .clkctrl_offs = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET,
  1604. .modulemode = MODULEMODE_SWCTRL,
  1605. },
  1606. },
  1607. };
  1608. static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
  1609. .rev_offs = 0x0,
  1610. .sysc_offs = 0x10,
  1611. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1612. SYSC_HAS_MIDLEMODE),
  1613. .idlemodes = (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
  1614. .sysc_fields = &omap_hwmod_sysc_type2,
  1615. };
  1616. /* 'tptc' class */
  1617. static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
  1618. .name = "tptc",
  1619. .sysc = &am33xx_tptc_sysc,
  1620. };
  1621. /* tptc0 */
  1622. static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = {
  1623. { .irq = 112 + OMAP_INTC_START, },
  1624. { .irq = -1 },
  1625. };
  1626. static struct omap_hwmod am33xx_tptc0_hwmod = {
  1627. .name = "tptc0",
  1628. .class = &am33xx_tptc_hwmod_class,
  1629. .clkdm_name = "l3_clkdm",
  1630. .mpu_irqs = am33xx_tptc0_irqs,
  1631. .main_clk = "l3_gclk",
  1632. .prcm = {
  1633. .omap4 = {
  1634. .clkctrl_offs = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET,
  1635. .modulemode = MODULEMODE_SWCTRL,
  1636. },
  1637. },
  1638. };
  1639. /* tptc1 */
  1640. static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = {
  1641. { .irq = 113 + OMAP_INTC_START, },
  1642. { .irq = -1 },
  1643. };
  1644. static struct omap_hwmod am33xx_tptc1_hwmod = {
  1645. .name = "tptc1",
  1646. .class = &am33xx_tptc_hwmod_class,
  1647. .clkdm_name = "l3_clkdm",
  1648. .mpu_irqs = am33xx_tptc1_irqs,
  1649. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  1650. .main_clk = "l3_gclk",
  1651. .prcm = {
  1652. .omap4 = {
  1653. .clkctrl_offs = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET,
  1654. .modulemode = MODULEMODE_SWCTRL,
  1655. },
  1656. },
  1657. };
  1658. /* tptc2 */
  1659. static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = {
  1660. { .irq = 114 + OMAP_INTC_START, },
  1661. { .irq = -1 },
  1662. };
  1663. static struct omap_hwmod am33xx_tptc2_hwmod = {
  1664. .name = "tptc2",
  1665. .class = &am33xx_tptc_hwmod_class,
  1666. .clkdm_name = "l3_clkdm",
  1667. .mpu_irqs = am33xx_tptc2_irqs,
  1668. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  1669. .main_clk = "l3_gclk",
  1670. .prcm = {
  1671. .omap4 = {
  1672. .clkctrl_offs = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET,
  1673. .modulemode = MODULEMODE_SWCTRL,
  1674. },
  1675. },
  1676. };
  1677. /* 'uart' class */
  1678. static struct omap_hwmod_class_sysconfig uart_sysc = {
  1679. .rev_offs = 0x50,
  1680. .sysc_offs = 0x54,
  1681. .syss_offs = 0x58,
  1682. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1683. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1684. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1685. SIDLE_SMART_WKUP),
  1686. .sysc_fields = &omap_hwmod_sysc_type1,
  1687. };
  1688. static struct omap_hwmod_class uart_class = {
  1689. .name = "uart",
  1690. .sysc = &uart_sysc,
  1691. };
  1692. /* uart1 */
  1693. static struct omap_hwmod_dma_info uart1_edma_reqs[] = {
  1694. { .name = "tx", .dma_req = 26, },
  1695. { .name = "rx", .dma_req = 27, },
  1696. { .dma_req = -1 }
  1697. };
  1698. static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = {
  1699. { .irq = 72 + OMAP_INTC_START, },
  1700. { .irq = -1 },
  1701. };
  1702. static struct omap_hwmod am33xx_uart1_hwmod = {
  1703. .name = "uart1",
  1704. .class = &uart_class,
  1705. .clkdm_name = "l4_wkup_clkdm",
  1706. .mpu_irqs = am33xx_uart1_irqs,
  1707. .sdma_reqs = uart1_edma_reqs,
  1708. .main_clk = "dpll_per_m2_div4_wkupdm_ck",
  1709. .prcm = {
  1710. .omap4 = {
  1711. .clkctrl_offs = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET,
  1712. .modulemode = MODULEMODE_SWCTRL,
  1713. },
  1714. },
  1715. };
  1716. static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
  1717. { .irq = 73 + OMAP_INTC_START, },
  1718. { .irq = -1 },
  1719. };
  1720. static struct omap_hwmod am33xx_uart2_hwmod = {
  1721. .name = "uart2",
  1722. .class = &uart_class,
  1723. .clkdm_name = "l4ls_clkdm",
  1724. .mpu_irqs = am33xx_uart2_irqs,
  1725. .sdma_reqs = uart1_edma_reqs,
  1726. .main_clk = "dpll_per_m2_div4_ck",
  1727. .prcm = {
  1728. .omap4 = {
  1729. .clkctrl_offs = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET,
  1730. .modulemode = MODULEMODE_SWCTRL,
  1731. },
  1732. },
  1733. };
  1734. /* uart3 */
  1735. static struct omap_hwmod_dma_info uart3_edma_reqs[] = {
  1736. { .name = "tx", .dma_req = 30, },
  1737. { .name = "rx", .dma_req = 31, },
  1738. { .dma_req = -1 }
  1739. };
  1740. static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = {
  1741. { .irq = 74 + OMAP_INTC_START, },
  1742. { .irq = -1 },
  1743. };
  1744. static struct omap_hwmod am33xx_uart3_hwmod = {
  1745. .name = "uart3",
  1746. .class = &uart_class,
  1747. .clkdm_name = "l4ls_clkdm",
  1748. .mpu_irqs = am33xx_uart3_irqs,
  1749. .sdma_reqs = uart3_edma_reqs,
  1750. .main_clk = "dpll_per_m2_div4_ck",
  1751. .prcm = {
  1752. .omap4 = {
  1753. .clkctrl_offs = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET,
  1754. .modulemode = MODULEMODE_SWCTRL,
  1755. },
  1756. },
  1757. };
  1758. static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = {
  1759. { .irq = 44 + OMAP_INTC_START, },
  1760. { .irq = -1 },
  1761. };
  1762. static struct omap_hwmod am33xx_uart4_hwmod = {
  1763. .name = "uart4",
  1764. .class = &uart_class,
  1765. .clkdm_name = "l4ls_clkdm",
  1766. .mpu_irqs = am33xx_uart4_irqs,
  1767. .sdma_reqs = uart1_edma_reqs,
  1768. .main_clk = "dpll_per_m2_div4_ck",
  1769. .prcm = {
  1770. .omap4 = {
  1771. .clkctrl_offs = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET,
  1772. .modulemode = MODULEMODE_SWCTRL,
  1773. },
  1774. },
  1775. };
  1776. static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = {
  1777. { .irq = 45 + OMAP_INTC_START, },
  1778. { .irq = -1 },
  1779. };
  1780. static struct omap_hwmod am33xx_uart5_hwmod = {
  1781. .name = "uart5",
  1782. .class = &uart_class,
  1783. .clkdm_name = "l4ls_clkdm",
  1784. .mpu_irqs = am33xx_uart5_irqs,
  1785. .sdma_reqs = uart1_edma_reqs,
  1786. .main_clk = "dpll_per_m2_div4_ck",
  1787. .prcm = {
  1788. .omap4 = {
  1789. .clkctrl_offs = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET,
  1790. .modulemode = MODULEMODE_SWCTRL,
  1791. },
  1792. },
  1793. };
  1794. static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = {
  1795. { .irq = 46 + OMAP_INTC_START, },
  1796. { .irq = -1 },
  1797. };
  1798. static struct omap_hwmod am33xx_uart6_hwmod = {
  1799. .name = "uart6",
  1800. .class = &uart_class,
  1801. .clkdm_name = "l4ls_clkdm",
  1802. .mpu_irqs = am33xx_uart6_irqs,
  1803. .sdma_reqs = uart1_edma_reqs,
  1804. .main_clk = "dpll_per_m2_div4_ck",
  1805. .prcm = {
  1806. .omap4 = {
  1807. .clkctrl_offs = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET,
  1808. .modulemode = MODULEMODE_SWCTRL,
  1809. },
  1810. },
  1811. };
  1812. /* 'wd_timer' class */
  1813. static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
  1814. .name = "wd_timer",
  1815. };
  1816. /*
  1817. * XXX: device.c file uses hardcoded name for watchdog timer
  1818. * driver "wd_timer2, so we are also using same name as of now...
  1819. */
  1820. static struct omap_hwmod am33xx_wd_timer1_hwmod = {
  1821. .name = "wd_timer2",
  1822. .class = &am33xx_wd_timer_hwmod_class,
  1823. .clkdm_name = "l4_wkup_clkdm",
  1824. .main_clk = "wdt1_fck",
  1825. .prcm = {
  1826. .omap4 = {
  1827. .clkctrl_offs = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET,
  1828. .modulemode = MODULEMODE_SWCTRL,
  1829. },
  1830. },
  1831. };
  1832. /*
  1833. * 'usb_otg' class
  1834. * high-speed on-the-go universal serial bus (usb_otg) controller
  1835. */
  1836. static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
  1837. .rev_offs = 0x0,
  1838. .sysc_offs = 0x10,
  1839. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  1840. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1841. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1842. .sysc_fields = &omap_hwmod_sysc_type2,
  1843. };
  1844. static struct omap_hwmod_class am33xx_usbotg_class = {
  1845. .name = "usbotg",
  1846. .sysc = &am33xx_usbhsotg_sysc,
  1847. };
  1848. static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
  1849. { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
  1850. { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
  1851. { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
  1852. { .irq = -1, },
  1853. };
  1854. static struct omap_hwmod am33xx_usbss_hwmod = {
  1855. .name = "usb_otg_hs",
  1856. .class = &am33xx_usbotg_class,
  1857. .clkdm_name = "l3s_clkdm",
  1858. .mpu_irqs = am33xx_usbss_mpu_irqs,
  1859. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1860. .main_clk = "usbotg_fck",
  1861. .prcm = {
  1862. .omap4 = {
  1863. .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
  1864. .modulemode = MODULEMODE_SWCTRL,
  1865. },
  1866. },
  1867. };
  1868. /*
  1869. * Interfaces
  1870. */
  1871. /* l4 fw -> emif fw */
  1872. static struct omap_hwmod_ocp_if am33xx_l4_fw__emif_fw = {
  1873. .master = &am33xx_l4_fw_hwmod,
  1874. .slave = &am33xx_emif_fw_hwmod,
  1875. .clk = "l4fw_gclk",
  1876. .user = OCP_USER_MPU,
  1877. };
  1878. static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
  1879. {
  1880. .pa_start = 0x4c000000,
  1881. .pa_end = 0x4c000fff,
  1882. .flags = ADDR_TYPE_RT
  1883. },
  1884. { }
  1885. };
  1886. /* l3 main -> emif */
  1887. static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
  1888. .master = &am33xx_l3_main_hwmod,
  1889. .slave = &am33xx_emif_hwmod,
  1890. .clk = "dpll_core_m4_ck",
  1891. .addr = am33xx_emif_addrs,
  1892. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1893. };
  1894. /* mpu -> l3 main */
  1895. static struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
  1896. .master = &am33xx_mpu_hwmod,
  1897. .slave = &am33xx_l3_main_hwmod,
  1898. .clk = "dpll_mpu_m2_ck",
  1899. .user = OCP_USER_MPU,
  1900. };
  1901. /* l3 main -> l4 hs */
  1902. static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
  1903. .master = &am33xx_l3_main_hwmod,
  1904. .slave = &am33xx_l4_hs_hwmod,
  1905. .clk = "l3s_gclk",
  1906. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1907. };
  1908. /* l3 main -> l3 s */
  1909. static struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
  1910. .master = &am33xx_l3_main_hwmod,
  1911. .slave = &am33xx_l3_s_hwmod,
  1912. .clk = "l3s_gclk",
  1913. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1914. };
  1915. /* l3 s -> l4 per/ls */
  1916. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
  1917. .master = &am33xx_l3_s_hwmod,
  1918. .slave = &am33xx_l4_ls_hwmod,
  1919. .clk = "l3s_gclk",
  1920. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1921. };
  1922. /* l3 s -> l4 wkup */
  1923. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
  1924. .master = &am33xx_l3_s_hwmod,
  1925. .slave = &am33xx_l4_wkup_hwmod,
  1926. .clk = "l3s_gclk",
  1927. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1928. };
  1929. /* l3 s -> l4 fw */
  1930. static struct omap_hwmod_ocp_if am33xx_l3_s__l4_fw = {
  1931. .master = &am33xx_l3_s_hwmod,
  1932. .slave = &am33xx_l4_fw_hwmod,
  1933. .clk = "l3s_gclk",
  1934. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1935. };
  1936. /* l3 main -> l3 instr */
  1937. static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
  1938. .master = &am33xx_l3_main_hwmod,
  1939. .slave = &am33xx_l3_instr_hwmod,
  1940. .clk = "l3s_gclk",
  1941. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1942. };
  1943. /* mpu -> prcm */
  1944. static struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
  1945. .master = &am33xx_mpu_hwmod,
  1946. .slave = &am33xx_prcm_hwmod,
  1947. .clk = "dpll_mpu_m2_ck",
  1948. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1949. };
  1950. /* l3 s -> l3 main*/
  1951. static struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
  1952. .master = &am33xx_l3_s_hwmod,
  1953. .slave = &am33xx_l3_main_hwmod,
  1954. .clk = "l3s_gclk",
  1955. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1956. };
  1957. /* pru-icss -> l3 main */
  1958. static struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
  1959. .master = &am33xx_pruss_hwmod,
  1960. .slave = &am33xx_l3_main_hwmod,
  1961. .clk = "l3_gclk",
  1962. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1963. };
  1964. /* wkup m3 -> l4 wkup */
  1965. static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
  1966. .master = &am33xx_wkup_m3_hwmod,
  1967. .slave = &am33xx_l4_wkup_hwmod,
  1968. .clk = "dpll_core_m4_div2_ck",
  1969. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1970. };
  1971. /* gfx -> l3 main */
  1972. static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
  1973. .master = &am33xx_gfx_hwmod,
  1974. .slave = &am33xx_l3_main_hwmod,
  1975. .clk = "dpll_core_m4_ck",
  1976. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1977. };
  1978. /* l4 wkup -> wkup m3 */
  1979. static struct omap_hwmod_addr_space am33xx_wkup_m3_addrs[] = {
  1980. {
  1981. .name = "umem",
  1982. .pa_start = 0x44d00000,
  1983. .pa_end = 0x44d00000 + SZ_16K - 1,
  1984. .flags = ADDR_TYPE_RT
  1985. },
  1986. {
  1987. .name = "dmem",
  1988. .pa_start = 0x44d80000,
  1989. .pa_end = 0x44d80000 + SZ_8K - 1,
  1990. .flags = ADDR_TYPE_RT
  1991. },
  1992. { }
  1993. };
  1994. static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
  1995. .master = &am33xx_l4_wkup_hwmod,
  1996. .slave = &am33xx_wkup_m3_hwmod,
  1997. .clk = "dpll_core_m4_div2_ck",
  1998. .addr = am33xx_wkup_m3_addrs,
  1999. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2000. };
  2001. /* l4 hs -> pru-icss */
  2002. static struct omap_hwmod_addr_space am33xx_pruss_addrs[] = {
  2003. {
  2004. .pa_start = 0x4a300000,
  2005. .pa_end = 0x4a300000 + SZ_512K - 1,
  2006. .flags = ADDR_TYPE_RT
  2007. },
  2008. { }
  2009. };
  2010. static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
  2011. .master = &am33xx_l4_hs_hwmod,
  2012. .slave = &am33xx_pruss_hwmod,
  2013. .clk = "dpll_core_m4_ck",
  2014. .addr = am33xx_pruss_addrs,
  2015. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2016. };
  2017. /* l3 main -> gfx */
  2018. static struct omap_hwmod_addr_space am33xx_gfx_addrs[] = {
  2019. {
  2020. .pa_start = 0x56000000,
  2021. .pa_end = 0x56000000 + SZ_16M - 1,
  2022. .flags = ADDR_TYPE_RT
  2023. },
  2024. { }
  2025. };
  2026. static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
  2027. .master = &am33xx_l3_main_hwmod,
  2028. .slave = &am33xx_gfx_hwmod,
  2029. .clk = "dpll_core_m4_ck",
  2030. .addr = am33xx_gfx_addrs,
  2031. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2032. };
  2033. /* l4 wkup -> smartreflex0 */
  2034. static struct omap_hwmod_addr_space am33xx_smartreflex0_addrs[] = {
  2035. {
  2036. .pa_start = 0x44e37000,
  2037. .pa_end = 0x44e37000 + SZ_4K - 1,
  2038. .flags = ADDR_TYPE_RT
  2039. },
  2040. { }
  2041. };
  2042. static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
  2043. .master = &am33xx_l4_wkup_hwmod,
  2044. .slave = &am33xx_smartreflex0_hwmod,
  2045. .clk = "dpll_core_m4_div2_ck",
  2046. .addr = am33xx_smartreflex0_addrs,
  2047. .user = OCP_USER_MPU,
  2048. };
  2049. /* l4 wkup -> smartreflex1 */
  2050. static struct omap_hwmod_addr_space am33xx_smartreflex1_addrs[] = {
  2051. {
  2052. .pa_start = 0x44e39000,
  2053. .pa_end = 0x44e39000 + SZ_4K - 1,
  2054. .flags = ADDR_TYPE_RT
  2055. },
  2056. { }
  2057. };
  2058. static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
  2059. .master = &am33xx_l4_wkup_hwmod,
  2060. .slave = &am33xx_smartreflex1_hwmod,
  2061. .clk = "dpll_core_m4_div2_ck",
  2062. .addr = am33xx_smartreflex1_addrs,
  2063. .user = OCP_USER_MPU,
  2064. };
  2065. /* l4 wkup -> control */
  2066. static struct omap_hwmod_addr_space am33xx_control_addrs[] = {
  2067. {
  2068. .pa_start = 0x44e10000,
  2069. .pa_end = 0x44e10000 + SZ_8K - 1,
  2070. .flags = ADDR_TYPE_RT
  2071. },
  2072. { }
  2073. };
  2074. static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
  2075. .master = &am33xx_l4_wkup_hwmod,
  2076. .slave = &am33xx_control_hwmod,
  2077. .clk = "dpll_core_m4_div2_ck",
  2078. .addr = am33xx_control_addrs,
  2079. .user = OCP_USER_MPU,
  2080. };
  2081. /* l4 wkup -> rtc */
  2082. static struct omap_hwmod_addr_space am33xx_rtc_addrs[] = {
  2083. {
  2084. .pa_start = 0x44e3e000,
  2085. .pa_end = 0x44e3e000 + SZ_4K - 1,
  2086. .flags = ADDR_TYPE_RT
  2087. },
  2088. { }
  2089. };
  2090. static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
  2091. .master = &am33xx_l4_wkup_hwmod,
  2092. .slave = &am33xx_rtc_hwmod,
  2093. .clk = "clkdiv32k_ick",
  2094. .addr = am33xx_rtc_addrs,
  2095. .user = OCP_USER_MPU,
  2096. };
  2097. /* l4 per/ls -> DCAN0 */
  2098. static struct omap_hwmod_addr_space am33xx_dcan0_addrs[] = {
  2099. {
  2100. .pa_start = 0x481CC000,
  2101. .pa_end = 0x481CC000 + SZ_4K - 1,
  2102. .flags = ADDR_TYPE_RT
  2103. },
  2104. { }
  2105. };
  2106. static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
  2107. .master = &am33xx_l4_ls_hwmod,
  2108. .slave = &am33xx_dcan0_hwmod,
  2109. .clk = "l4ls_gclk",
  2110. .addr = am33xx_dcan0_addrs,
  2111. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2112. };
  2113. /* l4 per/ls -> DCAN1 */
  2114. static struct omap_hwmod_addr_space am33xx_dcan1_addrs[] = {
  2115. {
  2116. .pa_start = 0x481D0000,
  2117. .pa_end = 0x481D0000 + SZ_4K - 1,
  2118. .flags = ADDR_TYPE_RT
  2119. },
  2120. { }
  2121. };
  2122. static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
  2123. .master = &am33xx_l4_ls_hwmod,
  2124. .slave = &am33xx_dcan1_hwmod,
  2125. .clk = "l4ls_gclk",
  2126. .addr = am33xx_dcan1_addrs,
  2127. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2128. };
  2129. /* l4 per/ls -> GPIO2 */
  2130. static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = {
  2131. {
  2132. .pa_start = 0x4804C000,
  2133. .pa_end = 0x4804C000 + SZ_4K - 1,
  2134. .flags = ADDR_TYPE_RT,
  2135. },
  2136. { }
  2137. };
  2138. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
  2139. .master = &am33xx_l4_ls_hwmod,
  2140. .slave = &am33xx_gpio1_hwmod,
  2141. .clk = "l4ls_gclk",
  2142. .addr = am33xx_gpio1_addrs,
  2143. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2144. };
  2145. /* l4 per/ls -> gpio3 */
  2146. static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = {
  2147. {
  2148. .pa_start = 0x481AC000,
  2149. .pa_end = 0x481AC000 + SZ_4K - 1,
  2150. .flags = ADDR_TYPE_RT,
  2151. },
  2152. { }
  2153. };
  2154. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
  2155. .master = &am33xx_l4_ls_hwmod,
  2156. .slave = &am33xx_gpio2_hwmod,
  2157. .clk = "l4ls_gclk",
  2158. .addr = am33xx_gpio2_addrs,
  2159. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2160. };
  2161. /* l4 per/ls -> gpio4 */
  2162. static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = {
  2163. {
  2164. .pa_start = 0x481AE000,
  2165. .pa_end = 0x481AE000 + SZ_4K - 1,
  2166. .flags = ADDR_TYPE_RT,
  2167. },
  2168. { }
  2169. };
  2170. static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
  2171. .master = &am33xx_l4_ls_hwmod,
  2172. .slave = &am33xx_gpio3_hwmod,
  2173. .clk = "l4ls_gclk",
  2174. .addr = am33xx_gpio3_addrs,
  2175. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2176. };
  2177. /* L4 WKUP -> I2C1 */
  2178. static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = {
  2179. {
  2180. .pa_start = 0x44E0B000,
  2181. .pa_end = 0x44E0B000 + SZ_4K - 1,
  2182. .flags = ADDR_TYPE_RT,
  2183. },
  2184. { }
  2185. };
  2186. static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
  2187. .master = &am33xx_l4_wkup_hwmod,
  2188. .slave = &am33xx_i2c1_hwmod,
  2189. .clk = "dpll_core_m4_div2_ck",
  2190. .addr = am33xx_i2c1_addr_space,
  2191. .user = OCP_USER_MPU,
  2192. };
  2193. /* L4 WKUP -> GPIO1 */
  2194. static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = {
  2195. {
  2196. .pa_start = 0x44E07000,
  2197. .pa_end = 0x44E07000 + SZ_4K - 1,
  2198. .flags = ADDR_TYPE_RT,
  2199. },
  2200. { }
  2201. };
  2202. static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
  2203. .master = &am33xx_l4_wkup_hwmod,
  2204. .slave = &am33xx_gpio0_hwmod,
  2205. .clk = "dpll_core_m4_div2_ck",
  2206. .addr = am33xx_gpio0_addrs,
  2207. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2208. };
  2209. /* L4 WKUP -> ADC_TSC */
  2210. static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
  2211. {
  2212. .pa_start = 0x44E0D000,
  2213. .pa_end = 0x44E0D000 + SZ_8K - 1,
  2214. .flags = ADDR_TYPE_RT
  2215. },
  2216. { }
  2217. };
  2218. static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
  2219. .master = &am33xx_l4_wkup_hwmod,
  2220. .slave = &am33xx_adc_tsc_hwmod,
  2221. .clk = "dpll_core_m4_div2_ck",
  2222. .addr = am33xx_adc_tsc_addrs,
  2223. .user = OCP_USER_MPU,
  2224. };
  2225. static struct omap_hwmod_addr_space am33xx_cpgmac0_addr_space[] = {
  2226. /* cpsw ss */
  2227. {
  2228. .pa_start = 0x4a100000,
  2229. .pa_end = 0x4a100000 + SZ_2K - 1,
  2230. .flags = ADDR_TYPE_RT,
  2231. },
  2232. /* cpsw wr */
  2233. {
  2234. .pa_start = 0x4a101200,
  2235. .pa_end = 0x4a101200 + SZ_256 - 1,
  2236. .flags = ADDR_TYPE_RT,
  2237. },
  2238. { }
  2239. };
  2240. static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
  2241. .master = &am33xx_l4_hs_hwmod,
  2242. .slave = &am33xx_cpgmac0_hwmod,
  2243. .clk = "cpsw_125mhz_gclk",
  2244. .addr = am33xx_cpgmac0_addr_space,
  2245. .user = OCP_USER_MPU,
  2246. };
  2247. static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
  2248. {
  2249. .pa_start = 0x4A101000,
  2250. .pa_end = 0x4A101000 + SZ_256 - 1,
  2251. },
  2252. { }
  2253. };
  2254. static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
  2255. .master = &am33xx_cpgmac0_hwmod,
  2256. .slave = &am33xx_mdio_hwmod,
  2257. .addr = am33xx_mdio_addr_space,
  2258. .user = OCP_USER_MPU,
  2259. };
  2260. static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
  2261. {
  2262. .pa_start = 0x48080000,
  2263. .pa_end = 0x48080000 + SZ_8K - 1,
  2264. .flags = ADDR_TYPE_RT
  2265. },
  2266. { }
  2267. };
  2268. static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
  2269. .master = &am33xx_l4_ls_hwmod,
  2270. .slave = &am33xx_elm_hwmod,
  2271. .clk = "l4ls_gclk",
  2272. .addr = am33xx_elm_addr_space,
  2273. .user = OCP_USER_MPU,
  2274. };
  2275. /*
  2276. * Splitting the resources to handle access of PWMSS config space
  2277. * and module specific part independently
  2278. */
  2279. static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
  2280. {
  2281. .pa_start = 0x48300000,
  2282. .pa_end = 0x48300000 + SZ_16 - 1,
  2283. .flags = ADDR_TYPE_RT
  2284. },
  2285. {
  2286. .pa_start = 0x48300200,
  2287. .pa_end = 0x48300200 + SZ_256 - 1,
  2288. .flags = ADDR_TYPE_RT
  2289. },
  2290. { }
  2291. };
  2292. static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm0 = {
  2293. .master = &am33xx_l4_ls_hwmod,
  2294. .slave = &am33xx_ehrpwm0_hwmod,
  2295. .clk = "l4ls_gclk",
  2296. .addr = am33xx_ehrpwm0_addr_space,
  2297. .user = OCP_USER_MPU,
  2298. };
  2299. /*
  2300. * Splitting the resources to handle access of PWMSS config space
  2301. * and module specific part independently
  2302. */
  2303. static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
  2304. {
  2305. .pa_start = 0x48302000,
  2306. .pa_end = 0x48302000 + SZ_16 - 1,
  2307. .flags = ADDR_TYPE_RT
  2308. },
  2309. {
  2310. .pa_start = 0x48302200,
  2311. .pa_end = 0x48302200 + SZ_256 - 1,
  2312. .flags = ADDR_TYPE_RT
  2313. },
  2314. { }
  2315. };
  2316. static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm1 = {
  2317. .master = &am33xx_l4_ls_hwmod,
  2318. .slave = &am33xx_ehrpwm1_hwmod,
  2319. .clk = "l4ls_gclk",
  2320. .addr = am33xx_ehrpwm1_addr_space,
  2321. .user = OCP_USER_MPU,
  2322. };
  2323. /*
  2324. * Splitting the resources to handle access of PWMSS config space
  2325. * and module specific part independently
  2326. */
  2327. static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
  2328. {
  2329. .pa_start = 0x48304000,
  2330. .pa_end = 0x48304000 + SZ_16 - 1,
  2331. .flags = ADDR_TYPE_RT
  2332. },
  2333. {
  2334. .pa_start = 0x48304200,
  2335. .pa_end = 0x48304200 + SZ_256 - 1,
  2336. .flags = ADDR_TYPE_RT
  2337. },
  2338. { }
  2339. };
  2340. static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm2 = {
  2341. .master = &am33xx_l4_ls_hwmod,
  2342. .slave = &am33xx_ehrpwm2_hwmod,
  2343. .clk = "l4ls_gclk",
  2344. .addr = am33xx_ehrpwm2_addr_space,
  2345. .user = OCP_USER_MPU,
  2346. };
  2347. /*
  2348. * Splitting the resources to handle access of PWMSS config space
  2349. * and module specific part independently
  2350. */
  2351. static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
  2352. {
  2353. .pa_start = 0x48300000,
  2354. .pa_end = 0x48300000 + SZ_16 - 1,
  2355. .flags = ADDR_TYPE_RT
  2356. },
  2357. {
  2358. .pa_start = 0x48300100,
  2359. .pa_end = 0x48300100 + SZ_256 - 1,
  2360. .flags = ADDR_TYPE_RT
  2361. },
  2362. { }
  2363. };
  2364. static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap0 = {
  2365. .master = &am33xx_l4_ls_hwmod,
  2366. .slave = &am33xx_ecap0_hwmod,
  2367. .clk = "l4ls_gclk",
  2368. .addr = am33xx_ecap0_addr_space,
  2369. .user = OCP_USER_MPU,
  2370. };
  2371. /*
  2372. * Splitting the resources to handle access of PWMSS config space
  2373. * and module specific part independently
  2374. */
  2375. static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
  2376. {
  2377. .pa_start = 0x48302000,
  2378. .pa_end = 0x48302000 + SZ_16 - 1,
  2379. .flags = ADDR_TYPE_RT
  2380. },
  2381. {
  2382. .pa_start = 0x48302100,
  2383. .pa_end = 0x48302100 + SZ_256 - 1,
  2384. .flags = ADDR_TYPE_RT
  2385. },
  2386. { }
  2387. };
  2388. static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap1 = {
  2389. .master = &am33xx_l4_ls_hwmod,
  2390. .slave = &am33xx_ecap1_hwmod,
  2391. .clk = "l4ls_gclk",
  2392. .addr = am33xx_ecap1_addr_space,
  2393. .user = OCP_USER_MPU,
  2394. };
  2395. /*
  2396. * Splitting the resources to handle access of PWMSS config space
  2397. * and module specific part independently
  2398. */
  2399. static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
  2400. {
  2401. .pa_start = 0x48304000,
  2402. .pa_end = 0x48304000 + SZ_16 - 1,
  2403. .flags = ADDR_TYPE_RT
  2404. },
  2405. {
  2406. .pa_start = 0x48304100,
  2407. .pa_end = 0x48304100 + SZ_256 - 1,
  2408. .flags = ADDR_TYPE_RT
  2409. },
  2410. { }
  2411. };
  2412. static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap2 = {
  2413. .master = &am33xx_l4_ls_hwmod,
  2414. .slave = &am33xx_ecap2_hwmod,
  2415. .clk = "l4ls_gclk",
  2416. .addr = am33xx_ecap2_addr_space,
  2417. .user = OCP_USER_MPU,
  2418. };
  2419. /* l3s cfg -> gpmc */
  2420. static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
  2421. {
  2422. .pa_start = 0x50000000,
  2423. .pa_end = 0x50000000 + SZ_8K - 1,
  2424. .flags = ADDR_TYPE_RT,
  2425. },
  2426. { }
  2427. };
  2428. static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
  2429. .master = &am33xx_l3_s_hwmod,
  2430. .slave = &am33xx_gpmc_hwmod,
  2431. .clk = "l3s_gclk",
  2432. .addr = am33xx_gpmc_addr_space,
  2433. .user = OCP_USER_MPU,
  2434. };
  2435. /* i2c2 */
  2436. static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = {
  2437. {
  2438. .pa_start = 0x4802A000,
  2439. .pa_end = 0x4802A000 + SZ_4K - 1,
  2440. .flags = ADDR_TYPE_RT,
  2441. },
  2442. { }
  2443. };
  2444. static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
  2445. .master = &am33xx_l4_ls_hwmod,
  2446. .slave = &am33xx_i2c2_hwmod,
  2447. .clk = "l4ls_gclk",
  2448. .addr = am33xx_i2c2_addr_space,
  2449. .user = OCP_USER_MPU,
  2450. };
  2451. static struct omap_hwmod_addr_space am33xx_i2c3_addr_space[] = {
  2452. {
  2453. .pa_start = 0x4819C000,
  2454. .pa_end = 0x4819C000 + SZ_4K - 1,
  2455. .flags = ADDR_TYPE_RT
  2456. },
  2457. { }
  2458. };
  2459. static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
  2460. .master = &am33xx_l4_ls_hwmod,
  2461. .slave = &am33xx_i2c3_hwmod,
  2462. .clk = "l4ls_gclk",
  2463. .addr = am33xx_i2c3_addr_space,
  2464. .user = OCP_USER_MPU,
  2465. };
  2466. static struct omap_hwmod_addr_space am33xx_lcdc_addr_space[] = {
  2467. {
  2468. .pa_start = 0x4830E000,
  2469. .pa_end = 0x4830E000 + SZ_8K - 1,
  2470. .flags = ADDR_TYPE_RT,
  2471. },
  2472. { }
  2473. };
  2474. static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
  2475. .master = &am33xx_l3_main_hwmod,
  2476. .slave = &am33xx_lcdc_hwmod,
  2477. .clk = "dpll_core_m4_ck",
  2478. .addr = am33xx_lcdc_addr_space,
  2479. .user = OCP_USER_MPU,
  2480. };
  2481. static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
  2482. {
  2483. .pa_start = 0x480C8000,
  2484. .pa_end = 0x480C8000 + (SZ_4K - 1),
  2485. .flags = ADDR_TYPE_RT
  2486. },
  2487. { }
  2488. };
  2489. /* l4 ls -> mailbox */
  2490. static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
  2491. .master = &am33xx_l4_ls_hwmod,
  2492. .slave = &am33xx_mailbox_hwmod,
  2493. .clk = "l4ls_gclk",
  2494. .addr = am33xx_mailbox_addrs,
  2495. .user = OCP_USER_MPU,
  2496. };
  2497. /* l4 ls -> spinlock */
  2498. static struct omap_hwmod_addr_space am33xx_spinlock_addrs[] = {
  2499. {
  2500. .pa_start = 0x480Ca000,
  2501. .pa_end = 0x480Ca000 + SZ_4K - 1,
  2502. .flags = ADDR_TYPE_RT
  2503. },
  2504. { }
  2505. };
  2506. static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
  2507. .master = &am33xx_l4_ls_hwmod,
  2508. .slave = &am33xx_spinlock_hwmod,
  2509. .clk = "l4ls_gclk",
  2510. .addr = am33xx_spinlock_addrs,
  2511. .user = OCP_USER_MPU,
  2512. };
  2513. /* l4 ls -> mcasp0 */
  2514. static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
  2515. {
  2516. .pa_start = 0x48038000,
  2517. .pa_end = 0x48038000 + SZ_8K - 1,
  2518. .flags = ADDR_TYPE_RT
  2519. },
  2520. { }
  2521. };
  2522. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
  2523. .master = &am33xx_l4_ls_hwmod,
  2524. .slave = &am33xx_mcasp0_hwmod,
  2525. .clk = "l4ls_gclk",
  2526. .addr = am33xx_mcasp0_addr_space,
  2527. .user = OCP_USER_MPU,
  2528. };
  2529. /* l3 s -> mcasp0 data */
  2530. static struct omap_hwmod_addr_space am33xx_mcasp0_data_addr_space[] = {
  2531. {
  2532. .pa_start = 0x46000000,
  2533. .pa_end = 0x46000000 + SZ_4M - 1,
  2534. .flags = ADDR_TYPE_RT
  2535. },
  2536. { }
  2537. };
  2538. static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp0_data = {
  2539. .master = &am33xx_l3_s_hwmod,
  2540. .slave = &am33xx_mcasp0_hwmod,
  2541. .clk = "l3s_gclk",
  2542. .addr = am33xx_mcasp0_data_addr_space,
  2543. .user = OCP_USER_SDMA,
  2544. };
  2545. /* l4 ls -> mcasp1 */
  2546. static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
  2547. {
  2548. .pa_start = 0x4803C000,
  2549. .pa_end = 0x4803C000 + SZ_8K - 1,
  2550. .flags = ADDR_TYPE_RT
  2551. },
  2552. { }
  2553. };
  2554. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
  2555. .master = &am33xx_l4_ls_hwmod,
  2556. .slave = &am33xx_mcasp1_hwmod,
  2557. .clk = "l4ls_gclk",
  2558. .addr = am33xx_mcasp1_addr_space,
  2559. .user = OCP_USER_MPU,
  2560. };
  2561. /* l3 s -> mcasp1 data */
  2562. static struct omap_hwmod_addr_space am33xx_mcasp1_data_addr_space[] = {
  2563. {
  2564. .pa_start = 0x46400000,
  2565. .pa_end = 0x46400000 + SZ_4M - 1,
  2566. .flags = ADDR_TYPE_RT
  2567. },
  2568. { }
  2569. };
  2570. static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp1_data = {
  2571. .master = &am33xx_l3_s_hwmod,
  2572. .slave = &am33xx_mcasp1_hwmod,
  2573. .clk = "l3s_gclk",
  2574. .addr = am33xx_mcasp1_data_addr_space,
  2575. .user = OCP_USER_SDMA,
  2576. };
  2577. /* l4 ls -> mmc0 */
  2578. static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
  2579. {
  2580. .pa_start = 0x48060100,
  2581. .pa_end = 0x48060100 + SZ_4K - 1,
  2582. .flags = ADDR_TYPE_RT,
  2583. },
  2584. { }
  2585. };
  2586. static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
  2587. .master = &am33xx_l4_ls_hwmod,
  2588. .slave = &am33xx_mmc0_hwmod,
  2589. .clk = "l4ls_gclk",
  2590. .addr = am33xx_mmc0_addr_space,
  2591. .user = OCP_USER_MPU,
  2592. };
  2593. /* l4 ls -> mmc1 */
  2594. static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
  2595. {
  2596. .pa_start = 0x481d8100,
  2597. .pa_end = 0x481d8100 + SZ_4K - 1,
  2598. .flags = ADDR_TYPE_RT,
  2599. },
  2600. { }
  2601. };
  2602. static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
  2603. .master = &am33xx_l4_ls_hwmod,
  2604. .slave = &am33xx_mmc1_hwmod,
  2605. .clk = "l4ls_gclk",
  2606. .addr = am33xx_mmc1_addr_space,
  2607. .user = OCP_USER_MPU,
  2608. };
  2609. /* l3 s -> mmc2 */
  2610. static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
  2611. {
  2612. .pa_start = 0x47810100,
  2613. .pa_end = 0x47810100 + SZ_64K - 1,
  2614. .flags = ADDR_TYPE_RT,
  2615. },
  2616. { }
  2617. };
  2618. static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
  2619. .master = &am33xx_l3_s_hwmod,
  2620. .slave = &am33xx_mmc2_hwmod,
  2621. .clk = "l3s_gclk",
  2622. .addr = am33xx_mmc2_addr_space,
  2623. .user = OCP_USER_MPU,
  2624. };
  2625. /* l4 ls -> mcspi0 */
  2626. static struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = {
  2627. {
  2628. .pa_start = 0x48030000,
  2629. .pa_end = 0x48030000 + SZ_1K - 1,
  2630. .flags = ADDR_TYPE_RT,
  2631. },
  2632. { }
  2633. };
  2634. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
  2635. .master = &am33xx_l4_ls_hwmod,
  2636. .slave = &am33xx_spi0_hwmod,
  2637. .clk = "l4ls_gclk",
  2638. .addr = am33xx_mcspi0_addr_space,
  2639. .user = OCP_USER_MPU,
  2640. };
  2641. /* l4 ls -> mcspi1 */
  2642. static struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = {
  2643. {
  2644. .pa_start = 0x481A0000,
  2645. .pa_end = 0x481A0000 + SZ_1K - 1,
  2646. .flags = ADDR_TYPE_RT,
  2647. },
  2648. { }
  2649. };
  2650. static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
  2651. .master = &am33xx_l4_ls_hwmod,
  2652. .slave = &am33xx_spi1_hwmod,
  2653. .clk = "l4ls_gclk",
  2654. .addr = am33xx_mcspi1_addr_space,
  2655. .user = OCP_USER_MPU,
  2656. };
  2657. /* l4 wkup -> timer1 */
  2658. static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = {
  2659. {
  2660. .pa_start = 0x44E31000,
  2661. .pa_end = 0x44E31000 + SZ_1K - 1,
  2662. .flags = ADDR_TYPE_RT
  2663. },
  2664. { }
  2665. };
  2666. static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
  2667. .master = &am33xx_l4_wkup_hwmod,
  2668. .slave = &am33xx_timer1_hwmod,
  2669. .clk = "dpll_core_m4_div2_ck",
  2670. .addr = am33xx_timer1_addr_space,
  2671. .user = OCP_USER_MPU,
  2672. };
  2673. /* l4 per -> timer2 */
  2674. static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = {
  2675. {
  2676. .pa_start = 0x48040000,
  2677. .pa_end = 0x48040000 + SZ_1K - 1,
  2678. .flags = ADDR_TYPE_RT
  2679. },
  2680. { }
  2681. };
  2682. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
  2683. .master = &am33xx_l4_ls_hwmod,
  2684. .slave = &am33xx_timer2_hwmod,
  2685. .clk = "l4ls_gclk",
  2686. .addr = am33xx_timer2_addr_space,
  2687. .user = OCP_USER_MPU,
  2688. };
  2689. /* l4 per -> timer3 */
  2690. static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = {
  2691. {
  2692. .pa_start = 0x48042000,
  2693. .pa_end = 0x48042000 + SZ_1K - 1,
  2694. .flags = ADDR_TYPE_RT
  2695. },
  2696. { }
  2697. };
  2698. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
  2699. .master = &am33xx_l4_ls_hwmod,
  2700. .slave = &am33xx_timer3_hwmod,
  2701. .clk = "l4ls_gclk",
  2702. .addr = am33xx_timer3_addr_space,
  2703. .user = OCP_USER_MPU,
  2704. };
  2705. /* l4 per -> timer4 */
  2706. static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = {
  2707. {
  2708. .pa_start = 0x48044000,
  2709. .pa_end = 0x48044000 + SZ_1K - 1,
  2710. .flags = ADDR_TYPE_RT
  2711. },
  2712. { }
  2713. };
  2714. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
  2715. .master = &am33xx_l4_ls_hwmod,
  2716. .slave = &am33xx_timer4_hwmod,
  2717. .clk = "l4ls_gclk",
  2718. .addr = am33xx_timer4_addr_space,
  2719. .user = OCP_USER_MPU,
  2720. };
  2721. /* l4 per -> timer5 */
  2722. static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = {
  2723. {
  2724. .pa_start = 0x48046000,
  2725. .pa_end = 0x48046000 + SZ_1K - 1,
  2726. .flags = ADDR_TYPE_RT
  2727. },
  2728. { }
  2729. };
  2730. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
  2731. .master = &am33xx_l4_ls_hwmod,
  2732. .slave = &am33xx_timer5_hwmod,
  2733. .clk = "l4ls_gclk",
  2734. .addr = am33xx_timer5_addr_space,
  2735. .user = OCP_USER_MPU,
  2736. };
  2737. /* l4 per -> timer6 */
  2738. static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = {
  2739. {
  2740. .pa_start = 0x48048000,
  2741. .pa_end = 0x48048000 + SZ_1K - 1,
  2742. .flags = ADDR_TYPE_RT
  2743. },
  2744. { }
  2745. };
  2746. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
  2747. .master = &am33xx_l4_ls_hwmod,
  2748. .slave = &am33xx_timer6_hwmod,
  2749. .clk = "l4ls_gclk",
  2750. .addr = am33xx_timer6_addr_space,
  2751. .user = OCP_USER_MPU,
  2752. };
  2753. /* l4 per -> timer7 */
  2754. static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = {
  2755. {
  2756. .pa_start = 0x4804A000,
  2757. .pa_end = 0x4804A000 + SZ_1K - 1,
  2758. .flags = ADDR_TYPE_RT
  2759. },
  2760. { }
  2761. };
  2762. static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
  2763. .master = &am33xx_l4_ls_hwmod,
  2764. .slave = &am33xx_timer7_hwmod,
  2765. .clk = "l4ls_gclk",
  2766. .addr = am33xx_timer7_addr_space,
  2767. .user = OCP_USER_MPU,
  2768. };
  2769. /* l3 main -> tpcc */
  2770. static struct omap_hwmod_addr_space am33xx_tpcc_addr_space[] = {
  2771. {
  2772. .pa_start = 0x49000000,
  2773. .pa_end = 0x49000000 + SZ_32K - 1,
  2774. .flags = ADDR_TYPE_RT
  2775. },
  2776. { }
  2777. };
  2778. static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
  2779. .master = &am33xx_l3_main_hwmod,
  2780. .slave = &am33xx_tpcc_hwmod,
  2781. .clk = "l3_gclk",
  2782. .addr = am33xx_tpcc_addr_space,
  2783. .user = OCP_USER_MPU,
  2784. };
  2785. /* l3 main -> tpcc0 */
  2786. static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
  2787. {
  2788. .pa_start = 0x49800000,
  2789. .pa_end = 0x49800000 + SZ_8K - 1,
  2790. .flags = ADDR_TYPE_RT,
  2791. },
  2792. { }
  2793. };
  2794. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
  2795. .master = &am33xx_l3_main_hwmod,
  2796. .slave = &am33xx_tptc0_hwmod,
  2797. .clk = "l3_gclk",
  2798. .addr = am33xx_tptc0_addr_space,
  2799. .user = OCP_USER_MPU,
  2800. };
  2801. /* l3 main -> tpcc1 */
  2802. static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
  2803. {
  2804. .pa_start = 0x49900000,
  2805. .pa_end = 0x49900000 + SZ_8K - 1,
  2806. .flags = ADDR_TYPE_RT,
  2807. },
  2808. { }
  2809. };
  2810. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
  2811. .master = &am33xx_l3_main_hwmod,
  2812. .slave = &am33xx_tptc1_hwmod,
  2813. .clk = "l3_gclk",
  2814. .addr = am33xx_tptc1_addr_space,
  2815. .user = OCP_USER_MPU,
  2816. };
  2817. /* l3 main -> tpcc2 */
  2818. static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
  2819. {
  2820. .pa_start = 0x49a00000,
  2821. .pa_end = 0x49a00000 + SZ_8K - 1,
  2822. .flags = ADDR_TYPE_RT,
  2823. },
  2824. { }
  2825. };
  2826. static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
  2827. .master = &am33xx_l3_main_hwmod,
  2828. .slave = &am33xx_tptc2_hwmod,
  2829. .clk = "l3_gclk",
  2830. .addr = am33xx_tptc2_addr_space,
  2831. .user = OCP_USER_MPU,
  2832. };
  2833. /* l4 wkup -> uart1 */
  2834. static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = {
  2835. {
  2836. .pa_start = 0x44E09000,
  2837. .pa_end = 0x44E09000 + SZ_8K - 1,
  2838. .flags = ADDR_TYPE_RT,
  2839. },
  2840. { }
  2841. };
  2842. static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
  2843. .master = &am33xx_l4_wkup_hwmod,
  2844. .slave = &am33xx_uart1_hwmod,
  2845. .clk = "dpll_core_m4_div2_ck",
  2846. .addr = am33xx_uart1_addr_space,
  2847. .user = OCP_USER_MPU,
  2848. };
  2849. /* l4 ls -> uart2 */
  2850. static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = {
  2851. {
  2852. .pa_start = 0x48022000,
  2853. .pa_end = 0x48022000 + SZ_8K - 1,
  2854. .flags = ADDR_TYPE_RT,
  2855. },
  2856. { }
  2857. };
  2858. static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
  2859. .master = &am33xx_l4_ls_hwmod,
  2860. .slave = &am33xx_uart2_hwmod,
  2861. .clk = "l4ls_gclk",
  2862. .addr = am33xx_uart2_addr_space,
  2863. .user = OCP_USER_MPU,
  2864. };
  2865. /* l4 ls -> uart3 */
  2866. static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = {
  2867. {
  2868. .pa_start = 0x48024000,