omap_hwmod_3xxx_data.c 36 KB

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