sama5d28.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. /* ---------------------------------------------------------------------------- */
  2. /* Atmel Microcontroller Software Support */
  3. /* SAM Software Package License */
  4. /* ---------------------------------------------------------------------------- */
  5. /* Copyright (c) 2015, Atmel Corporation */
  6. /* */
  7. /* All rights reserved. */
  8. /* */
  9. /* Redistribution and use in source and binary forms, with or without */
  10. /* modification, are permitted provided that the following condition is met: */
  11. /* */
  12. /* - Redistributions of source code must retain the above copyright notice, */
  13. /* this list of conditions and the disclaimer below. */
  14. /* */
  15. /* Atmel's name may not be used to endorse or promote products derived from */
  16. /* this software without specific prior written permission. */
  17. /* */
  18. /* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
  19. /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  20. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
  21. /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
  22. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
  23. /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
  24. /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  25. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
  26. /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
  27. /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
  28. /* ---------------------------------------------------------------------------- */
  29. #ifndef _SAMA5D28_
  30. #define _SAMA5D28_
  31. /** \addtogroup SAMA5D28_definitions SAMA5D28 definitions
  32. This file defines all structures and symbols for SAMA5D28:
  33. - registers and bitfields
  34. - peripheral base address
  35. - peripheral ID
  36. - PIO definitions
  37. */
  38. /*@{*/
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. #include <stdint.h>
  43. /* ************************************************************************** */
  44. /** SOFTWARE PERIPHERAL API DEFINITION FOR SAMA5D28 */
  45. /* ************************************************************************** */
  46. /** \addtogroup SAMA5D28_api Peripheral Software API */
  47. /*@{*/
  48. #include "component/component_acc.h"
  49. #include "component/component_adc.h"
  50. #include "component/component_aesb.h"
  51. #include "component/component_aes.h"
  52. #include "component/component_aic.h"
  53. #include "component/component_aximx.h"
  54. #include "component/component_bsc.h"
  55. #include "component/component_chipid.h"
  56. #include "component/component_classd.h"
  57. #include "component/component_flexcom.h"
  58. #include "component/component_gmac.h"
  59. #include "component/component_i2sc.h"
  60. #include "component/component_icm.h"
  61. #include "component/component_isc.h"
  62. #include "component/component_l2cc.h"
  63. #include "component/component_lcdc.h"
  64. #include "component/component_matrix.h"
  65. #include "component/component_mcan.h"
  66. #include "component/component_mpddrc.h"
  67. #include "component/component_pdmic.h"
  68. #include "component/component_pio.h"
  69. #include "component/component_pit.h"
  70. #include "component/component_pmc.h"
  71. #include "component/component_pwm.h"
  72. #include "component/component_qspi.h"
  73. #include "component/component_rstc.h"
  74. #include "component/component_rtc.h"
  75. #include "component/component_rxlp.h"
  76. #include "component/component_sckc.h"
  77. #include "component/component_sdmmc.h"
  78. #include "component/component_secumod.h"
  79. #include "component/component_sfc.h"
  80. #include "component/component_sfr.h"
  81. #include "component/component_sfrbu.h"
  82. #include "component/component_sha.h"
  83. #include "component/component_shdwc.h"
  84. #include "component/component_smc.h"
  85. #include "component/component_spi.h"
  86. #include "component/component_ssc.h"
  87. #include "component/component_tc.h"
  88. #include "component/component_tdes.h"
  89. #include "component/component_trng.h"
  90. #include "component/component_twi.h"
  91. #include "component/component_uart.h"
  92. #include "component/component_usart.h"
  93. #include "component/component_udphs.h"
  94. #include "component/component_wdt.h"
  95. #include "component/component_xdmac.h"
  96. /*@}*/
  97. /* ************************************************************************** */
  98. /* BASE ADDRESS DEFINITIONS FOR SAMA5D28 */
  99. /* ************************************************************************** */
  100. /** \addtogroup SAMA5D28_base Peripheral Base Address Definitions */
  101. /*@{*/
  102. #define AXIMX ((Aximx *)0x00600000U) /**< \brief (AXIMX ) Base Address */
  103. #define L2CC ((L2cc *)0x00A00000U) /**< \brief (L2CC ) Base Address */
  104. #define SDMMC0 ((Sdmmc *)0xA0000000U) /**< \brief (SDMMC0 ) Base Address */
  105. #define SDMMC1 ((Sdmmc *)0xB0000000U) /**< \brief (SDMMC1 ) Base Address */
  106. #define LCDC ((Lcdc *)0xF0000000U) /**< \brief (LCDC ) Base Address */
  107. #define XDMAC1 ((Xdmac *)0xF0004000U) /**< \brief (XDMAC1 ) Base Address */
  108. #define ISC ((Isc *)0xF0008000U) /**< \brief (ISC ) Base Address */
  109. #define MPDDRC ((Mpddrc *)0xF000C000U) /**< \brief (MPDDRC ) Base Address */
  110. #define XDMAC0 ((Xdmac *)0xF0010000U) /**< \brief (XDMAC0 ) Base Address */
  111. #define PMC ((Pmc *)0xF0014000U) /**< \brief (PMC ) Base Address */
  112. #define MATRIX0 ((Matrix *)0xF0018000U) /**< \brief (MATRIX0 ) Base Address */
  113. #define AESB ((Aesb *)0xF001C000U) /**< \brief (AESB ) Base Address */
  114. #define QSPI0 ((Qspi *)0xF0020000U) /**< \brief (QSPI0 ) Base Address */
  115. #define QSPI1 ((Qspi *)0xF0024000U) /**< \brief (QSPI1 ) Base Address */
  116. #define SHA ((Sha *)0xF0028000U) /**< \brief (SHA ) Base Address */
  117. #define AES ((Aes *)0xF002C000U) /**< \brief (AES ) Base Address */
  118. #define SPI0 ((Spi *)0xF8000000U) /**< \brief (SPI0 ) Base Address */
  119. #define SSC0 ((Ssc *)0xF8004000U) /**< \brief (SSC0 ) Base Address */
  120. #define GMAC0 ((Gmac *)0xF8008000U) /**< \brief (GMAC0 ) Base Address */
  121. #define TC0 ((Tc *)0xF800C000U) /**< \brief (TC0 ) Base Address */
  122. #define TC1 ((Tc *)0xF8010000U) /**< \brief (TC1 ) Base Address */
  123. #define HSMC ((Smc *)0xF8014000U) /**< \brief (HSMC ) Base Address */
  124. #define PDMIC ((Pdmic *)0xF8018000U) /**< \brief (PDMIC ) Base Address */
  125. #define UART0 ((Uart *)0xF801C000U) /**< \brief (UART0 ) Base Address */
  126. #define UART1 ((Uart *)0xF8020000U) /**< \brief (UART1 ) Base Address */
  127. #define UART2 ((Uart *)0xF8024000U) /**< \brief (UART2 ) Base Address */
  128. #define TWIHS0 ((Twi *)0xF8028000U) /**< \brief (TWIHS0 ) Base Address */
  129. #define PWM ((Pwm *)0xF802C000U) /**< \brief (PWM ) Base Address */
  130. #define SFR ((Sfr *)0xF8030000U) /**< \brief (SFR ) Base Address */
  131. #define FLEXCOM0 ((Flexcom *)0xF8034000U) /**< \brief (FLEXCOM0) Base Address */
  132. #define USART0 ((Usart *)0xF8034200U) /**< \brief (FLEXCOM0_USART) Base Address */
  133. #define FCOMSPI0 ((Spi *)0xF8034400U) /**< \brief (FLEXCOM0_SPI) Base Address */
  134. #define TWI0 ((Twi *)0xF8034600U) /**< \brief (FLEXCOM0_TWI) Base Address */
  135. #define FLEXCOM1 ((Flexcom *)0xF8038000U) /**< \brief (FLEXCOM1) Base Address */
  136. #define USART1 ((Usart *)0xF8038200U) /**< \brief (FLEXCOM1_USART) Base Address */
  137. #define FCOMSPI1 ((Spi *)0xF8038400U) /**< \brief (FLEXCOM1_SPI) Base Address */
  138. #define TWI1 ((Twi *)0xF8038600U) /**< \brief (FLEXCOM1_TWI) Base Address */
  139. #define SAIC ((Aic *)0xF803C000U) /**< \brief (SAIC ) Base Address */
  140. #define ICM ((Icm *)0xF8040000U) /**< \brief (ICM ) Base Address */
  141. #define SECURAM ((Securam *)0xF8044000U) /**< \brief (SECURAM ) Base Address */
  142. #define RSTC ((Rstc *)0xF8048000U) /**< \brief (RSTC ) Base Address */
  143. #define SHDWC ((Shdwc *)0xF8048010U) /**< \brief (SHDWC ) Base Address */
  144. #define PIT ((Pit *)0xF8048030U) /**< \brief (PIT ) Base Address */
  145. #define WDT ((Wdt *)0xF8048040U) /**< \brief (WDT ) Base Address */
  146. #define SCKC ((Sckc *)0xF8048050U) /**< \brief (SCKC ) Base Address */
  147. #define BSC ((Bsc *)0xF8048054U) /**< \brief (BSC ) Base Address */
  148. #define RTC ((Rtc *)0xF80480B0U) /**< \brief (RTC ) Base Address */
  149. #define RXLP ((Rxlp *)0xF8049000U) /**< \brief (RXLP ) Base Address */
  150. #define ACC ((Acc *)0xF804A000U) /**< \brief (ACC ) Base Address */
  151. #define SFC ((Sfc *)0xF804C000U) /**< \brief (SFC ) Base Address */
  152. #define I2SC0 ((I2sc *)0xF8050000U) /**< \brief (I2SC0 ) Base Address */
  153. #define MCAN0 ((Mcan *)0xF8054000U) /**< \brief (MCAN0 ) Base Address */
  154. #define SPI1 ((Spi *)0xFC000000U) /**< \brief (SPI1 ) Base Address */
  155. #define SSC1 ((Ssc *)0xFC004000U) /**< \brief (SSC1 ) Base Address */
  156. #define UART3 ((Uart *)0xFC008000U) /**< \brief (UART3 ) Base Address */
  157. #define UART4 ((Uart *)0xFC00C000U) /**< \brief (UART4 ) Base Address */
  158. #define FLEXCOM2 ((Flexcom *)0xFC010000U) /**< \brief (FLEXCOM2) Base Address */
  159. #define USART2 ((Usart *)0xFC010200U) /**< \brief (FLEXCOM2_USART) Base Address */
  160. #define FCOMSPI2 ((Spi *)0xFC010400U) /**< \brief (FLEXCOM2_SPI) Base Address */
  161. #define TWI2 ((Twi *)0xFC010600U) /**< \brief (FLEXCOM2_TWI) Base Address */
  162. #define FLEXCOM3 ((Flexcom *)0xFC014000U) /**< \brief (FLEXCOM3) Base Address */
  163. #define USART3 ((Usart *)0xFC014200U) /**< \brief (FLEXCOM3_USART) Base Address */
  164. #define FCOMSPI3 ((Spi *)0xFC014400U) /**< \brief (FLEXCOM3_SPI) Base Address */
  165. #define TWI3 ((Twi *)0xFC014600U) /**< \brief (FLEXCOM3_TWI) Base Address */
  166. #define FLEXCOM4 ((Flexcom *)0xFC018000U) /**< \brief (FLEXCOM4) Base Address */
  167. #define USART4 ((Usart *)0xFC018200U) /**< \brief (FLEXCOM4_USART) Base Address */
  168. #define FCOMSPI4 ((Spi *)0xFC018400U) /**< \brief (FLEXCOM4_SPI) Base Address */
  169. #define TWI4 ((Twi *)0xFC018600U) /**< \brief (FLEXCOM4_TWI) Base Address */
  170. #define TRNG ((Trng *)0xFC01C000U) /**< \brief (TRNG ) Base Address */
  171. #define AIC ((Aic *)0xFC020000U) /**< \brief (AIC ) Base Address */
  172. #define TWIHS1 ((Twi *)0xFC028000U) /**< \brief (TWIHS1 ) Base Address */
  173. #define UDPHS ((Udphs *)0xFC02C000U) /**< \brief (UDPHS ) Base Address */
  174. #define ADC ((Adc *)0xFC030000U) /**< \brief (ADC ) Base Address */
  175. #define PIOA ((Pio *)0xFC038000U) /**< \brief (PIOA ) Base Address */
  176. #define MATRIX1 ((Matrix *)0xFC03C000U) /**< \brief (MATRIX1 ) Base Address */
  177. #define SECUMOD ((Secumod *)0xFC040000U) /**< \brief (SECUMOD ) Base Address */
  178. #define TDES ((Tdes *)0xFC044000U) /**< \brief (TDES ) Base Address */
  179. #define CLASSD ((Classd *)0xFC048000U) /**< \brief (CLASSD ) Base Address */
  180. #define I2SC1 ((I2sc *)0xFC04C000U) /**< \brief (I2SC1 ) Base Address */
  181. #define MCAN1 ((Mcan *)0xFC050000U) /**< \brief (MCAN1 ) Base Address */
  182. #define SFRBU ((Sfrbu *)0xFC05C000U) /**< \brief (SFRBU ) Base Address */
  183. #define CHIPID ((Chipid *)0xFC069000U) /**< \brief (CHIPID ) Base Address */
  184. /*@}*/
  185. /* ************************************************************************** */
  186. /* PIO DEFINITIONS FOR SAMA5D28 */
  187. /* ************************************************************************** */
  188. /** \addtogroup SAMA5D28_pio Peripheral Pio Definitions */
  189. /*@{*/
  190. //#include "pio/pio_sama5d28.h"
  191. /*@}*/
  192. /* ************************************************************************** */
  193. /* MEMORY MAPPING DEFINITIONS FOR SAMA5D28 */
  194. /* ************************************************************************** */
  195. #define IRAM_SIZE (0x20000u)
  196. #define EBI_CS0_ADDR (0x10000000u) /**< EBI Chip Select 0 base address */
  197. #define DDR_CS_ADDR (0x20000000u) /**< DDR Chip Select base address */
  198. #define DDR_AES_CS_ADDR (0x40000000u) /**< DDR with AES Chip Select base address */
  199. #define EBI_CS1_ADDR (0x60000000u) /**< EBI Chip Select 1 base address */
  200. #define EBI_CS2_ADDR (0x70000000u) /**< EBI Chip Select 2 base address */
  201. #define EBI_CS3_ADDR (0x80000000u) /**< EBI Chip Select 3 base address */
  202. #define QSPI_AES0_ADDR (0x90000000u) /**< QPSI Memory crypted with AES 0 base address */
  203. #define QSPI_AES1_ADDR (0x98000000u) /**< QPSI Memory crypted with AES 1 base address */
  204. #define SDMMC0_ADDR (0xA0000000u) /**< SDMMC 0 base address */
  205. #define SDMMC1_ADDR (0xB0000000u) /**< SDMMC 1 base address */
  206. #define NFC_ADDR (0xC0000000u) /**< NAND Flash Controller Command base address */
  207. #define QSPIMEM0_ADDR (0xD0000000u) /**< QSPI Memory 0 base address */
  208. #define QSPIMEM1_ADDR (0xD8000000u) /**< QSPI Memory 1 base address */
  209. #define IROM_ADDR (0x00000000u) /**< Internal ROM base address */
  210. #define ECC_ROM_ADDR (0x00040000u) /**< ECC ROM base address */
  211. #define NFC_RAM_ADDR (0x00100000u) /**< NAND Flash Controller RAM base address */
  212. #define IRAM0_ADDR (0x00200000u) /**< Internal RAM 0 base address */
  213. #define IRAM_ADDR IRAM0_ADDR
  214. #define IRAM1_ADDR (0x00220000u) /**< Internal RAM 1 base address */
  215. #define UDPHS_RAM_ADDR (0x00300000u) /**< USB High Speed Device Port RAM base address */
  216. #define UHPHS_OHCI_ADDR (0x00400000u) /**< USB High Speed Device Port RAM base address */
  217. #define UHPHS_EHCI_ADDR (0x00500000u) /**< USB High Speed Device Port RAM base address */
  218. #define AXIMX_ADDR (0x00600000u) /**< AXI Bus Matrix base address */
  219. #define DAP_ADDR (0x00700000u) /**< Debug Access Port base address */
  220. #define PTCMEM_ADDR (0x00800000u) /**< PTC Memory base address */
  221. #ifdef __cplusplus
  222. }
  223. #endif
  224. /*@}*/
  225. #endif /* _SAMA5D28_ */