mx1.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /*
  2. * Copyright (C) 1997,1998 Russell King
  3. * Copyright (C) 1999 ARM Limited
  4. * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  5. * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
  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. #ifndef __ASM_ARCH_MXC_MX1_H__
  12. #define __ASM_ARCH_MXC_MX1_H__
  13. #ifndef __ASM_ARCH_MXC_HARDWARE_H__
  14. #error "Do not include directly."
  15. #endif
  16. #include <mach/vmalloc.h>
  17. /*
  18. * Memory map
  19. */
  20. #define IMX_IO_PHYS 0x00200000
  21. #define IMX_IO_SIZE 0x00100000
  22. #define IMX_IO_BASE VMALLOC_END
  23. #define IMX_CS0_PHYS 0x10000000
  24. #define IMX_CS0_SIZE 0x02000000
  25. #define IMX_CS1_PHYS 0x12000000
  26. #define IMX_CS1_SIZE 0x01000000
  27. #define IMX_CS2_PHYS 0x13000000
  28. #define IMX_CS2_SIZE 0x01000000
  29. #define IMX_CS3_PHYS 0x14000000
  30. #define IMX_CS3_SIZE 0x01000000
  31. #define IMX_CS4_PHYS 0x15000000
  32. #define IMX_CS4_SIZE 0x01000000
  33. #define IMX_CS5_PHYS 0x16000000
  34. #define IMX_CS5_SIZE 0x01000000
  35. /*
  36. * Register BASEs, based on OFFSETs
  37. */
  38. #define AIPI1_BASE_ADDR (0x00000 + IMX_IO_PHYS)
  39. #define WDT_BASE_ADDR (0x01000 + IMX_IO_PHYS)
  40. #define TIM1_BASE_ADDR (0x02000 + IMX_IO_PHYS)
  41. #define TIM2_BASE_ADDR (0x03000 + IMX_IO_PHYS)
  42. #define RTC_BASE_ADDR (0x04000 + IMX_IO_PHYS)
  43. #define LCDC_BASE_ADDR (0x05000 + IMX_IO_PHYS)
  44. #define UART1_BASE_ADDR (0x06000 + IMX_IO_PHYS)
  45. #define UART2_BASE_ADDR (0x07000 + IMX_IO_PHYS)
  46. #define PWM_BASE_ADDR (0x08000 + IMX_IO_PHYS)
  47. #define DMA_BASE_ADDR (0x09000 + IMX_IO_PHYS)
  48. #define AIPI2_BASE_ADDR (0x10000 + IMX_IO_PHYS)
  49. #define SIM_BASE_ADDR (0x11000 + IMX_IO_PHYS)
  50. #define USBD_BASE_ADDR (0x12000 + IMX_IO_PHYS)
  51. #define SPI1_BASE_ADDR (0x13000 + IMX_IO_PHYS)
  52. #define MMC_BASE_ADDR (0x14000 + IMX_IO_PHYS)
  53. #define ASP_BASE_ADDR (0x15000 + IMX_IO_PHYS)
  54. #define BTA_BASE_ADDR (0x16000 + IMX_IO_PHYS)
  55. #define I2C_BASE_ADDR (0x17000 + IMX_IO_PHYS)
  56. #define SSI_BASE_ADDR (0x18000 + IMX_IO_PHYS)
  57. #define SPI2_BASE_ADDR (0x19000 + IMX_IO_PHYS)
  58. #define MSHC_BASE_ADDR (0x1A000 + IMX_IO_PHYS)
  59. #define CCM_BASE_ADDR (0x1B000 + IMX_IO_PHYS)
  60. #define SCM_BASE_ADDR (0x1B804 + IMX_IO_PHYS)
  61. #define GPIO_BASE_ADDR (0x1C000 + IMX_IO_PHYS)
  62. #define EIM_BASE_ADDR (0x20000 + IMX_IO_PHYS)
  63. #define SDRAMC_BASE_ADDR (0x21000 + IMX_IO_PHYS)
  64. #define MMA_BASE_ADDR (0x22000 + IMX_IO_PHYS)
  65. #define AVIC_BASE_ADDR (0x23000 + IMX_IO_PHYS)
  66. #define CSI_BASE_ADDR (0x24000 + IMX_IO_PHYS)
  67. /* macro to get at IO space when running virtually */
  68. #define IO_ADDRESS(x) ((x) - IMX_IO_PHYS + IMX_IO_BASE)
  69. /* define macros needed for entry-macro.S */
  70. #define AVIC_IO_ADDRESS(x) IO_ADDRESS(x)
  71. /* fixed interrput numbers */
  72. #define INT_SOFTINT 0
  73. #define CSI_INT 6
  74. #define DSPA_MAC_INT 7
  75. #define DSPA_INT 8
  76. #define COMP_INT 9
  77. #define MSHC_XINT 10
  78. #define GPIO_INT_PORTA 11
  79. #define GPIO_INT_PORTB 12
  80. #define GPIO_INT_PORTC 13
  81. #define LCDC_INT 14
  82. #define SIM_INT 15
  83. #define SIM_DATA_INT 16
  84. #define RTC_INT 17
  85. #define RTC_SAMINT 18
  86. #define UART2_MINT_PFERR 19
  87. #define UART2_MINT_RTS 20
  88. #define UART2_MINT_DTR 21
  89. #define UART2_MINT_UARTC 22
  90. #define UART2_MINT_TX 23
  91. #define UART2_MINT_RX 24
  92. #define UART1_MINT_PFERR 25
  93. #define UART1_MINT_RTS 26
  94. #define UART1_MINT_DTR 27
  95. #define UART1_MINT_UARTC 28
  96. #define UART1_MINT_TX 29
  97. #define UART1_MINT_RX 30
  98. #define VOICE_DAC_INT 31
  99. #define VOICE_ADC_INT 32
  100. #define PEN_DATA_INT 33
  101. #define PWM_INT 34
  102. #define SDHC_INT 35
  103. #define I2C_INT 39
  104. #define CSPI_INT 41
  105. #define SSI_TX_INT 42
  106. #define SSI_TX_ERR_INT 43
  107. #define SSI_RX_INT 44
  108. #define SSI_RX_ERR_INT 45
  109. #define TOUCH_INT 46
  110. #define USBD_INT0 47
  111. #define USBD_INT1 48
  112. #define USBD_INT2 49
  113. #define USBD_INT3 50
  114. #define USBD_INT4 51
  115. #define USBD_INT5 52
  116. #define USBD_INT6 53
  117. #define BTSYS_INT 55
  118. #define BTTIM_INT 56
  119. #define BTWUI_INT 57
  120. #define TIM2_INT 58
  121. #define TIM1_INT 59
  122. #define DMA_ERR 60
  123. #define DMA_INT 61
  124. #define GPIO_INT_PORTD 62
  125. #define WDT_INT 63
  126. /* gpio and gpio based interrupt handling */
  127. #define GPIO_DR 0x1C
  128. #define GPIO_GDIR 0x00
  129. #define GPIO_PSR 0x24
  130. #define GPIO_ICR1 0x28
  131. #define GPIO_ICR2 0x2C
  132. #define GPIO_IMR 0x30
  133. #define GPIO_ISR 0x34
  134. #define GPIO_INT_LOW_LEV 0x3
  135. #define GPIO_INT_HIGH_LEV 0x2
  136. #define GPIO_INT_RISE_EDGE 0x0
  137. #define GPIO_INT_FALL_EDGE 0x1
  138. #define GPIO_INT_NONE 0x4
  139. /* DMA */
  140. #define DMA_REQ_UART3_T 2
  141. #define DMA_REQ_UART3_R 3
  142. #define DMA_REQ_SSI2_T 4
  143. #define DMA_REQ_SSI2_R 5
  144. #define DMA_REQ_CSI_STAT 6
  145. #define DMA_REQ_CSI_R 7
  146. #define DMA_REQ_MSHC 8
  147. #define DMA_REQ_DSPA_DCT_DOUT 9
  148. #define DMA_REQ_DSPA_DCT_DIN 10
  149. #define DMA_REQ_DSPA_MAC 11
  150. #define DMA_REQ_EXT 12
  151. #define DMA_REQ_SDHC 13
  152. #define DMA_REQ_SPI1_R 14
  153. #define DMA_REQ_SPI1_T 15
  154. #define DMA_REQ_SSI_T 16
  155. #define DMA_REQ_SSI_R 17
  156. #define DMA_REQ_ASP_DAC 18
  157. #define DMA_REQ_ASP_ADC 19
  158. #define DMA_REQ_USP_EP(x) (20 + (x))
  159. #define DMA_REQ_SPI2_R 26
  160. #define DMA_REQ_SPI2_T 27
  161. #define DMA_REQ_UART2_T 28
  162. #define DMA_REQ_UART2_R 29
  163. #define DMA_REQ_UART1_T 30
  164. #define DMA_REQ_UART1_R 31
  165. /* mandatory for CONFIG_LL_DEBUG */
  166. #define MXC_LL_UART_PADDR UART1_BASE_ADDR
  167. #define MXC_LL_UART_VADDR IO_ADDRESS(UART1_BASE_ADDR)
  168. #endif /* __ASM_ARCH_MXC_MX1_H__ */