omap_hwmod_3xxx_data.c 96 KB

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