omap_hwmod_3xxx_data.c 97 KB

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