mx1.h 5.3 KB

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