omap_hwmod_2xxx_3xxx_ipblock_data.c 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. /*
  2. * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3
  3. *
  4. * Copyright (C) 2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <plat/omap_hwmod.h>
  13. #include <plat/serial.h>
  14. #include <plat/dma.h>
  15. #include <plat/common.h>
  16. #include <plat/hdq1w.h>
  17. #include <mach/irqs.h>
  18. #include "omap_hwmod_common_data.h"
  19. /* UART */
  20. static struct omap_hwmod_class_sysconfig omap2_uart_sysc = {
  21. .rev_offs = 0x50,
  22. .sysc_offs = 0x54,
  23. .syss_offs = 0x58,
  24. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  25. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  26. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  27. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  28. .sysc_fields = &omap_hwmod_sysc_type1,
  29. };
  30. struct omap_hwmod_class omap2_uart_class = {
  31. .name = "uart",
  32. .sysc = &omap2_uart_sysc,
  33. };
  34. /*
  35. * 'dss' class
  36. * display sub-system
  37. */
  38. static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
  39. .rev_offs = 0x0000,
  40. .sysc_offs = 0x0010,
  41. .syss_offs = 0x0014,
  42. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  43. SYSS_HAS_RESET_STATUS),
  44. .sysc_fields = &omap_hwmod_sysc_type1,
  45. };
  46. struct omap_hwmod_class omap2_dss_hwmod_class = {
  47. .name = "dss",
  48. .sysc = &omap2_dss_sysc,
  49. .reset = omap_dss_reset,
  50. };
  51. /*
  52. * 'rfbi' class
  53. * remote frame buffer interface
  54. */
  55. static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
  56. .rev_offs = 0x0000,
  57. .sysc_offs = 0x0010,
  58. .syss_offs = 0x0014,
  59. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  60. SYSC_HAS_AUTOIDLE),
  61. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  62. .sysc_fields = &omap_hwmod_sysc_type1,
  63. };
  64. struct omap_hwmod_class omap2_rfbi_hwmod_class = {
  65. .name = "rfbi",
  66. .sysc = &omap2_rfbi_sysc,
  67. };
  68. /*
  69. * 'venc' class
  70. * video encoder
  71. */
  72. struct omap_hwmod_class omap2_venc_hwmod_class = {
  73. .name = "venc",
  74. };
  75. /* Common DMA request line data */
  76. struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
  77. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  78. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  79. { .dma_req = -1 }
  80. };
  81. struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
  82. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  83. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  84. { .dma_req = -1 }
  85. };
  86. struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
  87. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  88. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  89. { .dma_req = -1 }
  90. };
  91. struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
  92. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  93. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  94. { .dma_req = -1 }
  95. };
  96. struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
  97. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  98. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  99. { .dma_req = -1 }
  100. };
  101. struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[] = {
  102. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  103. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  104. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  105. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  106. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  107. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  108. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  109. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  110. { .dma_req = -1 }
  111. };
  112. struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[] = {
  113. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  114. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  115. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  116. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  117. { .dma_req = -1 }
  118. };
  119. struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[] = {
  120. { .name = "rx", .dma_req = 32 },
  121. { .name = "tx", .dma_req = 31 },
  122. { .dma_req = -1 }
  123. };
  124. struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[] = {
  125. { .name = "rx", .dma_req = 34 },
  126. { .name = "tx", .dma_req = 33 },
  127. { .dma_req = -1 }
  128. };
  129. struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[] = {
  130. { .name = "rx", .dma_req = 18 },
  131. { .name = "tx", .dma_req = 17 },
  132. { .dma_req = -1 }
  133. };
  134. /* Other IP block data */
  135. /*
  136. * omap_hwmod class data
  137. */
  138. struct omap_hwmod_class l3_hwmod_class = {
  139. .name = "l3"
  140. };
  141. struct omap_hwmod_class l4_hwmod_class = {
  142. .name = "l4"
  143. };
  144. struct omap_hwmod_class mpu_hwmod_class = {
  145. .name = "mpu"
  146. };
  147. struct omap_hwmod_class iva_hwmod_class = {
  148. .name = "iva"
  149. };
  150. /* Common MPU IRQ line data */
  151. struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = {
  152. { .irq = 37, },
  153. { .irq = -1 }
  154. };
  155. struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = {
  156. { .irq = 38, },
  157. { .irq = -1 }
  158. };
  159. struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = {
  160. { .irq = 39, },
  161. { .irq = -1 }
  162. };
  163. struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = {
  164. { .irq = 40, },
  165. { .irq = -1 }
  166. };
  167. struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = {
  168. { .irq = 41, },
  169. { .irq = -1 }
  170. };
  171. struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = {
  172. { .irq = 42, },
  173. { .irq = -1 }
  174. };
  175. struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = {
  176. { .irq = 43, },
  177. { .irq = -1 }
  178. };
  179. struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = {
  180. { .irq = 44, },
  181. { .irq = -1 }
  182. };
  183. struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = {
  184. { .irq = 45, },
  185. { .irq = -1 }
  186. };
  187. struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = {
  188. { .irq = 46, },
  189. { .irq = -1 }
  190. };
  191. struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = {
  192. { .irq = 47, },
  193. { .irq = -1 }
  194. };
  195. struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = {
  196. { .irq = INT_24XX_UART1_IRQ, },
  197. { .irq = -1 }
  198. };
  199. struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = {
  200. { .irq = INT_24XX_UART2_IRQ, },
  201. { .irq = -1 }
  202. };
  203. struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = {
  204. { .irq = INT_24XX_UART3_IRQ, },
  205. { .irq = -1 }
  206. };
  207. struct omap_hwmod_irq_info omap2_dispc_irqs[] = {
  208. { .irq = 25 },
  209. { .irq = -1 }
  210. };
  211. struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = {
  212. { .irq = INT_24XX_I2C1_IRQ, },
  213. { .irq = -1 }
  214. };
  215. struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = {
  216. { .irq = INT_24XX_I2C2_IRQ, },
  217. { .irq = -1 }
  218. };
  219. struct omap_hwmod_irq_info omap2_gpio1_irqs[] = {
  220. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  221. { .irq = -1 }
  222. };
  223. struct omap_hwmod_irq_info omap2_gpio2_irqs[] = {
  224. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  225. { .irq = -1 }
  226. };
  227. struct omap_hwmod_irq_info omap2_gpio3_irqs[] = {
  228. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  229. { .irq = -1 }
  230. };
  231. struct omap_hwmod_irq_info omap2_gpio4_irqs[] = {
  232. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  233. { .irq = -1 }
  234. };
  235. struct omap_hwmod_irq_info omap2_dma_system_irqs[] = {
  236. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  237. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  238. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  239. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  240. { .irq = -1 }
  241. };
  242. struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = {
  243. { .irq = 65 },
  244. { .irq = -1 }
  245. };
  246. struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
  247. { .irq = 66 },
  248. { .irq = -1 }
  249. };
  250. struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = {
  251. .rev_offs = 0x0,
  252. .sysc_offs = 0x14,
  253. .syss_offs = 0x18,
  254. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  255. SYSS_HAS_RESET_STATUS),
  256. .sysc_fields = &omap_hwmod_sysc_type1,
  257. };
  258. struct omap_hwmod_class omap2_hdq1w_class = {
  259. .name = "hdq1w",
  260. .sysc = &omap2_hdq1w_sysc,
  261. .reset = &omap_hdq1w_reset,
  262. };
  263. struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = {
  264. { .irq = 58, },
  265. { .irq = -1 }
  266. };