You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

900 lines
42 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /* ============================================================================
  2. * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005, 2006, 2007
  3. *
  4. * Use of this software is controlled by the terms and conditions found in the
  5. * license agreement under which this software has been supplied.
  6. * ===========================================================================
  7. */
  8. #ifndef _SOC_H_
  9. #define _SOC_H_
  10. /* =============================================================================
  11. * Revision History
  12. * ===============
  13. * 15-Feb-2007 NS File created.
  14. * Apr 09 2009 IMTIAZ SMA Updated for OMAPL138 SoC
  15. * =============================================================================
  16. */
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include "csl/cslr.h"
  21. /**************************************************************************\
  22. * SOC file
  23. \**************************************************************************/
  24. /******************************************************************************\
  25. * Static inline definition
  26. \******************************************************************************/
  27. #ifndef CSL_IDEF_INLINE
  28. #define CSL_IDEF_INLINE static inline
  29. #endif
  30. /******************************************************************************\
  31. * Peripheral Instance count
  32. \******************************************************************************/
  33. /** @brief Number of UPP instances */
  34. #define CSL_UPP_PER_CNT 1
  35. /** @brief Number of UHPI instances */
  36. #define CSL_HPI_PER_CNT 1
  37. /** @brief Number of McASP instances */
  38. #define CSL_MCASP_PER_CNT 1
  39. /** @brief Number of TIMER instances */
  40. #define CSL_TMR_PER_CNT 4
  41. /** @brief Number of PSC instances */
  42. #define CSL_PSC_PER_CNT 2
  43. /** @brief Number of UART instances */
  44. #define CSL_UART_PER_CNT 3
  45. /** @brief Number of SPI instances */
  46. #define CSL_SPI_PER_CNT 2
  47. /** @brief Number of I2C instances */
  48. #define CSL_I2C_PER_CNT 2
  49. /** @brief Number of PLL instances */
  50. #define CSL_PLLC_PER_CNT 2
  51. /** @brief Number of MMCSD instances */
  52. #define CSL_MMCSD_PER_CNT 2
  53. /** @brief Number of LCDC instances */
  54. #define CSL_LCDC_PER_CNT 1
  55. /** @brief Number of Mcbsp instances */
  56. #define CSL_MCBSP_PER_CNT 2
  57. /** @brief Number of EDMA3 CC instances */
  58. #define CSL_EDMA3CC_CNT 2
  59. /** @brief Number of EDMA3 TC instances */
  60. #define CSL_EDMA3TC_CNT 3
  61. /** @brief Number of EMIFA instances */
  62. #define CSL_EMIFA_PER_CNT 1
  63. /** @brief Number of EMIFB instances */
  64. #define CSL_EMIFB_PER_CNT 1
  65. /** @brief Number of EMAC instances */
  66. #define CSL_EMAC_PER_CNT 1
  67. /** @brief Number of MDIO instances */
  68. #define CSL_MDIO_PER_CNT 1
  69. /** @brief Number of EHRPWM instances */
  70. #define CSL_EHRPWM_PER_CNT 2
  71. /** @brief Number of ECAP instances */
  72. #define CSL_ECAP_PER_CNT 3
  73. /** @brief Number of CPGMAC instances */
  74. #define CSL_CPGMACSSR_PER_CNT 1
  75. /** @brief Number of CPPI instances */
  76. #define CSL_CPPI_PER_CNT 1
  77. /** @brief Number of USB instances */
  78. #define CSL_USB_PER_CNT 2
  79. /** @brief Number of VPIF instances */
  80. #define CSL_VPIF_PER_CNT 1
  81. /** @brief Number of INTC instances */
  82. #define CSL_INTC_PER_CNT 1
  83. /** @brief Number of AINTC instances */
  84. #define CSL_AINTC_PER_CNT 1
  85. /** @brief Number of SATA instances */
  86. #define CSL_SATA_PER_CNT 1
  87. /** @brief Number of RTC instances */
  88. #define CSL_RTC_PER_CNT 1
  89. /** @brief Number of GPIO instances */
  90. #define CSL_GPIO_PER_CNT 1
  91. /** @brief Number of SYSCFG instances */
  92. #define CSL_SYSCFG_PER_CNT 2
  93. /******************************************************************************\
  94. * Peripheral Instance definitions.
  95. \******************************************************************************/
  96. /** @brief Peripheral Instances of UHPI instances */
  97. #define CSL_HPI (0)
  98. /** @brief Peripheral Instances of McASP instances */
  99. #define CSL_MCASP_0 (0)
  100. /** @brief Peripheral Instance of EDMA CC instances */
  101. #define CSL_EDMA3CC_0 (0)
  102. #define CSL_EDMA3CC_1 (1)
  103. /** @brief Peripheral Instance of EDMA TC instances */
  104. #define CSL_EDMA3TC_0 (0)
  105. #define CSL_EDMA3TC_1 (1)
  106. /** @brief Peripheral Instance of Timer 64 instances */
  107. #define CSL_TMR_0 (0)
  108. #define CSL_TMR_1 (1)
  109. #define CSL_TMR_2 (2)
  110. #define CSL_TMR_3 (3)
  111. /** @brief Peripheral Instances of PSC instances */
  112. #define CSL_PSC_0 (0)
  113. #define CSL_PSC_1 (1)
  114. /** @brief Peripheral Instances of UART instances */
  115. #define CSL_UART_0 (0)
  116. #define CSL_UART_1 (1)
  117. #define CSL_UART_2 (2)
  118. /** @brief Peripheral Instances of SPI instances */
  119. #define CSL_SPI_0 (0)
  120. #define CSL_SPI_1 (1)
  121. /** @brief Peripheral Instances of I2C instances */
  122. #define CSL_I2C_0 (0)
  123. #define CSL_I2C_1 (1)
  124. /** @brief Peripheral Instances of MMCSD instances */
  125. #define CSL_MMCSD_0 (0)
  126. #define CSL_MMCSD_1 (1)
  127. /** @brief Peripheral Instances of LCDC instances */
  128. #define CSL_LCDC (0)
  129. /** @brief Instance number of PLL controller */
  130. #define CSL_PLLC_0 (0)
  131. #define CSL_PLLC_1 (1)
  132. /** @brief Peripheral Instance of EMIFA instances */
  133. #define CSL_EMIFA (0)
  134. /** @brief Peripheral Instance of EMAC instances */
  135. #define CSL_EMAC (0)
  136. /** @brief Peripheral Instance of MDIO instances */
  137. #define CSL_MDIO (0)
  138. /** @brief Peripheral Instance of EHRPWM instances */
  139. #define CSL_EHRPWM_0 (0)
  140. #define CSL_EHRPWM_1 (1)
  141. /** @brief Peripheral Instance of ECAP instances */
  142. #define CSL_ECAP_0 (0)
  143. #define CSL_ECAP_1 (1)
  144. #define CSL_ECAP_2 (2)
  145. /** @brief Peripheral Instance of USB instances */
  146. #define CSL_USB_0 (0)
  147. #define CSL_USB_1 (1)
  148. /** @brief Peripheral Instance of PRU CORE instances */
  149. #define CSL_PRUCORE_0 (0)
  150. #define CSL_PRUCORE_1 (1)
  151. /** @brief Peripheral Instance of PRUINTC instances */
  152. #define CSL_PRUINTC (0)
  153. /** @brief Peripheral Instance of INTC instances */
  154. #define CSL_INTC (0)
  155. /** @brief Peripheral Instance of AINTC instances */
  156. #define CSL_AINTC (0)
  157. /** @brief Peripheral Instance of RTC instances */
  158. #define CSL_RTC (0)
  159. /** @brief Peripheral Instance of GPIO instances */
  160. #define CSL_GPIO (0)
  161. /** @brief Peripheral Instance of ECTL instances */
  162. #define CSL_ECTL (0)
  163. /** @brief Peripheral Instance of SYSCFG instances */
  164. #define CSL_SYSCFG (2)
  165. /*******************************************************************************
  166. * Peripheral Base Address
  167. *******************************************************************************/
  168. /** @brief Base address of INTC memory mapped registers */
  169. #define CSL_INTC_0_REGS (0x01800000u)
  170. /** @brief Base address of PDC memory mapped registers */
  171. #define CSL_PWRDWN_PDC_REGS (0x01810000u)
  172. /** @brief Base address of SYS - Security ID register */
  173. #define CSL_SYS_0_SECURITY_ID_REGS (0x01811000u)
  174. /** @brief Base address of SYS - Revision ID register */
  175. #define CSL_SYS_0_REV_ID_REGS (0x01812000u)
  176. /** #brief IDMA Module memory mapped address */
  177. #define CSL_IDMA_0_REGS (0x01820000u)
  178. /** #brief EMC Module memory mapped address */
  179. #define CSL_EMC_0_REGS (0x01820000u)
  180. /** #brief Cache Module memory mapped address */
  181. #define CSL_CACHE_0_REGS (0x01840000u)
  182. /** @brief Base address of Channel controller memory mapped registers */
  183. #define CSL_EDMA30CC_0_REGS (0x01C00000u)
  184. /** @brief Base address of Transfer controller memory mapped registers */
  185. #define CSL_EDMA30TC_0_REGS (0x01C08000u)
  186. #define CSL_EDMA30TC_1_REGS (0x01C08400u)
  187. /** @brief Base address of PSC memory mapped registers */
  188. #define CSL_PSC_0_REGS (0x01C10000u)
  189. /** @brief PLL controller instance o module address */
  190. #define CSL_PLLC_0_REGS (0x01C11000u)
  191. /** @brief Base address of DEV memory mapped registers */
  192. #define CSL_SYSCFG_0_REGS (0x01C14000u)
  193. /** @brief Base address of TIMER memory mapped registers */
  194. #define CSL_TMR_0_REGS (0x01C20000u)
  195. #define CSL_TMR_1_REGS (0x01C21000u)
  196. /** @brief Base address of I2C memory mapped registers */
  197. #define CSL_I2C_0_REGS (0x01C22000u)
  198. /** @brief Base address of RTC memory */
  199. #define CSL_RTC_0_REGS (0x01C23000u)
  200. /** @brief Base address of MMCSD memory mapped registers */
  201. #define CSL_MMCSD_0_REGS (0x01C40000u)
  202. /** @brief Base address of SPI memory mapped registers */
  203. #define CSL_SPI_0_REGS (0x01C41000u)
  204. /** @brief Base address of UART memory mapped registers */
  205. #define CSL_UART_0_REGS (0x01C42000u)
  206. /** @brief Base address of McASP memory mapped registers */
  207. #define CSL_MCASP_0_CTRL_REGS (0x01D00000u)
  208. #define CSL_MCASP_0_FIFO_REGS (0x01D01000u)
  209. #define CSL_MCASP_0_DATA_REGS (0x01D02000u)
  210. /** @brief Base address of UART memory mapped registers */
  211. #define CSL_UART_1_REGS (0x01D0C000u)
  212. #define CSL_UART_2_REGS (0x01D0D000u)
  213. /** @brief Base address of McBSP memory mapped registers */
  214. #define CSL_MCBSP_0_CTRL_REGS (0x01D10000u)
  215. #define CSL_MCBSP_0_FIFO_REGS (0x01D10800u)
  216. #define CSL_MCBSP_0_DATA_REGS (0x01F10000u)
  217. /** @brief Base address of McASP memory mapped registers */
  218. #define CSL_MCBSP_1_CTRL_REGS (0x01D11000u)
  219. #define CSL_MCBSP_1_FIFO_REGS (0x01D11800u)
  220. #define CSL_MCBSP_1_DATA_REGS (0x01F10000u)
  221. /** @brief Base address of USB memory */
  222. #define CSL_USB_0_REGS (0x01E00000u)
  223. #define CSL_USB_1_REGS (0x01E25000u)
  224. /** @brief Base address of HPI memory mapped registers */
  225. #define CSL_HPI_0_REGS (0x01E10000u)
  226. /** @brief Base address of LCDC memory mapped registers */
  227. #define CSL_LCDC_0_REGS (0x01E13000u)
  228. /** @brief Base address of UPP memory mapped registers */
  229. #define CSL_UPP_0_REGS (0x01E16000u)
  230. /** @brief Base address of VPIF memory mapped registers */
  231. #define CSL_VPIF_0_REGS (0x01E17000u)
  232. /** @brief Base address of SATA memory mapped registers */
  233. #define CSL_SATA_0_REGS (0x01E18000u)
  234. /** @brief PLL controller instance 1 module address */
  235. #define CSL_PLLC_1_REGS (0X01E1A000u)
  236. /** @brief Base address of MMCSD memory mapped registers */
  237. #define CSL_MMCSD_1_REGS (0x01E1B000u)
  238. /** @brief Base address of EMAC memory */
  239. #define CSL_EMAC_DSC_CTRL_MOD_RAM (0x01E20000u)
  240. #define CSL_EMAC_DSC_CTRL_MOD_REG (0x01E22000u)
  241. #define CSL_EMAC_DSC_CONTROL_REG (0x01E23000u)
  242. #define CSL_MDIO_0_REGS (0x01E24000u)
  243. /** @brief Base address of PRU Core Regsiters */
  244. #define CSL_PRUCORE_0_REGS (0x01C37000u)
  245. #define CSL_PRUCORE_1_REGS (0x01C37800u)
  246. /** @brief Base address of PRU Interrupt Controller Registers */
  247. #define CSL_PRUINTC_0_REGS (0x01C34000u)
  248. /** @brief Base address of GPIO memory mapped registers */
  249. #define CSL_GPIO_0_REGS (0x01E26000u)
  250. /** @brief Base address of PSC memory mapped registers */
  251. #define CSL_PSC_1_REGS (0x01E27000u)
  252. /** @brief Base address of I2C memory mapped registers */
  253. #define CSL_I2C_1_REGS (0x01E28000u)
  254. /** @brief Base address of syscfg registers */
  255. #define CSL_SYSCFG_1_REGS (0x01E2C000u)
  256. /** @brief Base address of Channel controller memory mapped registers */
  257. #define CSL_EDMA31CC_0_REGS (0x01E30000u)
  258. /** @brief Base address of Transfer controller memory mapped registers */
  259. #define CSL_EDMA31TC_0_REGS (0x01E38000u)
  260. /** @brief Base address of EPWM memory mapped registers */
  261. #define CSL_EHRPWM_0_REGS (0x01F00000u)
  262. #define CSL_EHRPWM_1_REGS (0x01F02000u)
  263. /** @brief Base address of EPWM memory mapped registers */
  264. #define CSL_HRPWM_0_REGS (0x01F01000u)
  265. #define CSL_HRPWM_1_REGS (0x01F03000u)
  266. /** @brief Base address of ECAP memory mapped registers */
  267. #define CSL_ECAP_0_REGS (0x01F06000u)
  268. #define CSL_ECAP_1_REGS (0x01F07000u)
  269. #define CSL_ECAP_2_REGS (0x01F08000u)
  270. /** @brief Base address of TIMER memory mapped registers */
  271. #define CSL_TMR_2_REGS (0x01F0C000u)
  272. #define CSL_TMR_3_REGS (0x01F0D000u)
  273. /** @brief Base address of SPI memory mapped registers */
  274. #define CSL_SPI_1_REGS (0x01F0E000u)
  275. /** @brief Base address of EMIFA memory mapped registers */
  276. #define CSL_EMIFA_0_REGS (0x68000000u)
  277. /** @brief Base address of EMIFA_CS0 memory */
  278. #define CSL_EMIFA_CS0_ADDR (0x40000000u)
  279. /** @brief Base address of EMIFA_CS2 memory */
  280. #define CSL_EMIFA_CS2_ADDR (0x60000000u)
  281. /** @brief Base address of EMIFA_CS3 memory */
  282. #define CSL_EMIFA_CS3_ADDR (0x62000000u)
  283. /** @brief Base address of EMIFA_CS4 memory */
  284. #define CSL_EMIFA_CS4_ADDR (0x64000000u)
  285. /** @brief Base address of EMIFA_CS5 memory */
  286. #define CSL_EMIFA_CS5_ADDR (0x66000000u)
  287. /** @brief Base address of DDR memory mapped registers */
  288. #define CSL_DDR2_0_CTRL_REGS (0xB0000000u)
  289. #define CSL_DDR2_0_DATA_REGS (0xC0000000u)
  290. /** @brief Base address of AINTC memory mapped registers */
  291. #define CSL_AINTC_0_REGS (0xFFFEE000u)
  292. /** @brief Base address of UMC Memory protection registers */
  293. #define CSL_MEMPROT_L2_REGS (0x00800000u)
  294. /** @brief Base address of PMC memory Protection registers */
  295. #define CSL_MEMPROT_L1P_REGS (0x00E00000u)
  296. /** @brief Base address of DMC memory protection registers */
  297. #define CSL_MEMPROT_L1D_REGS (0x00F00000u)
  298. /******************************************************************************\
  299. * Interrupt Event IDs
  300. \******************************************************************************/
  301. /*
  302. * @brief Interrupt Event IDs
  303. */
  304. /* Output of event combiner 0, for events 1 to 31 */
  305. #define CSL_INTC_EVENTID_EVT0 (0)
  306. /* Output of event combiner 0, for events 32 to 63 */
  307. #define CSL_INTC_EVENTID_EVT1 (1)
  308. /* Output of event combiner 0, for events 64 to 95 */
  309. #define CSL_INTC_EVENTID_EVT2 (2)
  310. /* Output of event combiner 0, for events 96 to 127 */
  311. #define CSL_INTC_EVENTID_EVT3 (3)
  312. /* Timer 64P0 lower counter interrupt */
  313. #define CSL_INTC_EVENTID_T64P0_TINT12 (4)
  314. /* SYSCFG CHIPSIG Register Interrupt */
  315. #define CSL_INTC_EVENTID_BOOTCFGINT0 (5)
  316. #define CSL_INTC_EVENTID_EHRPWM0 (7)
  317. /* CC Completion Interrupt for region 1 */
  318. #define CSL_INTC_EVENTID_EDMA3CC_INT1 (8)
  319. /* EMU interrupt */
  320. #define CSL_INTC_EVENTID_EMU_DTDMA (9)
  321. /* HiResTimer Trip Zone Interrupt */
  322. #define CSL_INTC_EVENTID_EHRPWM0TZ (10)
  323. /* EMU real time data exchange receive complete */
  324. #define CSL_INTC_EVENTID_EMU_RTDXRX (11)
  325. /* EMU RTDX transmit complete */
  326. #define CSL_INTC_EVENTID_EMU_RTDXTX (12)
  327. /* IDMA Channel 0 Interrupt */
  328. #define CSL_INTC_EVENTID_IDMA0 (13)
  329. /* IDMA Channel 1 Interrupt */
  330. #define CSL_INTC_EVENTID_IDMA1 (14)
  331. /* mmcsd0 mmcsd interrupt */
  332. #define CSL_INTC_EVENTID_MMCSD0_INT0 (15)
  333. /* mmcsd0 SDIO interrupt */
  334. #define CSL_INTC_EVENTID_MMCSD0_INT1 (16)
  335. #define CSL_INTC_EVENTID_EHRPWM1 (18)
  336. /* USB Interrupt */
  337. #define CSL_INTC_EVENTID_USBINT0 (19)
  338. #define CSL_INTC_EVENTID_USB1_HCINT (20)
  339. #define CSL_INTC_EVENTID_USB1_RWAKEUP (21)
  340. #define CSL_INTC_EVENTID_EHRPWM1TZ (23)
  341. /* SATA interrupt */
  342. #define CSL_INTC_EVENTID_SATAINT (24)
  343. /* Timer 64P2 COMBINED counter interrupt */
  344. #define CSL_INTC_EVENTID_T64P2_TINTALL (25)
  345. /* EMAC Interrupt */
  346. #define CSL_INTC_EVENTID_EMAC_RXTHRHC0 (26)
  347. #define CSL_INTC_EVENTID_EMAC_RXC0 (27)
  348. #define CSL_INTC_EVENTID_EMAC_TXC0 (28)
  349. #define CSL_INTC_EVENTID_EMAC_MISCC0 (29)
  350. #define CSL_INTC_EVENTID_EMAC_RXTHRHC1 (30)
  351. #define CSL_INTC_EVENTID_EMAC_RXC1 (31)
  352. #define CSL_INTC_EVENTID_EMAC_TXC1 (32)
  353. #define CSL_INTC_EVENTID_EMAC_MISCC1 (33)
  354. /* UHPI DSPI Interrupt */
  355. #define CSL_INTC_EVENTID_UHPI_DSPINT (34)
  356. /* I2C interrupt */
  357. #define CSL_INTC_EVENTID_I2CINT0 (36)
  358. /* SPI interrupt */
  359. #define CSL_INTC_EVENTID_SPIINT0 (37)
  360. /* UART interrupt */
  361. #define CSL_INTC_EVENTID_UARTINT0 (38)
  362. /* Timer 64P1 lower counter interrupt */
  363. #define CSL_INTC_EVENTID_T64P1_TINT12 (40)
  364. /* GPIO BANK 1 interrupt */
  365. #define CSL_INTC_EVENTID_GPIO_BNK1_INT (41)
  366. #define CSL_INTC_EVENTID_I2CINT1 (42)
  367. /* SPI interrupt */
  368. #define CSL_INTC_EVENTID_SPIINT1 (43)
  369. /* ECAP0 interrupt */
  370. #define CSL_INTC_EVENTID_ECAPINT0 (45)
  371. /* UART INTERRUPT */
  372. #define CSL_INTC_EVENTID_UARTINT1 (46)
  373. /* ECAP1 interrupt */
  374. #define CSL_INTC_EVENTID_ECAPINT1 (47)
  375. /* Timer 64P1 higher counter interrupt */
  376. #define CSL_INTC_EVENTID_T64P1_TINT34 (48)
  377. /* GPIO BANK 2 interrupt */
  378. #define CSL_INTC_EVENTID_GPIO_BNK2_INT (49)
  379. /* ECAP2 interrupt */
  380. #define CSL_INTC_EVENTID_ECAPINT2 (51)
  381. /* GPIO BANK 3 interrupt */
  382. #define CSL_INTC_EVENTID_GPIO_BNK3_INT (52)
  383. /* mmcsd1 SDIO interrupt */
  384. #define CSL_INTC_EVENTID_MMCSD1_INT1 (53)
  385. /* GPIO BANK 4 interrupt */
  386. #define CSL_INTC_EVENTID_GPIO_BNK4_INT (54)
  387. /* EMIFA Error Interrupt */
  388. #define CSL_INTC_EVENTID_EMIFAINT (55)
  389. /* EDMA3 CC Interrupt */
  390. #define CSL_INTC_EVENTID_TPCC0_ERRINT (56)
  391. /* EDMA3 TC Interrupt */
  392. #define CSL_INTC_EVENTID_TPTC_ERRINT0 (57)
  393. #define CSL_INTC_EVENTID_TPTC_ERRINT1 (58)
  394. /* GPIO BANK 5 interrupt */
  395. #define CSL_INTC_EVENTID_GPIO_BNK5_INT (59)
  396. /* DDR2 memory err interrupt */
  397. #define CSL_INTC_EVENTID_DDR2_MEMERR (60)
  398. /* McASP combined interrupt */
  399. #define CSL_INTC_EVENTID_MCASP0INT (61)
  400. /* GPIO BANK 6 interrupt */
  401. #define CSL_INTC_EVENTID_GPIO_BNK6_INT (62)
  402. /* RTC Combined Interrupt */
  403. #define CSL_INTC_EVENTID_RTC_IRQS (63)
  404. /* Timer 64P0 higher counter interrupt */
  405. #define CSL_INTC_EVENTID_T64P0_TINT34 (64)
  406. /* GPIO BANK 0 interrupt */
  407. #define CSL_INTC_EVENTID_GPIO_BNK0_INT (65)
  408. /* SYSCFG_CHIPSIG Register */
  409. #define CSL_INTC_EVENTID_SYSCFG_CHIPINT3 (67)
  410. /* MMCSD 1 interrupt */
  411. #define CSL_INTC_EVENTID_MMCSD1_INT0 (68)
  412. /* uart2 interrupt */
  413. #define CSL_INTC_EVENTID_UARTINT2 (69)
  414. /* PSC interrupt */
  415. #define CSL_INTC_EVENTID_PSC0_ALLINT (70)
  416. #define CSL_INTC_EVENTID_PSC1_ALLINT (71)
  417. /* GPIO bank 7 interrupt */
  418. #define CSL_INTC_EVENTID_GPIO_BNK7_INT (72)
  419. /* LCDC interrupt */
  420. #define CSL_INTC_EVENTID_LCDC_INT0 (73)
  421. /* SYSCFG Protection Shared Interrupt */
  422. #define CSL_INTC_EVENTID_PROTERR (74)
  423. /* GPIO bank 8 interrupt */
  424. #define CSL_INTC_EVENTID_GPIO_BNK8_INT (75)
  425. /* Timer 64P2 Compare Interrupt */
  426. #define CSL_INTC_EVENTID_T64P2_CMPINT0 (78)
  427. #define CSL_INTC_EVENTID_T64P2_CMPINT1 (79)
  428. #define CSL_INTC_EVENTID_T64P2_CMPINT2 (80)
  429. #define CSL_INTC_EVENTID_T64P2_CMPINT3 (81)
  430. #define CSL_INTC_EVENTID_T64P2_CMPINT4 (82)
  431. #define CSL_INTC_EVENTID_T64P2_CMPINT5 (83)
  432. #define CSL_INTC_EVENTID_T64P2_CMPINT6 (84)
  433. #define CSL_INTC_EVENTID_T64P2_CMPINT7 (85)
  434. /* Timer 64P3 Compare Interrupt */
  435. #define CSL_INTC_EVENTID_T64P3_TINTALL (86)
  436. /* McBSP0 RX interrupt */
  437. #define CSL_INTC_EVENTID_MCBSP0_RXINT (87)
  438. /* McBSP0 TX interrupt */
  439. #define CSL_INTC_EVENTID_MCBSP0_TXINT (88)
  440. /* McBSP1 RX interrupt */
  441. #define CSL_INTC_EVENTID_MCBSP1_RXINT (89)
  442. /* McBSP1 TX interrupt */
  443. #define CSL_INTC_EVENTID_MCBSP1_TXINT (90)
  444. /* CC1 region 1 interrupt */
  445. #define CSL_INTC_EVENTID_EDMA3CC1_INT1 (91)
  446. /* CC1 Error Interrupt */
  447. #define CSL_INTC_EVENTID_EDMA3CC1_ERRINT (92)
  448. /* TC2 Error Interrupt */
  449. #define CSL_INTC_EVENTID_EDMA3TC2_ERRINT (93)
  450. /* UPP interrupt event */
  451. #define CSL_INTC_EVENTID_UPPINT (94)
  452. /* VPIF INTERRUPT EVENT */
  453. #define CSL_INTC_EVENTID_VPIFINT (95)
  454. /* Dropped CPU interrupt event */
  455. #define CSL_INTC_EVENTID_INTERR (96)
  456. /* EMC Invalid IDMA parameters */
  457. #define CSL_INTC_EVENTID_EMC_IDMAERR (97)
  458. /* PMC Single bit error detected during DMA read */
  459. #define CSL_INTC_EVENTID_PMC_ED (113)
  460. /* UMC single bit error detected */
  461. #define CSL_INTC_EVENTID_UMC_ED1 (116)
  462. /* UMC two bit error detected */
  463. #define CSL_INTC_EVENTID_UMC_ED2 (117)
  464. /* Power Down sleep interrupt */
  465. #define CSL_INTC_EVENTID_PDC_INT (118)
  466. /* SYS CMPA CPU memory protection fault */
  467. #define CSL_INTC_EVENTID_SYS_CMPA (119)
  468. /* PMC CPU memory protection fault */
  469. #define CSL_INTC_EVENTID_PMC_CMPA (120)
  470. /* PMC DMA memory protection fault */
  471. #define CSL_INTC_EVENTID_PMC_DMPA (121)
  472. /* DMC CPU memory protection fault */
  473. #define CSL_INTC_EVENTID_DMC_CMPA (122)
  474. /* DMC DMA memory protection fault */
  475. #define CSL_INTC_EVENTID_DMC_DMPA (123)
  476. /* UMC CPU memory protection fault */
  477. #define CSL_INTC_EVENTID_UMC_CMPA (124)
  478. /* UMC DMA memory protection fault */
  479. #define CSL_INTC_EVENTID_UMC_DMPA (125)
  480. /* IDMA CPU memory protection fault */
  481. #define CSL_INTC_EVENTID_EMC_CMPA (126)
  482. /* IDMA Bus error interrupt */
  483. #define CSL_INTC_EVENTID_EMC_BUSERR (127)
  484. /*************************** EDMA RELATED DEFINES ****************************/
  485. /******************************************************************************\
  486. * Parameterizable Configuration:- These are fed directly from the RTL
  487. * parameters for the given SOC
  488. \******************************************************************************/
  489. #define CSL_EDMA3_NUM_DMACH 32
  490. #define CSL_EDMA3_NUM_QDMACH 8
  491. #define CSL_EDMA3_NUM_PARAMSETS 128
  492. #define CSL_EDMA3_NUM_EVQUE 2
  493. #define CSL_EDMA3_CHMAPEXIST 0
  494. #define CSL_EDMA3_NUM_REGIONS 4
  495. #define CSL_EDMA3_MEMPROTECT 0
  496. /******************************************************************************\
  497. * Channel Instance count
  498. \******************************************************************************/
  499. #define CSL_EDMA3_CHA_CNT (CSL_EDMA3_NUM_DMACH + \
  500. CSL_EDMA3_NUM_QDMACH)
  501. /* EDMA channel synchronization events */
  502. /* McASP0 Receive Event */
  503. #define CSL_EDMA3_CHA_MCASP0_RX 0
  504. /* McASP0 Transmit Event */
  505. #define CSL_EDMA3_CHA_MCASP0_TX 1
  506. /* McBSP0 Receive Event */
  507. #define CSL_EDMA3_CHA_MCBSP0_RX 2
  508. /* McBSP1 Transmit Event */
  509. #define CSL_EDMA3_CHA_MCBSP0_TX 3
  510. /* McBSP1 Receive Event */
  511. #define CSL_EDMA3_CHA_MCBSP1_RX 4
  512. /* McBSP1 Transmit Event */
  513. #define CSL_EDMA3_CHA_MCBSP1_TX 5
  514. /* GPIO Bank0 event */
  515. #define CSL_EDMA3_CHA_GPIO_BNKINT0 6
  516. /* GPIO Bank1 event */
  517. #define CSL_EDMA3_CHA_GPIO_BNKINT1 7
  518. /* GPIO Bank2 event */
  519. #define CSL_EDMA3_CHA_GPIO_BNKINT2 22
  520. /* GPIO Bank3 event */
  521. #define CSL_EDMA3_CHA_GPIO_BNKINT3 23
  522. /* GPIO Bank4 event */
  523. #define CSL_EDMA3_CHA_GPIO_BNKINT4 28
  524. /* GPIO Bank5 event */
  525. #define CSL_EDMA3_CHA_GPIO_BNKINT5 29
  526. /* GPIO Bank6 event (TPCC1) */
  527. #define CSL_EDMA3_CHA_GPIO_BNKINT6 16
  528. /* GPIO Bank7 event (TPCC1) */
  529. #define CSL_EDMA3_CHA_GPIO_BNKINT7 17
  530. /* GPIO Bank8 event (TPCC1) */
  531. #define CSL_EDMA3_CHA_GPIO_BNKINT8 18
  532. /* UART0 Receive Event */
  533. #define CSL_EDMA3_CHA_UART0_RX 8
  534. /* UART0 Transmit Event */
  535. #define CSL_EDMA3_CHA_UART0_TX 9
  536. /* UART1 Receive Event */
  537. #define CSL_EDMA3_CHA_UART1_RX 12
  538. /* UART1 Transmit Event */
  539. #define CSL_EDMA3_CHA_UART1_TX 13
  540. /* UART2 Receive Event */
  541. #define CSL_EDMA3_CHA_UART2_RX 30
  542. /* UART2 Transmit Event */
  543. #define CSL_EDMA3_CHA_UART2_TX 31
  544. /* Timer 64P0 Event Out 12 */
  545. #define CSL_EDMA3_CHA_TIMER64P0_EVT12 10
  546. /* Timer 64P0 Event Out 34 */
  547. #define CSL_EDMA3_CHA_TIMER64P0_EVT34 11
  548. /* Timer 64P2 Event Out 12 (TPCC1) */
  549. #define CSL_EDMA3_CHA_TIMER64P2_EVT12 24
  550. /* Timer 64P2 Event Out 34 (TPCC1) */
  551. #define CSL_EDMA3_CHA_TIMER64P2_EVT34 25
  552. /* Timer 64P3 Event Out 12 (TPCC1) */
  553. #define CSL_EDMA3_CHA_TIMER64P3_EVT12 26
  554. /* Timer 64P3 Event Out 34 (TPCC1) */
  555. #define CSL_EDMA3_CHA_TIMER64P3_EVT34 27
  556. /* SPI0 Receive Event */
  557. #define CSL_EDMA3_CHA_SPI0_RX 14
  558. /* SPI0 Transmit Event */
  559. #define CSL_EDMA3_CHA_SPI0_TX 15
  560. /* SPI1 Receive Event */
  561. #define CSL_EDMA3_CHA_SPI1_RX 18
  562. /* SPI1 Transmit Event */
  563. #define CSL_EDMA3_CHA_SPI1_TX 19
  564. /* MMCSD0 Receive Event */
  565. #define CSL_EDMA3_CHA_MMCSD0_RX 16
  566. /* MMCSD0 Transmit Event */
  567. #define CSL_EDMA3_CHA_MMCSD0_TX 17
  568. /* MMCSD1 Receive Event (TPCC1) */
  569. #define CSL_EDMA3_CHA_MMCSD1_RX 28
  570. /* MMCSD1 Transmit Event (TPCC1) */
  571. #define CSL_EDMA3_CHA_MMCSD1_TX 29
  572. /* I2C0 Receive Event */
  573. #define CSL_EDMA3_CHA_I2C0_RX 24
  574. /* I2C0 Transmit Event */
  575. #define CSL_EDMA3_CHA_I2C0_TX 25
  576. /* I2C1 Receive Event */
  577. #define CSL_EDMA3_CHA_I2C1_RX 26
  578. /* I2C1 Transmit Event */
  579. #define CSL_EDMA3_CHA_I2C1_TX 27
  580. /* Timer 2 compare event0 (TPCC1) */
  581. #define CSL_EDMA3_TIMER2_T12CMPEVT0 00
  582. /* Timer 2 compare event1 (TPCC1) */
  583. #define CSL_EDMA3_TIMER2_T12CMPEVT1 01
  584. /* Timer 2 compare event2 (TPCC1) */
  585. #define CSL_EDMA3_TIMER2_T12CMPEVT2 02
  586. /* Timer 2 compare event3 (TPCC1) */
  587. #define CSL_EDMA3_TIMER2_T12CMPEVT3 03
  588. /* Timer 2 compare event4 (TPCC1) */
  589. #define CSL_EDMA3_TIMER2_T12CMPEVT4 04
  590. /* Timer 2 compare event5 (TPCC1) */
  591. #define CSL_EDMA3_TIMER2_T12CMPEVT5 05
  592. /* Timer 2 compare event6 (TPCC1) */
  593. #define CSL_EDMA3_TIMER2_T12CMPEVT6 06
  594. /* Timer 2 compare event7 (TPCC1) */
  595. #define CSL_EDMA3_TIMER2_T12CMPEVT7 07
  596. /* Timer 3 compare event0 (TPCC1) */
  597. #define CSL_EDMA3_TIMER3_T12CMPEVT0 08
  598. /* Timer 3 compare event1 (TPCC1) */
  599. #define CSL_EDMA3_TIMER3_T12CMPEVT1 09
  600. /* Timer 3 compare event2 (TPCC1) */
  601. #define CSL_EDMA3_TIMER3_T12CMPEVT2 10
  602. /* Timer 3 compare event3 (TPCC1) */
  603. #define CSL_EDMA3_TIMER3_T12CMPEVT3 11
  604. /* Timer 3 compare event4 (TPCC1) */
  605. #define CSL_EDMA3_TIMER3_T12CMPEVT4 12
  606. /* Timer 3 compare event5 (TPCC1) */
  607. #define CSL_EDMA3_TIMER3_T12CMPEVT5 13
  608. /* Timer 3 compare event6 (TPCC1) */
  609. #define CSL_EDMA3_TIMER3_T12CMPEVT6 14
  610. /* Timer 3 compare event7 (TPCC1) */
  611. #define CSL_EDMA3_TIMER3_T12CMPEVT7 15
  612. /* QDMA channels */
  613. #define CSL_EDMA3_QCHA_BASE CSL_EDMA3_NUM_DMACH /* QDMA Channel Base */
  614. #define CSL_EDMA3_QCHA_0 (CSL_EDMA3_QCHA_BASE + 0) /* QDMA Channel 0 */
  615. #define CSL_EDMA3_QCHA_1 (CSL_EDMA3_QCHA_BASE + 1) /* QDMA Channel 1 */
  616. #define CSL_EDMA3_QCHA_2 (CSL_EDMA3_QCHA_BASE + 2) /* QDMA Channel 2 */
  617. #define CSL_EDMA3_QCHA_3 (CSL_EDMA3_QCHA_BASE + 3) /* QDMA Channel 3 */
  618. #define CSL_EDMA3_QCHA_4 (CSL_EDMA3_QCHA_BASE + 4) /* QDMA Channel 4 */
  619. #define CSL_EDMA3_QCHA_5 (CSL_EDMA3_QCHA_BASE + 5) /* QDMA Channel 5 */
  620. #define CSL_EDMA3_QCHA_6 (CSL_EDMA3_QCHA_BASE + 6) /* QDMA Channel 6 */
  621. #define CSL_EDMA3_QCHA_7 (CSL_EDMA3_QCHA_BASE + 7) /* QDMA Channel 7 */
  622. /* Enumerations for EDMA Controlleres */
  623. typedef enum {
  624. CSL_EDMACC_ANY = -1, /* Any instance of EDMACC module */
  625. CSL_EDMACC_0 = 0 /* EDMACC Instance 0 */
  626. } CSL_EdmaccNum;
  627. /* Enumerations for EDMA Event Queues */
  628. typedef enum {
  629. CSL_EDMA3_QUE_0 = 0, /* Queue 0 */
  630. CSL_EDMA3_QUE_1 = 1 /* Queue 1 */
  631. } CSL_Edma3Que;
  632. /* Enumerations for EDMA Transfer Controllers
  633. *
  634. * There are 2 Transfer Controllers. Typically a one to one mapping exists
  635. * between Event Queues and Transfer Controllers.
  636. *
  637. */
  638. typedef enum {
  639. CSL_EDMATC_ANY = -1, /* Any instance of EDMATC */
  640. CSL_EDMATC_0 = 0, /* EDMATC Instance 0 */
  641. CSL_EDMATC_1 = 1 /* EDMATC Instance 1 */
  642. } CSL_EdmatcNum;
  643. #define CSL_EDMA3_REGION_GLOBAL -1
  644. #define CSL_EDMA3_REGION_0 0
  645. #define CSL_EDMA3_REGION_1 1
  646. #define CSL_EDMA3_REGION_2 2
  647. #define CSL_EDMA3_REGION_3 3
  648. /******************************* DAT RELATED DEFINES **************************/
  649. /******************************************************************************\
  650. * Parameterizable Configuration:- These are fed directly from the RTL
  651. * parameters for the given SOC
  652. \******************************************************************************/
  653. /******************************************************************************\
  654. * Channel Instance count
  655. \******************************************************************************/
  656. /** @brief Number of Generic Channel instances */
  657. /** @brief Enumerations for EDMA channels
  658. *
  659. * There are 8 QDMA channels -
  660. *
  661. */
  662. #define CSL_DAT_QCHA_0 0 /**< QDMA Channel 0 */
  663. #define CSL_DAT_QCHA_1 1 /**< QDMA Channel 1 */
  664. #define CSL_DAT_QCHA_2 2 /**< QDMA Channel 2 */
  665. #define CSL_DAT_QCHA_3 3 /**< QDMA Channel 3 */
  666. #define CSL_DAT_QCHA_4 4 /**< QDMA Channel 4 */
  667. #define CSL_DAT_QCHA_5 5 /**< QDMA Channel 5 */
  668. #define CSL_DAT_QCHA_6 6 /**< QDMA Channel 6 */
  669. #define CSL_DAT_QCHA_7 7 /**< QDMA Channel 7 */
  670. /** @brief Enumerations for EDMA Event Queues
  671. *
  672. * There are two Event Queues. Q0 is the highest priority and Q1 is the least
  673. * priority
  674. *
  675. */
  676. typedef enum {
  677. CSL_DAT_PRI_DEFAULT = 0, /* Queue 0 is default */
  678. CSL_DAT_PRI_0 = 0, /* Queue 0 */
  679. CSL_DAT_PRI_1 = 1 /* Queue 1 */
  680. } CSL_DatPriority;
  681. /** @brief Enumeration for EDMA Regions
  682. *
  683. *
  684. */
  685. #define CSL_DAT_REGION_GLOBAL -1 /* Global Region */
  686. #define CSL_DAT_REGION_0 0 /* EDMA Region 0 */
  687. #define CSL_DAT_REGION_1 1 /* EDMA Region 1 */
  688. #define CSL_DAT_REGION_2 2 /* EDMA Region 2 */
  689. #define CSL_DAT_REGION_3 3 /* EDMA Region 3 */
  690. #ifdef __cplusplus
  691. }
  692. #endif
  693. #endif /* _SOC_H_ */