omap_hwmod_3xxx_data.c 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345
  1. /*
  2. * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  3. *
  4. * Copyright (C) 2009-2010 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * The data in this file should be completely autogeneratable from
  12. * the TI hardware database or other technical documentation.
  13. *
  14. * XXX these should be marked initdata for multi-OMAP kernels
  15. */
  16. #include <plat/omap_hwmod.h>
  17. #include <mach/irqs.h>
  18. #include <plat/cpu.h>
  19. #include <plat/dma.h>
  20. #include <plat/serial.h>
  21. #include <plat/l3_3xxx.h>
  22. #include <plat/l4_3xxx.h>
  23. #include <plat/i2c.h>
  24. #include <plat/gpio.h>
  25. #include <plat/smartreflex.h>
  26. #include <plat/mcspi.h>
  27. #include "omap_hwmod_common_data.h"
  28. #include "prm-regbits-34xx.h"
  29. #include "cm-regbits-34xx.h"
  30. #include "wd_timer.h"
  31. #include <mach/am35xx.h>
  32. /*
  33. * OMAP3xxx hardware module integration data
  34. *
  35. * ALl of the data in this section should be autogeneratable from the
  36. * TI hardware database or other technical documentation. Data that
  37. * is driver-specific or driver-kernel integration-specific belongs
  38. * elsewhere.
  39. */
  40. static struct omap_hwmod omap3xxx_mpu_hwmod;
  41. static struct omap_hwmod omap3xxx_iva_hwmod;
  42. static struct omap_hwmod omap3xxx_l3_main_hwmod;
  43. static struct omap_hwmod omap3xxx_l4_core_hwmod;
  44. static struct omap_hwmod omap3xxx_l4_per_hwmod;
  45. static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
  46. static struct omap_hwmod omap3430es1_dss_core_hwmod;
  47. static struct omap_hwmod omap3xxx_dss_core_hwmod;
  48. static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
  49. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
  50. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
  51. static struct omap_hwmod omap3xxx_dss_venc_hwmod;
  52. static struct omap_hwmod omap3xxx_i2c1_hwmod;
  53. static struct omap_hwmod omap3xxx_i2c2_hwmod;
  54. static struct omap_hwmod omap3xxx_i2c3_hwmod;
  55. static struct omap_hwmod omap3xxx_gpio1_hwmod;
  56. static struct omap_hwmod omap3xxx_gpio2_hwmod;
  57. static struct omap_hwmod omap3xxx_gpio3_hwmod;
  58. static struct omap_hwmod omap3xxx_gpio4_hwmod;
  59. static struct omap_hwmod omap3xxx_gpio5_hwmod;
  60. static struct omap_hwmod omap3xxx_gpio6_hwmod;
  61. static struct omap_hwmod omap34xx_sr1_hwmod;
  62. static struct omap_hwmod omap34xx_sr2_hwmod;
  63. static struct omap_hwmod omap34xx_mcspi1;
  64. static struct omap_hwmod omap34xx_mcspi2;
  65. static struct omap_hwmod omap34xx_mcspi3;
  66. static struct omap_hwmod omap34xx_mcspi4;
  67. static struct omap_hwmod am35xx_usbhsotg_hwmod;
  68. static struct omap_hwmod omap3xxx_dma_system_hwmod;
  69. /* L3 -> L4_CORE interface */
  70. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  71. .master = &omap3xxx_l3_main_hwmod,
  72. .slave = &omap3xxx_l4_core_hwmod,
  73. .user = OCP_USER_MPU | OCP_USER_SDMA,
  74. };
  75. /* L3 -> L4_PER interface */
  76. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  77. .master = &omap3xxx_l3_main_hwmod,
  78. .slave = &omap3xxx_l4_per_hwmod,
  79. .user = OCP_USER_MPU | OCP_USER_SDMA,
  80. };
  81. /* MPU -> L3 interface */
  82. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  83. .master = &omap3xxx_mpu_hwmod,
  84. .slave = &omap3xxx_l3_main_hwmod,
  85. .user = OCP_USER_MPU,
  86. };
  87. /* Slave interfaces on the L3 interconnect */
  88. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
  89. &omap3xxx_mpu__l3_main,
  90. };
  91. /* DSS -> l3 */
  92. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  93. .master = &omap3xxx_dss_core_hwmod,
  94. .slave = &omap3xxx_l3_main_hwmod,
  95. .fw = {
  96. .omap2 = {
  97. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  98. .flags = OMAP_FIREWALL_L3,
  99. }
  100. },
  101. .user = OCP_USER_MPU | OCP_USER_SDMA,
  102. };
  103. /* Master interfaces on the L3 interconnect */
  104. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
  105. &omap3xxx_l3_main__l4_core,
  106. &omap3xxx_l3_main__l4_per,
  107. };
  108. /* L3 */
  109. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  110. .name = "l3_main",
  111. .class = &l3_hwmod_class,
  112. .masters = omap3xxx_l3_main_masters,
  113. .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
  114. .slaves = omap3xxx_l3_main_slaves,
  115. .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
  116. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  117. .flags = HWMOD_NO_IDLEST,
  118. };
  119. static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
  120. static struct omap_hwmod omap3xxx_uart1_hwmod;
  121. static struct omap_hwmod omap3xxx_uart2_hwmod;
  122. static struct omap_hwmod omap3xxx_uart3_hwmod;
  123. static struct omap_hwmod omap3xxx_uart4_hwmod;
  124. static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
  125. /* l3_core -> usbhsotg interface */
  126. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  127. .master = &omap3xxx_usbhsotg_hwmod,
  128. .slave = &omap3xxx_l3_main_hwmod,
  129. .clk = "core_l3_ick",
  130. .user = OCP_USER_MPU,
  131. };
  132. /* l3_core -> am35xx_usbhsotg interface */
  133. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  134. .master = &am35xx_usbhsotg_hwmod,
  135. .slave = &omap3xxx_l3_main_hwmod,
  136. .clk = "core_l3_ick",
  137. .user = OCP_USER_MPU,
  138. };
  139. /* L4_CORE -> L4_WKUP interface */
  140. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  141. .master = &omap3xxx_l4_core_hwmod,
  142. .slave = &omap3xxx_l4_wkup_hwmod,
  143. .user = OCP_USER_MPU | OCP_USER_SDMA,
  144. };
  145. /* L4 CORE -> UART1 interface */
  146. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  147. {
  148. .pa_start = OMAP3_UART1_BASE,
  149. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  150. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  151. },
  152. };
  153. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  154. .master = &omap3xxx_l4_core_hwmod,
  155. .slave = &omap3xxx_uart1_hwmod,
  156. .clk = "uart1_ick",
  157. .addr = omap3xxx_uart1_addr_space,
  158. .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
  159. .user = OCP_USER_MPU | OCP_USER_SDMA,
  160. };
  161. /* L4 CORE -> UART2 interface */
  162. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  163. {
  164. .pa_start = OMAP3_UART2_BASE,
  165. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  166. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  167. },
  168. };
  169. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  170. .master = &omap3xxx_l4_core_hwmod,
  171. .slave = &omap3xxx_uart2_hwmod,
  172. .clk = "uart2_ick",
  173. .addr = omap3xxx_uart2_addr_space,
  174. .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
  175. .user = OCP_USER_MPU | OCP_USER_SDMA,
  176. };
  177. /* L4 PER -> UART3 interface */
  178. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  179. {
  180. .pa_start = OMAP3_UART3_BASE,
  181. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  182. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  183. },
  184. };
  185. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  186. .master = &omap3xxx_l4_per_hwmod,
  187. .slave = &omap3xxx_uart3_hwmod,
  188. .clk = "uart3_ick",
  189. .addr = omap3xxx_uart3_addr_space,
  190. .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
  191. .user = OCP_USER_MPU | OCP_USER_SDMA,
  192. };
  193. /* L4 PER -> UART4 interface */
  194. static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
  195. {
  196. .pa_start = OMAP3_UART4_BASE,
  197. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  198. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  199. },
  200. };
  201. static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
  202. .master = &omap3xxx_l4_per_hwmod,
  203. .slave = &omap3xxx_uart4_hwmod,
  204. .clk = "uart4_ick",
  205. .addr = omap3xxx_uart4_addr_space,
  206. .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
  207. .user = OCP_USER_MPU | OCP_USER_SDMA,
  208. };
  209. /* I2C IP block address space length (in bytes) */
  210. #define OMAP2_I2C_AS_LEN 128
  211. /* L4 CORE -> I2C1 interface */
  212. static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
  213. {
  214. .pa_start = 0x48070000,
  215. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  216. .flags = ADDR_TYPE_RT,
  217. },
  218. };
  219. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  220. .master = &omap3xxx_l4_core_hwmod,
  221. .slave = &omap3xxx_i2c1_hwmod,
  222. .clk = "i2c1_ick",
  223. .addr = omap3xxx_i2c1_addr_space,
  224. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
  225. .fw = {
  226. .omap2 = {
  227. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  228. .l4_prot_group = 7,
  229. .flags = OMAP_FIREWALL_L4,
  230. }
  231. },
  232. .user = OCP_USER_MPU | OCP_USER_SDMA,
  233. };
  234. /* L4 CORE -> I2C2 interface */
  235. static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
  236. {
  237. .pa_start = 0x48072000,
  238. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  239. .flags = ADDR_TYPE_RT,
  240. },
  241. };
  242. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  243. .master = &omap3xxx_l4_core_hwmod,
  244. .slave = &omap3xxx_i2c2_hwmod,
  245. .clk = "i2c2_ick",
  246. .addr = omap3xxx_i2c2_addr_space,
  247. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
  248. .fw = {
  249. .omap2 = {
  250. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  251. .l4_prot_group = 7,
  252. .flags = OMAP_FIREWALL_L4,
  253. }
  254. },
  255. .user = OCP_USER_MPU | OCP_USER_SDMA,
  256. };
  257. /* L4 CORE -> I2C3 interface */
  258. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  259. {
  260. .pa_start = 0x48060000,
  261. .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1,
  262. .flags = ADDR_TYPE_RT,
  263. },
  264. };
  265. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  266. .master = &omap3xxx_l4_core_hwmod,
  267. .slave = &omap3xxx_i2c3_hwmod,
  268. .clk = "i2c3_ick",
  269. .addr = omap3xxx_i2c3_addr_space,
  270. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
  271. .fw = {
  272. .omap2 = {
  273. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  274. .l4_prot_group = 7,
  275. .flags = OMAP_FIREWALL_L4,
  276. }
  277. },
  278. .user = OCP_USER_MPU | OCP_USER_SDMA,
  279. };
  280. /* L4 CORE -> SR1 interface */
  281. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  282. {
  283. .pa_start = OMAP34XX_SR1_BASE,
  284. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  285. .flags = ADDR_TYPE_RT,
  286. },
  287. };
  288. static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
  289. .master = &omap3xxx_l4_core_hwmod,
  290. .slave = &omap34xx_sr1_hwmod,
  291. .clk = "sr_l4_ick",
  292. .addr = omap3_sr1_addr_space,
  293. .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space),
  294. .user = OCP_USER_MPU,
  295. };
  296. /* L4 CORE -> SR1 interface */
  297. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  298. {
  299. .pa_start = OMAP34XX_SR2_BASE,
  300. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  301. .flags = ADDR_TYPE_RT,
  302. },
  303. };
  304. static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
  305. .master = &omap3xxx_l4_core_hwmod,
  306. .slave = &omap34xx_sr2_hwmod,
  307. .clk = "sr_l4_ick",
  308. .addr = omap3_sr2_addr_space,
  309. .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space),
  310. .user = OCP_USER_MPU,
  311. };
  312. /*
  313. * usbhsotg interface data
  314. */
  315. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  316. {
  317. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  318. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  319. .flags = ADDR_TYPE_RT
  320. },
  321. };
  322. /* l4_core -> usbhsotg */
  323. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  324. .master = &omap3xxx_l4_core_hwmod,
  325. .slave = &omap3xxx_usbhsotg_hwmod,
  326. .clk = "l4_ick",
  327. .addr = omap3xxx_usbhsotg_addrs,
  328. .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs),
  329. .user = OCP_USER_MPU,
  330. };
  331. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
  332. &omap3xxx_usbhsotg__l3,
  333. };
  334. static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
  335. &omap3xxx_l4_core__usbhsotg,
  336. };
  337. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  338. {
  339. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  340. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  341. .flags = ADDR_TYPE_RT
  342. },
  343. };
  344. /* l4_core -> usbhsotg */
  345. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  346. .master = &omap3xxx_l4_core_hwmod,
  347. .slave = &am35xx_usbhsotg_hwmod,
  348. .clk = "l4_ick",
  349. .addr = am35xx_usbhsotg_addrs,
  350. .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs),
  351. .user = OCP_USER_MPU,
  352. };
  353. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
  354. &am35xx_usbhsotg__l3,
  355. };
  356. static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
  357. &am35xx_l4_core__usbhsotg,
  358. };
  359. /* Slave interfaces on the L4_CORE interconnect */
  360. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
  361. &omap3xxx_l3_main__l4_core,
  362. &omap3_l4_core__sr1,
  363. &omap3_l4_core__sr2,
  364. };
  365. /* Master interfaces on the L4_CORE interconnect */
  366. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
  367. &omap3xxx_l4_core__l4_wkup,
  368. &omap3_l4_core__uart1,
  369. &omap3_l4_core__uart2,
  370. &omap3_l4_core__i2c1,
  371. &omap3_l4_core__i2c2,
  372. &omap3_l4_core__i2c3,
  373. };
  374. /* L4 CORE */
  375. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  376. .name = "l4_core",
  377. .class = &l4_hwmod_class,
  378. .masters = omap3xxx_l4_core_masters,
  379. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
  380. .slaves = omap3xxx_l4_core_slaves,
  381. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
  382. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  383. .flags = HWMOD_NO_IDLEST,
  384. };
  385. /* Slave interfaces on the L4_PER interconnect */
  386. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
  387. &omap3xxx_l3_main__l4_per,
  388. };
  389. /* Master interfaces on the L4_PER interconnect */
  390. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
  391. &omap3_l4_per__uart3,
  392. &omap3_l4_per__uart4,
  393. };
  394. /* L4 PER */
  395. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  396. .name = "l4_per",
  397. .class = &l4_hwmod_class,
  398. .masters = omap3xxx_l4_per_masters,
  399. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
  400. .slaves = omap3xxx_l4_per_slaves,
  401. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
  402. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  403. .flags = HWMOD_NO_IDLEST,
  404. };
  405. /* Slave interfaces on the L4_WKUP interconnect */
  406. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
  407. &omap3xxx_l4_core__l4_wkup,
  408. };
  409. /* Master interfaces on the L4_WKUP interconnect */
  410. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
  411. };
  412. /* L4 WKUP */
  413. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  414. .name = "l4_wkup",
  415. .class = &l4_hwmod_class,
  416. .masters = omap3xxx_l4_wkup_masters,
  417. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
  418. .slaves = omap3xxx_l4_wkup_slaves,
  419. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
  420. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  421. .flags = HWMOD_NO_IDLEST,
  422. };
  423. /* Master interfaces on the MPU device */
  424. static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
  425. &omap3xxx_mpu__l3_main,
  426. };
  427. /* MPU */
  428. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  429. .name = "mpu",
  430. .class = &mpu_hwmod_class,
  431. .main_clk = "arm_fck",
  432. .masters = omap3xxx_mpu_masters,
  433. .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
  434. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  435. };
  436. /*
  437. * IVA2_2 interface data
  438. */
  439. /* IVA2 <- L3 interface */
  440. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  441. .master = &omap3xxx_l3_main_hwmod,
  442. .slave = &omap3xxx_iva_hwmod,
  443. .clk = "iva2_ck",
  444. .user = OCP_USER_MPU | OCP_USER_SDMA,
  445. };
  446. static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
  447. &omap3xxx_l3__iva,
  448. };
  449. /*
  450. * IVA2 (IVA2)
  451. */
  452. static struct omap_hwmod omap3xxx_iva_hwmod = {
  453. .name = "iva",
  454. .class = &iva_hwmod_class,
  455. .masters = omap3xxx_iva_masters,
  456. .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
  457. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  458. };
  459. /* l4_wkup -> wd_timer2 */
  460. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  461. {
  462. .pa_start = 0x48314000,
  463. .pa_end = 0x4831407f,
  464. .flags = ADDR_TYPE_RT
  465. },
  466. };
  467. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  468. .master = &omap3xxx_l4_wkup_hwmod,
  469. .slave = &omap3xxx_wd_timer2_hwmod,
  470. .clk = "wdt2_ick",
  471. .addr = omap3xxx_wd_timer2_addrs,
  472. .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
  473. .user = OCP_USER_MPU | OCP_USER_SDMA,
  474. };
  475. /*
  476. * 'wd_timer' class
  477. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  478. * overflow condition
  479. */
  480. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  481. .rev_offs = 0x0000,
  482. .sysc_offs = 0x0010,
  483. .syss_offs = 0x0014,
  484. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  485. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  486. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY),
  487. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  488. .sysc_fields = &omap_hwmod_sysc_type1,
  489. };
  490. /* I2C common */
  491. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  492. .rev_offs = 0x00,
  493. .sysc_offs = 0x20,
  494. .syss_offs = 0x10,
  495. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  496. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  497. SYSC_HAS_AUTOIDLE),
  498. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  499. .sysc_fields = &omap_hwmod_sysc_type1,
  500. };
  501. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  502. .name = "wd_timer",
  503. .sysc = &omap3xxx_wd_timer_sysc,
  504. .pre_shutdown = &omap2_wd_timer_disable
  505. };
  506. /* wd_timer2 */
  507. static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
  508. &omap3xxx_l4_wkup__wd_timer2,
  509. };
  510. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  511. .name = "wd_timer2",
  512. .class = &omap3xxx_wd_timer_hwmod_class,
  513. .main_clk = "wdt2_fck",
  514. .prcm = {
  515. .omap2 = {
  516. .prcm_reg_id = 1,
  517. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  518. .module_offs = WKUP_MOD,
  519. .idlest_reg_id = 1,
  520. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  521. },
  522. },
  523. .slaves = omap3xxx_wd_timer2_slaves,
  524. .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
  525. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  526. };
  527. /* UART common */
  528. static struct omap_hwmod_class_sysconfig uart_sysc = {
  529. .rev_offs = 0x50,
  530. .sysc_offs = 0x54,
  531. .syss_offs = 0x58,
  532. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  533. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  534. SYSC_HAS_AUTOIDLE),
  535. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  536. .sysc_fields = &omap_hwmod_sysc_type1,
  537. };
  538. static struct omap_hwmod_class uart_class = {
  539. .name = "uart",
  540. .sysc = &uart_sysc,
  541. };
  542. /* UART1 */
  543. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  544. { .irq = INT_24XX_UART1_IRQ, },
  545. };
  546. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  547. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  548. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  549. };
  550. static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
  551. &omap3_l4_core__uart1,
  552. };
  553. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  554. .name = "uart1",
  555. .mpu_irqs = uart1_mpu_irqs,
  556. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  557. .sdma_reqs = uart1_sdma_reqs,
  558. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  559. .main_clk = "uart1_fck",
  560. .prcm = {
  561. .omap2 = {
  562. .module_offs = CORE_MOD,
  563. .prcm_reg_id = 1,
  564. .module_bit = OMAP3430_EN_UART1_SHIFT,
  565. .idlest_reg_id = 1,
  566. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  567. },
  568. },
  569. .slaves = omap3xxx_uart1_slaves,
  570. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
  571. .class = &uart_class,
  572. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  573. };
  574. /* UART2 */
  575. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  576. { .irq = INT_24XX_UART2_IRQ, },
  577. };
  578. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  579. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  580. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  581. };
  582. static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
  583. &omap3_l4_core__uart2,
  584. };
  585. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  586. .name = "uart2",
  587. .mpu_irqs = uart2_mpu_irqs,
  588. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  589. .sdma_reqs = uart2_sdma_reqs,
  590. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  591. .main_clk = "uart2_fck",
  592. .prcm = {
  593. .omap2 = {
  594. .module_offs = CORE_MOD,
  595. .prcm_reg_id = 1,
  596. .module_bit = OMAP3430_EN_UART2_SHIFT,
  597. .idlest_reg_id = 1,
  598. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  599. },
  600. },
  601. .slaves = omap3xxx_uart2_slaves,
  602. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
  603. .class = &uart_class,
  604. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  605. };
  606. /* UART3 */
  607. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  608. { .irq = INT_24XX_UART3_IRQ, },
  609. };
  610. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  611. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  612. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  613. };
  614. static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
  615. &omap3_l4_per__uart3,
  616. };
  617. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  618. .name = "uart3",
  619. .mpu_irqs = uart3_mpu_irqs,
  620. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  621. .sdma_reqs = uart3_sdma_reqs,
  622. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  623. .main_clk = "uart3_fck",
  624. .prcm = {
  625. .omap2 = {
  626. .module_offs = OMAP3430_PER_MOD,
  627. .prcm_reg_id = 1,
  628. .module_bit = OMAP3430_EN_UART3_SHIFT,
  629. .idlest_reg_id = 1,
  630. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  631. },
  632. },
  633. .slaves = omap3xxx_uart3_slaves,
  634. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
  635. .class = &uart_class,
  636. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  637. };
  638. /* UART4 */
  639. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  640. { .irq = INT_36XX_UART4_IRQ, },
  641. };
  642. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  643. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  644. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  645. };
  646. static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
  647. &omap3_l4_per__uart4,
  648. };
  649. static struct omap_hwmod omap3xxx_uart4_hwmod = {
  650. .name = "uart4",
  651. .mpu_irqs = uart4_mpu_irqs,
  652. .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
  653. .sdma_reqs = uart4_sdma_reqs,
  654. .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
  655. .main_clk = "uart4_fck",
  656. .prcm = {
  657. .omap2 = {
  658. .module_offs = OMAP3430_PER_MOD,
  659. .prcm_reg_id = 1,
  660. .module_bit = OMAP3630_EN_UART4_SHIFT,
  661. .idlest_reg_id = 1,
  662. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  663. },
  664. },
  665. .slaves = omap3xxx_uart4_slaves,
  666. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
  667. .class = &uart_class,
  668. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  669. };
  670. static struct omap_hwmod_class i2c_class = {
  671. .name = "i2c",
  672. .sysc = &i2c_sysc,
  673. };
  674. /*
  675. * 'dss' class
  676. * display sub-system
  677. */
  678. static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = {
  679. .rev_offs = 0x0000,
  680. .sysc_offs = 0x0010,
  681. .syss_offs = 0x0014,
  682. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  683. .sysc_fields = &omap_hwmod_sysc_type1,
  684. };
  685. static struct omap_hwmod_class omap3xxx_dss_hwmod_class = {
  686. .name = "dss",
  687. .sysc = &omap3xxx_dss_sysc,
  688. };
  689. /* dss */
  690. static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = {
  691. { .irq = 25 },
  692. };
  693. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  694. { .name = "dispc", .dma_req = 5 },
  695. { .name = "dsi1", .dma_req = 74 },
  696. };
  697. /* dss */
  698. /* dss master ports */
  699. static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
  700. &omap3xxx_dss__l3,
  701. };
  702. static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = {
  703. {
  704. .pa_start = 0x48050000,
  705. .pa_end = 0x480503FF,
  706. .flags = ADDR_TYPE_RT
  707. },
  708. };
  709. /* l4_core -> dss */
  710. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  711. .master = &omap3xxx_l4_core_hwmod,
  712. .slave = &omap3430es1_dss_core_hwmod,
  713. .clk = "dss_ick",
  714. .addr = omap3xxx_dss_addrs,
  715. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
  716. .fw = {
  717. .omap2 = {
  718. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  719. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  720. .flags = OMAP_FIREWALL_L4,
  721. }
  722. },
  723. .user = OCP_USER_MPU | OCP_USER_SDMA,
  724. };
  725. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  726. .master = &omap3xxx_l4_core_hwmod,
  727. .slave = &omap3xxx_dss_core_hwmod,
  728. .clk = "dss_ick",
  729. .addr = omap3xxx_dss_addrs,
  730. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
  731. .fw = {
  732. .omap2 = {
  733. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  734. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  735. .flags = OMAP_FIREWALL_L4,
  736. }
  737. },
  738. .user = OCP_USER_MPU | OCP_USER_SDMA,
  739. };
  740. /* dss slave ports */
  741. static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
  742. &omap3430es1_l4_core__dss,
  743. };
  744. static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
  745. &omap3xxx_l4_core__dss,
  746. };
  747. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  748. { .role = "tv_clk", .clk = "dss_tv_fck" },
  749. { .role = "dssclk", .clk = "dss_96m_fck" },
  750. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  751. };
  752. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  753. .name = "dss_core",
  754. .class = &omap3xxx_dss_hwmod_class,
  755. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  756. .mpu_irqs = omap3xxx_dss_irqs,
  757. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
  758. .sdma_reqs = omap3xxx_dss_sdma_chs,
  759. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
  760. .prcm = {
  761. .omap2 = {
  762. .prcm_reg_id = 1,
  763. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  764. .module_offs = OMAP3430_DSS_MOD,
  765. .idlest_reg_id = 1,
  766. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  767. },
  768. },
  769. .opt_clks = dss_opt_clks,
  770. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  771. .slaves = omap3430es1_dss_slaves,
  772. .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
  773. .masters = omap3xxx_dss_masters,
  774. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  775. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
  776. .flags = HWMOD_NO_IDLEST,
  777. };
  778. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  779. .name = "dss_core",
  780. .class = &omap3xxx_dss_hwmod_class,
  781. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  782. .mpu_irqs = omap3xxx_dss_irqs,
  783. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
  784. .sdma_reqs = omap3xxx_dss_sdma_chs,
  785. .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
  786. .prcm = {
  787. .omap2 = {
  788. .prcm_reg_id = 1,
  789. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  790. .module_offs = OMAP3430_DSS_MOD,
  791. .idlest_reg_id = 1,
  792. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  793. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  794. },
  795. },
  796. .opt_clks = dss_opt_clks,
  797. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  798. .slaves = omap3xxx_dss_slaves,
  799. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
  800. .masters = omap3xxx_dss_masters,
  801. .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
  802. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 |
  803. CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
  804. };
  805. /*
  806. * 'dispc' class
  807. * display controller
  808. */
  809. static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = {
  810. .rev_offs = 0x0000,
  811. .sysc_offs = 0x0010,
  812. .syss_offs = 0x0014,
  813. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  814. SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP |
  815. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  816. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  817. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  818. .sysc_fields = &omap_hwmod_sysc_type1,
  819. };
  820. static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = {
  821. .name = "dispc",
  822. .sysc = &omap3xxx_dispc_sysc,
  823. };
  824. static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = {
  825. {
  826. .pa_start = 0x48050400,
  827. .pa_end = 0x480507FF,
  828. .flags = ADDR_TYPE_RT
  829. },
  830. };
  831. /* l4_core -> dss_dispc */
  832. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  833. .master = &omap3xxx_l4_core_hwmod,
  834. .slave = &omap3xxx_dss_dispc_hwmod,
  835. .clk = "dss_ick",
  836. .addr = omap3xxx_dss_dispc_addrs,
  837. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs),
  838. .fw = {
  839. .omap2 = {
  840. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  841. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  842. .flags = OMAP_FIREWALL_L4,
  843. }
  844. },
  845. .user = OCP_USER_MPU | OCP_USER_SDMA,
  846. };
  847. /* dss_dispc slave ports */
  848. static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
  849. &omap3xxx_l4_core__dss_dispc,
  850. };
  851. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  852. .name = "dss_dispc",
  853. .class = &omap3xxx_dispc_hwmod_class,
  854. .main_clk = "dss1_alwon_fck",
  855. .prcm = {
  856. .omap2 = {
  857. .prcm_reg_id = 1,
  858. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  859. .module_offs = OMAP3430_DSS_MOD,
  860. },
  861. },
  862. .slaves = omap3xxx_dss_dispc_slaves,
  863. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
  864. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  865. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  866. CHIP_GE_OMAP3630ES1_1),
  867. .flags = HWMOD_NO_IDLEST,
  868. };
  869. /*
  870. * 'dsi' class
  871. * display serial interface controller
  872. */
  873. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  874. .name = "dsi",
  875. };
  876. /* dss_dsi1 */
  877. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  878. {
  879. .pa_start = 0x4804FC00,
  880. .pa_end = 0x4804FFFF,
  881. .flags = ADDR_TYPE_RT
  882. },
  883. };
  884. /* l4_core -> dss_dsi1 */
  885. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  886. .master = &omap3xxx_l4_core_hwmod,
  887. .slave = &omap3xxx_dss_dsi1_hwmod,
  888. .addr = omap3xxx_dss_dsi1_addrs,
  889. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs),
  890. .fw = {
  891. .omap2 = {
  892. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  893. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  894. .flags = OMAP_FIREWALL_L4,
  895. }
  896. },
  897. .user = OCP_USER_MPU | OCP_USER_SDMA,
  898. };
  899. /* dss_dsi1 slave ports */
  900. static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
  901. &omap3xxx_l4_core__dss_dsi1,
  902. };
  903. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  904. .name = "dss_dsi1",
  905. .class = &omap3xxx_dsi_hwmod_class,
  906. .main_clk = "dss1_alwon_fck",
  907. .prcm = {
  908. .omap2 = {
  909. .prcm_reg_id = 1,
  910. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  911. .module_offs = OMAP3430_DSS_MOD,
  912. },
  913. },
  914. .slaves = omap3xxx_dss_dsi1_slaves,
  915. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
  916. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  917. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  918. CHIP_GE_OMAP3630ES1_1),
  919. .flags = HWMOD_NO_IDLEST,
  920. };
  921. /*
  922. * 'rfbi' class
  923. * remote frame buffer interface
  924. */
  925. static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = {
  926. .rev_offs = 0x0000,
  927. .sysc_offs = 0x0010,
  928. .syss_offs = 0x0014,
  929. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  930. SYSC_HAS_AUTOIDLE),
  931. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  932. .sysc_fields = &omap_hwmod_sysc_type1,
  933. };
  934. static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = {
  935. .name = "rfbi",
  936. .sysc = &omap3xxx_rfbi_sysc,
  937. };
  938. static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = {
  939. {
  940. .pa_start = 0x48050800,
  941. .pa_end = 0x48050BFF,
  942. .flags = ADDR_TYPE_RT
  943. },
  944. };
  945. /* l4_core -> dss_rfbi */
  946. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  947. .master = &omap3xxx_l4_core_hwmod,
  948. .slave = &omap3xxx_dss_rfbi_hwmod,
  949. .clk = "dss_ick",
  950. .addr = omap3xxx_dss_rfbi_addrs,
  951. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs),
  952. .fw = {
  953. .omap2 = {
  954. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  955. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  956. .flags = OMAP_FIREWALL_L4,
  957. }
  958. },
  959. .user = OCP_USER_MPU | OCP_USER_SDMA,
  960. };
  961. /* dss_rfbi slave ports */
  962. static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
  963. &omap3xxx_l4_core__dss_rfbi,
  964. };
  965. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  966. .name = "dss_rfbi",
  967. .class = &omap3xxx_rfbi_hwmod_class,
  968. .main_clk = "dss1_alwon_fck",
  969. .prcm = {
  970. .omap2 = {
  971. .prcm_reg_id = 1,
  972. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  973. .module_offs = OMAP3430_DSS_MOD,
  974. },
  975. },
  976. .slaves = omap3xxx_dss_rfbi_slaves,
  977. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
  978. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  979. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  980. CHIP_GE_OMAP3630ES1_1),
  981. .flags = HWMOD_NO_IDLEST,
  982. };
  983. /*
  984. * 'venc' class
  985. * video encoder
  986. */
  987. static struct omap_hwmod_class omap3xxx_venc_hwmod_class = {
  988. .name = "venc",
  989. };
  990. /* dss_venc */
  991. static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = {
  992. {
  993. .pa_start = 0x48050C00,
  994. .pa_end = 0x48050FFF,
  995. .flags = ADDR_TYPE_RT
  996. },
  997. };
  998. /* l4_core -> dss_venc */
  999. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  1000. .master = &omap3xxx_l4_core_hwmod,
  1001. .slave = &omap3xxx_dss_venc_hwmod,
  1002. .clk = "dss_tv_fck",
  1003. .addr = omap3xxx_dss_venc_addrs,
  1004. .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs),
  1005. .fw = {
  1006. .omap2 = {
  1007. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  1008. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  1009. .flags = OMAP_FIREWALL_L4,
  1010. }
  1011. },
  1012. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1013. };
  1014. /* dss_venc slave ports */
  1015. static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
  1016. &omap3xxx_l4_core__dss_venc,
  1017. };
  1018. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  1019. .name = "dss_venc",
  1020. .class = &omap3xxx_venc_hwmod_class,
  1021. .main_clk = "dss1_alwon_fck",
  1022. .prcm = {
  1023. .omap2 = {
  1024. .prcm_reg_id = 1,
  1025. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  1026. .module_offs = OMAP3430_DSS_MOD,
  1027. },
  1028. },
  1029. .slaves = omap3xxx_dss_venc_slaves,
  1030. .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
  1031. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  1032. CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
  1033. CHIP_GE_OMAP3630ES1_1),
  1034. .flags = HWMOD_NO_IDLEST,
  1035. };
  1036. /* I2C1 */
  1037. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  1038. .fifo_depth = 8, /* bytes */
  1039. };
  1040. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1041. { .irq = INT_24XX_I2C1_IRQ, },
  1042. };
  1043. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1044. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1045. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1046. };
  1047. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  1048. &omap3_l4_core__i2c1,
  1049. };
  1050. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  1051. .name = "i2c1",
  1052. .mpu_irqs = i2c1_mpu_irqs,
  1053. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  1054. .sdma_reqs = i2c1_sdma_reqs,
  1055. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  1056. .main_clk = "i2c1_fck",
  1057. .prcm = {
  1058. .omap2 = {
  1059. .module_offs = CORE_MOD,
  1060. .prcm_reg_id = 1,
  1061. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  1062. .idlest_reg_id = 1,
  1063. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  1064. },
  1065. },
  1066. .slaves = omap3xxx_i2c1_slaves,
  1067. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  1068. .class = &i2c_class,
  1069. .dev_attr = &i2c1_dev_attr,
  1070. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1071. };
  1072. /* I2C2 */
  1073. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  1074. .fifo_depth = 8, /* bytes */
  1075. };
  1076. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1077. { .irq = INT_24XX_I2C2_IRQ, },
  1078. };
  1079. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1080. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1081. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1082. };
  1083. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  1084. &omap3_l4_core__i2c2,
  1085. };
  1086. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  1087. .name = "i2c2",
  1088. .mpu_irqs = i2c2_mpu_irqs,
  1089. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  1090. .sdma_reqs = i2c2_sdma_reqs,
  1091. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  1092. .main_clk = "i2c2_fck",
  1093. .prcm = {
  1094. .omap2 = {
  1095. .module_offs = CORE_MOD,
  1096. .prcm_reg_id = 1,
  1097. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  1098. .idlest_reg_id = 1,
  1099. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  1100. },
  1101. },
  1102. .slaves = omap3xxx_i2c2_slaves,
  1103. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  1104. .class = &i2c_class,
  1105. .dev_attr = &i2c2_dev_attr,
  1106. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1107. };
  1108. /* I2C3 */
  1109. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  1110. .fifo_depth = 64, /* bytes */
  1111. };
  1112. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1113. { .irq = INT_34XX_I2C3_IRQ, },
  1114. };
  1115. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  1116. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  1117. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  1118. };
  1119. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  1120. &omap3_l4_core__i2c3,
  1121. };
  1122. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  1123. .name = "i2c3",
  1124. .mpu_irqs = i2c3_mpu_irqs,
  1125. .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs),
  1126. .sdma_reqs = i2c3_sdma_reqs,
  1127. .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
  1128. .main_clk = "i2c3_fck",
  1129. .prcm = {
  1130. .omap2 = {
  1131. .module_offs = CORE_MOD,
  1132. .prcm_reg_id = 1,
  1133. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  1134. .idlest_reg_id = 1,
  1135. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  1136. },
  1137. },
  1138. .slaves = omap3xxx_i2c3_slaves,
  1139. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  1140. .class = &i2c_class,
  1141. .dev_attr = &i2c3_dev_attr,
  1142. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1143. };
  1144. /* l4_wkup -> gpio1 */
  1145. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  1146. {
  1147. .pa_start = 0x48310000,
  1148. .pa_end = 0x483101ff,
  1149. .flags = ADDR_TYPE_RT
  1150. },
  1151. };
  1152. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  1153. .master = &omap3xxx_l4_wkup_hwmod,
  1154. .slave = &omap3xxx_gpio1_hwmod,
  1155. .addr = omap3xxx_gpio1_addrs,
  1156. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
  1157. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1158. };
  1159. /* l4_per -> gpio2 */
  1160. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  1161. {
  1162. .pa_start = 0x49050000,
  1163. .pa_end = 0x490501ff,
  1164. .flags = ADDR_TYPE_RT
  1165. },
  1166. };
  1167. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  1168. .master = &omap3xxx_l4_per_hwmod,
  1169. .slave = &omap3xxx_gpio2_hwmod,
  1170. .addr = omap3xxx_gpio2_addrs,
  1171. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
  1172. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1173. };
  1174. /* l4_per -> gpio3 */
  1175. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  1176. {
  1177. .pa_start = 0x49052000,
  1178. .pa_end = 0x490521ff,
  1179. .flags = ADDR_TYPE_RT
  1180. },
  1181. };
  1182. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  1183. .master = &omap3xxx_l4_per_hwmod,
  1184. .slave = &omap3xxx_gpio3_hwmod,
  1185. .addr = omap3xxx_gpio3_addrs,
  1186. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
  1187. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1188. };
  1189. /* l4_per -> gpio4 */
  1190. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  1191. {
  1192. .pa_start = 0x49054000,
  1193. .pa_end = 0x490541ff,
  1194. .flags = ADDR_TYPE_RT
  1195. },
  1196. };
  1197. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  1198. .master = &omap3xxx_l4_per_hwmod,
  1199. .slave = &omap3xxx_gpio4_hwmod,
  1200. .addr = omap3xxx_gpio4_addrs,
  1201. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
  1202. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1203. };
  1204. /* l4_per -> gpio5 */
  1205. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  1206. {
  1207. .pa_start = 0x49056000,
  1208. .pa_end = 0x490561ff,
  1209. .flags = ADDR_TYPE_RT
  1210. },
  1211. };
  1212. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  1213. .master = &omap3xxx_l4_per_hwmod,
  1214. .slave = &omap3xxx_gpio5_hwmod,
  1215. .addr = omap3xxx_gpio5_addrs,
  1216. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
  1217. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1218. };
  1219. /* l4_per -> gpio6 */
  1220. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  1221. {
  1222. .pa_start = 0x49058000,
  1223. .pa_end = 0x490581ff,
  1224. .flags = ADDR_TYPE_RT
  1225. },
  1226. };
  1227. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  1228. .master = &omap3xxx_l4_per_hwmod,
  1229. .slave = &omap3xxx_gpio6_hwmod,
  1230. .addr = omap3xxx_gpio6_addrs,
  1231. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
  1232. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1233. };
  1234. /*
  1235. * 'gpio' class
  1236. * general purpose io module
  1237. */
  1238. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  1239. .rev_offs = 0x0000,
  1240. .sysc_offs = 0x0010,
  1241. .syss_offs = 0x0014,
  1242. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1243. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1244. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1245. .sysc_fields = &omap_hwmod_sysc_type1,
  1246. };
  1247. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  1248. .name = "gpio",
  1249. .sysc = &omap3xxx_gpio_sysc,
  1250. .rev = 1,
  1251. };
  1252. /* gpio_dev_attr*/
  1253. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1254. .bank_width = 32,
  1255. .dbck_flag = true,
  1256. };
  1257. /* gpio1 */
  1258. static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
  1259. { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
  1260. };
  1261. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  1262. { .role = "dbclk", .clk = "gpio1_dbck", },
  1263. };
  1264. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  1265. &omap3xxx_l4_wkup__gpio1,
  1266. };
  1267. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  1268. .name = "gpio1",
  1269. .mpu_irqs = omap3xxx_gpio1_irqs,
  1270. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
  1271. .main_clk = "gpio1_ick",
  1272. .opt_clks = gpio1_opt_clks,
  1273. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1274. .prcm = {
  1275. .omap2 = {
  1276. .prcm_reg_id = 1,
  1277. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  1278. .module_offs = WKUP_MOD,
  1279. .idlest_reg_id = 1,
  1280. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  1281. },
  1282. },
  1283. .slaves = omap3xxx_gpio1_slaves,
  1284. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  1285. .class = &omap3xxx_gpio_hwmod_class,
  1286. .dev_attr = &gpio_dev_attr,
  1287. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1288. };
  1289. /* gpio2 */
  1290. static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
  1291. { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
  1292. };
  1293. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1294. { .role = "dbclk", .clk = "gpio2_dbck", },
  1295. };
  1296. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  1297. &omap3xxx_l4_per__gpio2,
  1298. };
  1299. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  1300. .name = "gpio2",
  1301. .mpu_irqs = omap3xxx_gpio2_irqs,
  1302. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
  1303. .main_clk = "gpio2_ick",
  1304. .opt_clks = gpio2_opt_clks,
  1305. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1306. .prcm = {
  1307. .omap2 = {
  1308. .prcm_reg_id = 1,
  1309. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  1310. .module_offs = OMAP3430_PER_MOD,
  1311. .idlest_reg_id = 1,
  1312. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  1313. },
  1314. },
  1315. .slaves = omap3xxx_gpio2_slaves,
  1316. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  1317. .class = &omap3xxx_gpio_hwmod_class,
  1318. .dev_attr = &gpio_dev_attr,
  1319. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1320. };
  1321. /* gpio3 */
  1322. static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
  1323. { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
  1324. };
  1325. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1326. { .role = "dbclk", .clk = "gpio3_dbck", },
  1327. };
  1328. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  1329. &omap3xxx_l4_per__gpio3,
  1330. };
  1331. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  1332. .name = "gpio3",
  1333. .mpu_irqs = omap3xxx_gpio3_irqs,
  1334. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
  1335. .main_clk = "gpio3_ick",
  1336. .opt_clks = gpio3_opt_clks,
  1337. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1338. .prcm = {
  1339. .omap2 = {
  1340. .prcm_reg_id = 1,
  1341. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  1342. .module_offs = OMAP3430_PER_MOD,
  1343. .idlest_reg_id = 1,
  1344. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  1345. },
  1346. },
  1347. .slaves = omap3xxx_gpio3_slaves,
  1348. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  1349. .class = &omap3xxx_gpio_hwmod_class,
  1350. .dev_attr = &gpio_dev_attr,
  1351. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1352. };
  1353. /* gpio4 */
  1354. static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
  1355. { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
  1356. };
  1357. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1358. { .role = "dbclk", .clk = "gpio4_dbck", },
  1359. };
  1360. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  1361. &omap3xxx_l4_per__gpio4,
  1362. };
  1363. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  1364. .name = "gpio4",
  1365. .mpu_irqs = omap3xxx_gpio4_irqs,
  1366. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
  1367. .main_clk = "gpio4_ick",
  1368. .opt_clks = gpio4_opt_clks,
  1369. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  1370. .prcm = {
  1371. .omap2 = {
  1372. .prcm_reg_id = 1,
  1373. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  1374. .module_offs = OMAP3430_PER_MOD,
  1375. .idlest_reg_id = 1,
  1376. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  1377. },
  1378. },
  1379. .slaves = omap3xxx_gpio4_slaves,
  1380. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  1381. .class = &omap3xxx_gpio_hwmod_class,
  1382. .dev_attr = &gpio_dev_attr,
  1383. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1384. };
  1385. /* gpio5 */
  1386. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  1387. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  1388. };
  1389. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  1390. { .role = "dbclk", .clk = "gpio5_dbck", },
  1391. };
  1392. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  1393. &omap3xxx_l4_per__gpio5,
  1394. };
  1395. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  1396. .name = "gpio5",
  1397. .mpu_irqs = omap3xxx_gpio5_irqs,
  1398. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
  1399. .main_clk = "gpio5_ick",
  1400. .opt_clks = gpio5_opt_clks,
  1401. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  1402. .prcm = {
  1403. .omap2 = {
  1404. .prcm_reg_id = 1,
  1405. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  1406. .module_offs = OMAP3430_PER_MOD,
  1407. .idlest_reg_id = 1,
  1408. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  1409. },
  1410. },
  1411. .slaves = omap3xxx_gpio5_slaves,
  1412. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  1413. .class = &omap3xxx_gpio_hwmod_class,
  1414. .dev_attr = &gpio_dev_attr,
  1415. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1416. };
  1417. /* gpio6 */
  1418. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  1419. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  1420. };
  1421. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  1422. { .role = "dbclk", .clk = "gpio6_dbck", },
  1423. };
  1424. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  1425. &omap3xxx_l4_per__gpio6,
  1426. };
  1427. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  1428. .name = "gpio6",
  1429. .mpu_irqs = omap3xxx_gpio6_irqs,
  1430. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
  1431. .main_clk = "gpio6_ick",
  1432. .opt_clks = gpio6_opt_clks,
  1433. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  1434. .prcm = {
  1435. .omap2 = {
  1436. .prcm_reg_id = 1,
  1437. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  1438. .module_offs = OMAP3430_PER_MOD,
  1439. .idlest_reg_id = 1,
  1440. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  1441. },
  1442. },
  1443. .slaves = omap3xxx_gpio6_slaves,
  1444. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  1445. .class = &omap3xxx_gpio_hwmod_class,
  1446. .dev_attr = &gpio_dev_attr,
  1447. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1448. };
  1449. /* dma_system -> L3 */
  1450. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  1451. .master = &omap3xxx_dma_system_hwmod,
  1452. .slave = &omap3xxx_l3_main_hwmod,
  1453. .clk = "core_l3_ick",
  1454. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1455. };
  1456. /* dma attributes */
  1457. static struct omap_dma_dev_attr dma_dev_attr = {
  1458. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1459. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1460. .lch_count = 32,
  1461. };
  1462. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  1463. .rev_offs = 0x0000,
  1464. .sysc_offs = 0x002c,
  1465. .syss_offs = 0x0028,
  1466. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1467. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1468. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  1469. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1470. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1471. .sysc_fields = &omap_hwmod_sysc_type1,
  1472. };
  1473. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  1474. .name = "dma",
  1475. .sysc = &omap3xxx_dma_sysc,
  1476. };
  1477. /* dma_system */
  1478. static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
  1479. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1480. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1481. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1482. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1483. };
  1484. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  1485. {
  1486. .pa_start = 0x48056000,
  1487. .pa_end = 0x4a0560ff,
  1488. .flags = ADDR_TYPE_RT
  1489. },
  1490. };
  1491. /* dma_system master ports */
  1492. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  1493. &omap3xxx_dma_system__l3,
  1494. };
  1495. /* l4_cfg -> dma_system */
  1496. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  1497. .master = &omap3xxx_l4_core_hwmod,
  1498. .slave = &omap3xxx_dma_system_hwmod,
  1499. .clk = "core_l4_ick",
  1500. .addr = omap3xxx_dma_system_addrs,
  1501. .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
  1502. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1503. };
  1504. /* dma_system slave ports */
  1505. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  1506. &omap3xxx_l4_core__dma_system,
  1507. };
  1508. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  1509. .name = "dma",
  1510. .class = &omap3xxx_dma_hwmod_class,
  1511. .mpu_irqs = omap3xxx_dma_system_irqs,
  1512. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
  1513. .main_clk = "core_l3_ick",
  1514. .prcm = {
  1515. .omap2 = {
  1516. .module_offs = CORE_MOD,
  1517. .prcm_reg_id = 1,
  1518. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1519. .idlest_reg_id = 1,
  1520. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1521. },
  1522. },
  1523. .slaves = omap3xxx_dma_system_slaves,
  1524. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  1525. .masters = omap3xxx_dma_system_masters,
  1526. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  1527. .dev_attr = &dma_dev_attr,
  1528. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1529. .flags = HWMOD_NO_IDLEST,
  1530. };
  1531. /* SR common */
  1532. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  1533. .clkact_shift = 20,
  1534. };
  1535. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  1536. .sysc_offs = 0x24,
  1537. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  1538. .clockact = CLOCKACT_TEST_ICLK,
  1539. .sysc_fields = &omap34xx_sr_sysc_fields,
  1540. };
  1541. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  1542. .name = "smartreflex",
  1543. .sysc = &omap34xx_sr_sysc,
  1544. .rev = 1,
  1545. };
  1546. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  1547. .sidle_shift = 24,
  1548. .enwkup_shift = 26
  1549. };
  1550. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  1551. .sysc_offs = 0x38,
  1552. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1553. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1554. SYSC_NO_CACHE),
  1555. .sysc_fields = &omap36xx_sr_sysc_fields,
  1556. };
  1557. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  1558. .name = "smartreflex",
  1559. .sysc = &omap36xx_sr_sysc,
  1560. .rev = 2,
  1561. };
  1562. /* SR1 */
  1563. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  1564. &omap3_l4_core__sr1,
  1565. };
  1566. static struct omap_hwmod omap34xx_sr1_hwmod = {
  1567. .name = "sr1_hwmod",
  1568. .class = &omap34xx_smartreflex_hwmod_class,
  1569. .main_clk = "sr1_fck",
  1570. .vdd_name = "mpu",
  1571. .prcm = {
  1572. .omap2 = {
  1573. .prcm_reg_id = 1,
  1574. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1575. .module_offs = WKUP_MOD,
  1576. .idlest_reg_id = 1,
  1577. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1578. },
  1579. },
  1580. .slaves = omap3_sr1_slaves,
  1581. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  1582. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  1583. CHIP_IS_OMAP3430ES3_0 |
  1584. CHIP_IS_OMAP3430ES3_1),
  1585. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1586. };
  1587. static struct omap_hwmod omap36xx_sr1_hwmod = {
  1588. .name = "sr1_hwmod",
  1589. .class = &omap36xx_smartreflex_hwmod_class,
  1590. .main_clk = "sr1_fck",
  1591. .vdd_name = "mpu",
  1592. .prcm = {
  1593. .omap2 = {
  1594. .prcm_reg_id = 1,
  1595. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1596. .module_offs = WKUP_MOD,
  1597. .idlest_reg_id = 1,
  1598. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1599. },
  1600. },
  1601. .slaves = omap3_sr1_slaves,
  1602. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  1603. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1604. };
  1605. /* SR2 */
  1606. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  1607. &omap3_l4_core__sr2,
  1608. };
  1609. static struct omap_hwmod omap34xx_sr2_hwmod = {
  1610. .name = "sr2_hwmod",
  1611. .class = &omap34xx_smartreflex_hwmod_class,
  1612. .main_clk = "sr2_fck",
  1613. .vdd_name = "core",
  1614. .prcm = {
  1615. .omap2 = {
  1616. .prcm_reg_id = 1,
  1617. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1618. .module_offs = WKUP_MOD,
  1619. .idlest_reg_id = 1,
  1620. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1621. },
  1622. },
  1623. .slaves = omap3_sr2_slaves,
  1624. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  1625. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  1626. CHIP_IS_OMAP3430ES3_0 |
  1627. CHIP_IS_OMAP3430ES3_1),
  1628. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1629. };
  1630. static struct omap_hwmod omap36xx_sr2_hwmod = {
  1631. .name = "sr2_hwmod",
  1632. .class = &omap36xx_smartreflex_hwmod_class,
  1633. .main_clk = "sr2_fck",
  1634. .vdd_name = "core",
  1635. .prcm = {
  1636. .omap2 = {
  1637. .prcm_reg_id = 1,
  1638. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1639. .module_offs = WKUP_MOD,
  1640. .idlest_reg_id = 1,
  1641. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1642. },
  1643. },
  1644. .slaves = omap3_sr2_slaves,
  1645. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  1646. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1647. };
  1648. /*
  1649. * 'mailbox' class
  1650. * mailbox module allowing communication between the on-chip processors
  1651. * using a queued mailbox-interrupt mechanism.
  1652. */
  1653. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  1654. .rev_offs = 0x000,
  1655. .sysc_offs = 0x010,
  1656. .syss_offs = 0x014,
  1657. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1658. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1659. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1660. .sysc_fields = &omap_hwmod_sysc_type1,
  1661. };
  1662. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  1663. .name = "mailbox",
  1664. .sysc = &omap3xxx_mailbox_sysc,
  1665. };
  1666. static struct omap_hwmod omap3xxx_mailbox_hwmod;
  1667. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  1668. { .irq = 26 },
  1669. };
  1670. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  1671. {
  1672. .pa_start = 0x48094000,
  1673. .pa_end = 0x480941ff,
  1674. .flags = ADDR_TYPE_RT,
  1675. },
  1676. };
  1677. /* l4_core -> mailbox */
  1678. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  1679. .master = &omap3xxx_l4_core_hwmod,
  1680. .slave = &omap3xxx_mailbox_hwmod,
  1681. .addr = omap3xxx_mailbox_addrs,
  1682. .addr_cnt = ARRAY_SIZE(omap3xxx_mailbox_addrs),
  1683. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1684. };
  1685. /* mailbox slave ports */
  1686. static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
  1687. &omap3xxx_l4_core__mailbox,
  1688. };
  1689. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  1690. .name = "mailbox",
  1691. .class = &omap3xxx_mailbox_hwmod_class,
  1692. .mpu_irqs = omap3xxx_mailbox_irqs,
  1693. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mailbox_irqs),
  1694. .main_clk = "mailboxes_ick",
  1695. .prcm = {
  1696. .omap2 = {
  1697. .prcm_reg_id = 1,
  1698. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  1699. .module_offs = CORE_MOD,
  1700. .idlest_reg_id = 1,
  1701. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  1702. },
  1703. },
  1704. .slaves = omap3xxx_mailbox_slaves,
  1705. .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
  1706. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1707. };
  1708. /* l4 core -> mcspi1 interface */
  1709. static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
  1710. {
  1711. .pa_start = 0x48098000,
  1712. .pa_end = 0x480980ff,
  1713. .flags = ADDR_TYPE_RT,
  1714. },
  1715. };
  1716. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  1717. .master = &omap3xxx_l4_core_hwmod,
  1718. .slave = &omap34xx_mcspi1,
  1719. .clk = "mcspi1_ick",
  1720. .addr = omap34xx_mcspi1_addr_space,
  1721. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
  1722. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1723. };
  1724. /* l4 core -> mcspi2 interface */
  1725. static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
  1726. {
  1727. .pa_start = 0x4809a000,
  1728. .pa_end = 0x4809a0ff,
  1729. .flags = ADDR_TYPE_RT,
  1730. },
  1731. };
  1732. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  1733. .master = &omap3xxx_l4_core_hwmod,
  1734. .slave = &omap34xx_mcspi2,
  1735. .clk = "mcspi2_ick",
  1736. .addr = omap34xx_mcspi2_addr_space,
  1737. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
  1738. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1739. };
  1740. /* l4 core -> mcspi3 interface */
  1741. static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
  1742. {
  1743. .pa_start = 0x480b8000,
  1744. .pa_end = 0x480b80ff,
  1745. .flags = ADDR_TYPE_RT,
  1746. },
  1747. };
  1748. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  1749. .master = &omap3xxx_l4_core_hwmod,
  1750. .slave = &omap34xx_mcspi3,
  1751. .clk = "mcspi3_ick",
  1752. .addr = omap34xx_mcspi3_addr_space,
  1753. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
  1754. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1755. };
  1756. /* l4 core -> mcspi4 interface */
  1757. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  1758. {
  1759. .pa_start = 0x480ba000,
  1760. .pa_end = 0x480ba0ff,
  1761. .flags = ADDR_TYPE_RT,
  1762. },
  1763. };
  1764. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  1765. .master = &omap3xxx_l4_core_hwmod,
  1766. .slave = &omap34xx_mcspi4,
  1767. .clk = "mcspi4_ick",
  1768. .addr = omap34xx_mcspi4_addr_space,
  1769. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
  1770. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1771. };
  1772. /*
  1773. * 'mcspi' class
  1774. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1775. * bus
  1776. */
  1777. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  1778. .rev_offs = 0x0000,
  1779. .sysc_offs = 0x0010,
  1780. .syss_offs = 0x0014,
  1781. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1782. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1783. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1784. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1785. .sysc_fields = &omap_hwmod_sysc_type1,
  1786. };
  1787. static struct omap_hwmod_class omap34xx_mcspi_class = {
  1788. .name = "mcspi",
  1789. .sysc = &omap34xx_mcspi_sysc,
  1790. .rev = OMAP3_MCSPI_REV,
  1791. };
  1792. /* mcspi1 */
  1793. static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
  1794. { .name = "irq", .irq = 65 },
  1795. };
  1796. static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
  1797. { .name = "tx0", .dma_req = 35 },
  1798. { .name = "rx0", .dma_req = 36 },
  1799. { .name = "tx1", .dma_req = 37 },
  1800. { .name = "rx1", .dma_req = 38 },
  1801. { .name = "tx2", .dma_req = 39 },
  1802. { .name = "rx2", .dma_req = 40 },
  1803. { .name = "tx3", .dma_req = 41 },
  1804. { .name = "rx3", .dma_req = 42 },
  1805. };
  1806. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  1807. &omap34xx_l4_core__mcspi1,
  1808. };
  1809. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1810. .num_chipselect = 4,
  1811. };
  1812. static struct omap_hwmod omap34xx_mcspi1 = {
  1813. .name = "mcspi1",
  1814. .mpu_irqs = omap34xx_mcspi1_mpu_irqs,
  1815. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs),
  1816. .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
  1817. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
  1818. .main_clk = "mcspi1_fck",
  1819. .prcm = {
  1820. .omap2 = {
  1821. .module_offs = CORE_MOD,
  1822. .prcm_reg_id = 1,
  1823. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  1824. .idlest_reg_id = 1,
  1825. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  1826. },
  1827. },
  1828. .slaves = omap34xx_mcspi1_slaves,
  1829. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  1830. .class = &omap34xx_mcspi_class,
  1831. .dev_attr = &omap_mcspi1_dev_attr,
  1832. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1833. };
  1834. /* mcspi2 */
  1835. static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
  1836. { .name = "irq", .irq = 66 },
  1837. };
  1838. static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
  1839. { .name = "tx0", .dma_req = 43 },
  1840. { .name = "rx0", .dma_req = 44 },
  1841. { .name = "tx1", .dma_req = 45 },
  1842. { .name = "rx1", .dma_req = 46 },
  1843. };
  1844. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  1845. &omap34xx_l4_core__mcspi2,
  1846. };
  1847. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1848. .num_chipselect = 2,
  1849. };
  1850. static struct omap_hwmod omap34xx_mcspi2 = {
  1851. .name = "mcspi2",
  1852. .mpu_irqs = omap34xx_mcspi2_mpu_irqs,
  1853. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs),
  1854. .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
  1855. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
  1856. .main_clk = "mcspi2_fck",
  1857. .prcm = {
  1858. .omap2 = {
  1859. .module_offs = CORE_MOD,
  1860. .prcm_reg_id = 1,
  1861. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  1862. .idlest_reg_id = 1,
  1863. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  1864. },
  1865. },
  1866. .slaves = omap34xx_mcspi2_slaves,
  1867. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  1868. .class = &omap34xx_mcspi_class,
  1869. .dev_attr = &omap_mcspi2_dev_attr,
  1870. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1871. };
  1872. /* mcspi3 */
  1873. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  1874. { .name = "irq", .irq = 91 }, /* 91 */
  1875. };
  1876. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  1877. { .name = "tx0", .dma_req = 15 },
  1878. { .name = "rx0", .dma_req = 16 },
  1879. { .name = "tx1", .dma_req = 23 },
  1880. { .name = "rx1", .dma_req = 24 },
  1881. };
  1882. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  1883. &omap34xx_l4_core__mcspi3,
  1884. };
  1885. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1886. .num_chipselect = 2,
  1887. };
  1888. static struct omap_hwmod omap34xx_mcspi3 = {
  1889. .name = "mcspi3",
  1890. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  1891. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
  1892. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  1893. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
  1894. .main_clk = "mcspi3_fck",
  1895. .prcm = {
  1896. .omap2 = {
  1897. .module_offs = CORE_MOD,
  1898. .prcm_reg_id = 1,
  1899. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  1900. .idlest_reg_id = 1,
  1901. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  1902. },
  1903. },
  1904. .slaves = omap34xx_mcspi3_slaves,
  1905. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  1906. .class = &omap34xx_mcspi_class,
  1907. .dev_attr = &omap_mcspi3_dev_attr,
  1908. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1909. };
  1910. /* SPI4 */
  1911. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  1912. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  1913. };
  1914. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  1915. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  1916. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  1917. };
  1918. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  1919. &omap34xx_l4_core__mcspi4,
  1920. };
  1921. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  1922. .num_chipselect = 1,
  1923. };
  1924. static struct omap_hwmod omap34xx_mcspi4 = {
  1925. .name = "mcspi4",
  1926. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  1927. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
  1928. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  1929. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
  1930. .main_clk = "mcspi4_fck",
  1931. .prcm = {
  1932. .omap2 = {
  1933. .module_offs = CORE_MOD,
  1934. .prcm_reg_id = 1,
  1935. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  1936. .idlest_reg_id = 1,
  1937. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  1938. },
  1939. },
  1940. .slaves = omap34xx_mcspi4_slaves,
  1941. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  1942. .class = &omap34xx_mcspi_class,
  1943. .dev_attr = &omap_mcspi4_dev_attr,
  1944. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1945. };
  1946. /*
  1947. * usbhsotg
  1948. */
  1949. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  1950. .rev_offs = 0x0400,
  1951. .sysc_offs = 0x0404,
  1952. .syss_offs = 0x0408,
  1953. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1954. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1955. SYSC_HAS_AUTOIDLE),
  1956. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1957. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1958. .sysc_fields = &omap_hwmod_sysc_type1,
  1959. };
  1960. static struct omap_hwmod_class usbotg_class = {
  1961. .name = "usbotg",
  1962. .sysc = &omap3xxx_usbhsotg_sysc,
  1963. };
  1964. /* usb_otg_hs */
  1965. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  1966. { .name = "mc", .irq = 92 },
  1967. { .name = "dma", .irq = 93 },
  1968. };
  1969. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  1970. .name = "usb_otg_hs",
  1971. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  1972. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
  1973. .main_clk = "hsotgusb_ick",
  1974. .prcm = {
  1975. .omap2 = {
  1976. .prcm_reg_id = 1,
  1977. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  1978. .module_offs = CORE_MOD,
  1979. .idlest_reg_id = 1,
  1980. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  1981. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  1982. },
  1983. },
  1984. .masters = omap3xxx_usbhsotg_masters,
  1985. .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
  1986. .slaves = omap3xxx_usbhsotg_slaves,
  1987. .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
  1988. .class = &usbotg_class,
  1989. /*
  1990. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1991. * broken when autoidle is enabled
  1992. * workaround is to disable the autoidle bit at module level.
  1993. */
  1994. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1995. | HWMOD_SWSUP_MSTANDBY,
  1996. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  1997. };
  1998. /* usb_otg_hs */
  1999. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  2000. { .name = "mc", .irq = 71 },
  2001. };
  2002. static struct omap_hwmod_class am35xx_usbotg_class = {
  2003. .name = "am35xx_usbotg",
  2004. .sysc = NULL,
  2005. };
  2006. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  2007. .name = "am35x_otg_hs",
  2008. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  2009. .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs),
  2010. .main_clk = NULL,
  2011. .prcm = {
  2012. .omap2 = {
  2013. },
  2014. },
  2015. .masters = am35xx_usbhsotg_masters,
  2016. .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
  2017. .slaves = am35xx_usbhsotg_slaves,
  2018. .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
  2019. .class = &am35xx_usbotg_class,
  2020. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
  2021. };
  2022. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  2023. &omap3xxx_l3_main_hwmod,
  2024. &omap3xxx_l4_core_hwmod,
  2025. &omap3xxx_l4_per_hwmod,
  2026. &omap3xxx_l4_wkup_hwmod,
  2027. &omap3xxx_mpu_hwmod,
  2028. &omap3xxx_iva_hwmod,
  2029. &omap3xxx_wd_timer2_hwmod,
  2030. &omap3xxx_uart1_hwmod,
  2031. &omap3xxx_uart2_hwmod,
  2032. &omap3xxx_uart3_hwmod,
  2033. &omap3xxx_uart4_hwmod,
  2034. /* dss class */
  2035. &omap3430es1_dss_core_hwmod,
  2036. &omap3xxx_dss_core_hwmod,
  2037. &omap3xxx_dss_dispc_hwmod,
  2038. &omap3xxx_dss_dsi1_hwmod,
  2039. &omap3xxx_dss_rfbi_hwmod,
  2040. &omap3xxx_dss_venc_hwmod,
  2041. /* i2c class */
  2042. &omap3xxx_i2c1_hwmod,
  2043. &omap3xxx_i2c2_hwmod,
  2044. &omap3xxx_i2c3_hwmod,
  2045. &omap34xx_sr1_hwmod,
  2046. &omap34xx_sr2_hwmod,
  2047. &omap36xx_sr1_hwmod,
  2048. &omap36xx_sr2_hwmod,
  2049. /* gpio class */
  2050. &omap3xxx_gpio1_hwmod,
  2051. &omap3xxx_gpio2_hwmod,
  2052. &omap3xxx_gpio3_hwmod,
  2053. &omap3xxx_gpio4_hwmod,
  2054. &omap3xxx_gpio5_hwmod,
  2055. &omap3xxx_gpio6_hwmod,
  2056. /* dma_system class*/
  2057. &omap3xxx_dma_system_hwmod,
  2058. /* mailbox class */
  2059. &omap3xxx_mailbox_hwmod,
  2060. /* mcspi class */
  2061. &omap34xx_mcspi1,
  2062. &omap34xx_mcspi2,
  2063. &omap34xx_mcspi3,
  2064. &omap34xx_mcspi4,
  2065. /* usbotg class */
  2066. &omap3xxx_usbhsotg_hwmod,
  2067. /* usbotg for am35x */
  2068. &am35xx_usbhsotg_hwmod,
  2069. NULL,
  2070. };
  2071. int __init omap3xxx_hwmod_init(void)
  2072. {
  2073. return omap_hwmod_init(omap3xxx_hwmods);
  2074. }