Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************/ |
| 2 | |
| 3 | /* |
| 4 | * m5272sim.h -- ColdFire 5272 System Integration Module support. |
| 5 | * |
| 6 | * (C) Copyright 1999, Greg Ungerer (gerg@snapgear.com) |
| 7 | * (C) Copyright 2000, Lineo Inc. (www.lineo.com) |
| 8 | */ |
| 9 | |
| 10 | /****************************************************************************/ |
| 11 | #ifndef m5272sim_h |
| 12 | #define m5272sim_h |
| 13 | /****************************************************************************/ |
| 14 | |
Greg Ungerer | 733f31b | 2010-11-02 17:40:37 +1000 | [diff] [blame] | 15 | #define CPU_NAME "COLDFIRE(m5272)" |
| 16 | #define CPU_INSTR_PER_JIFFY 3 |
Greg Ungerer | ce3de78 | 2011-03-09 14:19:08 +1000 | [diff] [blame] | 17 | #define MCF_BUSCLK MCF_CLK |
Greg Ungerer | 7fc82b6 | 2010-11-02 17:13:27 +1000 | [diff] [blame] | 18 | |
Greg Ungerer | a12cf0a | 2010-11-09 10:12:29 +1000 | [diff] [blame] | 19 | #include <asm/m52xxacr.h> |
| 20 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | /* |
| 22 | * Define the 5272 SIM register set addresses. |
| 23 | */ |
Greg Ungerer | d72a5ab | 2012-09-14 16:25:12 +1000 | [diff] [blame] | 24 | #define MCFSIM_SCR (MCF_MBAR + 0x04) /* SIM Config reg */ |
| 25 | #define MCFSIM_SPR (MCF_MBAR + 0x06) /* System Protection */ |
| 26 | #define MCFSIM_PMR (MCF_MBAR + 0x08) /* Power Management */ |
| 27 | #define MCFSIM_APMR (MCF_MBAR + 0x0e) /* Active Low Power */ |
| 28 | #define MCFSIM_DIR (MCF_MBAR + 0x10) /* Device Identity */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Greg Ungerer | c986a3d | 2012-08-17 16:48:16 +1000 | [diff] [blame] | 30 | #define MCFSIM_ICR1 (MCF_MBAR + 0x20) /* Intr Ctrl reg 1 */ |
| 31 | #define MCFSIM_ICR2 (MCF_MBAR + 0x24) /* Intr Ctrl reg 2 */ |
| 32 | #define MCFSIM_ICR3 (MCF_MBAR + 0x28) /* Intr Ctrl reg 3 */ |
| 33 | #define MCFSIM_ICR4 (MCF_MBAR + 0x2c) /* Intr Ctrl reg 4 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
Greg Ungerer | 6a3a786 | 2012-07-15 21:42:47 +1000 | [diff] [blame] | 35 | #define MCFSIM_ISR (MCF_MBAR + 0x30) /* Intr Source */ |
| 36 | #define MCFSIM_PITR (MCF_MBAR + 0x34) /* Intr Transition */ |
| 37 | #define MCFSIM_PIWR (MCF_MBAR + 0x38) /* Intr Wakeup */ |
| 38 | #define MCFSIM_PIVR (MCF_MBAR + 0x3f) /* Intr Vector */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
Greg Ungerer | 660b73e | 2012-07-15 22:01:08 +1000 | [diff] [blame] | 40 | #define MCFSIM_WRRR (MCF_MBAR + 0x280) /* Watchdog reference */ |
| 41 | #define MCFSIM_WIRR (MCF_MBAR + 0x284) /* Watchdog interrupt */ |
| 42 | #define MCFSIM_WCR (MCF_MBAR + 0x288) /* Watchdog counter */ |
| 43 | #define MCFSIM_WER (MCF_MBAR + 0x28c) /* Watchdog event */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
Greg Ungerer | 1419ea3 | 2012-09-14 15:36:02 +1000 | [diff] [blame] | 45 | #define MCFSIM_CSBR0 (MCF_MBAR + 0x40) /* CS0 Base Address */ |
| 46 | #define MCFSIM_CSOR0 (MCF_MBAR + 0x44) /* CS0 Option */ |
| 47 | #define MCFSIM_CSBR1 (MCF_MBAR + 0x48) /* CS1 Base Address */ |
| 48 | #define MCFSIM_CSOR1 (MCF_MBAR + 0x4c) /* CS1 Option */ |
| 49 | #define MCFSIM_CSBR2 (MCF_MBAR + 0x50) /* CS2 Base Address */ |
| 50 | #define MCFSIM_CSOR2 (MCF_MBAR + 0x54) /* CS2 Option */ |
| 51 | #define MCFSIM_CSBR3 (MCF_MBAR + 0x58) /* CS3 Base Address */ |
| 52 | #define MCFSIM_CSOR3 (MCF_MBAR + 0x5c) /* CS3 Option */ |
| 53 | #define MCFSIM_CSBR4 (MCF_MBAR + 0x60) /* CS4 Base Address */ |
| 54 | #define MCFSIM_CSOR4 (MCF_MBAR + 0x64) /* CS4 Option */ |
| 55 | #define MCFSIM_CSBR5 (MCF_MBAR + 0x68) /* CS5 Base Address */ |
| 56 | #define MCFSIM_CSOR5 (MCF_MBAR + 0x6c) /* CS5 Option */ |
| 57 | #define MCFSIM_CSBR6 (MCF_MBAR + 0x70) /* CS6 Base Address */ |
| 58 | #define MCFSIM_CSOR6 (MCF_MBAR + 0x74) /* CS6 Option */ |
| 59 | #define MCFSIM_CSBR7 (MCF_MBAR + 0x78) /* CS7 Base Address */ |
| 60 | #define MCFSIM_CSOR7 (MCF_MBAR + 0x7c) /* CS7 Option */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | |
Greg Ungerer | d72a5ab | 2012-09-14 16:25:12 +1000 | [diff] [blame] | 62 | #define MCFSIM_SDCR (MCF_MBAR + 0x180) /* SDRAM Config */ |
| 63 | #define MCFSIM_SDTR (MCF_MBAR + 0x184) /* SDRAM Timing */ |
| 64 | #define MCFSIM_DCAR0 (MCF_MBAR + 0x4c) /* DRAM 0 Address */ |
| 65 | #define MCFSIM_DCMR0 (MCF_MBAR + 0x50) /* DRAM 0 Mask */ |
| 66 | #define MCFSIM_DCCR0 (MCF_MBAR + 0x57) /* DRAM 0 Control */ |
| 67 | #define MCFSIM_DCAR1 (MCF_MBAR + 0x58) /* DRAM 1 Address */ |
| 68 | #define MCFSIM_DCMR1 (MCF_MBAR + 0x5c) /* DRAM 1 Mask reg */ |
| 69 | #define MCFSIM_DCCR1 (MCF_MBAR + 0x63) /* DRAM 1 Control */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | |
Greg Ungerer | 023e055 | 2011-12-24 00:30:37 +1000 | [diff] [blame] | 71 | #define MCFUART_BASE0 (MCF_MBAR + 0x100) /* Base address UART0 */ |
| 72 | #define MCFUART_BASE1 (MCF_MBAR + 0x140) /* Base address UART1 */ |
Greg Ungerer | 5701542 | 2010-11-03 12:50:30 +1000 | [diff] [blame] | 73 | |
sfking@fdwdc.com | 316f2c4 | 2009-06-19 18:11:07 -0700 | [diff] [blame] | 74 | #define MCFSIM_PACNT (MCF_MBAR + 0x80) /* Port A Control (r/w) */ |
| 75 | #define MCFSIM_PADDR (MCF_MBAR + 0x84) /* Port A Direction (r/w) */ |
| 76 | #define MCFSIM_PADAT (MCF_MBAR + 0x86) /* Port A Data (r/w) */ |
| 77 | #define MCFSIM_PBCNT (MCF_MBAR + 0x88) /* Port B Control (r/w) */ |
| 78 | #define MCFSIM_PBDDR (MCF_MBAR + 0x8c) /* Port B Direction (r/w) */ |
| 79 | #define MCFSIM_PBDAT (MCF_MBAR + 0x8e) /* Port B Data (r/w) */ |
| 80 | #define MCFSIM_PCDDR (MCF_MBAR + 0x94) /* Port C Direction (r/w) */ |
| 81 | #define MCFSIM_PCDAT (MCF_MBAR + 0x96) /* Port C Data (r/w) */ |
| 82 | #define MCFSIM_PDCNT (MCF_MBAR + 0x98) /* Port D Control (r/w) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | |
Greg Ungerer | babc08b | 2011-03-06 00:54:36 +1000 | [diff] [blame] | 84 | #define MCFDMA_BASE0 (MCF_MBAR + 0xe0) /* Base address DMA 0 */ |
| 85 | |
Greg Ungerer | 58f0ac9 | 2011-03-09 09:57:14 +1000 | [diff] [blame] | 86 | #define MCFTIMER_BASE1 (MCF_MBAR + 0x200) /* Base address TIMER1 */ |
| 87 | #define MCFTIMER_BASE2 (MCF_MBAR + 0x220) /* Base address TIMER2 */ |
| 88 | #define MCFTIMER_BASE3 (MCF_MBAR + 0x240) /* Base address TIMER4 */ |
| 89 | #define MCFTIMER_BASE4 (MCF_MBAR + 0x260) /* Base address TIMER3 */ |
| 90 | |
Greg Ungerer | 9a11b493 | 2011-12-24 10:13:36 +1000 | [diff] [blame] | 91 | #define MCFFEC_BASE0 (MCF_MBAR + 0x840) /* Base FEC ethernet */ |
| 92 | #define MCFFEC_SIZE0 0x1d0 |
| 93 | |
Greg Ungerer | 04b75b1 | 2009-05-19 14:52:40 +1000 | [diff] [blame] | 94 | /* |
| 95 | * Define system peripheral IRQ usage. |
| 96 | */ |
Greg Ungerer | 9075216d | 2009-07-07 09:39:11 +1000 | [diff] [blame] | 97 | #define MCFINT_VECBASE 64 /* Base of interrupts */ |
| 98 | #define MCF_IRQ_SPURIOUS 64 /* User Spurious */ |
| 99 | #define MCF_IRQ_EINT1 65 /* External Interrupt 1 */ |
| 100 | #define MCF_IRQ_EINT2 66 /* External Interrupt 2 */ |
| 101 | #define MCF_IRQ_EINT3 67 /* External Interrupt 3 */ |
| 102 | #define MCF_IRQ_EINT4 68 /* External Interrupt 4 */ |
| 103 | #define MCF_IRQ_TIMER1 69 /* Timer 1 */ |
| 104 | #define MCF_IRQ_TIMER2 70 /* Timer 2 */ |
| 105 | #define MCF_IRQ_TIMER3 71 /* Timer 3 */ |
| 106 | #define MCF_IRQ_TIMER4 72 /* Timer 4 */ |
Greg Ungerer | 023e055 | 2011-12-24 00:30:37 +1000 | [diff] [blame] | 107 | #define MCF_IRQ_UART0 73 /* UART 0 */ |
| 108 | #define MCF_IRQ_UART1 74 /* UART 1 */ |
Greg Ungerer | 9075216d | 2009-07-07 09:39:11 +1000 | [diff] [blame] | 109 | #define MCF_IRQ_PLIP 75 /* PLIC 2Khz Periodic */ |
| 110 | #define MCF_IRQ_PLIA 76 /* PLIC Asynchronous */ |
| 111 | #define MCF_IRQ_USB0 77 /* USB Endpoint 0 */ |
| 112 | #define MCF_IRQ_USB1 78 /* USB Endpoint 1 */ |
| 113 | #define MCF_IRQ_USB2 79 /* USB Endpoint 2 */ |
| 114 | #define MCF_IRQ_USB3 80 /* USB Endpoint 3 */ |
| 115 | #define MCF_IRQ_USB4 81 /* USB Endpoint 4 */ |
| 116 | #define MCF_IRQ_USB5 82 /* USB Endpoint 5 */ |
| 117 | #define MCF_IRQ_USB6 83 /* USB Endpoint 6 */ |
| 118 | #define MCF_IRQ_USB7 84 /* USB Endpoint 7 */ |
| 119 | #define MCF_IRQ_DMA 85 /* DMA Controller */ |
Greg Ungerer | 9a11b493 | 2011-12-24 10:13:36 +1000 | [diff] [blame] | 120 | #define MCF_IRQ_FECRX0 86 /* Ethernet Receiver */ |
| 121 | #define MCF_IRQ_FECTX0 87 /* Ethernet Transmitter */ |
| 122 | #define MCF_IRQ_FECENTC0 88 /* Ethernet Non-Time Critical */ |
Greg Ungerer | 9075216d | 2009-07-07 09:39:11 +1000 | [diff] [blame] | 123 | #define MCF_IRQ_QSPI 89 /* Queued Serial Interface */ |
| 124 | #define MCF_IRQ_EINT5 90 /* External Interrupt 5 */ |
| 125 | #define MCF_IRQ_EINT6 91 /* External Interrupt 6 */ |
| 126 | #define MCF_IRQ_SWTO 92 /* Software Watchdog */ |
| 127 | #define MCFINT_VECMAX 95 /* Maxmum interrupt */ |
| 128 | |
| 129 | #define MCF_IRQ_TIMER MCF_IRQ_TIMER1 |
| 130 | #define MCF_IRQ_PROFILER MCF_IRQ_TIMER2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | |
sfking@fdwdc.com | 316f2c4 | 2009-06-19 18:11:07 -0700 | [diff] [blame] | 132 | /* |
| 133 | * Generic GPIO support |
| 134 | */ |
Greg Ungerer | 41e5be6 | 2012-09-18 15:20:19 +1000 | [diff] [blame] | 135 | #define MCFGPIO_PIN_MAX 48 |
| 136 | #define MCFGPIO_IRQ_MAX -1 |
| 137 | #define MCFGPIO_IRQ_VECBASE -1 |
| 138 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 139 | /****************************************************************************/ |
| 140 | #endif /* m5272sim_h */ |