Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 1 | /****************************************************************************/ |
| 2 | |
| 3 | /* |
| 4 | * m523xsim.h -- ColdFire 523x System Integration Module support. |
| 5 | * |
| 6 | * (C) Copyright 2003-2005, Greg Ungerer <gerg@snapgear.com> |
| 7 | */ |
| 8 | |
| 9 | /****************************************************************************/ |
| 10 | #ifndef m523xsim_h |
| 11 | #define m523xsim_h |
| 12 | /****************************************************************************/ |
| 13 | |
Greg Ungerer | 733f31b | 2010-11-02 17:40:37 +1000 | [diff] [blame] | 14 | #define CPU_NAME "COLDFIRE(m523x)" |
| 15 | #define CPU_INSTR_PER_JIFFY 3 |
Greg Ungerer | ce3de78 | 2011-03-09 14:19:08 +1000 | [diff] [blame] | 16 | #define MCF_BUSCLK (MCF_CLK / 2) |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 17 | |
Greg Ungerer | a12cf0a | 2010-11-09 10:12:29 +1000 | [diff] [blame] | 18 | #include <asm/m52xxacr.h> |
| 19 | |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 20 | /* |
| 21 | * Define the 523x SIM register set addresses. |
| 22 | */ |
Greg Ungerer | 254eef7 | 2011-03-05 22:17:17 +1000 | [diff] [blame] | 23 | #define MCFICM_INTC0 (MCF_IPSBAR + 0x0c00) /* Base for Interrupt Ctrl 0 */ |
| 24 | #define MCFICM_INTC1 (MCF_IPSBAR + 0x0d00) /* Base for Interrupt Ctrl 0 */ |
| 25 | |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 26 | #define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */ |
| 27 | #define MCFINTC_IPRL 0x04 /* Interrupt pending 1-31 */ |
| 28 | #define MCFINTC_IMRH 0x08 /* Interrupt mask 32-63 */ |
| 29 | #define MCFINTC_IMRL 0x0c /* Interrupt mask 1-31 */ |
| 30 | #define MCFINTC_INTFRCH 0x10 /* Interrupt force 32-63 */ |
| 31 | #define MCFINTC_INTFRCL 0x14 /* Interrupt force 1-31 */ |
| 32 | #define MCFINTC_IRLR 0x18 /* */ |
| 33 | #define MCFINTC_IACKL 0x19 /* */ |
| 34 | #define MCFINTC_ICR0 0x40 /* Base ICR register */ |
| 35 | |
| 36 | #define MCFINT_VECBASE 64 /* Vector base number */ |
| 37 | #define MCFINT_UART0 13 /* Interrupt number for UART0 */ |
Greg Ungerer | 13682af | 2011-12-24 00:25:28 +1000 | [diff] [blame] | 38 | #define MCFINT_UART1 14 /* Interrupt number for UART1 */ |
| 39 | #define MCFINT_UART2 15 /* Interrupt number for UART2 */ |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 40 | #define MCFINT_QSPI 18 /* Interrupt number for QSPI */ |
Greg Ungerer | 2163459 | 2011-12-24 10:10:13 +1000 | [diff] [blame] | 41 | #define MCFINT_FECRX0 23 /* Interrupt number for FEC */ |
| 42 | #define MCFINT_FECTX0 27 /* Interrupt number for FEC */ |
| 43 | #define MCFINT_FECENTC0 29 /* Interrupt number for FEC */ |
| 44 | #define MCFINT_PIT1 36 /* Interrupt number for PIT1 */ |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 45 | |
Greg Ungerer | 13682af | 2011-12-24 00:25:28 +1000 | [diff] [blame] | 46 | #define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0) |
| 47 | #define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1) |
| 48 | #define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) |
| 49 | |
Greg Ungerer | 2163459 | 2011-12-24 10:10:13 +1000 | [diff] [blame] | 50 | #define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) |
| 51 | #define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) |
| 52 | #define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) |
| 53 | |
Greg Ungerer | 36d175a | 2011-12-24 12:36:38 +1000 | [diff] [blame] | 54 | #define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI) |
Steven King | bdee4e2 | 2012-06-06 14:02:14 -0700 | [diff] [blame] | 55 | #define MCF_IRQ_PIT1 (MCFINT_VECBASE + MCFINT_PIT1) |
Greg Ungerer | 36d175a | 2011-12-24 12:36:38 +1000 | [diff] [blame] | 56 | |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 57 | /* |
| 58 | * SDRAM configuration registers. |
| 59 | */ |
Greg Ungerer | 6a92e19 | 2011-03-06 23:01:46 +1000 | [diff] [blame] | 60 | #define MCFSIM_DCR (MCF_IPSBAR + 0x44) /* Control */ |
| 61 | #define MCFSIM_DACR0 (MCF_IPSBAR + 0x48) /* Base address 0 */ |
| 62 | #define MCFSIM_DMR0 (MCF_IPSBAR + 0x4c) /* Address mask 0 */ |
| 63 | #define MCFSIM_DACR1 (MCF_IPSBAR + 0x50) /* Base address 1 */ |
| 64 | #define MCFSIM_DMR1 (MCF_IPSBAR + 0x54) /* Address mask 1 */ |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 65 | |
Greg Ungerer | 55b33f3 | 2009-04-30 22:58:35 +1000 | [diff] [blame] | 66 | /* |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 67 | * Reset Control Unit (relative to IPSBAR). |
Greg Ungerer | 55b33f3 | 2009-04-30 22:58:35 +1000 | [diff] [blame] | 68 | */ |
Greg Ungerer | 320de7d | 2012-02-19 16:27:23 +1000 | [diff] [blame] | 69 | #define MCF_RCR (MCF_IPSBAR + 0x110000) |
| 70 | #define MCF_RSR (MCF_IPSBAR + 0x110001) |
Greg Ungerer | 55b33f3 | 2009-04-30 22:58:35 +1000 | [diff] [blame] | 71 | |
| 72 | #define MCF_RCR_SWRESET 0x80 /* Software reset bit */ |
| 73 | #define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ |
| 74 | |
Greg Ungerer | 5701542 | 2010-11-03 12:50:30 +1000 | [diff] [blame] | 75 | /* |
| 76 | * UART module. |
| 77 | */ |
Greg Ungerer | 13682af | 2011-12-24 00:25:28 +1000 | [diff] [blame] | 78 | #define MCFUART_BASE0 (MCF_IPSBAR + 0x200) |
| 79 | #define MCFUART_BASE1 (MCF_IPSBAR + 0x240) |
| 80 | #define MCFUART_BASE2 (MCF_IPSBAR + 0x280) |
Greg Ungerer | 5701542 | 2010-11-03 12:50:30 +1000 | [diff] [blame] | 81 | |
Greg Ungerer | b62384a | 2011-03-06 00:05:29 +1000 | [diff] [blame] | 82 | /* |
| 83 | * FEC ethernet module. |
| 84 | */ |
Greg Ungerer | 2163459 | 2011-12-24 10:10:13 +1000 | [diff] [blame] | 85 | #define MCFFEC_BASE0 (MCF_IPSBAR + 0x1000) |
| 86 | #define MCFFEC_SIZE0 0x800 |
Greg Ungerer | b62384a | 2011-03-06 00:05:29 +1000 | [diff] [blame] | 87 | |
| 88 | /* |
Greg Ungerer | 36d175a | 2011-12-24 12:36:38 +1000 | [diff] [blame] | 89 | * QSPI module. |
| 90 | */ |
| 91 | #define MCFQSPI_BASE (MCF_IPSBAR + 0x340) |
| 92 | #define MCFQSPI_SIZE 0x40 |
| 93 | |
| 94 | #define MCFQSPI_CS0 91 |
| 95 | #define MCFQSPI_CS1 92 |
| 96 | #define MCFQSPI_CS2 103 |
| 97 | #define MCFQSPI_CS3 99 |
| 98 | |
| 99 | /* |
Greg Ungerer | b62384a | 2011-03-06 00:05:29 +1000 | [diff] [blame] | 100 | * GPIO module. |
| 101 | */ |
sfking@fdwdc.com | a03ce7d | 2009-06-19 18:11:04 -0700 | [diff] [blame] | 102 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) |
| 103 | #define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001) |
| 104 | #define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002) |
| 105 | #define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100003) |
| 106 | #define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100004) |
| 107 | #define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100005) |
| 108 | #define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x100006) |
| 109 | #define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x100007) |
| 110 | #define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100008) |
| 111 | #define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100009) |
| 112 | #define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000A) |
| 113 | #define MCFGPIO_PODR_TIMER (MCF_IPSBAR + 0x10000B) |
| 114 | #define MCFGPIO_PODR_ETPU (MCF_IPSBAR + 0x10000C) |
| 115 | |
| 116 | #define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100010) |
| 117 | #define MCFGPIO_PDDR_DATAH (MCF_IPSBAR + 0x100011) |
| 118 | #define MCFGPIO_PDDR_DATAL (MCF_IPSBAR + 0x100012) |
| 119 | #define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100013) |
| 120 | #define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100014) |
| 121 | #define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100015) |
| 122 | #define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x100016) |
| 123 | #define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100017) |
| 124 | #define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100018) |
| 125 | #define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x100019) |
| 126 | #define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x10001A) |
| 127 | #define MCFGPIO_PDDR_TIMER (MCF_IPSBAR + 0x10001B) |
| 128 | #define MCFGPIO_PDDR_ETPU (MCF_IPSBAR + 0x10001C) |
| 129 | |
| 130 | #define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x100020) |
| 131 | #define MCFGPIO_PPDSDR_DATAH (MCF_IPSBAR + 0x100021) |
| 132 | #define MCFGPIO_PPDSDR_DATAL (MCF_IPSBAR + 0x100022) |
| 133 | #define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x100023) |
| 134 | #define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x100024) |
| 135 | #define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100025) |
| 136 | #define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100026) |
| 137 | #define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100027) |
| 138 | #define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100028) |
| 139 | #define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100029) |
| 140 | #define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x10002A) |
| 141 | #define MCFGPIO_PPDSDR_TIMER (MCF_IPSBAR + 0x10002B) |
| 142 | #define MCFGPIO_PPDSDR_ETPU (MCF_IPSBAR + 0x10002C) |
| 143 | |
| 144 | #define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100030) |
| 145 | #define MCFGPIO_PCLRR_DATAH (MCF_IPSBAR + 0x100031) |
| 146 | #define MCFGPIO_PCLRR_DATAL (MCF_IPSBAR + 0x100032) |
| 147 | #define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100033) |
| 148 | #define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100034) |
| 149 | #define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x100035) |
| 150 | #define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100036) |
| 151 | #define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100037) |
| 152 | #define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x100038) |
| 153 | #define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100039) |
| 154 | #define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x10003A) |
| 155 | #define MCFGPIO_PCLRR_TIMER (MCF_IPSBAR + 0x10003B) |
| 156 | #define MCFGPIO_PCLRR_ETPU (MCF_IPSBAR + 0x10003C) |
| 157 | |
| 158 | /* |
Greg Ungerer | f317c71 | 2011-03-05 23:32:35 +1000 | [diff] [blame] | 159 | * PIT timer base addresses. |
| 160 | */ |
| 161 | #define MCFPIT_BASE1 (MCF_IPSBAR + 0x150000) |
| 162 | #define MCFPIT_BASE2 (MCF_IPSBAR + 0x160000) |
| 163 | #define MCFPIT_BASE3 (MCF_IPSBAR + 0x170000) |
| 164 | #define MCFPIT_BASE4 (MCF_IPSBAR + 0x180000) |
| 165 | |
| 166 | /* |
sfking@fdwdc.com | a03ce7d | 2009-06-19 18:11:04 -0700 | [diff] [blame] | 167 | * EPort |
| 168 | */ |
Greg Ungerer | 57b4814 | 2011-03-11 17:06:58 +1000 | [diff] [blame] | 169 | #define MCFEPORT_EPPAR (MCF_IPSBAR + 0x130000) |
sfking@fdwdc.com | a03ce7d | 2009-06-19 18:11:04 -0700 | [diff] [blame] | 170 | #define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002) |
Greg Ungerer | 57b4814 | 2011-03-11 17:06:58 +1000 | [diff] [blame] | 171 | #define MCFEPORT_EPIER (MCF_IPSBAR + 0x130003) |
sfking@fdwdc.com | a03ce7d | 2009-06-19 18:11:04 -0700 | [diff] [blame] | 172 | #define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004) |
| 173 | #define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005) |
Greg Ungerer | 57b4814 | 2011-03-11 17:06:58 +1000 | [diff] [blame] | 174 | #define MCFEPORT_EPFR (MCF_IPSBAR + 0x130006) |
sfking@fdwdc.com | a03ce7d | 2009-06-19 18:11:04 -0700 | [diff] [blame] | 175 | |
| 176 | /* |
| 177 | * Generic GPIO support |
| 178 | */ |
| 179 | #define MCFGPIO_PODR MCFGPIO_PODR_ADDR |
| 180 | #define MCFGPIO_PDDR MCFGPIO_PDDR_ADDR |
| 181 | #define MCFGPIO_PPDR MCFGPIO_PPDSDR_ADDR |
| 182 | #define MCFGPIO_SETR MCFGPIO_PPDSDR_ADDR |
| 183 | #define MCFGPIO_CLRR MCFGPIO_PCLRR_ADDR |
| 184 | |
| 185 | #define MCFGPIO_PIN_MAX 107 |
| 186 | #define MCFGPIO_IRQ_MAX 8 |
| 187 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE |
| 188 | |
Steven King | 91d6041 | 2010-01-22 12:43:03 -0800 | [diff] [blame] | 189 | /* |
| 190 | * Pin Assignment |
| 191 | */ |
| 192 | #define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10004A) |
| 193 | #define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10004C) |
Greg Ungerer | babc08b | 2011-03-06 00:54:36 +1000 | [diff] [blame] | 194 | |
| 195 | /* |
| 196 | * DMA unit base addresses. |
| 197 | */ |
| 198 | #define MCFDMA_BASE0 (MCF_IPSBAR + 0x100) |
| 199 | #define MCFDMA_BASE1 (MCF_IPSBAR + 0x140) |
| 200 | #define MCFDMA_BASE2 (MCF_IPSBAR + 0x180) |
| 201 | #define MCFDMA_BASE3 (MCF_IPSBAR + 0x1C0) |
| 202 | |
Greg Ungerer | 910ce396 | 2005-09-09 09:32:14 +1000 | [diff] [blame] | 203 | /****************************************************************************/ |
| 204 | #endif /* m523xsim_h */ |