Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************/ |
| 2 | |
| 3 | /* |
| 4 | * m527xsim.h -- ColdFire 5270/5271 System Integration Module support. |
| 5 | * |
| 6 | * (C) Copyright 2004, Greg Ungerer (gerg@snapgear.com) |
| 7 | */ |
| 8 | |
| 9 | /****************************************************************************/ |
| 10 | #ifndef m527xsim_h |
| 11 | #define m527xsim_h |
| 12 | /****************************************************************************/ |
| 13 | |
Greg Ungerer | 733f31b | 2010-11-02 17:40:37 +1000 | [diff] [blame] | 14 | #define CPU_NAME "COLDFIRE(m527x)" |
| 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 | 7fc82b6 | 2010-11-02 17:13:27 +1000 | [diff] [blame] | 17 | |
Greg Ungerer | a12cf0a | 2010-11-09 10:12:29 +1000 | [diff] [blame] | 18 | #include <asm/m52xxacr.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | |
| 20 | /* |
| 21 | * Define the 5270/5271 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 1 */ |
| 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [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 */ |
| 38 | #define MCFINT_UART1 14 /* Interrupt number for UART1 */ |
| 39 | #define MCFINT_UART2 15 /* Interrupt number for UART2 */ |
Steven King | 2d24b53 | 2014-06-30 09:53:19 -0700 | [diff] [blame] | 40 | #define MCFINT_I2C0 17 /* Interrupt number for I2C */ |
Steven King | 91d6041 | 2010-01-22 12:43:03 -0800 | [diff] [blame] | 41 | #define MCFINT_QSPI 18 /* Interrupt number for QSPI */ |
Greg Ungerer | 308bfc1 | 2011-12-24 10:17:42 +1000 | [diff] [blame] | 42 | #define MCFINT_FECRX0 23 /* Interrupt number for FEC0 */ |
| 43 | #define MCFINT_FECTX0 27 /* Interrupt number for FEC0 */ |
| 44 | #define MCFINT_FECENTC0 29 /* Interrupt number for FEC0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | #define MCFINT_PIT1 36 /* Interrupt number for PIT1 */ |
| 46 | |
Greg Ungerer | 308bfc1 | 2011-12-24 10:17:42 +1000 | [diff] [blame] | 47 | #define MCFINT2_VECBASE 128 /* Vector base number 2 */ |
| 48 | #define MCFINT2_FECRX1 23 /* Interrupt number for FEC1 */ |
| 49 | #define MCFINT2_FECTX1 27 /* Interrupt number for FEC1 */ |
| 50 | #define MCFINT2_FECENTC1 29 /* Interrupt number for FEC1 */ |
| 51 | |
Greg Ungerer | 20e681f | 2011-12-24 00:33:31 +1000 | [diff] [blame] | 52 | #define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0) |
| 53 | #define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1) |
| 54 | #define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) |
| 55 | |
Greg Ungerer | 308bfc1 | 2011-12-24 10:17:42 +1000 | [diff] [blame] | 56 | #define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) |
| 57 | #define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) |
| 58 | #define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) |
| 59 | #define MCF_IRQ_FECRX1 (MCFINT2_VECBASE + MCFINT2_FECRX1) |
| 60 | #define MCF_IRQ_FECTX1 (MCFINT2_VECBASE + MCFINT2_FECTX1) |
| 61 | #define MCF_IRQ_FECENTC1 (MCFINT2_VECBASE + MCFINT2_FECENTC1) |
| 62 | |
Greg Ungerer | 6c84a60 | 2011-12-24 12:40:37 +1000 | [diff] [blame] | 63 | #define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI) |
Steven King | bdee4e2 | 2012-06-06 14:02:14 -0700 | [diff] [blame] | 64 | #define MCF_IRQ_PIT1 (MCFINT_VECBASE + MCFINT_PIT1) |
Steven King | 2d24b53 | 2014-06-30 09:53:19 -0700 | [diff] [blame] | 65 | #define MCF_IRQ_I2C0 (MCFINT_VECBASE + MCFINT_I2C0) |
Greg Ungerer | 6c84a60 | 2011-12-24 12:40:37 +1000 | [diff] [blame] | 66 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | /* |
| 68 | * SDRAM configuration registers. |
| 69 | */ |
Greg Ungerer | d871629 | 2005-09-12 11:18:10 +1000 | [diff] [blame] | 70 | #ifdef CONFIG_M5271 |
Greg Ungerer | 6a92e19 | 2011-03-06 23:01:46 +1000 | [diff] [blame] | 71 | #define MCFSIM_DCR (MCF_IPSBAR + 0x40) /* Control */ |
| 72 | #define MCFSIM_DACR0 (MCF_IPSBAR + 0x48) /* Base address 0 */ |
| 73 | #define MCFSIM_DMR0 (MCF_IPSBAR + 0x4c) /* Address mask 0 */ |
| 74 | #define MCFSIM_DACR1 (MCF_IPSBAR + 0x50) /* Base address 1 */ |
| 75 | #define MCFSIM_DMR1 (MCF_IPSBAR + 0x54) /* Address mask 1 */ |
Greg Ungerer | d871629 | 2005-09-12 11:18:10 +1000 | [diff] [blame] | 76 | #endif |
| 77 | #ifdef CONFIG_M5275 |
Greg Ungerer | 6a92e19 | 2011-03-06 23:01:46 +1000 | [diff] [blame] | 78 | #define MCFSIM_DMR (MCF_IPSBAR + 0x40) /* Mode */ |
| 79 | #define MCFSIM_DCR (MCF_IPSBAR + 0x44) /* Control */ |
| 80 | #define MCFSIM_DCFG1 (MCF_IPSBAR + 0x48) /* Configuration 1 */ |
| 81 | #define MCFSIM_DCFG2 (MCF_IPSBAR + 0x4c) /* Configuration 2 */ |
| 82 | #define MCFSIM_DBAR0 (MCF_IPSBAR + 0x50) /* Base address 0 */ |
| 83 | #define MCFSIM_DMR0 (MCF_IPSBAR + 0x54) /* Address mask 0 */ |
| 84 | #define MCFSIM_DBAR1 (MCF_IPSBAR + 0x58) /* Base address 1 */ |
| 85 | #define MCFSIM_DMR1 (MCF_IPSBAR + 0x5c) /* Address mask 1 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | #endif |
| 87 | |
Greg Ungerer | 5701542 | 2010-11-03 12:50:30 +1000 | [diff] [blame] | 88 | /* |
Greg Ungerer | babc08b | 2011-03-06 00:54:36 +1000 | [diff] [blame] | 89 | * DMA unit base addresses. |
| 90 | */ |
| 91 | #define MCFDMA_BASE0 (MCF_IPSBAR + 0x100) |
| 92 | #define MCFDMA_BASE1 (MCF_IPSBAR + 0x140) |
| 93 | #define MCFDMA_BASE2 (MCF_IPSBAR + 0x180) |
| 94 | #define MCFDMA_BASE3 (MCF_IPSBAR + 0x1C0) |
| 95 | |
| 96 | /* |
Greg Ungerer | 5701542 | 2010-11-03 12:50:30 +1000 | [diff] [blame] | 97 | * UART module. |
| 98 | */ |
Greg Ungerer | 20e681f | 2011-12-24 00:33:31 +1000 | [diff] [blame] | 99 | #define MCFUART_BASE0 (MCF_IPSBAR + 0x200) |
| 100 | #define MCFUART_BASE1 (MCF_IPSBAR + 0x240) |
| 101 | #define MCFUART_BASE2 (MCF_IPSBAR + 0x280) |
Greg Ungerer | 9a6b0c7 | 2011-03-06 00:13:17 +1000 | [diff] [blame] | 102 | |
| 103 | /* |
| 104 | * FEC ethernet module. |
| 105 | */ |
| 106 | #define MCFFEC_BASE0 (MCF_IPSBAR + 0x1000) |
| 107 | #define MCFFEC_SIZE0 0x800 |
Greg Ungerer | a630ec1 | 2015-03-18 10:14:45 +1000 | [diff] [blame] | 108 | #ifdef CONFIG_M5275 |
Greg Ungerer | 9a6b0c7 | 2011-03-06 00:13:17 +1000 | [diff] [blame] | 109 | #define MCFFEC_BASE1 (MCF_IPSBAR + 0x1800) |
| 110 | #define MCFFEC_SIZE1 0x800 |
Greg Ungerer | a630ec1 | 2015-03-18 10:14:45 +1000 | [diff] [blame] | 111 | #endif |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 112 | |
Greg Ungerer | 6c84a60 | 2011-12-24 12:40:37 +1000 | [diff] [blame] | 113 | /* |
| 114 | * QSPI module. |
| 115 | */ |
| 116 | #define MCFQSPI_BASE (MCF_IPSBAR + 0x340) |
| 117 | #define MCFQSPI_SIZE 0x40 |
| 118 | |
| 119 | #ifdef CONFIG_M5271 |
| 120 | #define MCFQSPI_CS0 91 |
| 121 | #define MCFQSPI_CS1 92 |
| 122 | #define MCFQSPI_CS2 99 |
| 123 | #define MCFQSPI_CS3 103 |
| 124 | #endif |
| 125 | #ifdef CONFIG_M5275 |
| 126 | #define MCFQSPI_CS0 59 |
| 127 | #define MCFQSPI_CS1 60 |
| 128 | #define MCFQSPI_CS2 61 |
| 129 | #define MCFQSPI_CS3 62 |
| 130 | #endif |
| 131 | |
| 132 | /* |
| 133 | * GPIO module. |
| 134 | */ |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 135 | #ifdef CONFIG_M5271 |
| 136 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) |
| 137 | #define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001) |
| 138 | #define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002) |
| 139 | #define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100003) |
| 140 | #define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100004) |
| 141 | #define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100005) |
| 142 | #define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x100006) |
| 143 | #define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x100007) |
| 144 | #define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100008) |
| 145 | #define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100009) |
| 146 | #define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000A) |
| 147 | #define MCFGPIO_PODR_TIMER (MCF_IPSBAR + 0x10000B) |
| 148 | |
| 149 | #define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100010) |
| 150 | #define MCFGPIO_PDDR_DATAH (MCF_IPSBAR + 0x100011) |
| 151 | #define MCFGPIO_PDDR_DATAL (MCF_IPSBAR + 0x100012) |
| 152 | #define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100013) |
| 153 | #define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100014) |
| 154 | #define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100015) |
| 155 | #define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x100016) |
| 156 | #define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100017) |
| 157 | #define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100018) |
| 158 | #define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x100019) |
| 159 | #define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x10001A) |
| 160 | #define MCFGPIO_PDDR_TIMER (MCF_IPSBAR + 0x10001B) |
| 161 | |
| 162 | #define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x100020) |
| 163 | #define MCFGPIO_PPDSDR_DATAH (MCF_IPSBAR + 0x100021) |
| 164 | #define MCFGPIO_PPDSDR_DATAL (MCF_IPSBAR + 0x100022) |
| 165 | #define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x100023) |
| 166 | #define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x100024) |
| 167 | #define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100025) |
| 168 | #define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100026) |
| 169 | #define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100027) |
| 170 | #define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100028) |
| 171 | #define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100029) |
| 172 | #define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x10002A) |
| 173 | #define MCFGPIO_PPDSDR_TIMER (MCF_IPSBAR + 0x10002B) |
| 174 | |
| 175 | #define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100030) |
| 176 | #define MCFGPIO_PCLRR_DATAH (MCF_IPSBAR + 0x100031) |
| 177 | #define MCFGPIO_PCLRR_DATAL (MCF_IPSBAR + 0x100032) |
| 178 | #define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100033) |
| 179 | #define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100034) |
| 180 | #define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x100035) |
| 181 | #define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100036) |
| 182 | #define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100037) |
| 183 | #define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x100038) |
| 184 | #define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100039) |
| 185 | #define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x10003A) |
| 186 | #define MCFGPIO_PCLRR_TIMER (MCF_IPSBAR + 0x10003B) |
| 187 | |
| 188 | /* |
| 189 | * Generic GPIO support |
| 190 | */ |
Greg Ungerer | 39dc5b7 | 2012-09-18 15:38:15 +1000 | [diff] [blame] | 191 | #define MCFGPIO_PODR MCFGPIO_PODR_ADDR |
| 192 | #define MCFGPIO_PDDR MCFGPIO_PDDR_ADDR |
| 193 | #define MCFGPIO_PPDR MCFGPIO_PPDSDR_ADDR |
| 194 | #define MCFGPIO_SETR MCFGPIO_PPDSDR_ADDR |
| 195 | #define MCFGPIO_CLRR MCFGPIO_PCLRR_ADDR |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 196 | |
Greg Ungerer | 39dc5b7 | 2012-09-18 15:38:15 +1000 | [diff] [blame] | 197 | #define MCFGPIO_PIN_MAX 100 |
| 198 | #define MCFGPIO_IRQ_MAX 8 |
| 199 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE |
Steven King | 91d6041 | 2010-01-22 12:43:03 -0800 | [diff] [blame] | 200 | |
Greg Ungerer | f821e34 | 2012-09-17 12:07:21 +1000 | [diff] [blame] | 201 | /* |
| 202 | * Port Pin Assignment registers. |
| 203 | */ |
| 204 | #define MCFGPIO_PAR_AD (MCF_IPSBAR + 0x100040) |
| 205 | #define MCFGPIO_PAR_BUSCTL (MCF_IPSBAR + 0x100042) |
| 206 | #define MCFGPIO_PAR_BS (MCF_IPSBAR + 0x100044) |
| 207 | #define MCFGPIO_PAR_CS (MCF_IPSBAR + 0x100045) |
| 208 | #define MCFGPIO_PAR_SDRAM (MCF_IPSBAR + 0x100046) |
| 209 | #define MCFGPIO_PAR_FECI2C (MCF_IPSBAR + 0x100047) |
| 210 | #define MCFGPIO_PAR_UART (MCF_IPSBAR + 0x100048) |
Steven King | 91d6041 | 2010-01-22 12:43:03 -0800 | [diff] [blame] | 211 | #define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10004A) |
| 212 | #define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10004C) |
Greg Ungerer | f821e34 | 2012-09-17 12:07:21 +1000 | [diff] [blame] | 213 | |
| 214 | #define UART0_ENABLE_MASK 0x000f |
| 215 | #define UART1_ENABLE_MASK 0x0ff0 |
| 216 | #define UART2_ENABLE_MASK 0x3000 |
| 217 | #endif /* CONFIG_M5271 */ |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 218 | |
| 219 | #ifdef CONFIG_M5275 |
| 220 | #define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100004) |
| 221 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100005) |
| 222 | #define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100008) |
| 223 | #define MCFGPIO_PODR_FEC0H (MCF_IPSBAR + 0x10000A) |
| 224 | #define MCFGPIO_PODR_FEC0L (MCF_IPSBAR + 0x10000B) |
| 225 | #define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x10000C) |
| 226 | #define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000D) |
| 227 | #define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x10000E) |
| 228 | #define MCFGPIO_PODR_TIMERH (MCF_IPSBAR + 0x10000F) |
| 229 | #define MCFGPIO_PODR_TIMERL (MCF_IPSBAR + 0x100010) |
| 230 | #define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100011) |
| 231 | #define MCFGPIO_PODR_FEC1H (MCF_IPSBAR + 0x100012) |
| 232 | #define MCFGPIO_PODR_FEC1L (MCF_IPSBAR + 0x100013) |
| 233 | #define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100014) |
| 234 | #define MCFGPIO_PODR_IRQ (MCF_IPSBAR + 0x100015) |
| 235 | #define MCFGPIO_PODR_USBH (MCF_IPSBAR + 0x100016) |
| 236 | #define MCFGPIO_PODR_USBL (MCF_IPSBAR + 0x100017) |
| 237 | #define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100018) |
| 238 | |
| 239 | #define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100020) |
| 240 | #define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100021) |
| 241 | #define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100024) |
| 242 | #define MCFGPIO_PDDR_FEC0H (MCF_IPSBAR + 0x100026) |
| 243 | #define MCFGPIO_PDDR_FEC0L (MCF_IPSBAR + 0x100027) |
| 244 | #define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100028) |
| 245 | #define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x100029) |
| 246 | #define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x10002A) |
| 247 | #define MCFGPIO_PDDR_TIMERH (MCF_IPSBAR + 0x10002B) |
| 248 | #define MCFGPIO_PDDR_TIMERL (MCF_IPSBAR + 0x10002C) |
| 249 | #define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x10002D) |
| 250 | #define MCFGPIO_PDDR_FEC1H (MCF_IPSBAR + 0x10002E) |
| 251 | #define MCFGPIO_PDDR_FEC1L (MCF_IPSBAR + 0x10002F) |
| 252 | #define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100030) |
| 253 | #define MCFGPIO_PDDR_IRQ (MCF_IPSBAR + 0x100031) |
| 254 | #define MCFGPIO_PDDR_USBH (MCF_IPSBAR + 0x100032) |
| 255 | #define MCFGPIO_PDDR_USBL (MCF_IPSBAR + 0x100033) |
| 256 | #define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100034) |
| 257 | |
| 258 | #define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x10003C) |
| 259 | #define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x10003D) |
| 260 | #define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100040) |
| 261 | #define MCFGPIO_PPDSDR_FEC0H (MCF_IPSBAR + 0x100042) |
| 262 | #define MCFGPIO_PPDSDR_FEC0L (MCF_IPSBAR + 0x100043) |
| 263 | #define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100044) |
| 264 | #define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x100045) |
| 265 | #define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100046) |
| 266 | #define MCFGPIO_PPDSDR_TIMERH (MCF_IPSBAR + 0x100047) |
| 267 | #define MCFGPIO_PPDSDR_TIMERL (MCF_IPSBAR + 0x100048) |
| 268 | #define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100049) |
| 269 | #define MCFGPIO_PPDSDR_FEC1H (MCF_IPSBAR + 0x10004A) |
| 270 | #define MCFGPIO_PPDSDR_FEC1L (MCF_IPSBAR + 0x10004B) |
| 271 | #define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x10004C) |
| 272 | #define MCFGPIO_PPDSDR_IRQ (MCF_IPSBAR + 0x10004D) |
| 273 | #define MCFGPIO_PPDSDR_USBH (MCF_IPSBAR + 0x10004E) |
| 274 | #define MCFGPIO_PPDSDR_USBL (MCF_IPSBAR + 0x10004F) |
| 275 | #define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100050) |
| 276 | |
| 277 | #define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100058) |
| 278 | #define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100059) |
| 279 | #define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x10005C) |
| 280 | #define MCFGPIO_PCLRR_FEC0H (MCF_IPSBAR + 0x10005E) |
| 281 | #define MCFGPIO_PCLRR_FEC0L (MCF_IPSBAR + 0x10005F) |
| 282 | #define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100060) |
| 283 | #define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x100061) |
| 284 | #define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100062) |
| 285 | #define MCFGPIO_PCLRR_TIMERH (MCF_IPSBAR + 0x100063) |
| 286 | #define MCFGPIO_PCLRR_TIMERL (MCF_IPSBAR + 0x100064) |
| 287 | #define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100065) |
| 288 | #define MCFGPIO_PCLRR_FEC1H (MCF_IPSBAR + 0x100066) |
| 289 | #define MCFGPIO_PCLRR_FEC1L (MCF_IPSBAR + 0x100067) |
| 290 | #define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100068) |
| 291 | #define MCFGPIO_PCLRR_IRQ (MCF_IPSBAR + 0x100069) |
| 292 | #define MCFGPIO_PCLRR_USBH (MCF_IPSBAR + 0x10006A) |
| 293 | #define MCFGPIO_PCLRR_USBL (MCF_IPSBAR + 0x10006B) |
| 294 | #define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x10006C) |
| 295 | |
| 296 | |
| 297 | /* |
| 298 | * Generic GPIO support |
| 299 | */ |
Greg Ungerer | 39dc5b7 | 2012-09-18 15:38:15 +1000 | [diff] [blame] | 300 | #define MCFGPIO_PODR MCFGPIO_PODR_BUSCTL |
| 301 | #define MCFGPIO_PDDR MCFGPIO_PDDR_BUSCTL |
| 302 | #define MCFGPIO_PPDR MCFGPIO_PPDSDR_BUSCTL |
| 303 | #define MCFGPIO_SETR MCFGPIO_PPDSDR_BUSCTL |
| 304 | #define MCFGPIO_CLRR MCFGPIO_PCLRR_BUSCTL |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 305 | |
Greg Ungerer | 39dc5b7 | 2012-09-18 15:38:15 +1000 | [diff] [blame] | 306 | #define MCFGPIO_PIN_MAX 148 |
| 307 | #define MCFGPIO_IRQ_MAX 8 |
| 308 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE |
Steven King | 91d6041 | 2010-01-22 12:43:03 -0800 | [diff] [blame] | 309 | |
Greg Ungerer | f821e34 | 2012-09-17 12:07:21 +1000 | [diff] [blame] | 310 | /* |
| 311 | * Port Pin Assignment registers. |
| 312 | */ |
| 313 | #define MCFGPIO_PAR_AD (MCF_IPSBAR + 0x100070) |
| 314 | #define MCFGPIO_PAR_CS (MCF_IPSBAR + 0x100071) |
| 315 | #define MCFGPIO_PAR_BUSCTL (MCF_IPSBAR + 0x100072) |
| 316 | #define MCFGPIO_PAR_USB (MCF_IPSBAR + 0x100076) |
| 317 | #define MCFGPIO_PAR_FEC0HL (MCF_IPSBAR + 0x100078) |
| 318 | #define MCFGPIO_PAR_FEC1HL (MCF_IPSBAR + 0x100079) |
| 319 | #define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10007A) |
| 320 | #define MCFGPIO_PAR_UART (MCF_IPSBAR + 0x10007C) |
Steven King | 91d6041 | 2010-01-22 12:43:03 -0800 | [diff] [blame] | 321 | #define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10007E) |
Greg Ungerer | f821e34 | 2012-09-17 12:07:21 +1000 | [diff] [blame] | 322 | #define MCFGPIO_PAR_SDRAM (MCF_IPSBAR + 0x100080) |
| 323 | #define MCFGPIO_PAR_FECI2C (MCF_IPSBAR + 0x100082) |
| 324 | #define MCFGPIO_PAR_BS (MCF_IPSBAR + 0x100084) |
| 325 | |
| 326 | #define UART0_ENABLE_MASK 0x000f |
| 327 | #define UART1_ENABLE_MASK 0x00f0 |
| 328 | #define UART2_ENABLE_MASK 0x3f00 |
| 329 | #endif /* CONFIG_M5275 */ |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 330 | |
| 331 | /* |
Greg Ungerer | f317c71 | 2011-03-05 23:32:35 +1000 | [diff] [blame] | 332 | * PIT timer base addresses. |
| 333 | */ |
| 334 | #define MCFPIT_BASE1 (MCF_IPSBAR + 0x150000) |
| 335 | #define MCFPIT_BASE2 (MCF_IPSBAR + 0x160000) |
| 336 | #define MCFPIT_BASE3 (MCF_IPSBAR + 0x170000) |
| 337 | #define MCFPIT_BASE4 (MCF_IPSBAR + 0x180000) |
| 338 | |
| 339 | /* |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 340 | * EPort |
| 341 | */ |
Greg Ungerer | 57b4814 | 2011-03-11 17:06:58 +1000 | [diff] [blame] | 342 | #define MCFEPORT_EPPAR (MCF_IPSBAR + 0x130000) |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 343 | #define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002) |
Greg Ungerer | 57b4814 | 2011-03-11 17:06:58 +1000 | [diff] [blame] | 344 | #define MCFEPORT_EPIER (MCF_IPSBAR + 0x130003) |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 345 | #define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004) |
| 346 | #define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005) |
Greg Ungerer | 57b4814 | 2011-03-11 17:06:58 +1000 | [diff] [blame] | 347 | #define MCFEPORT_EPFR (MCF_IPSBAR + 0x130006) |
sfking@fdwdc.com | f1554da | 2009-06-19 18:11:06 -0700 | [diff] [blame] | 348 | |
Greg Ungerer | d871629 | 2005-09-12 11:18:10 +1000 | [diff] [blame] | 349 | /* |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 350 | * Reset Control Unit (relative to IPSBAR). |
Greg Ungerer | 4c0b008 | 2009-04-30 23:06:45 +1000 | [diff] [blame] | 351 | */ |
Greg Ungerer | 0b2a213 | 2012-02-19 16:33:11 +1000 | [diff] [blame] | 352 | #define MCF_RCR (MCF_IPSBAR + 0x110000) |
| 353 | #define MCF_RSR (MCF_IPSBAR + 0x110001) |
Greg Ungerer | 4c0b008 | 2009-04-30 23:06:45 +1000 | [diff] [blame] | 354 | |
| 355 | #define MCF_RCR_SWRESET 0x80 /* Software reset bit */ |
| 356 | #define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ |
| 357 | |
Steven King | 2d24b53 | 2014-06-30 09:53:19 -0700 | [diff] [blame] | 358 | /* |
| 359 | * I2C module. |
| 360 | */ |
| 361 | #define MCFI2C_BASE0 (MCF_IPSBAR + 0x300) |
| 362 | #define MCFI2C_SIZE0 0x40 |
| 363 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 364 | /****************************************************************************/ |
| 365 | #endif /* m527xsim_h */ |