omap_hwmod_3xxx_data.c 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676
  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/l4_3xxx.h>
  22. #include <plat/i2c.h>
  23. #include <plat/gpio.h>
  24. #include <plat/smartreflex.h>
  25. #include <plat/mcspi.h>
  26. #include "omap_hwmod_common_data.h"
  27. #include "prm-regbits-34xx.h"
  28. #include "cm-regbits-34xx.h"
  29. #include "wd_timer.h"
  30. /*
  31. * OMAP3xxx hardware module integration data
  32. *
  33. * ALl of the data in this section should be autogeneratable from the
  34. * TI hardware database or other technical documentation. Data that
  35. * is driver-specific or driver-kernel integration-specific belongs
  36. * elsewhere.
  37. */
  38. static struct omap_hwmod omap3xxx_mpu_hwmod;
  39. static struct omap_hwmod omap3xxx_iva_hwmod;
  40. static struct omap_hwmod omap3xxx_l3_main_hwmod;
  41. static struct omap_hwmod omap3xxx_l4_core_hwmod;
  42. static struct omap_hwmod omap3xxx_l4_per_hwmod;
  43. static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
  44. static struct omap_hwmod omap3xxx_i2c1_hwmod;
  45. static struct omap_hwmod omap3xxx_i2c2_hwmod;
  46. static struct omap_hwmod omap3xxx_i2c3_hwmod;
  47. static struct omap_hwmod omap3xxx_gpio1_hwmod;
  48. static struct omap_hwmod omap3xxx_gpio2_hwmod;
  49. static struct omap_hwmod omap3xxx_gpio3_hwmod;
  50. static struct omap_hwmod omap3xxx_gpio4_hwmod;
  51. static struct omap_hwmod omap3xxx_gpio5_hwmod;
  52. static struct omap_hwmod omap3xxx_gpio6_hwmod;
  53. static struct omap_hwmod omap34xx_sr1_hwmod;
  54. static struct omap_hwmod omap34xx_sr2_hwmod;
  55. static struct omap_hwmod omap34xx_mcspi1;
  56. static struct omap_hwmod omap34xx_mcspi2;
  57. static struct omap_hwmod omap34xx_mcspi3;
  58. static struct omap_hwmod omap34xx_mcspi4;
  59. static struct omap_hwmod omap3xxx_dma_system_hwmod;
  60. /* L3 -> L4_CORE interface */
  61. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  62. .master = &omap3xxx_l3_main_hwmod,
  63. .slave = &omap3xxx_l4_core_hwmod,
  64. .user = OCP_USER_MPU | OCP_USER_SDMA,
  65. };
  66. /* L3 -> L4_PER interface */
  67. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  68. .master = &omap3xxx_l3_main_hwmod,
  69. .slave = &omap3xxx_l4_per_hwmod,
  70. .user = OCP_USER_MPU | OCP_USER_SDMA,
  71. };
  72. /* MPU -> L3 interface */
  73. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  74. .master = &omap3xxx_mpu_hwmod,
  75. .slave = &omap3xxx_l3_main_hwmod,
  76. .user = OCP_USER_MPU,
  77. };
  78. /* Slave interfaces on the L3 interconnect */
  79. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
  80. &omap3xxx_mpu__l3_main,
  81. };
  82. /* Master interfaces on the L3 interconnect */
  83. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
  84. &omap3xxx_l3_main__l4_core,
  85. &omap3xxx_l3_main__l4_per,
  86. };
  87. /* L3 */
  88. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  89. .name = "l3_main",
  90. .class = &l3_hwmod_class,
  91. .masters = omap3xxx_l3_main_masters,
  92. .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
  93. .slaves = omap3xxx_l3_main_slaves,
  94. .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
  95. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  96. .flags = HWMOD_NO_IDLEST,
  97. };
  98. static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
  99. static struct omap_hwmod omap3xxx_uart1_hwmod;
  100. static struct omap_hwmod omap3xxx_uart2_hwmod;
  101. static struct omap_hwmod omap3xxx_uart3_hwmod;
  102. static struct omap_hwmod omap3xxx_uart4_hwmod;
  103. /* L4_CORE -> L4_WKUP interface */
  104. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  105. .master = &omap3xxx_l4_core_hwmod,
  106. .slave = &omap3xxx_l4_wkup_hwmod,
  107. .user = OCP_USER_MPU | OCP_USER_SDMA,
  108. };
  109. /* L4 CORE -> UART1 interface */
  110. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  111. {
  112. .pa_start = OMAP3_UART1_BASE,
  113. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  114. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  115. },
  116. };
  117. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  118. .master = &omap3xxx_l4_core_hwmod,
  119. .slave = &omap3xxx_uart1_hwmod,
  120. .clk = "uart1_ick",
  121. .addr = omap3xxx_uart1_addr_space,
  122. .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
  123. .user = OCP_USER_MPU | OCP_USER_SDMA,
  124. };
  125. /* L4 CORE -> UART2 interface */
  126. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  127. {
  128. .pa_start = OMAP3_UART2_BASE,
  129. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  130. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  131. },
  132. };
  133. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  134. .master = &omap3xxx_l4_core_hwmod,
  135. .slave = &omap3xxx_uart2_hwmod,
  136. .clk = "uart2_ick",
  137. .addr = omap3xxx_uart2_addr_space,
  138. .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
  139. .user = OCP_USER_MPU | OCP_USER_SDMA,
  140. };
  141. /* L4 PER -> UART3 interface */
  142. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  143. {
  144. .pa_start = OMAP3_UART3_BASE,
  145. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  146. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  147. },
  148. };
  149. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  150. .master = &omap3xxx_l4_per_hwmod,
  151. .slave = &omap3xxx_uart3_hwmod,
  152. .clk = "uart3_ick",
  153. .addr = omap3xxx_uart3_addr_space,
  154. .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
  155. .user = OCP_USER_MPU | OCP_USER_SDMA,
  156. };
  157. /* L4 PER -> UART4 interface */
  158. static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
  159. {
  160. .pa_start = OMAP3_UART4_BASE,
  161. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  162. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  163. },
  164. };
  165. static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
  166. .master = &omap3xxx_l4_per_hwmod,
  167. .slave = &omap3xxx_uart4_hwmod,
  168. .clk = "uart4_ick",
  169. .addr = omap3xxx_uart4_addr_space,
  170. .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
  171. .user = OCP_USER_MPU | OCP_USER_SDMA,
  172. };
  173. /* I2C IP block address space length (in bytes) */
  174. #define OMAP2_I2C_AS_LEN 128
  175. /* L4 CORE -> I2C1 interface */
  176. static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
  177. {
  178. .pa_start = 0x48070000,
  179. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  180. .flags = ADDR_TYPE_RT,
  181. },
  182. };
  183. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  184. .master = &omap3xxx_l4_core_hwmod,
  185. .slave = &omap3xxx_i2c1_hwmod,
  186. .clk = "i2c1_ick",
  187. .addr = omap3xxx_i2c1_addr_space,
  188. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
  189. .fw = {
  190. .omap2 = {
  191. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  192. .l4_prot_group = 7,
  193. .flags = OMAP_FIREWALL_L4,
  194. }
  195. },
  196. .user = OCP_USER_MPU | OCP_USER_SDMA,
  197. };
  198. /* L4 CORE -> I2C2 interface */
  199. static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
  200. {
  201. .pa_start = 0x48072000,
  202. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  203. .flags = ADDR_TYPE_RT,
  204. },
  205. };
  206. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  207. .master = &omap3xxx_l4_core_hwmod,
  208. .slave = &omap3xxx_i2c2_hwmod,
  209. .clk = "i2c2_ick",
  210. .addr = omap3xxx_i2c2_addr_space,
  211. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
  212. .fw = {
  213. .omap2 = {
  214. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  215. .l4_prot_group = 7,
  216. .flags = OMAP_FIREWALL_L4,
  217. }
  218. },
  219. .user = OCP_USER_MPU | OCP_USER_SDMA,
  220. };
  221. /* L4 CORE -> I2C3 interface */
  222. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  223. {
  224. .pa_start = 0x48060000,
  225. .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1,
  226. .flags = ADDR_TYPE_RT,
  227. },
  228. };
  229. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  230. .master = &omap3xxx_l4_core_hwmod,
  231. .slave = &omap3xxx_i2c3_hwmod,
  232. .clk = "i2c3_ick",
  233. .addr = omap3xxx_i2c3_addr_space,
  234. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
  235. .fw = {
  236. .omap2 = {
  237. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  238. .l4_prot_group = 7,
  239. .flags = OMAP_FIREWALL_L4,
  240. }
  241. },
  242. .user = OCP_USER_MPU | OCP_USER_SDMA,
  243. };
  244. /* L4 CORE -> SR1 interface */
  245. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  246. {
  247. .pa_start = OMAP34XX_SR1_BASE,
  248. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  249. .flags = ADDR_TYPE_RT,
  250. },
  251. };
  252. static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
  253. .master = &omap3xxx_l4_core_hwmod,
  254. .slave = &omap34xx_sr1_hwmod,
  255. .clk = "sr_l4_ick",
  256. .addr = omap3_sr1_addr_space,
  257. .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space),
  258. .user = OCP_USER_MPU,
  259. };
  260. /* L4 CORE -> SR1 interface */
  261. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  262. {
  263. .pa_start = OMAP34XX_SR2_BASE,
  264. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  265. .flags = ADDR_TYPE_RT,
  266. },
  267. };
  268. static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
  269. .master = &omap3xxx_l4_core_hwmod,
  270. .slave = &omap34xx_sr2_hwmod,
  271. .clk = "sr_l4_ick",
  272. .addr = omap3_sr2_addr_space,
  273. .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space),
  274. .user = OCP_USER_MPU,
  275. };
  276. /* Slave interfaces on the L4_CORE interconnect */
  277. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
  278. &omap3xxx_l3_main__l4_core,
  279. &omap3_l4_core__sr1,
  280. &omap3_l4_core__sr2,
  281. };
  282. /* Master interfaces on the L4_CORE interconnect */
  283. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
  284. &omap3xxx_l4_core__l4_wkup,
  285. &omap3_l4_core__uart1,
  286. &omap3_l4_core__uart2,
  287. &omap3_l4_core__i2c1,
  288. &omap3_l4_core__i2c2,
  289. &omap3_l4_core__i2c3,
  290. };
  291. /* L4 CORE */
  292. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  293. .name = "l4_core",
  294. .class = &l4_hwmod_class,
  295. .masters = omap3xxx_l4_core_masters,
  296. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
  297. .slaves = omap3xxx_l4_core_slaves,
  298. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
  299. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  300. .flags = HWMOD_NO_IDLEST,
  301. };
  302. /* Slave interfaces on the L4_PER interconnect */
  303. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
  304. &omap3xxx_l3_main__l4_per,
  305. };
  306. /* Master interfaces on the L4_PER interconnect */
  307. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
  308. &omap3_l4_per__uart3,
  309. &omap3_l4_per__uart4,
  310. };
  311. /* L4 PER */
  312. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  313. .name = "l4_per",
  314. .class = &l4_hwmod_class,
  315. .masters = omap3xxx_l4_per_masters,
  316. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
  317. .slaves = omap3xxx_l4_per_slaves,
  318. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
  319. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  320. .flags = HWMOD_NO_IDLEST,
  321. };
  322. /* Slave interfaces on the L4_WKUP interconnect */
  323. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
  324. &omap3xxx_l4_core__l4_wkup,
  325. };
  326. /* Master interfaces on the L4_WKUP interconnect */
  327. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
  328. };
  329. /* L4 WKUP */
  330. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  331. .name = "l4_wkup",
  332. .class = &l4_hwmod_class,
  333. .masters = omap3xxx_l4_wkup_masters,
  334. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
  335. .slaves = omap3xxx_l4_wkup_slaves,
  336. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
  337. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  338. .flags = HWMOD_NO_IDLEST,
  339. };
  340. /* Master interfaces on the MPU device */
  341. static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
  342. &omap3xxx_mpu__l3_main,
  343. };
  344. /* MPU */
  345. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  346. .name = "mpu",
  347. .class = &mpu_hwmod_class,
  348. .main_clk = "arm_fck",
  349. .masters = omap3xxx_mpu_masters,
  350. .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
  351. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  352. };
  353. /*
  354. * IVA2_2 interface data
  355. */
  356. /* IVA2 <- L3 interface */
  357. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  358. .master = &omap3xxx_l3_main_hwmod,
  359. .slave = &omap3xxx_iva_hwmod,
  360. .clk = "iva2_ck",
  361. .user = OCP_USER_MPU | OCP_USER_SDMA,
  362. };
  363. static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
  364. &omap3xxx_l3__iva,
  365. };
  366. /*
  367. * IVA2 (IVA2)
  368. */
  369. static struct omap_hwmod omap3xxx_iva_hwmod = {
  370. .name = "iva",
  371. .class = &iva_hwmod_class,
  372. .masters = omap3xxx_iva_masters,
  373. .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
  374. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  375. };
  376. /* l4_wkup -> wd_timer2 */
  377. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  378. {
  379. .pa_start = 0x48314000,
  380. .pa_end = 0x4831407f,
  381. .flags = ADDR_TYPE_RT
  382. },
  383. };
  384. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  385. .master = &omap3xxx_l4_wkup_hwmod,
  386. .slave = &omap3xxx_wd_timer2_hwmod,
  387. .clk = "wdt2_ick",
  388. .addr = omap3xxx_wd_timer2_addrs,
  389. .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
  390. .user = OCP_USER_MPU | OCP_USER_SDMA,
  391. };
  392. /*
  393. * 'wd_timer' class
  394. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  395. * overflow condition
  396. */
  397. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  398. .rev_offs = 0x0000,
  399. .sysc_offs = 0x0010,
  400. .syss_offs = 0x0014,
  401. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  402. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  403. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY),
  404. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  405. .sysc_fields = &omap_hwmod_sysc_type1,
  406. };
  407. /* I2C common */
  408. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  409. .rev_offs = 0x00,
  410. .sysc_offs = 0x20,
  411. .syss_offs = 0x10,
  412. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  413. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  414. SYSC_HAS_AUTOIDLE),
  415. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  416. .sysc_fields = &omap_hwmod_sysc_type1,
  417. };
  418. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  419. .name = "wd_timer",
  420. .sysc = &omap3xxx_wd_timer_sysc,
  421. .pre_shutdown = &omap2_wd_timer_disable
  422. };
  423. /* wd_timer2 */
  424. static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
  425. &omap3xxx_l4_wkup__wd_timer2,
  426. };
  427. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  428. .name = "wd_timer2",
  429. .class = &omap3xxx_wd_timer_hwmod_class,
  430. .main_clk = "wdt2_fck",
  431. .prcm = {
  432. .omap2 = {
  433. .prcm_reg_id = 1,
  434. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  435. .module_offs = WKUP_MOD,
  436. .idlest_reg_id = 1,
  437. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  438. },
  439. },
  440. .slaves = omap3xxx_wd_timer2_slaves,
  441. .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
  442. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  443. };
  444. /* UART common */
  445. static struct omap_hwmod_class_sysconfig uart_sysc = {
  446. .rev_offs = 0x50,
  447. .sysc_offs = 0x54,
  448. .syss_offs = 0x58,
  449. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  450. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  451. SYSC_HAS_AUTOIDLE),
  452. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  453. .sysc_fields = &omap_hwmod_sysc_type1,
  454. };
  455. static struct omap_hwmod_class uart_class = {
  456. .name = "uart",
  457. .sysc = &uart_sysc,
  458. };
  459. /* UART1 */
  460. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  461. { .irq = INT_24XX_UART1_IRQ, },
  462. };
  463. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  464. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  465. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  466. };
  467. static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
  468. &omap3_l4_core__uart1,
  469. };
  470. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  471. .name = "uart1",
  472. .mpu_irqs = uart1_mpu_irqs,
  473. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  474. .sdma_reqs = uart1_sdma_reqs,
  475. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  476. .main_clk = "uart1_fck",
  477. .prcm = {
  478. .omap2 = {
  479. .module_offs = CORE_MOD,
  480. .prcm_reg_id = 1,
  481. .module_bit = OMAP3430_EN_UART1_SHIFT,
  482. .idlest_reg_id = 1,
  483. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  484. },
  485. },
  486. .slaves = omap3xxx_uart1_slaves,
  487. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
  488. .class = &uart_class,
  489. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  490. };
  491. /* UART2 */
  492. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  493. { .irq = INT_24XX_UART2_IRQ, },
  494. };
  495. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  496. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  497. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  498. };
  499. static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
  500. &omap3_l4_core__uart2,
  501. };
  502. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  503. .name = "uart2",
  504. .mpu_irqs = uart2_mpu_irqs,
  505. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  506. .sdma_reqs = uart2_sdma_reqs,
  507. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  508. .main_clk = "uart2_fck",
  509. .prcm = {
  510. .omap2 = {
  511. .module_offs = CORE_MOD,
  512. .prcm_reg_id = 1,
  513. .module_bit = OMAP3430_EN_UART2_SHIFT,
  514. .idlest_reg_id = 1,
  515. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  516. },
  517. },
  518. .slaves = omap3xxx_uart2_slaves,
  519. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
  520. .class = &uart_class,
  521. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  522. };
  523. /* UART3 */
  524. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  525. { .irq = INT_24XX_UART3_IRQ, },
  526. };
  527. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  528. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  529. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  530. };
  531. static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
  532. &omap3_l4_per__uart3,
  533. };
  534. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  535. .name = "uart3",
  536. .mpu_irqs = uart3_mpu_irqs,
  537. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  538. .sdma_reqs = uart3_sdma_reqs,
  539. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  540. .main_clk = "uart3_fck",
  541. .prcm = {
  542. .omap2 = {
  543. .module_offs = OMAP3430_PER_MOD,
  544. .prcm_reg_id = 1,
  545. .module_bit = OMAP3430_EN_UART3_SHIFT,
  546. .idlest_reg_id = 1,
  547. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  548. },
  549. },
  550. .slaves = omap3xxx_uart3_slaves,
  551. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
  552. .class = &uart_class,
  553. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  554. };
  555. /* UART4 */
  556. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  557. { .irq = INT_36XX_UART4_IRQ, },
  558. };
  559. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  560. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  561. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  562. };
  563. static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
  564. &omap3_l4_per__uart4,
  565. };
  566. static struct omap_hwmod omap3xxx_uart4_hwmod = {
  567. .name = "uart4",
  568. .mpu_irqs = uart4_mpu_irqs,
  569. .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
  570. .sdma_reqs = uart4_sdma_reqs,
  571. .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
  572. .main_clk = "uart4_fck",
  573. .prcm = {
  574. .omap2 = {
  575. .module_offs = OMAP3430_PER_MOD,
  576. .prcm_reg_id = 1,
  577. .module_bit = OMAP3630_EN_UART4_SHIFT,
  578. .idlest_reg_id = 1,
  579. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  580. },
  581. },
  582. .slaves = omap3xxx_uart4_slaves,
  583. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
  584. .class = &uart_class,
  585. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  586. };
  587. static struct omap_hwmod_class i2c_class = {
  588. .name = "i2c",
  589. .sysc = &i2c_sysc,
  590. };
  591. /* I2C1 */
  592. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  593. .fifo_depth = 8, /* bytes */
  594. };
  595. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  596. { .irq = INT_24XX_I2C1_IRQ, },
  597. };
  598. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  599. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  600. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  601. };
  602. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  603. &omap3_l4_core__i2c1,
  604. };
  605. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  606. .name = "i2c1",
  607. .mpu_irqs = i2c1_mpu_irqs,
  608. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  609. .sdma_reqs = i2c1_sdma_reqs,
  610. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  611. .main_clk = "i2c1_fck",
  612. .prcm = {
  613. .omap2 = {
  614. .module_offs = CORE_MOD,
  615. .prcm_reg_id = 1,
  616. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  617. .idlest_reg_id = 1,
  618. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  619. },
  620. },
  621. .slaves = omap3xxx_i2c1_slaves,
  622. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  623. .class = &i2c_class,
  624. .dev_attr = &i2c1_dev_attr,
  625. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  626. };
  627. /* I2C2 */
  628. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  629. .fifo_depth = 8, /* bytes */
  630. };
  631. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  632. { .irq = INT_24XX_I2C2_IRQ, },
  633. };
  634. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  635. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  636. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  637. };
  638. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  639. &omap3_l4_core__i2c2,
  640. };
  641. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  642. .name = "i2c2",
  643. .mpu_irqs = i2c2_mpu_irqs,
  644. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  645. .sdma_reqs = i2c2_sdma_reqs,
  646. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  647. .main_clk = "i2c2_fck",
  648. .prcm = {
  649. .omap2 = {
  650. .module_offs = CORE_MOD,
  651. .prcm_reg_id = 1,
  652. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  653. .idlest_reg_id = 1,
  654. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  655. },
  656. },
  657. .slaves = omap3xxx_i2c2_slaves,
  658. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  659. .class = &i2c_class,
  660. .dev_attr = &i2c2_dev_attr,
  661. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  662. };
  663. /* I2C3 */
  664. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  665. .fifo_depth = 64, /* bytes */
  666. };
  667. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  668. { .irq = INT_34XX_I2C3_IRQ, },
  669. };
  670. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  671. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  672. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  673. };
  674. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  675. &omap3_l4_core__i2c3,
  676. };
  677. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  678. .name = "i2c3",
  679. .mpu_irqs = i2c3_mpu_irqs,
  680. .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs),
  681. .sdma_reqs = i2c3_sdma_reqs,
  682. .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
  683. .main_clk = "i2c3_fck",
  684. .prcm = {
  685. .omap2 = {
  686. .module_offs = CORE_MOD,
  687. .prcm_reg_id = 1,
  688. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  689. .idlest_reg_id = 1,
  690. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  691. },
  692. },
  693. .slaves = omap3xxx_i2c3_slaves,
  694. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  695. .class = &i2c_class,
  696. .dev_attr = &i2c3_dev_attr,
  697. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  698. };
  699. /* l4_wkup -> gpio1 */
  700. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  701. {
  702. .pa_start = 0x48310000,
  703. .pa_end = 0x483101ff,
  704. .flags = ADDR_TYPE_RT
  705. },
  706. };
  707. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  708. .master = &omap3xxx_l4_wkup_hwmod,
  709. .slave = &omap3xxx_gpio1_hwmod,
  710. .addr = omap3xxx_gpio1_addrs,
  711. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
  712. .user = OCP_USER_MPU | OCP_USER_SDMA,
  713. };
  714. /* l4_per -> gpio2 */
  715. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  716. {
  717. .pa_start = 0x49050000,
  718. .pa_end = 0x490501ff,
  719. .flags = ADDR_TYPE_RT
  720. },
  721. };
  722. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  723. .master = &omap3xxx_l4_per_hwmod,
  724. .slave = &omap3xxx_gpio2_hwmod,
  725. .addr = omap3xxx_gpio2_addrs,
  726. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
  727. .user = OCP_USER_MPU | OCP_USER_SDMA,
  728. };
  729. /* l4_per -> gpio3 */
  730. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  731. {
  732. .pa_start = 0x49052000,
  733. .pa_end = 0x490521ff,
  734. .flags = ADDR_TYPE_RT
  735. },
  736. };
  737. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  738. .master = &omap3xxx_l4_per_hwmod,
  739. .slave = &omap3xxx_gpio3_hwmod,
  740. .addr = omap3xxx_gpio3_addrs,
  741. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
  742. .user = OCP_USER_MPU | OCP_USER_SDMA,
  743. };
  744. /* l4_per -> gpio4 */
  745. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  746. {
  747. .pa_start = 0x49054000,
  748. .pa_end = 0x490541ff,
  749. .flags = ADDR_TYPE_RT
  750. },
  751. };
  752. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  753. .master = &omap3xxx_l4_per_hwmod,
  754. .slave = &omap3xxx_gpio4_hwmod,
  755. .addr = omap3xxx_gpio4_addrs,
  756. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
  757. .user = OCP_USER_MPU | OCP_USER_SDMA,
  758. };
  759. /* l4_per -> gpio5 */
  760. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  761. {
  762. .pa_start = 0x49056000,
  763. .pa_end = 0x490561ff,
  764. .flags = ADDR_TYPE_RT
  765. },
  766. };
  767. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  768. .master = &omap3xxx_l4_per_hwmod,
  769. .slave = &omap3xxx_gpio5_hwmod,
  770. .addr = omap3xxx_gpio5_addrs,
  771. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
  772. .user = OCP_USER_MPU | OCP_USER_SDMA,
  773. };
  774. /* l4_per -> gpio6 */
  775. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  776. {
  777. .pa_start = 0x49058000,
  778. .pa_end = 0x490581ff,
  779. .flags = ADDR_TYPE_RT
  780. },
  781. };
  782. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  783. .master = &omap3xxx_l4_per_hwmod,
  784. .slave = &omap3xxx_gpio6_hwmod,
  785. .addr = omap3xxx_gpio6_addrs,
  786. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
  787. .user = OCP_USER_MPU | OCP_USER_SDMA,
  788. };
  789. /*
  790. * 'gpio' class
  791. * general purpose io module
  792. */
  793. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  794. .rev_offs = 0x0000,
  795. .sysc_offs = 0x0010,
  796. .syss_offs = 0x0014,
  797. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  798. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  799. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  800. .sysc_fields = &omap_hwmod_sysc_type1,
  801. };
  802. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  803. .name = "gpio",
  804. .sysc = &omap3xxx_gpio_sysc,
  805. .rev = 1,
  806. };
  807. /* gpio_dev_attr*/
  808. static struct omap_gpio_dev_attr gpio_dev_attr = {
  809. .bank_width = 32,
  810. .dbck_flag = true,
  811. };
  812. /* gpio1 */
  813. static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
  814. { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
  815. };
  816. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  817. { .role = "dbclk", .clk = "gpio1_dbck", },
  818. };
  819. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  820. &omap3xxx_l4_wkup__gpio1,
  821. };
  822. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  823. .name = "gpio1",
  824. .mpu_irqs = omap3xxx_gpio1_irqs,
  825. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
  826. .main_clk = "gpio1_ick",
  827. .opt_clks = gpio1_opt_clks,
  828. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  829. .prcm = {
  830. .omap2 = {
  831. .prcm_reg_id = 1,
  832. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  833. .module_offs = WKUP_MOD,
  834. .idlest_reg_id = 1,
  835. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  836. },
  837. },
  838. .slaves = omap3xxx_gpio1_slaves,
  839. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  840. .class = &omap3xxx_gpio_hwmod_class,
  841. .dev_attr = &gpio_dev_attr,
  842. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  843. };
  844. /* gpio2 */
  845. static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
  846. { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
  847. };
  848. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  849. { .role = "dbclk", .clk = "gpio2_dbck", },
  850. };
  851. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  852. &omap3xxx_l4_per__gpio2,
  853. };
  854. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  855. .name = "gpio2",
  856. .mpu_irqs = omap3xxx_gpio2_irqs,
  857. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
  858. .main_clk = "gpio2_ick",
  859. .opt_clks = gpio2_opt_clks,
  860. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  861. .prcm = {
  862. .omap2 = {
  863. .prcm_reg_id = 1,
  864. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  865. .module_offs = OMAP3430_PER_MOD,
  866. .idlest_reg_id = 1,
  867. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  868. },
  869. },
  870. .slaves = omap3xxx_gpio2_slaves,
  871. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  872. .class = &omap3xxx_gpio_hwmod_class,
  873. .dev_attr = &gpio_dev_attr,
  874. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  875. };
  876. /* gpio3 */
  877. static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
  878. { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
  879. };
  880. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  881. { .role = "dbclk", .clk = "gpio3_dbck", },
  882. };
  883. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  884. &omap3xxx_l4_per__gpio3,
  885. };
  886. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  887. .name = "gpio3",
  888. .mpu_irqs = omap3xxx_gpio3_irqs,
  889. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
  890. .main_clk = "gpio3_ick",
  891. .opt_clks = gpio3_opt_clks,
  892. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  893. .prcm = {
  894. .omap2 = {
  895. .prcm_reg_id = 1,
  896. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  897. .module_offs = OMAP3430_PER_MOD,
  898. .idlest_reg_id = 1,
  899. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  900. },
  901. },
  902. .slaves = omap3xxx_gpio3_slaves,
  903. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  904. .class = &omap3xxx_gpio_hwmod_class,
  905. .dev_attr = &gpio_dev_attr,
  906. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  907. };
  908. /* gpio4 */
  909. static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
  910. { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
  911. };
  912. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  913. { .role = "dbclk", .clk = "gpio4_dbck", },
  914. };
  915. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  916. &omap3xxx_l4_per__gpio4,
  917. };
  918. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  919. .name = "gpio4",
  920. .mpu_irqs = omap3xxx_gpio4_irqs,
  921. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
  922. .main_clk = "gpio4_ick",
  923. .opt_clks = gpio4_opt_clks,
  924. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  925. .prcm = {
  926. .omap2 = {
  927. .prcm_reg_id = 1,
  928. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  929. .module_offs = OMAP3430_PER_MOD,
  930. .idlest_reg_id = 1,
  931. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  932. },
  933. },
  934. .slaves = omap3xxx_gpio4_slaves,
  935. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  936. .class = &omap3xxx_gpio_hwmod_class,
  937. .dev_attr = &gpio_dev_attr,
  938. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  939. };
  940. /* gpio5 */
  941. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  942. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  943. };
  944. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  945. { .role = "dbclk", .clk = "gpio5_dbck", },
  946. };
  947. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  948. &omap3xxx_l4_per__gpio5,
  949. };
  950. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  951. .name = "gpio5",
  952. .mpu_irqs = omap3xxx_gpio5_irqs,
  953. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
  954. .main_clk = "gpio5_ick",
  955. .opt_clks = gpio5_opt_clks,
  956. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  957. .prcm = {
  958. .omap2 = {
  959. .prcm_reg_id = 1,
  960. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  961. .module_offs = OMAP3430_PER_MOD,
  962. .idlest_reg_id = 1,
  963. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  964. },
  965. },
  966. .slaves = omap3xxx_gpio5_slaves,
  967. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  968. .class = &omap3xxx_gpio_hwmod_class,
  969. .dev_attr = &gpio_dev_attr,
  970. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  971. };
  972. /* gpio6 */
  973. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  974. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  975. };
  976. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  977. { .role = "dbclk", .clk = "gpio6_dbck", },
  978. };
  979. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  980. &omap3xxx_l4_per__gpio6,
  981. };
  982. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  983. .name = "gpio6",
  984. .mpu_irqs = omap3xxx_gpio6_irqs,
  985. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
  986. .main_clk = "gpio6_ick",
  987. .opt_clks = gpio6_opt_clks,
  988. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  989. .prcm = {
  990. .omap2 = {
  991. .prcm_reg_id = 1,
  992. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  993. .module_offs = OMAP3430_PER_MOD,
  994. .idlest_reg_id = 1,
  995. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  996. },
  997. },
  998. .slaves = omap3xxx_gpio6_slaves,
  999. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  1000. .class = &omap3xxx_gpio_hwmod_class,
  1001. .dev_attr = &gpio_dev_attr,
  1002. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1003. };
  1004. /* dma_system -> L3 */
  1005. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  1006. .master = &omap3xxx_dma_system_hwmod,
  1007. .slave = &omap3xxx_l3_main_hwmod,
  1008. .clk = "core_l3_ick",
  1009. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1010. };
  1011. /* dma attributes */
  1012. static struct omap_dma_dev_attr dma_dev_attr = {
  1013. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1014. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1015. .lch_count = 32,
  1016. };
  1017. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  1018. .rev_offs = 0x0000,
  1019. .sysc_offs = 0x002c,
  1020. .syss_offs = 0x0028,
  1021. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1022. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1023. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  1024. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1025. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1026. .sysc_fields = &omap_hwmod_sysc_type1,
  1027. };
  1028. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  1029. .name = "dma",
  1030. .sysc = &omap3xxx_dma_sysc,
  1031. };
  1032. /* dma_system */
  1033. static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
  1034. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1035. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1036. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1037. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1038. };
  1039. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  1040. {
  1041. .pa_start = 0x48056000,
  1042. .pa_end = 0x4a0560ff,
  1043. .flags = ADDR_TYPE_RT
  1044. },
  1045. };
  1046. /* dma_system master ports */
  1047. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  1048. &omap3xxx_dma_system__l3,
  1049. };
  1050. /* l4_cfg -> dma_system */
  1051. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  1052. .master = &omap3xxx_l4_core_hwmod,
  1053. .slave = &omap3xxx_dma_system_hwmod,
  1054. .clk = "core_l4_ick",
  1055. .addr = omap3xxx_dma_system_addrs,
  1056. .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
  1057. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1058. };
  1059. /* dma_system slave ports */
  1060. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  1061. &omap3xxx_l4_core__dma_system,
  1062. };
  1063. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  1064. .name = "dma",
  1065. .class = &omap3xxx_dma_hwmod_class,
  1066. .mpu_irqs = omap3xxx_dma_system_irqs,
  1067. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
  1068. .main_clk = "core_l3_ick",
  1069. .prcm = {
  1070. .omap2 = {
  1071. .module_offs = CORE_MOD,
  1072. .prcm_reg_id = 1,
  1073. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1074. .idlest_reg_id = 1,
  1075. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1076. },
  1077. },
  1078. .slaves = omap3xxx_dma_system_slaves,
  1079. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  1080. .masters = omap3xxx_dma_system_masters,
  1081. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  1082. .dev_attr = &dma_dev_attr,
  1083. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1084. .flags = HWMOD_NO_IDLEST,
  1085. };
  1086. /* SR common */
  1087. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  1088. .clkact_shift = 20,
  1089. };
  1090. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  1091. .sysc_offs = 0x24,
  1092. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  1093. .clockact = CLOCKACT_TEST_ICLK,
  1094. .sysc_fields = &omap34xx_sr_sysc_fields,
  1095. };
  1096. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  1097. .name = "smartreflex",
  1098. .sysc = &omap34xx_sr_sysc,
  1099. .rev = 1,
  1100. };
  1101. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  1102. .sidle_shift = 24,
  1103. .enwkup_shift = 26
  1104. };
  1105. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  1106. .sysc_offs = 0x38,
  1107. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1108. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1109. SYSC_NO_CACHE),
  1110. .sysc_fields = &omap36xx_sr_sysc_fields,
  1111. };
  1112. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  1113. .name = "smartreflex",
  1114. .sysc = &omap36xx_sr_sysc,
  1115. .rev = 2,
  1116. };
  1117. /* SR1 */
  1118. static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
  1119. &omap3_l4_core__sr1,
  1120. };
  1121. static struct omap_hwmod omap34xx_sr1_hwmod = {
  1122. .name = "sr1_hwmod",
  1123. .class = &omap34xx_smartreflex_hwmod_class,
  1124. .main_clk = "sr1_fck",
  1125. .vdd_name = "mpu",
  1126. .prcm = {
  1127. .omap2 = {
  1128. .prcm_reg_id = 1,
  1129. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1130. .module_offs = WKUP_MOD,
  1131. .idlest_reg_id = 1,
  1132. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1133. },
  1134. },
  1135. .slaves = omap3_sr1_slaves,
  1136. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  1137. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  1138. CHIP_IS_OMAP3430ES3_0 |
  1139. CHIP_IS_OMAP3430ES3_1),
  1140. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1141. };
  1142. static struct omap_hwmod omap36xx_sr1_hwmod = {
  1143. .name = "sr1_hwmod",
  1144. .class = &omap36xx_smartreflex_hwmod_class,
  1145. .main_clk = "sr1_fck",
  1146. .vdd_name = "mpu",
  1147. .prcm = {
  1148. .omap2 = {
  1149. .prcm_reg_id = 1,
  1150. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1151. .module_offs = WKUP_MOD,
  1152. .idlest_reg_id = 1,
  1153. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1154. },
  1155. },
  1156. .slaves = omap3_sr1_slaves,
  1157. .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
  1158. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1159. };
  1160. /* SR2 */
  1161. static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
  1162. &omap3_l4_core__sr2,
  1163. };
  1164. static struct omap_hwmod omap34xx_sr2_hwmod = {
  1165. .name = "sr2_hwmod",
  1166. .class = &omap34xx_smartreflex_hwmod_class,
  1167. .main_clk = "sr2_fck",
  1168. .vdd_name = "core",
  1169. .prcm = {
  1170. .omap2 = {
  1171. .prcm_reg_id = 1,
  1172. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1173. .module_offs = WKUP_MOD,
  1174. .idlest_reg_id = 1,
  1175. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1176. },
  1177. },
  1178. .slaves = omap3_sr2_slaves,
  1179. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  1180. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
  1181. CHIP_IS_OMAP3430ES3_0 |
  1182. CHIP_IS_OMAP3430ES3_1),
  1183. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1184. };
  1185. static struct omap_hwmod omap36xx_sr2_hwmod = {
  1186. .name = "sr2_hwmod",
  1187. .class = &omap36xx_smartreflex_hwmod_class,
  1188. .main_clk = "sr2_fck",
  1189. .vdd_name = "core",
  1190. .prcm = {
  1191. .omap2 = {
  1192. .prcm_reg_id = 1,
  1193. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1194. .module_offs = WKUP_MOD,
  1195. .idlest_reg_id = 1,
  1196. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1197. },
  1198. },
  1199. .slaves = omap3_sr2_slaves,
  1200. .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
  1201. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  1202. };
  1203. /* l4 core -> mcspi1 interface */
  1204. static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
  1205. {
  1206. .pa_start = 0x48098000,
  1207. .pa_end = 0x480980ff,
  1208. .flags = ADDR_TYPE_RT,
  1209. },
  1210. };
  1211. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  1212. .master = &omap3xxx_l4_core_hwmod,
  1213. .slave = &omap34xx_mcspi1,
  1214. .clk = "mcspi1_ick",
  1215. .addr = omap34xx_mcspi1_addr_space,
  1216. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
  1217. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1218. };
  1219. /* l4 core -> mcspi2 interface */
  1220. static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
  1221. {
  1222. .pa_start = 0x4809a000,
  1223. .pa_end = 0x4809a0ff,
  1224. .flags = ADDR_TYPE_RT,
  1225. },
  1226. };
  1227. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  1228. .master = &omap3xxx_l4_core_hwmod,
  1229. .slave = &omap34xx_mcspi2,
  1230. .clk = "mcspi2_ick",
  1231. .addr = omap34xx_mcspi2_addr_space,
  1232. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
  1233. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1234. };
  1235. /* l4 core -> mcspi3 interface */
  1236. static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
  1237. {
  1238. .pa_start = 0x480b8000,
  1239. .pa_end = 0x480b80ff,
  1240. .flags = ADDR_TYPE_RT,
  1241. },
  1242. };
  1243. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  1244. .master = &omap3xxx_l4_core_hwmod,
  1245. .slave = &omap34xx_mcspi3,
  1246. .clk = "mcspi3_ick",
  1247. .addr = omap34xx_mcspi3_addr_space,
  1248. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
  1249. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1250. };
  1251. /* l4 core -> mcspi4 interface */
  1252. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  1253. {
  1254. .pa_start = 0x480ba000,
  1255. .pa_end = 0x480ba0ff,
  1256. .flags = ADDR_TYPE_RT,
  1257. },
  1258. };
  1259. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  1260. .master = &omap3xxx_l4_core_hwmod,
  1261. .slave = &omap34xx_mcspi4,
  1262. .clk = "mcspi4_ick",
  1263. .addr = omap34xx_mcspi4_addr_space,
  1264. .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
  1265. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1266. };
  1267. /*
  1268. * 'mcspi' class
  1269. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1270. * bus
  1271. */
  1272. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  1273. .rev_offs = 0x0000,
  1274. .sysc_offs = 0x0010,
  1275. .syss_offs = 0x0014,
  1276. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1277. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1278. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1279. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1280. .sysc_fields = &omap_hwmod_sysc_type1,
  1281. };
  1282. static struct omap_hwmod_class omap34xx_mcspi_class = {
  1283. .name = "mcspi",
  1284. .sysc = &omap34xx_mcspi_sysc,
  1285. .rev = OMAP3_MCSPI_REV,
  1286. };
  1287. /* mcspi1 */
  1288. static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
  1289. { .name = "irq", .irq = 65 },
  1290. };
  1291. static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
  1292. { .name = "tx0", .dma_req = 35 },
  1293. { .name = "rx0", .dma_req = 36 },
  1294. { .name = "tx1", .dma_req = 37 },
  1295. { .name = "rx1", .dma_req = 38 },
  1296. { .name = "tx2", .dma_req = 39 },
  1297. { .name = "rx2", .dma_req = 40 },
  1298. { .name = "tx3", .dma_req = 41 },
  1299. { .name = "rx3", .dma_req = 42 },
  1300. };
  1301. static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
  1302. &omap34xx_l4_core__mcspi1,
  1303. };
  1304. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1305. .num_chipselect = 4,
  1306. };
  1307. static struct omap_hwmod omap34xx_mcspi1 = {
  1308. .name = "mcspi1",
  1309. .mpu_irqs = omap34xx_mcspi1_mpu_irqs,
  1310. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs),
  1311. .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
  1312. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
  1313. .main_clk = "mcspi1_fck",
  1314. .prcm = {
  1315. .omap2 = {
  1316. .module_offs = CORE_MOD,
  1317. .prcm_reg_id = 1,
  1318. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  1319. .idlest_reg_id = 1,
  1320. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  1321. },
  1322. },
  1323. .slaves = omap34xx_mcspi1_slaves,
  1324. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
  1325. .class = &omap34xx_mcspi_class,
  1326. .dev_attr = &omap_mcspi1_dev_attr,
  1327. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1328. };
  1329. /* mcspi2 */
  1330. static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
  1331. { .name = "irq", .irq = 66 },
  1332. };
  1333. static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
  1334. { .name = "tx0", .dma_req = 43 },
  1335. { .name = "rx0", .dma_req = 44 },
  1336. { .name = "tx1", .dma_req = 45 },
  1337. { .name = "rx1", .dma_req = 46 },
  1338. };
  1339. static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
  1340. &omap34xx_l4_core__mcspi2,
  1341. };
  1342. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1343. .num_chipselect = 2,
  1344. };
  1345. static struct omap_hwmod omap34xx_mcspi2 = {
  1346. .name = "mcspi2",
  1347. .mpu_irqs = omap34xx_mcspi2_mpu_irqs,
  1348. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs),
  1349. .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
  1350. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
  1351. .main_clk = "mcspi2_fck",
  1352. .prcm = {
  1353. .omap2 = {
  1354. .module_offs = CORE_MOD,
  1355. .prcm_reg_id = 1,
  1356. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  1357. .idlest_reg_id = 1,
  1358. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  1359. },
  1360. },
  1361. .slaves = omap34xx_mcspi2_slaves,
  1362. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
  1363. .class = &omap34xx_mcspi_class,
  1364. .dev_attr = &omap_mcspi2_dev_attr,
  1365. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1366. };
  1367. /* mcspi3 */
  1368. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  1369. { .name = "irq", .irq = 91 }, /* 91 */
  1370. };
  1371. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  1372. { .name = "tx0", .dma_req = 15 },
  1373. { .name = "rx0", .dma_req = 16 },
  1374. { .name = "tx1", .dma_req = 23 },
  1375. { .name = "rx1", .dma_req = 24 },
  1376. };
  1377. static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
  1378. &omap34xx_l4_core__mcspi3,
  1379. };
  1380. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1381. .num_chipselect = 2,
  1382. };
  1383. static struct omap_hwmod omap34xx_mcspi3 = {
  1384. .name = "mcspi3",
  1385. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  1386. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
  1387. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  1388. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
  1389. .main_clk = "mcspi3_fck",
  1390. .prcm = {
  1391. .omap2 = {
  1392. .module_offs = CORE_MOD,
  1393. .prcm_reg_id = 1,
  1394. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  1395. .idlest_reg_id = 1,
  1396. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  1397. },
  1398. },
  1399. .slaves = omap34xx_mcspi3_slaves,
  1400. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
  1401. .class = &omap34xx_mcspi_class,
  1402. .dev_attr = &omap_mcspi3_dev_attr,
  1403. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1404. };
  1405. /* SPI4 */
  1406. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  1407. { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
  1408. };
  1409. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  1410. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  1411. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  1412. };
  1413. static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
  1414. &omap34xx_l4_core__mcspi4,
  1415. };
  1416. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  1417. .num_chipselect = 1,
  1418. };
  1419. static struct omap_hwmod omap34xx_mcspi4 = {
  1420. .name = "mcspi4",
  1421. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  1422. .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
  1423. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  1424. .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
  1425. .main_clk = "mcspi4_fck",
  1426. .prcm = {
  1427. .omap2 = {
  1428. .module_offs = CORE_MOD,
  1429. .prcm_reg_id = 1,
  1430. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  1431. .idlest_reg_id = 1,
  1432. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  1433. },
  1434. },
  1435. .slaves = omap34xx_mcspi4_slaves,
  1436. .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
  1437. .class = &omap34xx_mcspi_class,
  1438. .dev_attr = &omap_mcspi4_dev_attr,
  1439. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1440. };
  1441. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  1442. &omap3xxx_l3_main_hwmod,
  1443. &omap3xxx_l4_core_hwmod,
  1444. &omap3xxx_l4_per_hwmod,
  1445. &omap3xxx_l4_wkup_hwmod,
  1446. &omap3xxx_mpu_hwmod,
  1447. &omap3xxx_iva_hwmod,
  1448. &omap3xxx_wd_timer2_hwmod,
  1449. &omap3xxx_uart1_hwmod,
  1450. &omap3xxx_uart2_hwmod,
  1451. &omap3xxx_uart3_hwmod,
  1452. &omap3xxx_uart4_hwmod,
  1453. &omap3xxx_i2c1_hwmod,
  1454. &omap3xxx_i2c2_hwmod,
  1455. &omap3xxx_i2c3_hwmod,
  1456. &omap34xx_sr1_hwmod,
  1457. &omap34xx_sr2_hwmod,
  1458. &omap36xx_sr1_hwmod,
  1459. &omap36xx_sr2_hwmod,
  1460. /* gpio class */
  1461. &omap3xxx_gpio1_hwmod,
  1462. &omap3xxx_gpio2_hwmod,
  1463. &omap3xxx_gpio3_hwmod,
  1464. &omap3xxx_gpio4_hwmod,
  1465. &omap3xxx_gpio5_hwmod,
  1466. &omap3xxx_gpio6_hwmod,
  1467. /* dma_system class*/
  1468. &omap3xxx_dma_system_hwmod,
  1469. /* mcspi class */
  1470. &omap34xx_mcspi1,
  1471. &omap34xx_mcspi2,
  1472. &omap34xx_mcspi3,
  1473. &omap34xx_mcspi4,
  1474. NULL,
  1475. };
  1476. int __init omap3xxx_hwmod_init(void)
  1477. {
  1478. return omap_hwmod_init(omap3xxx_hwmods);
  1479. }