omap_hwmod_2430_data.c 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 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. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include <plat/serial.h>
  19. #include <plat/i2c.h>
  20. #include <plat/gpio.h>
  21. #include <plat/mcbsp.h>
  22. #include <plat/mcspi.h>
  23. #include <plat/l3_2xxx.h>
  24. #include "omap_hwmod_common_data.h"
  25. #include "prm-regbits-24xx.h"
  26. #include "cm-regbits-24xx.h"
  27. #include "wd_timer.h"
  28. /*
  29. * OMAP2430 hardware module integration data
  30. *
  31. * ALl of the data in this section should be autogeneratable from the
  32. * TI hardware database or other technical documentation. Data that
  33. * is driver-specific or driver-kernel integration-specific belongs
  34. * elsewhere.
  35. */
  36. static struct omap_hwmod omap2430_mpu_hwmod;
  37. static struct omap_hwmod omap2430_iva_hwmod;
  38. static struct omap_hwmod omap2430_l3_main_hwmod;
  39. static struct omap_hwmod omap2430_l4_core_hwmod;
  40. static struct omap_hwmod omap2430_dss_core_hwmod;
  41. static struct omap_hwmod omap2430_dss_dispc_hwmod;
  42. static struct omap_hwmod omap2430_dss_rfbi_hwmod;
  43. static struct omap_hwmod omap2430_dss_venc_hwmod;
  44. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  45. static struct omap_hwmod omap2430_gpio1_hwmod;
  46. static struct omap_hwmod omap2430_gpio2_hwmod;
  47. static struct omap_hwmod omap2430_gpio3_hwmod;
  48. static struct omap_hwmod omap2430_gpio4_hwmod;
  49. static struct omap_hwmod omap2430_gpio5_hwmod;
  50. static struct omap_hwmod omap2430_dma_system_hwmod;
  51. static struct omap_hwmod omap2430_mcbsp1_hwmod;
  52. static struct omap_hwmod omap2430_mcbsp2_hwmod;
  53. static struct omap_hwmod omap2430_mcbsp3_hwmod;
  54. static struct omap_hwmod omap2430_mcbsp4_hwmod;
  55. static struct omap_hwmod omap2430_mcbsp5_hwmod;
  56. static struct omap_hwmod omap2430_mcspi1_hwmod;
  57. static struct omap_hwmod omap2430_mcspi2_hwmod;
  58. static struct omap_hwmod omap2430_mcspi3_hwmod;
  59. /* L3 -> L4_CORE interface */
  60. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  61. .master = &omap2430_l3_main_hwmod,
  62. .slave = &omap2430_l4_core_hwmod,
  63. .user = OCP_USER_MPU | OCP_USER_SDMA,
  64. };
  65. /* MPU -> L3 interface */
  66. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  67. .master = &omap2430_mpu_hwmod,
  68. .slave = &omap2430_l3_main_hwmod,
  69. .user = OCP_USER_MPU,
  70. };
  71. /* Slave interfaces on the L3 interconnect */
  72. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  73. &omap2430_mpu__l3_main,
  74. };
  75. /* DSS -> l3 */
  76. static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
  77. .master = &omap2430_dss_core_hwmod,
  78. .slave = &omap2430_l3_main_hwmod,
  79. .fw = {
  80. .omap2 = {
  81. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  82. .flags = OMAP_FIREWALL_L3,
  83. }
  84. },
  85. .user = OCP_USER_MPU | OCP_USER_SDMA,
  86. };
  87. /* Master interfaces on the L3 interconnect */
  88. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  89. &omap2430_l3_main__l4_core,
  90. };
  91. /* L3 */
  92. static struct omap_hwmod omap2430_l3_main_hwmod = {
  93. .name = "l3_main",
  94. .class = &l3_hwmod_class,
  95. .masters = omap2430_l3_main_masters,
  96. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  97. .slaves = omap2430_l3_main_slaves,
  98. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  99. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  100. .flags = HWMOD_NO_IDLEST,
  101. };
  102. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  103. static struct omap_hwmod omap2430_uart1_hwmod;
  104. static struct omap_hwmod omap2430_uart2_hwmod;
  105. static struct omap_hwmod omap2430_uart3_hwmod;
  106. static struct omap_hwmod omap2430_i2c1_hwmod;
  107. static struct omap_hwmod omap2430_i2c2_hwmod;
  108. static struct omap_hwmod omap2430_usbhsotg_hwmod;
  109. /* l3_core -> usbhsotg interface */
  110. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  111. .master = &omap2430_usbhsotg_hwmod,
  112. .slave = &omap2430_l3_main_hwmod,
  113. .clk = "core_l3_ck",
  114. .user = OCP_USER_MPU,
  115. };
  116. /* I2C IP block address space length (in bytes) */
  117. #define OMAP2_I2C_AS_LEN 128
  118. /* L4 CORE -> I2C1 interface */
  119. static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
  120. {
  121. .pa_start = 0x48070000,
  122. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  123. .flags = ADDR_TYPE_RT,
  124. },
  125. };
  126. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  127. .master = &omap2430_l4_core_hwmod,
  128. .slave = &omap2430_i2c1_hwmod,
  129. .clk = "i2c1_ick",
  130. .addr = omap2430_i2c1_addr_space,
  131. .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space),
  132. .user = OCP_USER_MPU | OCP_USER_SDMA,
  133. };
  134. /* L4 CORE -> I2C2 interface */
  135. static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
  136. {
  137. .pa_start = 0x48072000,
  138. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  139. .flags = ADDR_TYPE_RT,
  140. },
  141. };
  142. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  143. .master = &omap2430_l4_core_hwmod,
  144. .slave = &omap2430_i2c2_hwmod,
  145. .clk = "i2c2_ick",
  146. .addr = omap2430_i2c2_addr_space,
  147. .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space),
  148. .user = OCP_USER_MPU | OCP_USER_SDMA,
  149. };
  150. /* L4_CORE -> L4_WKUP interface */
  151. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  152. .master = &omap2430_l4_core_hwmod,
  153. .slave = &omap2430_l4_wkup_hwmod,
  154. .user = OCP_USER_MPU | OCP_USER_SDMA,
  155. };
  156. /* L4 CORE -> UART1 interface */
  157. static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
  158. {
  159. .pa_start = OMAP2_UART1_BASE,
  160. .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
  161. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  162. },
  163. };
  164. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  165. .master = &omap2430_l4_core_hwmod,
  166. .slave = &omap2430_uart1_hwmod,
  167. .clk = "uart1_ick",
  168. .addr = omap2430_uart1_addr_space,
  169. .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
  170. .user = OCP_USER_MPU | OCP_USER_SDMA,
  171. };
  172. /* L4 CORE -> UART2 interface */
  173. static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
  174. {
  175. .pa_start = OMAP2_UART2_BASE,
  176. .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
  177. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  178. },
  179. };
  180. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  181. .master = &omap2430_l4_core_hwmod,
  182. .slave = &omap2430_uart2_hwmod,
  183. .clk = "uart2_ick",
  184. .addr = omap2430_uart2_addr_space,
  185. .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
  186. .user = OCP_USER_MPU | OCP_USER_SDMA,
  187. };
  188. /* L4 PER -> UART3 interface */
  189. static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
  190. {
  191. .pa_start = OMAP2_UART3_BASE,
  192. .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
  193. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  194. },
  195. };
  196. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  197. .master = &omap2430_l4_core_hwmod,
  198. .slave = &omap2430_uart3_hwmod,
  199. .clk = "uart3_ick",
  200. .addr = omap2430_uart3_addr_space,
  201. .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space),
  202. .user = OCP_USER_MPU | OCP_USER_SDMA,
  203. };
  204. /*
  205. * usbhsotg interface data
  206. */
  207. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  208. {
  209. .pa_start = OMAP243X_HS_BASE,
  210. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  211. .flags = ADDR_TYPE_RT
  212. },
  213. };
  214. /* l4_core ->usbhsotg interface */
  215. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  216. .master = &omap2430_l4_core_hwmod,
  217. .slave = &omap2430_usbhsotg_hwmod,
  218. .clk = "usb_l4_ick",
  219. .addr = omap2430_usbhsotg_addrs,
  220. .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs),
  221. .user = OCP_USER_MPU,
  222. };
  223. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
  224. &omap2430_usbhsotg__l3,
  225. };
  226. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
  227. &omap2430_l4_core__usbhsotg,
  228. };
  229. /* Slave interfaces on the L4_CORE interconnect */
  230. static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
  231. &omap2430_l3_main__l4_core,
  232. };
  233. /* Master interfaces on the L4_CORE interconnect */
  234. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  235. &omap2430_l4_core__l4_wkup,
  236. };
  237. /* L4 CORE */
  238. static struct omap_hwmod omap2430_l4_core_hwmod = {
  239. .name = "l4_core",
  240. .class = &l4_hwmod_class,
  241. .masters = omap2430_l4_core_masters,
  242. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  243. .slaves = omap2430_l4_core_slaves,
  244. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  245. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  246. .flags = HWMOD_NO_IDLEST,
  247. };
  248. /* Slave interfaces on the L4_WKUP interconnect */
  249. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  250. &omap2430_l4_core__l4_wkup,
  251. &omap2_l4_core__uart1,
  252. &omap2_l4_core__uart2,
  253. &omap2_l4_core__uart3,
  254. };
  255. /* Master interfaces on the L4_WKUP interconnect */
  256. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  257. };
  258. /* l4 core -> mcspi1 interface */
  259. static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = {
  260. {
  261. .pa_start = 0x48098000,
  262. .pa_end = 0x480980ff,
  263. .flags = ADDR_TYPE_RT,
  264. },
  265. };
  266. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
  267. .master = &omap2430_l4_core_hwmod,
  268. .slave = &omap2430_mcspi1_hwmod,
  269. .clk = "mcspi1_ick",
  270. .addr = omap2430_mcspi1_addr_space,
  271. .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space),
  272. .user = OCP_USER_MPU | OCP_USER_SDMA,
  273. };
  274. /* l4 core -> mcspi2 interface */
  275. static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = {
  276. {
  277. .pa_start = 0x4809a000,
  278. .pa_end = 0x4809a0ff,
  279. .flags = ADDR_TYPE_RT,
  280. },
  281. };
  282. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
  283. .master = &omap2430_l4_core_hwmod,
  284. .slave = &omap2430_mcspi2_hwmod,
  285. .clk = "mcspi2_ick",
  286. .addr = omap2430_mcspi2_addr_space,
  287. .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space),
  288. .user = OCP_USER_MPU | OCP_USER_SDMA,
  289. };
  290. /* l4 core -> mcspi3 interface */
  291. static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
  292. {
  293. .pa_start = 0x480b8000,
  294. .pa_end = 0x480b80ff,
  295. .flags = ADDR_TYPE_RT,
  296. },
  297. };
  298. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  299. .master = &omap2430_l4_core_hwmod,
  300. .slave = &omap2430_mcspi3_hwmod,
  301. .clk = "mcspi3_ick",
  302. .addr = omap2430_mcspi3_addr_space,
  303. .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space),
  304. .user = OCP_USER_MPU | OCP_USER_SDMA,
  305. };
  306. /* L4 WKUP */
  307. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  308. .name = "l4_wkup",
  309. .class = &l4_hwmod_class,
  310. .masters = omap2430_l4_wkup_masters,
  311. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  312. .slaves = omap2430_l4_wkup_slaves,
  313. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  314. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  315. .flags = HWMOD_NO_IDLEST,
  316. };
  317. /* Master interfaces on the MPU device */
  318. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  319. &omap2430_mpu__l3_main,
  320. };
  321. /* MPU */
  322. static struct omap_hwmod omap2430_mpu_hwmod = {
  323. .name = "mpu",
  324. .class = &mpu_hwmod_class,
  325. .main_clk = "mpu_ck",
  326. .masters = omap2430_mpu_masters,
  327. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  328. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  329. };
  330. /*
  331. * IVA2_1 interface data
  332. */
  333. /* IVA2 <- L3 interface */
  334. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  335. .master = &omap2430_l3_main_hwmod,
  336. .slave = &omap2430_iva_hwmod,
  337. .clk = "dsp_fck",
  338. .user = OCP_USER_MPU | OCP_USER_SDMA,
  339. };
  340. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  341. &omap2430_l3__iva,
  342. };
  343. /*
  344. * IVA2 (IVA2)
  345. */
  346. static struct omap_hwmod omap2430_iva_hwmod = {
  347. .name = "iva",
  348. .class = &iva_hwmod_class,
  349. .masters = omap2430_iva_masters,
  350. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  351. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  352. };
  353. /* l4_wkup -> wd_timer2 */
  354. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  355. {
  356. .pa_start = 0x49016000,
  357. .pa_end = 0x4901607f,
  358. .flags = ADDR_TYPE_RT
  359. },
  360. };
  361. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  362. .master = &omap2430_l4_wkup_hwmod,
  363. .slave = &omap2430_wd_timer2_hwmod,
  364. .clk = "mpu_wdt_ick",
  365. .addr = omap2430_wd_timer2_addrs,
  366. .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
  367. .user = OCP_USER_MPU | OCP_USER_SDMA,
  368. };
  369. /*
  370. * 'wd_timer' class
  371. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  372. * overflow condition
  373. */
  374. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  375. .rev_offs = 0x0,
  376. .sysc_offs = 0x0010,
  377. .syss_offs = 0x0014,
  378. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  379. SYSC_HAS_AUTOIDLE),
  380. .sysc_fields = &omap_hwmod_sysc_type1,
  381. };
  382. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  383. .name = "wd_timer",
  384. .sysc = &omap2430_wd_timer_sysc,
  385. .pre_shutdown = &omap2_wd_timer_disable
  386. };
  387. /* wd_timer2 */
  388. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  389. &omap2430_l4_wkup__wd_timer2,
  390. };
  391. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  392. .name = "wd_timer2",
  393. .class = &omap2430_wd_timer_hwmod_class,
  394. .main_clk = "mpu_wdt_fck",
  395. .prcm = {
  396. .omap2 = {
  397. .prcm_reg_id = 1,
  398. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  399. .module_offs = WKUP_MOD,
  400. .idlest_reg_id = 1,
  401. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  402. },
  403. },
  404. .slaves = omap2430_wd_timer2_slaves,
  405. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  406. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  407. };
  408. /* UART */
  409. static struct omap_hwmod_class_sysconfig uart_sysc = {
  410. .rev_offs = 0x50,
  411. .sysc_offs = 0x54,
  412. .syss_offs = 0x58,
  413. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  414. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  415. SYSC_HAS_AUTOIDLE),
  416. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  417. .sysc_fields = &omap_hwmod_sysc_type1,
  418. };
  419. static struct omap_hwmod_class uart_class = {
  420. .name = "uart",
  421. .sysc = &uart_sysc,
  422. };
  423. /* UART1 */
  424. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  425. { .irq = INT_24XX_UART1_IRQ, },
  426. };
  427. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  428. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  429. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  430. };
  431. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  432. &omap2_l4_core__uart1,
  433. };
  434. static struct omap_hwmod omap2430_uart1_hwmod = {
  435. .name = "uart1",
  436. .mpu_irqs = uart1_mpu_irqs,
  437. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  438. .sdma_reqs = uart1_sdma_reqs,
  439. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  440. .main_clk = "uart1_fck",
  441. .prcm = {
  442. .omap2 = {
  443. .module_offs = CORE_MOD,
  444. .prcm_reg_id = 1,
  445. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  446. .idlest_reg_id = 1,
  447. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  448. },
  449. },
  450. .slaves = omap2430_uart1_slaves,
  451. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  452. .class = &uart_class,
  453. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  454. };
  455. /* UART2 */
  456. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  457. { .irq = INT_24XX_UART2_IRQ, },
  458. };
  459. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  460. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  461. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  462. };
  463. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  464. &omap2_l4_core__uart2,
  465. };
  466. static struct omap_hwmod omap2430_uart2_hwmod = {
  467. .name = "uart2",
  468. .mpu_irqs = uart2_mpu_irqs,
  469. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  470. .sdma_reqs = uart2_sdma_reqs,
  471. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  472. .main_clk = "uart2_fck",
  473. .prcm = {
  474. .omap2 = {
  475. .module_offs = CORE_MOD,
  476. .prcm_reg_id = 1,
  477. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  478. .idlest_reg_id = 1,
  479. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  480. },
  481. },
  482. .slaves = omap2430_uart2_slaves,
  483. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  484. .class = &uart_class,
  485. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  486. };
  487. /* UART3 */
  488. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  489. { .irq = INT_24XX_UART3_IRQ, },
  490. };
  491. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  492. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  493. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  494. };
  495. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  496. &omap2_l4_core__uart3,
  497. };
  498. static struct omap_hwmod omap2430_uart3_hwmod = {
  499. .name = "uart3",
  500. .mpu_irqs = uart3_mpu_irqs,
  501. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  502. .sdma_reqs = uart3_sdma_reqs,
  503. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  504. .main_clk = "uart3_fck",
  505. .prcm = {
  506. .omap2 = {
  507. .module_offs = CORE_MOD,
  508. .prcm_reg_id = 2,
  509. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  510. .idlest_reg_id = 2,
  511. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  512. },
  513. },
  514. .slaves = omap2430_uart3_slaves,
  515. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  516. .class = &uart_class,
  517. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  518. };
  519. /*
  520. * 'dss' class
  521. * display sub-system
  522. */
  523. static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
  524. .rev_offs = 0x0000,
  525. .sysc_offs = 0x0010,
  526. .syss_offs = 0x0014,
  527. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  528. .sysc_fields = &omap_hwmod_sysc_type1,
  529. };
  530. static struct omap_hwmod_class omap2430_dss_hwmod_class = {
  531. .name = "dss",
  532. .sysc = &omap2430_dss_sysc,
  533. };
  534. /* dss */
  535. static struct omap_hwmod_irq_info omap2430_dss_irqs[] = {
  536. { .irq = 25 },
  537. };
  538. static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
  539. { .name = "dispc", .dma_req = 5 },
  540. };
  541. /* dss */
  542. /* dss master ports */
  543. static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
  544. &omap2430_dss__l3,
  545. };
  546. static struct omap_hwmod_addr_space omap2430_dss_addrs[] = {
  547. {
  548. .pa_start = 0x48050000,
  549. .pa_end = 0x480503FF,
  550. .flags = ADDR_TYPE_RT
  551. },
  552. };
  553. /* l4_core -> dss */
  554. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  555. .master = &omap2430_l4_core_hwmod,
  556. .slave = &omap2430_dss_core_hwmod,
  557. .clk = "dss_ick",
  558. .addr = omap2430_dss_addrs,
  559. .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs),
  560. .user = OCP_USER_MPU | OCP_USER_SDMA,
  561. };
  562. /* dss slave ports */
  563. static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
  564. &omap2430_l4_core__dss,
  565. };
  566. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  567. { .role = "tv_clk", .clk = "dss_54m_fck" },
  568. { .role = "sys_clk", .clk = "dss2_fck" },
  569. };
  570. static struct omap_hwmod omap2430_dss_core_hwmod = {
  571. .name = "dss_core",
  572. .class = &omap2430_dss_hwmod_class,
  573. .main_clk = "dss1_fck", /* instead of dss_fck */
  574. .mpu_irqs = omap2430_dss_irqs,
  575. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dss_irqs),
  576. .sdma_reqs = omap2430_dss_sdma_chs,
  577. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
  578. .prcm = {
  579. .omap2 = {
  580. .prcm_reg_id = 1,
  581. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  582. .module_offs = CORE_MOD,
  583. .idlest_reg_id = 1,
  584. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  585. },
  586. },
  587. .opt_clks = dss_opt_clks,
  588. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  589. .slaves = omap2430_dss_slaves,
  590. .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
  591. .masters = omap2430_dss_masters,
  592. .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
  593. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  594. .flags = HWMOD_NO_IDLEST,
  595. };
  596. /*
  597. * 'dispc' class
  598. * display controller
  599. */
  600. static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
  601. .rev_offs = 0x0000,
  602. .sysc_offs = 0x0010,
  603. .syss_offs = 0x0014,
  604. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  605. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  606. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  607. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  608. .sysc_fields = &omap_hwmod_sysc_type1,
  609. };
  610. static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
  611. .name = "dispc",
  612. .sysc = &omap2430_dispc_sysc,
  613. };
  614. static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = {
  615. {
  616. .pa_start = 0x48050400,
  617. .pa_end = 0x480507FF,
  618. .flags = ADDR_TYPE_RT
  619. },
  620. };
  621. /* l4_core -> dss_dispc */
  622. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  623. .master = &omap2430_l4_core_hwmod,
  624. .slave = &omap2430_dss_dispc_hwmod,
  625. .clk = "dss_ick",
  626. .addr = omap2430_dss_dispc_addrs,
  627. .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs),
  628. .user = OCP_USER_MPU | OCP_USER_SDMA,
  629. };
  630. /* dss_dispc slave ports */
  631. static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
  632. &omap2430_l4_core__dss_dispc,
  633. };
  634. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  635. .name = "dss_dispc",
  636. .class = &omap2430_dispc_hwmod_class,
  637. .main_clk = "dss1_fck",
  638. .prcm = {
  639. .omap2 = {
  640. .prcm_reg_id = 1,
  641. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  642. .module_offs = CORE_MOD,
  643. .idlest_reg_id = 1,
  644. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  645. },
  646. },
  647. .slaves = omap2430_dss_dispc_slaves,
  648. .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
  649. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  650. .flags = HWMOD_NO_IDLEST,
  651. };
  652. /*
  653. * 'rfbi' class
  654. * remote frame buffer interface
  655. */
  656. static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
  657. .rev_offs = 0x0000,
  658. .sysc_offs = 0x0010,
  659. .syss_offs = 0x0014,
  660. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  661. SYSC_HAS_AUTOIDLE),
  662. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  663. .sysc_fields = &omap_hwmod_sysc_type1,
  664. };
  665. static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
  666. .name = "rfbi",
  667. .sysc = &omap2430_rfbi_sysc,
  668. };
  669. static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = {
  670. {
  671. .pa_start = 0x48050800,
  672. .pa_end = 0x48050BFF,
  673. .flags = ADDR_TYPE_RT
  674. },
  675. };
  676. /* l4_core -> dss_rfbi */
  677. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  678. .master = &omap2430_l4_core_hwmod,
  679. .slave = &omap2430_dss_rfbi_hwmod,
  680. .clk = "dss_ick",
  681. .addr = omap2430_dss_rfbi_addrs,
  682. .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs),
  683. .user = OCP_USER_MPU | OCP_USER_SDMA,
  684. };
  685. /* dss_rfbi slave ports */
  686. static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
  687. &omap2430_l4_core__dss_rfbi,
  688. };
  689. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  690. .name = "dss_rfbi",
  691. .class = &omap2430_rfbi_hwmod_class,
  692. .main_clk = "dss1_fck",
  693. .prcm = {
  694. .omap2 = {
  695. .prcm_reg_id = 1,
  696. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  697. .module_offs = CORE_MOD,
  698. },
  699. },
  700. .slaves = omap2430_dss_rfbi_slaves,
  701. .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
  702. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  703. .flags = HWMOD_NO_IDLEST,
  704. };
  705. /*
  706. * 'venc' class
  707. * video encoder
  708. */
  709. static struct omap_hwmod_class omap2430_venc_hwmod_class = {
  710. .name = "venc",
  711. };
  712. /* dss_venc */
  713. static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = {
  714. {
  715. .pa_start = 0x48050C00,
  716. .pa_end = 0x48050FFF,
  717. .flags = ADDR_TYPE_RT
  718. },
  719. };
  720. /* l4_core -> dss_venc */
  721. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  722. .master = &omap2430_l4_core_hwmod,
  723. .slave = &omap2430_dss_venc_hwmod,
  724. .clk = "dss_54m_fck",
  725. .addr = omap2430_dss_venc_addrs,
  726. .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs),
  727. .user = OCP_USER_MPU | OCP_USER_SDMA,
  728. };
  729. /* dss_venc slave ports */
  730. static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
  731. &omap2430_l4_core__dss_venc,
  732. };
  733. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  734. .name = "dss_venc",
  735. .class = &omap2430_venc_hwmod_class,
  736. .main_clk = "dss1_fck",
  737. .prcm = {
  738. .omap2 = {
  739. .prcm_reg_id = 1,
  740. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  741. .module_offs = CORE_MOD,
  742. },
  743. },
  744. .slaves = omap2430_dss_venc_slaves,
  745. .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
  746. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  747. .flags = HWMOD_NO_IDLEST,
  748. };
  749. /* I2C common */
  750. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  751. .rev_offs = 0x00,
  752. .sysc_offs = 0x20,
  753. .syss_offs = 0x10,
  754. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  755. .sysc_fields = &omap_hwmod_sysc_type1,
  756. };
  757. static struct omap_hwmod_class i2c_class = {
  758. .name = "i2c",
  759. .sysc = &i2c_sysc,
  760. };
  761. static struct omap_i2c_dev_attr i2c_dev_attr = {
  762. .fifo_depth = 8, /* bytes */
  763. };
  764. /* I2C1 */
  765. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  766. { .irq = INT_24XX_I2C1_IRQ, },
  767. };
  768. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  769. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  770. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  771. };
  772. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  773. &omap2430_l4_core__i2c1,
  774. };
  775. static struct omap_hwmod omap2430_i2c1_hwmod = {
  776. .name = "i2c1",
  777. .mpu_irqs = i2c1_mpu_irqs,
  778. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  779. .sdma_reqs = i2c1_sdma_reqs,
  780. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  781. .main_clk = "i2chs1_fck",
  782. .prcm = {
  783. .omap2 = {
  784. /*
  785. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  786. * I2CHS IP's do not follow the usual pattern.
  787. * prcm_reg_id alone cannot be used to program
  788. * the iclk and fclk. Needs to be handled using
  789. * additonal flags when clk handling is moved
  790. * to hwmod framework.
  791. */
  792. .module_offs = CORE_MOD,
  793. .prcm_reg_id = 1,
  794. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  795. .idlest_reg_id = 1,
  796. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  797. },
  798. },
  799. .slaves = omap2430_i2c1_slaves,
  800. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  801. .class = &i2c_class,
  802. .dev_attr = &i2c_dev_attr,
  803. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  804. };
  805. /* I2C2 */
  806. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  807. { .irq = INT_24XX_I2C2_IRQ, },
  808. };
  809. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  810. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  811. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  812. };
  813. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  814. &omap2430_l4_core__i2c2,
  815. };
  816. static struct omap_hwmod omap2430_i2c2_hwmod = {
  817. .name = "i2c2",
  818. .mpu_irqs = i2c2_mpu_irqs,
  819. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  820. .sdma_reqs = i2c2_sdma_reqs,
  821. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  822. .main_clk = "i2chs2_fck",
  823. .prcm = {
  824. .omap2 = {
  825. .module_offs = CORE_MOD,
  826. .prcm_reg_id = 1,
  827. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  828. .idlest_reg_id = 1,
  829. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  830. },
  831. },
  832. .slaves = omap2430_i2c2_slaves,
  833. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  834. .class = &i2c_class,
  835. .dev_attr = &i2c_dev_attr,
  836. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  837. };
  838. /* l4_wkup -> gpio1 */
  839. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  840. {
  841. .pa_start = 0x4900C000,
  842. .pa_end = 0x4900C1ff,
  843. .flags = ADDR_TYPE_RT
  844. },
  845. };
  846. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  847. .master = &omap2430_l4_wkup_hwmod,
  848. .slave = &omap2430_gpio1_hwmod,
  849. .clk = "gpios_ick",
  850. .addr = omap2430_gpio1_addr_space,
  851. .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
  852. .user = OCP_USER_MPU | OCP_USER_SDMA,
  853. };
  854. /* l4_wkup -> gpio2 */
  855. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  856. {
  857. .pa_start = 0x4900E000,
  858. .pa_end = 0x4900E1ff,
  859. .flags = ADDR_TYPE_RT
  860. },
  861. };
  862. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  863. .master = &omap2430_l4_wkup_hwmod,
  864. .slave = &omap2430_gpio2_hwmod,
  865. .clk = "gpios_ick",
  866. .addr = omap2430_gpio2_addr_space,
  867. .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
  868. .user = OCP_USER_MPU | OCP_USER_SDMA,
  869. };
  870. /* l4_wkup -> gpio3 */
  871. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  872. {
  873. .pa_start = 0x49010000,
  874. .pa_end = 0x490101ff,
  875. .flags = ADDR_TYPE_RT
  876. },
  877. };
  878. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  879. .master = &omap2430_l4_wkup_hwmod,
  880. .slave = &omap2430_gpio3_hwmod,
  881. .clk = "gpios_ick",
  882. .addr = omap2430_gpio3_addr_space,
  883. .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
  884. .user = OCP_USER_MPU | OCP_USER_SDMA,
  885. };
  886. /* l4_wkup -> gpio4 */
  887. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  888. {
  889. .pa_start = 0x49012000,
  890. .pa_end = 0x490121ff,
  891. .flags = ADDR_TYPE_RT
  892. },
  893. };
  894. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  895. .master = &omap2430_l4_wkup_hwmod,
  896. .slave = &omap2430_gpio4_hwmod,
  897. .clk = "gpios_ick",
  898. .addr = omap2430_gpio4_addr_space,
  899. .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
  900. .user = OCP_USER_MPU | OCP_USER_SDMA,
  901. };
  902. /* l4_core -> gpio5 */
  903. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  904. {
  905. .pa_start = 0x480B6000,
  906. .pa_end = 0x480B61ff,
  907. .flags = ADDR_TYPE_RT
  908. },
  909. };
  910. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  911. .master = &omap2430_l4_core_hwmod,
  912. .slave = &omap2430_gpio5_hwmod,
  913. .clk = "gpio5_ick",
  914. .addr = omap2430_gpio5_addr_space,
  915. .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
  916. .user = OCP_USER_MPU | OCP_USER_SDMA,
  917. };
  918. /* gpio dev_attr */
  919. static struct omap_gpio_dev_attr gpio_dev_attr = {
  920. .bank_width = 32,
  921. .dbck_flag = false,
  922. };
  923. static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
  924. .rev_offs = 0x0000,
  925. .sysc_offs = 0x0010,
  926. .syss_offs = 0x0014,
  927. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  928. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  929. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  930. .sysc_fields = &omap_hwmod_sysc_type1,
  931. };
  932. /*
  933. * 'gpio' class
  934. * general purpose io module
  935. */
  936. static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
  937. .name = "gpio",
  938. .sysc = &omap243x_gpio_sysc,
  939. .rev = 0,
  940. };
  941. /* gpio1 */
  942. static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
  943. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  944. };
  945. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  946. &omap2430_l4_wkup__gpio1,
  947. };
  948. static struct omap_hwmod omap2430_gpio1_hwmod = {
  949. .name = "gpio1",
  950. .mpu_irqs = omap243x_gpio1_irqs,
  951. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
  952. .main_clk = "gpios_fck",
  953. .prcm = {
  954. .omap2 = {
  955. .prcm_reg_id = 1,
  956. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  957. .module_offs = WKUP_MOD,
  958. .idlest_reg_id = 1,
  959. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  960. },
  961. },
  962. .slaves = omap2430_gpio1_slaves,
  963. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  964. .class = &omap243x_gpio_hwmod_class,
  965. .dev_attr = &gpio_dev_attr,
  966. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  967. };
  968. /* gpio2 */
  969. static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
  970. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  971. };
  972. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  973. &omap2430_l4_wkup__gpio2,
  974. };
  975. static struct omap_hwmod omap2430_gpio2_hwmod = {
  976. .name = "gpio2",
  977. .mpu_irqs = omap243x_gpio2_irqs,
  978. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
  979. .main_clk = "gpios_fck",
  980. .prcm = {
  981. .omap2 = {
  982. .prcm_reg_id = 1,
  983. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  984. .module_offs = WKUP_MOD,
  985. .idlest_reg_id = 1,
  986. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  987. },
  988. },
  989. .slaves = omap2430_gpio2_slaves,
  990. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  991. .class = &omap243x_gpio_hwmod_class,
  992. .dev_attr = &gpio_dev_attr,
  993. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  994. };
  995. /* gpio3 */
  996. static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
  997. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  998. };
  999. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  1000. &omap2430_l4_wkup__gpio3,
  1001. };
  1002. static struct omap_hwmod omap2430_gpio3_hwmod = {
  1003. .name = "gpio3",
  1004. .mpu_irqs = omap243x_gpio3_irqs,
  1005. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
  1006. .main_clk = "gpios_fck",
  1007. .prcm = {
  1008. .omap2 = {
  1009. .prcm_reg_id = 1,
  1010. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1011. .module_offs = WKUP_MOD,
  1012. .idlest_reg_id = 1,
  1013. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1014. },
  1015. },
  1016. .slaves = omap2430_gpio3_slaves,
  1017. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1018. .class = &omap243x_gpio_hwmod_class,
  1019. .dev_attr = &gpio_dev_attr,
  1020. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1021. };
  1022. /* gpio4 */
  1023. static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
  1024. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  1025. };
  1026. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1027. &omap2430_l4_wkup__gpio4,
  1028. };
  1029. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1030. .name = "gpio4",
  1031. .mpu_irqs = omap243x_gpio4_irqs,
  1032. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
  1033. .main_clk = "gpios_fck",
  1034. .prcm = {
  1035. .omap2 = {
  1036. .prcm_reg_id = 1,
  1037. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1038. .module_offs = WKUP_MOD,
  1039. .idlest_reg_id = 1,
  1040. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1041. },
  1042. },
  1043. .slaves = omap2430_gpio4_slaves,
  1044. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1045. .class = &omap243x_gpio_hwmod_class,
  1046. .dev_attr = &gpio_dev_attr,
  1047. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1048. };
  1049. /* gpio5 */
  1050. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1051. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1052. };
  1053. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1054. &omap2430_l4_core__gpio5,
  1055. };
  1056. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1057. .name = "gpio5",
  1058. .mpu_irqs = omap243x_gpio5_irqs,
  1059. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
  1060. .main_clk = "gpio5_fck",
  1061. .prcm = {
  1062. .omap2 = {
  1063. .prcm_reg_id = 2,
  1064. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1065. .module_offs = CORE_MOD,
  1066. .idlest_reg_id = 2,
  1067. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1068. },
  1069. },
  1070. .slaves = omap2430_gpio5_slaves,
  1071. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1072. .class = &omap243x_gpio_hwmod_class,
  1073. .dev_attr = &gpio_dev_attr,
  1074. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1075. };
  1076. /* dma_system */
  1077. static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
  1078. .rev_offs = 0x0000,
  1079. .sysc_offs = 0x002c,
  1080. .syss_offs = 0x0028,
  1081. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1082. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1083. SYSC_HAS_AUTOIDLE),
  1084. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1085. .sysc_fields = &omap_hwmod_sysc_type1,
  1086. };
  1087. static struct omap_hwmod_class omap2430_dma_hwmod_class = {
  1088. .name = "dma",
  1089. .sysc = &omap2430_dma_sysc,
  1090. };
  1091. /* dma attributes */
  1092. static struct omap_dma_dev_attr dma_dev_attr = {
  1093. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1094. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1095. .lch_count = 32,
  1096. };
  1097. static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
  1098. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1099. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1100. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1101. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1102. };
  1103. static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
  1104. {
  1105. .pa_start = 0x48056000,
  1106. .pa_end = 0x4a0560ff,
  1107. .flags = ADDR_TYPE_RT
  1108. },
  1109. };
  1110. /* dma_system -> L3 */
  1111. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1112. .master = &omap2430_dma_system_hwmod,
  1113. .slave = &omap2430_l3_main_hwmod,
  1114. .clk = "core_l3_ck",
  1115. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1116. };
  1117. /* dma_system master ports */
  1118. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1119. &omap2430_dma_system__l3,
  1120. };
  1121. /* l4_core -> dma_system */
  1122. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1123. .master = &omap2430_l4_core_hwmod,
  1124. .slave = &omap2430_dma_system_hwmod,
  1125. .clk = "sdma_ick",
  1126. .addr = omap2430_dma_system_addrs,
  1127. .addr_cnt = ARRAY_SIZE(omap2430_dma_system_addrs),
  1128. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1129. };
  1130. /* dma_system slave ports */
  1131. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1132. &omap2430_l4_core__dma_system,
  1133. };
  1134. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1135. .name = "dma",
  1136. .class = &omap2430_dma_hwmod_class,
  1137. .mpu_irqs = omap2430_dma_system_irqs,
  1138. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs),
  1139. .main_clk = "core_l3_ck",
  1140. .slaves = omap2430_dma_system_slaves,
  1141. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1142. .masters = omap2430_dma_system_masters,
  1143. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1144. .dev_attr = &dma_dev_attr,
  1145. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1146. .flags = HWMOD_NO_IDLEST,
  1147. };
  1148. /*
  1149. * 'mailbox' class
  1150. * mailbox module allowing communication between the on-chip processors
  1151. * using a queued mailbox-interrupt mechanism.
  1152. */
  1153. static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
  1154. .rev_offs = 0x000,
  1155. .sysc_offs = 0x010,
  1156. .syss_offs = 0x014,
  1157. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1158. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1159. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1160. .sysc_fields = &omap_hwmod_sysc_type1,
  1161. };
  1162. static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
  1163. .name = "mailbox",
  1164. .sysc = &omap2430_mailbox_sysc,
  1165. };
  1166. /* mailbox */
  1167. static struct omap_hwmod omap2430_mailbox_hwmod;
  1168. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1169. { .irq = 26 },
  1170. };
  1171. static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
  1172. {
  1173. .pa_start = 0x48094000,
  1174. .pa_end = 0x480941ff,
  1175. .flags = ADDR_TYPE_RT,
  1176. },
  1177. };
  1178. /* l4_core -> mailbox */
  1179. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1180. .master = &omap2430_l4_core_hwmod,
  1181. .slave = &omap2430_mailbox_hwmod,
  1182. .addr = omap2430_mailbox_addrs,
  1183. .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs),
  1184. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1185. };
  1186. /* mailbox slave ports */
  1187. static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
  1188. &omap2430_l4_core__mailbox,
  1189. };
  1190. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1191. .name = "mailbox",
  1192. .class = &omap2430_mailbox_hwmod_class,
  1193. .mpu_irqs = omap2430_mailbox_irqs,
  1194. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
  1195. .main_clk = "mailboxes_ick",
  1196. .prcm = {
  1197. .omap2 = {
  1198. .prcm_reg_id = 1,
  1199. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1200. .module_offs = CORE_MOD,
  1201. .idlest_reg_id = 1,
  1202. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1203. },
  1204. },
  1205. .slaves = omap2430_mailbox_slaves,
  1206. .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
  1207. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1208. };
  1209. /*
  1210. * 'mcspi' class
  1211. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1212. * bus
  1213. */
  1214. static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
  1215. .rev_offs = 0x0000,
  1216. .sysc_offs = 0x0010,
  1217. .syss_offs = 0x0014,
  1218. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1219. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1220. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1221. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1222. .sysc_fields = &omap_hwmod_sysc_type1,
  1223. };
  1224. static struct omap_hwmod_class omap2430_mcspi_class = {
  1225. .name = "mcspi",
  1226. .sysc = &omap2430_mcspi_sysc,
  1227. .rev = OMAP2_MCSPI_REV,
  1228. };
  1229. /* mcspi1 */
  1230. static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
  1231. { .irq = 65 },
  1232. };
  1233. static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
  1234. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  1235. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  1236. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  1237. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  1238. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  1239. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  1240. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  1241. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  1242. };
  1243. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1244. &omap2430_l4_core__mcspi1,
  1245. };
  1246. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1247. .num_chipselect = 4,
  1248. };
  1249. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1250. .name = "mcspi1_hwmod",
  1251. .mpu_irqs = omap2430_mcspi1_mpu_irqs,
  1252. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs),
  1253. .sdma_reqs = omap2430_mcspi1_sdma_reqs,
  1254. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
  1255. .main_clk = "mcspi1_fck",
  1256. .prcm = {
  1257. .omap2 = {
  1258. .module_offs = CORE_MOD,
  1259. .prcm_reg_id = 1,
  1260. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1261. .idlest_reg_id = 1,
  1262. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1263. },
  1264. },
  1265. .slaves = omap2430_mcspi1_slaves,
  1266. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1267. .class = &omap2430_mcspi_class,
  1268. .dev_attr = &omap_mcspi1_dev_attr,
  1269. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1270. };
  1271. /* mcspi2 */
  1272. static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
  1273. { .irq = 66 },
  1274. };
  1275. static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
  1276. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  1277. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  1278. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  1279. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  1280. };
  1281. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1282. &omap2430_l4_core__mcspi2,
  1283. };
  1284. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1285. .num_chipselect = 2,
  1286. };
  1287. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1288. .name = "mcspi2_hwmod",
  1289. .mpu_irqs = omap2430_mcspi2_mpu_irqs,
  1290. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs),
  1291. .sdma_reqs = omap2430_mcspi2_sdma_reqs,
  1292. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
  1293. .main_clk = "mcspi2_fck",
  1294. .prcm = {
  1295. .omap2 = {
  1296. .module_offs = CORE_MOD,
  1297. .prcm_reg_id = 1,
  1298. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1299. .idlest_reg_id = 1,
  1300. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1301. },
  1302. },
  1303. .slaves = omap2430_mcspi2_slaves,
  1304. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1305. .class = &omap2430_mcspi_class,
  1306. .dev_attr = &omap_mcspi2_dev_attr,
  1307. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1308. };
  1309. /* mcspi3 */
  1310. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1311. { .irq = 91 },
  1312. };
  1313. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1314. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1315. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1316. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1317. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1318. };
  1319. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1320. &omap2430_l4_core__mcspi3,
  1321. };
  1322. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1323. .num_chipselect = 2,
  1324. };
  1325. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1326. .name = "mcspi3_hwmod",
  1327. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1328. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
  1329. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1330. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
  1331. .main_clk = "mcspi3_fck",
  1332. .prcm = {
  1333. .omap2 = {
  1334. .module_offs = CORE_MOD,
  1335. .prcm_reg_id = 2,
  1336. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1337. .idlest_reg_id = 2,
  1338. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1339. },
  1340. },
  1341. .slaves = omap2430_mcspi3_slaves,
  1342. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1343. .class = &omap2430_mcspi_class,
  1344. .dev_attr = &omap_mcspi3_dev_attr,
  1345. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1346. };
  1347. /*
  1348. * usbhsotg
  1349. */
  1350. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1351. .rev_offs = 0x0400,
  1352. .sysc_offs = 0x0404,
  1353. .syss_offs = 0x0408,
  1354. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1355. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1356. SYSC_HAS_AUTOIDLE),
  1357. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1358. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1359. .sysc_fields = &omap_hwmod_sysc_type1,
  1360. };
  1361. static struct omap_hwmod_class usbotg_class = {
  1362. .name = "usbotg",
  1363. .sysc = &omap2430_usbhsotg_sysc,
  1364. };
  1365. /* usb_otg_hs */
  1366. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1367. { .name = "mc", .irq = 92 },
  1368. { .name = "dma", .irq = 93 },
  1369. };
  1370. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1371. .name = "usb_otg_hs",
  1372. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1373. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
  1374. .main_clk = "usbhs_ick",
  1375. .prcm = {
  1376. .omap2 = {
  1377. .prcm_reg_id = 1,
  1378. .module_bit = OMAP2430_EN_USBHS_MASK,
  1379. .module_offs = CORE_MOD,
  1380. .idlest_reg_id = 1,
  1381. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1382. },
  1383. },
  1384. .masters = omap2430_usbhsotg_masters,
  1385. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1386. .slaves = omap2430_usbhsotg_slaves,
  1387. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1388. .class = &usbotg_class,
  1389. /*
  1390. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1391. * broken when autoidle is enabled
  1392. * workaround is to disable the autoidle bit at module level.
  1393. */
  1394. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1395. | HWMOD_SWSUP_MSTANDBY,
  1396. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  1397. };
  1398. /*
  1399. * 'mcbsp' class
  1400. * multi channel buffered serial port controller
  1401. */
  1402. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  1403. .rev_offs = 0x007C,
  1404. .sysc_offs = 0x008C,
  1405. .sysc_flags = (SYSC_HAS_SOFTRESET),
  1406. .sysc_fields = &omap_hwmod_sysc_type1,
  1407. };
  1408. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  1409. .name = "mcbsp",
  1410. .sysc = &omap2430_mcbsp_sysc,
  1411. .rev = MCBSP_CONFIG_TYPE2,
  1412. };
  1413. /* mcbsp1 */
  1414. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  1415. { .name = "tx", .irq = 59 },
  1416. { .name = "rx", .irq = 60 },
  1417. { .name = "ovr", .irq = 61 },
  1418. { .name = "common", .irq = 64 },
  1419. };
  1420. static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
  1421. { .name = "rx", .dma_req = 32 },
  1422. { .name = "tx", .dma_req = 31 },
  1423. };
  1424. static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
  1425. {
  1426. .name = "mpu",
  1427. .pa_start = 0x48074000,
  1428. .pa_end = 0x480740ff,
  1429. .flags = ADDR_TYPE_RT
  1430. },
  1431. };
  1432. /* l4_core -> mcbsp1 */
  1433. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  1434. .master = &omap2430_l4_core_hwmod,
  1435. .slave = &omap2430_mcbsp1_hwmod,
  1436. .clk = "mcbsp1_ick",
  1437. .addr = omap2430_mcbsp1_addrs,
  1438. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs),
  1439. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1440. };
  1441. /* mcbsp1 slave ports */
  1442. static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
  1443. &omap2430_l4_core__mcbsp1,
  1444. };
  1445. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  1446. .name = "mcbsp1",
  1447. .class = &omap2430_mcbsp_hwmod_class,
  1448. .mpu_irqs = omap2430_mcbsp1_irqs,
  1449. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs),
  1450. .sdma_reqs = omap2430_mcbsp1_sdma_chs,
  1451. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
  1452. .main_clk = "mcbsp1_fck",
  1453. .prcm = {
  1454. .omap2 = {
  1455. .prcm_reg_id = 1,
  1456. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1457. .module_offs = CORE_MOD,
  1458. .idlest_reg_id = 1,
  1459. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1460. },
  1461. },
  1462. .slaves = omap2430_mcbsp1_slaves,
  1463. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
  1464. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1465. };
  1466. /* mcbsp2 */
  1467. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  1468. { .name = "tx", .irq = 62 },
  1469. { .name = "rx", .irq = 63 },
  1470. { .name = "common", .irq = 16 },
  1471. };
  1472. static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
  1473. { .name = "rx", .dma_req = 34 },
  1474. { .name = "tx", .dma_req = 33 },
  1475. };
  1476. static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
  1477. {
  1478. .name = "mpu",
  1479. .pa_start = 0x48076000,
  1480. .pa_end = 0x480760ff,
  1481. .flags = ADDR_TYPE_RT
  1482. },
  1483. };
  1484. /* l4_core -> mcbsp2 */
  1485. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  1486. .master = &omap2430_l4_core_hwmod,
  1487. .slave = &omap2430_mcbsp2_hwmod,
  1488. .clk = "mcbsp2_ick",
  1489. .addr = omap2430_mcbsp2_addrs,
  1490. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs),
  1491. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1492. };
  1493. /* mcbsp2 slave ports */
  1494. static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
  1495. &omap2430_l4_core__mcbsp2,
  1496. };
  1497. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  1498. .name = "mcbsp2",
  1499. .class = &omap2430_mcbsp_hwmod_class,
  1500. .mpu_irqs = omap2430_mcbsp2_irqs,
  1501. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs),
  1502. .sdma_reqs = omap2430_mcbsp2_sdma_chs,
  1503. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
  1504. .main_clk = "mcbsp2_fck",
  1505. .prcm = {
  1506. .omap2 = {
  1507. .prcm_reg_id = 1,
  1508. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1509. .module_offs = CORE_MOD,
  1510. .idlest_reg_id = 1,
  1511. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1512. },
  1513. },
  1514. .slaves = omap2430_mcbsp2_slaves,
  1515. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
  1516. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1517. };
  1518. /* mcbsp3 */
  1519. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  1520. { .name = "tx", .irq = 89 },
  1521. { .name = "rx", .irq = 90 },
  1522. { .name = "common", .irq = 17 },
  1523. };
  1524. static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
  1525. { .name = "rx", .dma_req = 18 },
  1526. { .name = "tx", .dma_req = 17 },
  1527. };
  1528. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  1529. {
  1530. .name = "mpu",
  1531. .pa_start = 0x4808C000,
  1532. .pa_end = 0x4808C0ff,
  1533. .flags = ADDR_TYPE_RT
  1534. },
  1535. };
  1536. /* l4_core -> mcbsp3 */
  1537. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  1538. .master = &omap2430_l4_core_hwmod,
  1539. .slave = &omap2430_mcbsp3_hwmod,
  1540. .clk = "mcbsp3_ick",
  1541. .addr = omap2430_mcbsp3_addrs,
  1542. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs),
  1543. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1544. };
  1545. /* mcbsp3 slave ports */
  1546. static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
  1547. &omap2430_l4_core__mcbsp3,
  1548. };
  1549. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  1550. .name = "mcbsp3",
  1551. .class = &omap2430_mcbsp_hwmod_class,
  1552. .mpu_irqs = omap2430_mcbsp3_irqs,
  1553. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs),
  1554. .sdma_reqs = omap2430_mcbsp3_sdma_chs,
  1555. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
  1556. .main_clk = "mcbsp3_fck",
  1557. .prcm = {
  1558. .omap2 = {
  1559. .prcm_reg_id = 1,
  1560. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  1561. .module_offs = CORE_MOD,
  1562. .idlest_reg_id = 2,
  1563. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  1564. },
  1565. },
  1566. .slaves = omap2430_mcbsp3_slaves,
  1567. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
  1568. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1569. };
  1570. /* mcbsp4 */
  1571. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  1572. { .name = "tx", .irq = 54 },
  1573. { .name = "rx", .irq = 55 },
  1574. { .name = "common", .irq = 18 },
  1575. };
  1576. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  1577. { .name = "rx", .dma_req = 20 },
  1578. { .name = "tx", .dma_req = 19 },
  1579. };
  1580. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  1581. {
  1582. .name = "mpu",
  1583. .pa_start = 0x4808E000,
  1584. .pa_end = 0x4808E0ff,
  1585. .flags = ADDR_TYPE_RT
  1586. },
  1587. };
  1588. /* l4_core -> mcbsp4 */
  1589. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  1590. .master = &omap2430_l4_core_hwmod,
  1591. .slave = &omap2430_mcbsp4_hwmod,
  1592. .clk = "mcbsp4_ick",
  1593. .addr = omap2430_mcbsp4_addrs,
  1594. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs),
  1595. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1596. };
  1597. /* mcbsp4 slave ports */
  1598. static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
  1599. &omap2430_l4_core__mcbsp4,
  1600. };
  1601. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  1602. .name = "mcbsp4",
  1603. .class = &omap2430_mcbsp_hwmod_class,
  1604. .mpu_irqs = omap2430_mcbsp4_irqs,
  1605. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
  1606. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  1607. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
  1608. .main_clk = "mcbsp4_fck",
  1609. .prcm = {
  1610. .omap2 = {
  1611. .prcm_reg_id = 1,
  1612. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  1613. .module_offs = CORE_MOD,
  1614. .idlest_reg_id = 2,
  1615. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  1616. },
  1617. },
  1618. .slaves = omap2430_mcbsp4_slaves,
  1619. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
  1620. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1621. };
  1622. /* mcbsp5 */
  1623. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  1624. { .name = "tx", .irq = 81 },
  1625. { .name = "rx", .irq = 82 },
  1626. { .name = "common", .irq = 19 },
  1627. };
  1628. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  1629. { .name = "rx", .dma_req = 22 },
  1630. { .name = "tx", .dma_req = 21 },
  1631. };
  1632. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  1633. {
  1634. .name = "mpu",
  1635. .pa_start = 0x48096000,
  1636. .pa_end = 0x480960ff,
  1637. .flags = ADDR_TYPE_RT
  1638. },
  1639. };
  1640. /* l4_core -> mcbsp5 */
  1641. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  1642. .master = &omap2430_l4_core_hwmod,
  1643. .slave = &omap2430_mcbsp5_hwmod,
  1644. .clk = "mcbsp5_ick",
  1645. .addr = omap2430_mcbsp5_addrs,
  1646. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs),
  1647. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1648. };
  1649. /* mcbsp5 slave ports */
  1650. static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
  1651. &omap2430_l4_core__mcbsp5,
  1652. };
  1653. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  1654. .name = "mcbsp5",
  1655. .class = &omap2430_mcbsp_hwmod_class,
  1656. .mpu_irqs = omap2430_mcbsp5_irqs,
  1657. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
  1658. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  1659. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
  1660. .main_clk = "mcbsp5_fck",
  1661. .prcm = {
  1662. .omap2 = {
  1663. .prcm_reg_id = 1,
  1664. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  1665. .module_offs = CORE_MOD,
  1666. .idlest_reg_id = 2,
  1667. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  1668. },
  1669. },
  1670. .slaves = omap2430_mcbsp5_slaves,
  1671. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
  1672. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1673. };
  1674. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  1675. &omap2430_l3_main_hwmod,
  1676. &omap2430_l4_core_hwmod,
  1677. &omap2430_l4_wkup_hwmod,
  1678. &omap2430_mpu_hwmod,
  1679. &omap2430_iva_hwmod,
  1680. &omap2430_wd_timer2_hwmod,
  1681. &omap2430_uart1_hwmod,
  1682. &omap2430_uart2_hwmod,
  1683. &omap2430_uart3_hwmod,
  1684. /* dss class */
  1685. &omap2430_dss_core_hwmod,
  1686. &omap2430_dss_dispc_hwmod,
  1687. &omap2430_dss_rfbi_hwmod,
  1688. &omap2430_dss_venc_hwmod,
  1689. /* i2c class */
  1690. &omap2430_i2c1_hwmod,
  1691. &omap2430_i2c2_hwmod,
  1692. /* gpio class */
  1693. &omap2430_gpio1_hwmod,
  1694. &omap2430_gpio2_hwmod,
  1695. &omap2430_gpio3_hwmod,
  1696. &omap2430_gpio4_hwmod,
  1697. &omap2430_gpio5_hwmod,
  1698. /* dma_system class*/
  1699. &omap2430_dma_system_hwmod,
  1700. /* mcbsp class */
  1701. &omap2430_mcbsp1_hwmod,
  1702. &omap2430_mcbsp2_hwmod,
  1703. &omap2430_mcbsp3_hwmod,
  1704. &omap2430_mcbsp4_hwmod,
  1705. &omap2430_mcbsp5_hwmod,
  1706. /* mailbox class */
  1707. &omap2430_mailbox_hwmod,
  1708. /* mcspi class */
  1709. &omap2430_mcspi1_hwmod,
  1710. &omap2430_mcspi2_hwmod,
  1711. &omap2430_mcspi3_hwmod,
  1712. /* usbotg class*/
  1713. &omap2430_usbhsotg_hwmod,
  1714. NULL,
  1715. };
  1716. int __init omap2430_hwmod_init(void)
  1717. {
  1718. return omap_hwmod_init(omap2430_hwmods);
  1719. }