Go to the documentation of this file.00001 #ifndef _ARCH_ARM_AT91SAM9XE_H_
00002 #define _ARCH_ARM_AT91SAM9XE_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00055 #include <arch/arm/v5te.h>
00056
00057 #define FLASH_BASE 0x100000UL
00058 #define RAM_BASE 0x200000UL
00059
00060 #define TC_BLK0_BASE 0xFFFA0000
00061 #define TC_BASE TC_BLK0_BASE
00062 #define UDP_BASE 0xFFFA4000
00063 #define MCI_BASE 0xFFFA8000
00064 #define TWI_BASE 0xFFFAC000
00065 #define USART0_BASE 0xFFFB0000
00066 #define USART1_BASE 0xFFFB4000
00067 #define USART2_BASE 0xFFFB8000
00068 #define SSC_BASE 0xFFFBC000
00069 #define ISI_BASE 0xFFFC0000
00070 #define EMAC_BASE 0xFFFC4000
00071 #define SPI0_BASE 0xFFFC8000
00072 #define SPI1_BASE 0xFFFCC000
00073 #define USART3_BASE 0xFFFD0000
00074 #define USART4_BASE 0xFFFD4000
00075 #define TWI1_BASE 0xFFFD8000
00076 #define TC_BLK1_BASE 0xFFFDC000
00077 #define TC345_BASE TC_BLK1_BASE
00078 #define ADC_BASE 0xFFFE0000
00079 #define ECC_BASE 0xFFFFE800
00080 #define SDRAMC_BASE 0xFFFFEA00
00081 #define SMC_BASE 0xFFFFEC00
00082 #define MATRIX_BASE 0xFFFFEE00
00083 #define CCFG_BASE 0xFFFFEF10
00084 #define EBI_BASE 0xFFFFEF1C
00085 #define AIC_BASE 0xFFFFF000
00086 #define DBGU_BASE 0xFFFFF200
00087 #define PIOA_BASE 0xFFFFF400
00088 #define PIOB_BASE 0xFFFFF600
00089 #define PIOC_BASE 0xFFFFF800
00090 #define EEFC_BASE 0xFFFFFA00
00091 #define PMC_BASE 0xFFFFFC00
00092 #define RSTC_BASE 0xFFFFFD00
00093 #define SHDWC_BASE 0xFFFFFD10
00094 #define RTT_BASE 0xFFFFFD20
00095 #define PIT_BASE 0xFFFFFD30
00096 #define WDT_BASE 0xFFFFFD40
00097 #define GPBR_BASE 0xFFFFFD60
00099 #define PERIPH_RPR_OFF 0x00000100
00100 #define PERIPH_RCR_OFF 0x00000104
00101 #define PERIPH_TPR_OFF 0x00000108
00102 #define PERIPH_TCR_OFF 0x0000010C
00103 #define PERIPH_RNPR_OFF 0x00000110
00104 #define PERIPH_RNCR_OFF 0x00000114
00105 #define PERIPH_TNPR_OFF 0x00000118
00106 #define PERIPH_TNCR_OFF 0x0000011C
00107 #define PERIPH_PTCR_OFF 0x00000120
00108 #define PERIPH_PTSR_OFF 0x00000124
00110 #define PDC_RXTEN 0x00000001
00111 #define PDC_RXTDIS 0x00000002
00112 #define PDC_TXTEN 0x00000100
00113 #define PDC_TXTDIS 0x00000200
00115 #define EBI_HAS_CSA
00116
00117 #define DBGU_HAS_PDC
00118 #define SPI_HAS_PDC
00119 #define SSC_HAS_PDC
00120 #define USART_HAS_PDC
00121 #define USART_HAS_MODE
00122 #define MCI_HAS_PDC
00123 #define PMC_HAS_PLLB
00124 #define PMC_HAS_MDIV
00125 #define ADC_HAS_PDC
00126
00127 #define PIO_HAS_MULTIDRIVER
00128 #define PIO_HAS_PULLUP
00129 #define PIO_HAS_PERIPHERALSELECT
00130 #define PIO_HAS_OUTPUTWRITEENABLE
00131
00132 #include <arch/arm/atmel/at91_tc.h>
00133 #undef TC_CLKS_MCK1024
00134 #include <arch/arm/atmel/at91_us.h>
00135 #include <arch/arm/atmel/at91_dbgu.h>
00136 #include <arch/arm/atmel/at91_emac.h>
00137 #include <arch/arm/atmel/at91_spi.h>
00138 #include <arch/arm/atmel/at91_aic.h>
00139 #include <arch/arm/atmel/at91_pio.h>
00140 #include <arch/arm/atmel/at91_pmc.h>
00141 #include <arch/arm/atmel/at91_rstc.h>
00142 #include <arch/arm/atmel/at91_shdwc.h>
00143 #include <arch/arm/atmel/at91_wdt.h>
00144 #include <arch/arm/atmel/at91_ssc.h>
00145 #include <arch/arm/atmel/at91_twi.h>
00146 #include <arch/arm/atmel/at91_ebi.h>
00147 #include <arch/arm/atmel/at91_smc.h>
00148 #include <arch/arm/atmel/at91_mci.h>
00149 #include <arch/arm/atmel/at91_smc.h>
00150 #include <arch/arm/atmel/at91_matrix.h>
00151 #include <arch/arm/atmel/at91_ccfg.h>
00152 #include <arch/arm/atmel/at91_sdramc.h>
00153 #include <arch/arm/atmel/at91_pit.h>
00154 #include <arch/arm/atmel/at91_adc.h>
00155 #include <arch/arm/atmel/at91_eefc.h>
00156
00159
00162 #define FIQ_ID 0
00163 #define SYSC_ID 1
00164 #define PIOA_ID 2
00165 #define PIOB_ID 3
00166 #define PIOC_ID 4
00167 #define ADC_ID 5
00168 #define US0_ID 6
00169 #define US1_ID 7
00170 #define US2_ID 8
00171 #define MCI_ID 9
00172 #define UDP_ID 10
00173 #define TWI_ID 11
00174 #define SPI0_ID 12
00175 #define SPI1_ID 13
00176 #define SSC_ID 14
00177 #define TC0_ID 17
00178 #define TC1_ID 18
00179 #define TC2_ID 19
00180 #define UHP_ID 20
00181 #define EMAC_ID 21
00182 #define ISI_ID 22
00183 #define US3_ID 23
00184 #define US4_ID 24
00185 #define TWI1_ID 25
00186 #define TC3_ID 26
00187 #define TC4_ID 27
00188 #define TC5_ID 28
00189 #define IRQ0_ID 29
00190 #define IRQ1_ID 30
00191 #define IRQ2_ID 31
00194
00195
00197 #define PA31_SCK0_A 31
00198 #define PB4_TXD0_A 4
00199 #define PB5_RXD0_A 5
00200 #define PB27_CTS0_A 27
00201 #define PB26_RTS0_A 26
00202 #define PB25_RI0_A 25
00203 #define PB22_DSR0_A 22
00204 #define PB23_DCD0_A 23
00205 #define PB24_DTR0_A 24
00207 #define PA29_SCK1_A 29
00208 #define PB6_TXD1_A 6
00209 #define PB7_RXD1_A 7
00210 #define PB29_CTS1_A 29
00211 #define PB28_RTS1_A 28
00213 #define PA30_SCK2_A 30
00214 #define PB8_TXD2_A 8
00215 #define PB9_RXD2_A 9
00216 #define PA5_CTS2_A 5
00217 #define PA4_RTS2_A 4
00219 #define PC0_SCK3_B 0
00220 #define PB10_TXD3_A 10
00221 #define PB11_RXD3_A 11
00222 #define PC10_CTS3_B 10
00223 #define PC8_RTS3_B 8
00225 #define PA31_TXD4_B 31
00226 #define PA30_RXD4_B 30
00228
00229
00231 #define PA0_SPI0_MISO_A 0
00232 #define PA1_SPI0_MOSI_A 1
00233 #define PA2_SPI0_SPCK_A 2
00234 #define PA3_SPI0_NPCS0_A 3
00235 #define PC11_SPI0_NPCS1_B 11
00236 #define PC16_SPI0_NPCS2_B 16
00237 #define PC17_SPI0_NPCS3_B 17
00239 #define SPI0_PINS _BV(PA0_SPI0_MISO_A) | _BV(PA1_SPI0_MOSI_A) | _BV(PA2_SPI0_SPCK_A)
00240 #define SPI0_PIO_BASE PIOA_BASE
00241 #define SPI0_PSR_OFF PIO_ASR_OFF
00242
00243 #define SPI0_CS0_PIN _BV(PA3_SPI0_NPCS0_A)
00244 #define SPI0_CS0_PIO_BASE PIOA_BASE
00245 #define SPI0_CS0_PSR_OFF PIO_ASR_OFF
00246
00247 #define SPI0_CS1_PIN _BV(PC11_SPI0_NPCS1_B)
00248 #define SPI0_CS1_PIO_BASE PIOC_BASE
00249 #define SPI0_CS1_PSR_OFF PIO_BSR_OFF
00250
00251 #define PB0_SPI1_MISO_A 0
00252 #define PB1_SPI1_MOSI_A 1
00253 #define PB2_SPI1_SPCK_A 2
00254 #define PB3_SPI1_NPCS0_A 3
00255 #define PC5_SPI1_NPCS1_B 5
00256 #define PC18_SPI1_NPCS1_B 18
00257 #define PC4_SPI1_NPCS2_B 4
00258 #define PC19_SPI1_NPCS2_B 19
00259 #define PC3_SPI1_NPCS3_B 3
00260 #define PC20_SPI1_NPCS3_B 20
00262 #define SPI1_PINS _BV(PB0_SPI1_MISO_A) | _BV(PB1_SPI1_MOSI_A) | _BV(PB2_SPI1_SPCK_A)
00263 #define SPI1_PIO_BASE PIOB_BASE
00264 #define SPI1_PSR_OFF PIO_ASR_OFF
00265
00266 #define SPI1_CS0_PIN _BV(PB3_SPI1_NPCS0_A)
00267 #define SPI1_CS0_PIO_BASE PIOB_BASE
00268 #define SPI1_CS0_PSR_OFF PIO_ASR_OFF
00269
00270 #ifndef SPI1_CS3_PIN
00271 #define SPI1_CS3_PIN _BV(PC3_SPI1_NPCS3_B)
00272 #define SPI1_CS3_PIO_BASE PIOC_BASE
00273 #define SPI1_CS3_PSR_OFF PIO_BSR_OFF
00274 #endif
00275
00280 #define PB20_ISI_D0_B 20
00281 #define PB21_ISI_D1_B 21
00282 #define PB22_ISI_D2_B 22
00283 #define PB23_ISI_D3_B 23
00284 #define PB24_ISI_D4_B 24
00285 #define PB25_ISI_D5_B 25
00286 #define PB26_ISI_D6_B 26
00287 #define PB27_ISI_D7_B 27
00288 #define PB10_ISI_D8_B 10
00289 #define PB11_ISI_D9_B 11
00290 #define PB12_ISI_D10_B 12
00291 #define PB13_ISI_D11_B 13
00292 #define PB28_ISI_PCK_B 28
00293 #define PB29_ISI_VSYNC_B 29
00294 #define PB30_ISI_HSYNC_B 30
00295 #define PB31_ISI_MCK_B 31
00297
00298
00300 #define PA8_MCCK_A 8
00301 #define PA7_MCCDA_A 7
00302 #define PA6_MCDA0_A 6
00303 #define PA9_MCDA1_A 9
00304 #define PA10_MCDA2_A 10
00305 #define PA11_MCDA3_A 11
00306 #define PA1_MCCDB_B 1
00307 #define PA0_MCDB0_B 0
00308 #define PA5_MCDB1_B 5
00309 #define PA4_MCDB2_B 4
00310 #define PA3_MCDB3_B 3
00312
00313
00315 #define PA10_ETX2_B 10
00316 #define PA11_ETX3_B 11
00317 #define PA12_ETX0_A 12
00318 #define PA13_ETX1_A 13
00319 #define PA14_ERX0_A 14
00320 #define PA15_ERX1_A 15
00321 #define PA16_ETXEN_A 16
00322 #define PA17_ERXDV_A 17
00323 #define PA18_ERXER_A 18
00324 #define PA19_ETXCK_A 19
00325 #define PA20_EMDC_A 20
00326 #define PA21_EMDIO_A 21
00327 #define PA22_ETXER_B 22
00328 #define PA23_ETX2_B 23
00329 #define PA24_ETX3_B 24
00330 #define PA25_ERX2_B 25
00331 #define PA26_ERX3_B 26
00332 #define PA27_ERXCK_B 27
00333 #define PA28_ECRS_B 28
00334 #define PA29_ECOL_B 29
00335 #define PC21_EF100_B 21
00337
00338
00340 #define PA22_ADTRG_A 22
00342
00343
00345 #define PB14_DRXD_A 14
00346 #define PB15_DTXD_A 15
00348
00349
00351 #define PB18_TD0_A 18
00352 #define PB19_RD0_A 19
00353 #define PB16_TK0_A 16
00354 #define PB20_RK0_A 20
00355 #define PB17_TF0_A 17
00356 #define PB21_RF0_A 21
00358
00359
00361 #define PA23_TWD_A 23
00362 #define PA24_TWCK_A 24
00364 #define PB12_TWD1_A 12
00365 #define PB13_RWCK1_A 13
00367
00368
00370 #define PA25_TCLK0_A 25
00371 #define PA26_TIOA0_A 26
00372 #define PC9_TIOB0_B 9
00374 #define PB6_TCLK1_B 6
00375 #define PA27_TIOA1_A 27
00376 #define PC7_TIOB1_A 7
00378 #define PB7_TCLK2_B 7
00379 #define PA28_TIOA2_A 28
00380 #define PC6_TIOB2_A 6
00382 #define PB16_TCLK3_B 16
00383 #define PB0_TIOA3_B 0
00384 #define PB1_TIOB3_B 1
00386 #define PB17_TCLK4_B 17
00387 #define PB2_TIOA4_B 2
00388 #define PB18_TIOB4_B 18
00390 #define PC22_TCLK5_B 22
00391 #define PB3_TIOA5_B 3
00392 #define PB19_TIOB5_B 19
00394
00395
00397 #define PB30_PCK0_A 30
00398 #define PC1_PCK0_B 1
00399 #define PB31_PCK1_A 31
00400 #define PC2_PCK1_B 2
00402
00403
00405 #define PC10_A25_CFRNW_A 10
00406 #define PC8_NCS4_CFCS0_A 8
00407 #define PC9_NCS5_CFCS1_A 9
00408 #define PC6_CFCE1_B 6
00409 #define PC7_CFCE2_B 7
00411
00412
00414 #define PC16_D16_A 16
00415 #define PC17_D17_A 17
00416 #define PC18_D18_A 18
00417 #define PC19_D19_A 19
00418 #define PC20_D20_A 20
00419 #define PC21_D21_A 21
00420 #define PC22_D22_A 22
00421 #define PC23_D23_A 23
00422 #define PC24_D24_A 24
00423 #define PC25_D25_A 25
00424 #define PC26_D26_A 26
00425 #define PC27_D27_A 27
00426 #define PC28_D28_A 28
00427 #define PC29_D29_A 29
00428 #define PC30_D30_A 30
00429 #define PC31_D31_A 31
00430 #define PC4_A23_A 4
00431 #define PC5_A24_A 5
00432 #define PC11_NCS2_A 11
00433 #define PC14_NCS3_NANDCS_A 14
00434 #define PC13_NCS6_B 13
00435 #define PC12_NCS7_B 12
00436 #define PC15_NWAIT_A 15
00438
00439
00441 #define PC13_FIQ_A 13
00442 #define PC12_IRQ0_A 12
00443 #define PC15_IRQ1_B 15
00444 #define PC14_IRQ2_B 14
00446
00447
00449 #endif