omap_hwmod_3xxx_data.c 96 KB

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