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
00049 #define FLASH_BASE 0x100000UL
00050 #define RAM_BASE 0x200000UL
00051
00052 #define TC_BASE 0xFFFA0000
00053 #define UDP_BASE 0xFFFA4000
00054 #define MCI_BASE 0xFFFA8000
00055 #define TWI_BASE 0xFFFAC000
00056 #define USART0_BASE 0xFFFB0000
00057 #define USART1_BASE 0xFFFB4000
00058 #define USART2_BASE 0xFFFB8000
00059 #define SSC_BASE 0xFFFBC000
00060 #define ISI_BASE 0xFFFC0000
00061 #define EMAC_BASE 0xFFFC4000
00062 #define SPI0_BASE 0xFFFC8000
00063 #define SPI1_BASE 0xFFFCC000
00064 #define USART3_BASE 0xFFFD0000
00065 #define USART4_BASE 0xFFFD4000
00066 #define TWI1_BASE 0xFFFD8000
00067 #define TC345_BASE 0xFFFDC000
00068 #define ADC_BASE 0xFFFE0000
00069 #define ECC_BASE 0xFFFFE800
00070 #define SDRAMC_BASE 0xFFFFEA00
00071 #define SMC_BASE 0xFFFFEC00
00072 #define MATRIX_BASE 0xFFFFEE00
00073 #define CCFG_BASE 0xFFFFEF10
00074 #define AIC_BASE 0xFFFFF000
00075 #define DBGU_BASE 0xFFFFF200
00076 #define PIOA_BASE 0xFFFFF400
00077 #define PIOB_BASE 0xFFFFF600
00078 #define PIOC_BASE 0xFFFFF800
00079 #define EEFC_BASE 0xFFFFFA00
00080 #define PMC_BASE 0xFFFFFC00
00081 #define RSTC_BASE 0xFFFFFD00
00082 #define RTT_BASE 0xFFFFFD20
00083 #define PIT_BASE 0xFFFFFD30
00084 #define WDT_BASE 0xFFFFFD40
00085 #define GPBR_BASE 0xFFFFFD50
00087 #define PERIPH_RPR_OFF 0x00000100
00088 #define PERIPH_RCR_OFF 0x00000104
00089 #define PERIPH_TPR_OFF 0x00000108
00090 #define PERIPH_TCR_OFF 0x0000010C
00091 #define PERIPH_RNPR_OFF 0x00000110
00092 #define PERIPH_RNCR_OFF 0x00000114
00093 #define PERIPH_TNPR_OFF 0x00000118
00094 #define PERIPH_TNCR_OFF 0x0000011C
00095 #define PERIPH_PTCR_OFF 0x00000120
00096 #define PERIPH_PTSR_OFF 0x00000124
00098 #define PDC_RXTEN 0x00000001
00099 #define PDC_RXTDIS 0x00000002
00100 #define PDC_TXTEN 0x00000100
00101 #define PDC_TXTDIS 0x00000200
00103 #define DBGU_HAS_PDC
00104 #define SPI_HAS_PDC
00105 #define SSC_HAS_PDC
00106 #define USART_HAS_PDC
00107 #define MCI_HAS_PDC
00108
00109 #define PIO_HAS_MULTIDRIVER
00110 #define PIO_HAS_PULLUP
00111 #define PIO_HAS_PERIPHERALSELECT
00112 #define PIO_HAS_OUTPUTWRITEENABLE
00113
00114 #include <arch/arm/at91_tc.h>
00115 #include <arch/arm/at91_us.h>
00116 #include <arch/arm/at91_dbgu.h>
00117 #include <arch/arm/at91_emac.h>
00118 #include <arch/arm/at91_spi.h>
00119 #include <arch/arm/at91_aic.h>
00120 #include <arch/arm/at91_pio.h>
00121 #include <arch/arm/at91_pmc.h>
00122 #include <arch/arm/at91_rstc.h>
00123 #include <arch/arm/at91_wdt.h>
00124 #include <arch/arm/at91_ssc.h>
00125 #include <arch/arm/at91_twi.h>
00126 #include <arch/arm/at91_smc.h>
00127 #include <arch/arm/at91_mci.h>
00128 #include <arch/arm/at91_matrix.h>
00129 #include <arch/arm/at91_ccfg.h>
00130 #include <arch/arm/at91_sdramc.h>
00131 #include <arch/arm/at91_adc.h>
00132
00135
00138 #define FIQ_ID 0
00139 #define SYSC_ID 2
00140 #define PIOA_ID 2
00141 #define PIOB_ID 3
00142 #define PIOC_ID 4
00143 #define ADC_ID 5
00144 #define US0_ID 6
00145 #define US1_ID 7
00146 #define US2_ID 8
00147 #define MCI_ID 9
00148 #define UDP_ID 10
00149 #define TWI0_ID 11
00150 #define SPI0_ID 12
00151 #define SPI1_ID 13
00152 #define SSC_ID 14
00153 #define TC0_ID 17
00154 #define TC1_ID 18
00155 #define TC2_ID 19
00156 #define UHP_ID 20
00157 #define EMAC_ID 21
00158 #define ISI_ID 22
00159 #define US3_ID 23
00160 #define US4_ID 24
00161 #define TWI1_ID 25
00162 #define TC3_ID 26
00163 #define TC4_ID 27
00164 #define TC5_ID 28
00165 #define IRQ0_ID 29
00166 #define IRQ1_ID 30
00167 #define IRQ2_ID 31
00170
00171
00173 #define PA31_SCK0_A 31
00174 #define PB4_TXD0_A 4
00175 #define PB5_RXD0_A 5
00176 #define PB27_CTS0_A 27
00177 #define PB26_RTS0_A 26
00178 #define PB25_RI0_A 25
00179 #define PB22_DSR0_A 22
00180 #define PB23_DCD0_A 23
00181 #define PB24_DTR0_A 24
00183 #define PA29_SCK1_A 29
00184 #define PB6_TXD1_A 6
00185 #define PB7_RXD1_A 7
00186 #define PB29_CTS1_A 29
00187 #define PB28_RTS1_A 28
00189 #define PA30_SCK2_A 30
00190 #define PB8_TXD2_A 8
00191 #define PB9_RXD2_A 9
00192 #define PA5_CTS2_A 5
00193 #define PA4_RTS2_A 4
00195 #define PC0_SCK3_B 0
00196 #define PB10_TXD3_A 10
00197 #define PB11_RXD3_A 11
00198 #define PC10_CTS3_B 10
00199 #define PC8_RTS3_B 8
00201 #define PA31_TXD4_B 31
00202 #define PA30_RXD4_B 30
00204
00205
00207 #define PA0_SPI0_MISO_A 0
00208 #define PA1_SPI0_MOSI_A 1
00209 #define PA2_SPI0_SPCK_A 2
00210 #define PA3_SPI0_NPCS0_A 3
00211 #define PC11_SPI0_NPCS1_B 11
00212 #define PC16_SPI0_NPCS2_B 16
00213 #define PC17_SPI0_NPCS3_B 17
00215 #define SPI0_PINS _BV(PA0_SPI0_MISO_A) | _BV(PA1_SPI0_MOSI_A) | _BV(PA2_SPI0_SPCK_A)
00216 #define SPI0_PIO_BASE PIOA_BASE
00217 #define SPI0_PSR_OFF PIO_ASR_OFF
00218
00219 #define SPI0_CS0_PIN _BV(PA3_SPI0_NPCS0_A)
00220 #define SPI0_CS0_PIO_BASE PIOA_BASE
00221 #define SPI0_CS0_PSR_OFF PIO_ASR_OFF
00222
00223 #define SPI0_CS1_PIN _BV(PC11_SPI0_NPCS1_B)
00224 #define SPI0_CS1_PIO_BASE PIOC_BASE
00225 #define SPI0_CS1_PSR_OFF PIO_BSR_OFF
00226
00227 #define PB0_SPI1_MISO_A 0
00228 #define PB1_SPI1_MOSI_A 1
00229 #define PB2_SPI1_SPCK_A 2
00230 #define PB3_SPI1_NPCS0_A 3
00231 #define PC5_SPI1_NPCS1_B 5
00232 #define PC18_SPI1_NPCS1_B 18
00233 #define PC4_SPI1_NPCS2_B 4
00234 #define PC19_SPI1_NPCS2_B 19
00235 #define PC3_SPI1_NPCS3_B 3
00236 #define PC20_SPI1_NPCS3_B 20
00238 #define SPI1_PINS _BV(PB0_SPI1_MISO_A) | _BV(PB1_SPI1_MOSI_A) | _BV(PB2_SPI1_SPCK_A)
00239 #define SPI1_PIO_BASE PIOB_BASE
00240 #define SPI1_PSR_OFF PIO_ASR_OFF
00241
00242 #define SPI1_CS0_PIN _BV(PB3_SPI1_NPCS0_A)
00243 #define SPI1_CS0_PIO_BASE PIOB_BASE
00244 #define SPI1_CS0_PSR_OFF PIO_ASR_OFF
00245
00246 #ifndef SPI1_CS3_PIN
00247 #define SPI1_CS3_PIN _BV(PC3_SPI1_NPCS3_B)
00248 #define SPI1_CS3_PIO_BASE PIOC_BASE
00249 #define SPI1_CS3_PSR_OFF PIO_BSR_OFF
00250 #endif
00251
00256 #define PB20_ISI_D0_B 20
00257 #define PB21_ISI_D1_B 21
00258 #define PB22_ISI_D2_B 22
00259 #define PB23_ISI_D3_B 23
00260 #define PB24_ISI_D4_B 24
00261 #define PB25_ISI_D5_B 25
00262 #define PB26_ISI_D6_B 26
00263 #define PB27_ISI_D7_B 27
00264 #define PB10_ISI_D8_B 10
00265 #define PB11_ISI_D9_B 11
00266 #define PB12_ISI_D10_B 12
00267 #define PB13_ISI_D11_B 13
00268 #define PB28_ISI_PCK_B 28
00269 #define PB29_ISI_VSYNC_B 29
00270 #define PB30_ISI_HSYNC_B 30
00271 #define PB31_ISI_MCK_B 31
00273
00274
00276 #define PA8_MCCK_A 8
00277 #define PA7_MCCDA_A 7
00278 #define PA6_MCDA0_A 6
00279 #define PA9_MCDA1_A 9
00280 #define PA10_MCDA2_A 10
00281 #define PA11_MCDA3_A 11
00282 #define PA1_MCCDB_B 1
00283 #define PA0_MCDB0_B 0
00284 #define PA5_MCDB1_B 5
00285 #define PA4_MCDB2_B 4
00286 #define PA3_MCDB3_B 3
00288
00289
00291 #define PA10_ETX2_B 10
00292 #define PA11_ETX3_B 11
00293 #define PA12_ETX0_A 12
00294 #define PA13_ETX1_A 13
00295 #define PA14_ERX0_A 14
00296 #define PA15_ERX1_A 15
00297 #define PA16_ETXEN_A 16
00298 #define PA17_ERXDV_A 17
00299 #define PA18_ERXER_A 18
00300 #define PA19_ETXCK_A 19
00301 #define PA20_EMDC_A 20
00302 #define PA21_EMDIO_A 21
00303 #define PA22_ETXER_B 22
00304 #define PA23_ETX2_B 23
00305 #define PA24_ETX3_B 24
00306 #define PA25_ERX2_B 25
00307 #define PA26_ERX3_B 26
00308 #define PA27_ERXCK_B 27
00309 #define PA28_ECRS_B 28
00310 #define PA29_ECOL_B 29
00311 #define PC21_EF100_B 21
00313
00314
00316 #define PA22_ADTRG_A 22
00318
00319
00321 #define PB14_DRXD_A 14
00322 #define PB15_DTXD_A 15
00324
00325
00327 #define PB18_TD0_A 18
00328 #define PB19_RD0_A 19
00329 #define PB16_TK0_A 16
00330 #define PB20_RK0_A 20
00331 #define PB17_TF0_A 17
00332 #define PB21_RF0_A 21
00334
00335
00337 #define PA23_TWD0_A 23
00338 #define PA24_TWCK0_A 24
00340 #define PB12_TWD1_A 12
00341 #define PB13_RWCK1_A 13
00343
00344
00346 #define PA25_TCLK0_A 25
00347 #define PA26_TIOA0_A 26
00348 #define PC9_TIOB0_B 9
00350 #define PB6_TCLK1_B 6
00351 #define PA27_TIOA1_A 27
00352 #define PC7_TIOB1_A 7
00354 #define PB7_TCLK2_B 7
00355 #define PA28_TIOA2_A 28
00356 #define PC6_TIOB2_A 6
00358 #define PB16_TCLK3_B 16
00359 #define PB0_TIOA3_B 0
00360 #define PB1_TIOB3_B 1
00362 #define PB17_TCLK4_B 17
00363 #define PB2_TIOA4_B 2
00364 #define PB18_TIOB4_B 18
00366 #define PC22_TCLK5_B 22
00367 #define PB3_TIOA5_B 3
00368 #define PB19_TIOB5_B 19
00370
00371
00373 #define PB30_PCK0_A 30
00374 #define PC1_PCK0_B 1
00375 #define PB31_PCK1_A 31
00376 #define PC2_PCK1_B 2
00378
00379
00381 #define PC10_A25_CFRNW_A 10
00382 #define PC8_NCS4_CFCS0_A 8
00383 #define PC9_NCS5_CFCS1_A 9
00384 #define PC6_CFCE1_B 6
00385 #define PC7_CFCE2_B 7
00387
00388
00390 #define PC16_D16_A 16
00391 #define PC17_D17_A 17
00392 #define PC18_D18_A 18
00393 #define PC19_D19_A 19
00394 #define PC20_D20_A 20
00395 #define PC21_D21_A 21
00396 #define PC22_D22_A 22
00397 #define PC23_D23_A 23
00398 #define PC24_D24_A 24
00399 #define PC25_D25_A 25
00400 #define PC26_D26_A 26
00401 #define PC27_D27_A 27
00402 #define PC28_D28_A 28
00403 #define PC29_D29_A 29
00404 #define PC30_D30_A 30
00405 #define PC31_D31_A 31
00406 #define PC4_A23_A 4
00407 #define PC5_A24_A 5
00408 #define PC11_NCS2_A 11
00409 #define PC14_NCS3_NANDCS_A 14
00410 #define PC13_NCS6_B 13
00411 #define PC12_NCS7_B 12
00412 #define PC15_NWAIT_A 15
00414
00415
00417 #define PC13_FIQ_A 13
00418 #define PC12_IRQ0_A 12
00419 #define PC15_IRQ1_B 15
00420 #define PC14_IRQ2_B 14
00422
00423
00425 #endif