1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * MCF5445x Internal Memory Map
4  *
5  * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
6  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
7  */
8 
9 #ifndef __IMMAP_5445X__
10 #define __IMMAP_5445X__
11 
12 /* Module Base Addresses */
13 #define MMAP_SCM1	0xFC000000
14 #define MMAP_XBS	0xFC004000
15 #define MMAP_FBCS	0xFC008000
16 #define MMAP_FEC0	0xFC030000
17 #define MMAP_FEC1	0xFC034000
18 #define MMAP_RTC	0xFC03C000
19 #define MMAP_SCM2	0xFC040000
20 #define MMAP_EDMA	0xFC044000
21 #define MMAP_INTC0	0xFC048000
22 #define MMAP_INTC1	0xFC04C000
23 #define MMAP_IACK	0xFC054000
24 #define MMAP_I2C	0xFC058000
25 #define MMAP_DSPI	0xFC05C000
26 #define MMAP_UART0	0xFC060000
27 #define MMAP_UART1	0xFC064000
28 #define MMAP_UART2	0xFC068000
29 #define MMAP_DTMR0	0xFC070000
30 #define MMAP_DTMR1	0xFC074000
31 #define MMAP_DTMR2	0xFC078000
32 #define MMAP_DTMR3	0xFC07C000
33 #define MMAP_PIT0	0xFC080000
34 #define MMAP_PIT1	0xFC084000
35 #define MMAP_PIT2	0xFC088000
36 #define MMAP_PIT3	0xFC08C000
37 #define MMAP_EPORT	0xFC094000
38 #define MMAP_WTM	0xFC098000
39 #define MMAP_SBF	0xFC0A0000
40 #define MMAP_RCM	0xFC0A0000
41 #define MMAP_CCM	0xFC0A0000
42 #define MMAP_GPIO	0xFC0A4000
43 #define MMAP_PCI	0xFC0A8000
44 #define MMAP_PCIARB	0xFC0AC000
45 #define MMAP_RNG	0xFC0B4000
46 #define MMAP_SDRAM	0xFC0B8000
47 #define MMAP_SSI	0xFC0BC000
48 #define MMAP_PLL	0xFC0C4000
49 #define MMAP_ATA	0x90000000
50 #define MMAP_USBHW	0xFC0B0000
51 #define MMAP_USBCAPS	0xFC0B0100
52 #define MMAP_USBEHCI	0xFC0B0140
53 #define MMAP_USBOTG	0xFC0B01A0
54 
55 #include <asm/coldfire/ata.h>
56 #include <asm/coldfire/crossbar.h>
57 #include <asm/coldfire/dspi.h>
58 #include <asm/coldfire/edma.h>
59 #include <asm/coldfire/eport.h>
60 #include <asm/coldfire/flexbus.h>
61 #include <asm/coldfire/intctrl.h>
62 #include <asm/coldfire/ssi.h>
63 
64 /* Watchdog Timer Modules (WTM) */
65 typedef struct wtm {
66 	u16 wcr;
67 	u16 wmr;
68 	u16 wcntr;
69 	u16 wsr;
70 } wtm_t;
71 
72 /* Serial Boot Facility (SBF) */
73 typedef struct sbf {
74 	u8 resv0[0x18];
75 	u16 sbfsr;		/* Serial Boot Facility Status Register */
76 	u8 resv1[0x6];
77 	u16 sbfcr;		/* Serial Boot Facility Control Register */
78 } sbf_t;
79 
80 /* Reset Controller Module (RCM) */
81 typedef struct rcm {
82 	u8 rcr;
83 	u8 rsr;
84 } rcm_t;
85 
86 /* Chip Configuration Module (CCM) */
87 typedef struct ccm {
88 	u8 ccm_resv0[0x4];
89 	u16 ccr;		/* Chip Configuration Register (256 TEPBGA, Read-only) */
90 	u8 resv1[0x2];
91 	u16 rcon;		/* Reset Configuration (256 TEPBGA, Read-only) */
92 	u16 cir;		/* Chip Identification Register (Read-only) */
93 	u8 resv2[0x4];
94 	u16 misccr;		/* Miscellaneous Control Register */
95 	u16 cdr;		/* Clock Divider Register */
96 	u16 uocsr;		/* USB On-the-Go Controller Status Register */
97 } ccm_t;
98 
99 /* General Purpose I/O Module (GPIO) */
100 typedef struct gpio {
101 	u8 podr_fec0h;		/* FEC0 High Port Output Data Register */
102 	u8 podr_fec0l;		/* FEC0 Low Port Output Data Register */
103 	u8 podr_ssi;		/* SSI Port Output Data Register */
104 	u8 podr_fbctl;		/* Flexbus Control Port Output Data Register */
105 	u8 podr_be;		/* Flexbus Byte Enable Port Output Data Register */
106 	u8 podr_cs;		/* Flexbus Chip-Select Port Output Data Register */
107 	u8 podr_dma;		/* DMA Port Output Data Register */
108 	u8 podr_feci2c;		/* FEC1 / I2C Port Output Data Register */
109 	u8 resv0[0x1];
110 	u8 podr_uart;		/* UART Port Output Data Register */
111 	u8 podr_dspi;		/* DSPI Port Output Data Register */
112 	u8 podr_timer;		/* Timer Port Output Data Register */
113 	u8 podr_pci;		/* PCI Port Output Data Register */
114 	u8 podr_usb;		/* USB Port Output Data Register */
115 	u8 podr_atah;		/* ATA High Port Output Data Register */
116 	u8 podr_atal;		/* ATA Low Port Output Data Register */
117 	u8 podr_fec1h;		/* FEC1 High Port Output Data Register */
118 	u8 podr_fec1l;		/* FEC1 Low Port Output Data Register */
119 	u8 resv1[0x2];
120 	u8 podr_fbadh;		/* Flexbus AD High Port Output Data Register */
121 	u8 podr_fbadmh;		/* Flexbus AD Med-High Port Output Data Register */
122 	u8 podr_fbadml;		/* Flexbus AD Med-Low Port Output Data Register */
123 	u8 podr_fbadl;		/* Flexbus AD Low Port Output Data Register */
124 	u8 pddr_fec0h;		/* FEC0 High Port Data Direction Register */
125 	u8 pddr_fec0l;		/* FEC0 Low Port Data Direction Register */
126 	u8 pddr_ssi;		/* SSI Port Data Direction Register */
127 	u8 pddr_fbctl;		/* Flexbus Control Port Data Direction Register */
128 	u8 pddr_be;		/* Flexbus Byte Enable Port Data Direction Register */
129 	u8 pddr_cs;		/* Flexbus Chip-Select Port Data Direction Register */
130 	u8 pddr_dma;		/* DMA Port Data Direction Register */
131 	u8 pddr_feci2c;		/* FEC1 / I2C Port Data Direction Register */
132 	u8 resv2[0x1];
133 	u8 pddr_uart;		/* UART Port Data Direction Register */
134 	u8 pddr_dspi;		/* DSPI Port Data Direction Register */
135 	u8 pddr_timer;		/* Timer Port Data Direction Register */
136 	u8 pddr_pci;		/* PCI Port Data Direction Register */
137 	u8 pddr_usb;		/* USB Port Data Direction Register */
138 	u8 pddr_atah;		/* ATA High Port Data Direction Register */
139 	u8 pddr_atal;		/* ATA Low Port Data Direction Register */
140 	u8 pddr_fec1h;		/* FEC1 High Port Data Direction Register */
141 	u8 pddr_fec1l;		/* FEC1 Low Port Data Direction Register */
142 	u8 resv3[0x2];
143 	u8 pddr_fbadh;		/* Flexbus AD High Port Data Direction Register */
144 	u8 pddr_fbadmh;		/* Flexbus AD Med-High Port Data Direction Register */
145 	u8 pddr_fbadml;		/* Flexbus AD Med-Low Port Data Direction Register */
146 	u8 pddr_fbadl;		/* Flexbus AD Low Port Data Direction Register */
147 	u8 ppdsdr_fec0h;	/* FEC0 High Port Pin Data/Set Data Register */
148 	u8 ppdsdr_fec0l;	/* FEC0 Low Port Clear Output Data Register */
149 	u8 ppdsdr_ssi;		/* SSI Port Pin Data/Set Data Register */
150 	u8 ppdsdr_fbctl;	/* Flexbus Control Port Pin Data/Set Data Register */
151 	u8 ppdsdr_be;		/* Flexbus Byte Enable Port Pin Data/Set Data Register */
152 	u8 ppdsdr_cs;		/* Flexbus Chip-Select Port Pin Data/Set Data Register */
153 	u8 ppdsdr_dma;		/* DMA Port Pin Data/Set Data Register */
154 	u8 ppdsdr_feci2c;	/* FEC1 / I2C Port Pin Data/Set Data Register */
155 	u8 resv4[0x1];
156 	u8 ppdsdr_uart;		/* UART Port Pin Data/Set Data Register */
157 	u8 ppdsdr_dspi;		/* DSPI Port Pin Data/Set Data Register */
158 	u8 ppdsdr_timer;	/* FTimer Port Pin Data/Set Data Register */
159 	u8 ppdsdr_pci;		/* PCI Port Pin Data/Set Data Register */
160 	u8 ppdsdr_usb;		/* USB Port Pin Data/Set Data Register */
161 	u8 ppdsdr_atah;		/* ATA High Port Pin Data/Set Data Register */
162 	u8 ppdsdr_atal;		/* ATA Low Port Pin Data/Set Data Register */
163 	u8 ppdsdr_fec1h;	/* FEC1 High Port Pin Data/Set Data Register */
164 	u8 ppdsdr_fec1l;	/* FEC1 Low Port Pin Data/Set Data Register */
165 	u8 resv5[0x2];
166 	u8 ppdsdr_fbadh;	/* Flexbus AD High Port Pin Data/Set Data Register */
167 	u8 ppdsdr_fbadmh;	/* Flexbus AD Med-High Port Pin Data/Set Data Register */
168 	u8 ppdsdr_fbadml;	/* Flexbus AD Med-Low Port Pin Data/Set Data Register */
169 	u8 ppdsdr_fbadl;	/* Flexbus AD Low Port Pin Data/Set Data Register */
170 	u8 pclrr_fec0h;		/* FEC0 High Port Clear Output Data Register */
171 	u8 pclrr_fec0l;		/* FEC0 Low Port Pin Data/Set Data Register */
172 	u8 pclrr_ssi;		/* SSI Port Clear Output Data Register */
173 	u8 pclrr_fbctl;		/* Flexbus Control Port Clear Output Data Register */
174 	u8 pclrr_be;		/* Flexbus Byte Enable Port Clear Output Data Register */
175 	u8 pclrr_cs;		/* Flexbus Chip-Select Port Clear Output Data Register */
176 	u8 pclrr_dma;		/* DMA Port Clear Output Data Register */
177 	u8 pclrr_feci2c;	/* FEC1 / I2C Port Clear Output Data Register */
178 	u8 resv6[0x1];
179 	u8 pclrr_uart;		/* UART Port Clear Output Data Register */
180 	u8 pclrr_dspi;		/* DSPI Port Clear Output Data Register */
181 	u8 pclrr_timer;		/* Timer Port Clear Output Data Register */
182 	u8 pclrr_pci;		/* PCI Port Clear Output Data Register */
183 	u8 pclrr_usb;		/* USB Port Clear Output Data Register */
184 	u8 pclrr_atah;		/* ATA High Port Clear Output Data Register */
185 	u8 pclrr_atal;		/* ATA Low Port Clear Output Data Register */
186 	u8 pclrr_fec1h;		/* FEC1 High Port Clear Output Data Register */
187 	u8 pclrr_fec1l;		/* FEC1 Low Port Clear Output Data Register */
188 	u8 resv7[0x2];
189 	u8 pclrr_fbadh;		/* Flexbus AD High Port Clear Output Data Register */
190 	u8 pclrr_fbadmh;	/* Flexbus AD Med-High Port Clear Output Data Register */
191 	u8 pclrr_fbadml;	/* Flexbus AD Med-Low Port Clear Output Data Register */
192 	u8 pclrr_fbadl;		/* Flexbus AD Low Port Clear Output Data Register */
193 	u8 par_fec;		/* FEC Pin Assignment Register */
194 	u8 par_dma;		/* DMA Pin Assignment Register */
195 	u8 par_fbctl;		/* Flexbus Control Pin Assignment Register */
196 	u8 par_dspi;		/* DSPI Pin Assignment Register */
197 	u8 par_be;		/* Flexbus Byte-Enable Pin Assignment Register */
198 	u8 par_cs;		/* Flexbus Chip-Select Pin Assignment Register */
199 	u8 par_timer;		/* Time Pin Assignment Register */
200 	u8 par_usb;		/* USB Pin Assignment Register */
201 	u8 resv8[0x1];
202 	u8 par_uart;		/* UART Pin Assignment Register */
203 	u16 par_feci2c;		/* FEC / I2C Pin Assignment Register */
204 	u16 par_ssi;		/* SSI Pin Assignment Register */
205 	u16 par_ata;		/* ATA Pin Assignment Register */
206 	u8 par_irq;		/* IRQ Pin Assignment Register */
207 	u8 resv9[0x1];
208 	u16 par_pci;		/* PCI Pin Assignment Register */
209 	u8 mscr_sdram;		/* SDRAM Mode Select Control Register */
210 	u8 mscr_pci;		/* PCI Mode Select Control Register */
211 	u8 resv10[0x2];
212 	u8 dscr_i2c;		/* I2C Drive Strength Control Register */
213 	u8 dscr_flexbus;	/* FLEXBUS Drive Strength Control Register */
214 	u8 dscr_fec;		/* FEC Drive Strength Control Register */
215 	u8 dscr_uart;		/* UART Drive Strength Control Register */
216 	u8 dscr_dspi;		/* DSPI Drive Strength Control Register */
217 	u8 dscr_timer;		/* TIMER Drive Strength Control Register */
218 	u8 dscr_ssi;		/* SSI Drive Strength Control Register */
219 	u8 dscr_dma;		/* DMA Drive Strength Control Register */
220 	u8 dscr_debug;		/* DEBUG Drive Strength Control Register */
221 	u8 dscr_reset;		/* RESET Drive Strength Control Register */
222 	u8 dscr_irq;		/* IRQ Drive Strength Control Register */
223 	u8 dscr_usb;		/* USB Drive Strength Control Register */
224 	u8 dscr_ata;		/* ATA Drive Strength Control Register */
225 } gpio_t;
226 
227 /* SDRAM Controller (SDRAMC) */
228 typedef struct sdramc {
229 	u32 sdmr;		/* SDRAM Mode/Extended Mode Register */
230 	u32 sdcr;		/* SDRAM Control Register */
231 	u32 sdcfg1;		/* SDRAM Configuration Register 1 */
232 	u32 sdcfg2;		/* SDRAM Chip Select Register */
233 	u8 resv0[0x100];
234 	u32 sdcs0;		/* SDRAM Mode/Extended Mode Register */
235 	u32 sdcs1;		/* SDRAM Mode/Extended Mode Register */
236 } sdramc_t;
237 
238 /* Phase Locked Loop (PLL) */
239 typedef struct pll {
240 	u32 pcr;		/* PLL Control Register */
241 	u32 psr;		/* PLL Status Register */
242 } pll_t;
243 
244 typedef struct pci {
245 	u32 idr;		/* 0x00 Device Id / Vendor Id Register */
246 	u32 scr;		/* 0x04 Status / command Register */
247 	u32 ccrir;		/* 0x08 Class Code / Revision Id Register */
248 	u32 cr1;		/* 0x0c Configuration 1 Register */
249 	u32 bar0;		/* 0x10 Base address register 0 Register */
250 	u32 bar1;		/* 0x14 Base address register 1 Register */
251 	u32 bar2;		/* 0x18 Base address register 2 Register */
252 	u32 bar3;		/* 0x1c Base address register 3 Register */
253 	u32 bar4;		/* 0x20 Base address register 4 Register */
254 	u32 bar5;		/* 0x24 Base address register 5 Register */
255 	u32 ccpr;		/* 0x28 Cardbus CIS Pointer Register */
256 	u32 sid;		/* 0x2c Subsystem ID / Subsystem Vendor ID Register */
257 	u32 erbar;		/* 0x30 Expansion ROM Base Address Register */
258 	u32 cpr;		/* 0x34 Capabilities Pointer Register */
259 	u32 rsvd1;		/* 0x38 */
260 	u32 cr2;		/* 0x3c Configuration Register 2 */
261 	u32 rsvd2[8];		/* 0x40 - 0x5f */
262 
263 	/* General control / status registers */
264 	u32 gscr;		/* 0x60 Global Status / Control Register */
265 	u32 tbatr0a;		/* 0x64 Target Base Address Translation Register  0 */
266 	u32 tbatr1a;		/* 0x68 Target Base Address Translation Register  1 */
267 	u32 tcr1;		/* 0x6c Target Control 1 Register */
268 	u32 iw0btar;		/* 0x70 Initiator Window 0 Base/Translation addr */
269 	u32 iw1btar;		/* 0x74 Initiator Window 1 Base/Translation addr */
270 	u32 iw2btar;		/* 0x78 Initiator Window 2 Base/Translation addr */
271 	u32 rsvd3;		/* 0x7c */
272 	u32 iwcr;		/* 0x80 Initiator Window Configuration Register */
273 	u32 icr;		/* 0x84 Initiator Control Register */
274 	u32 isr;		/* 0x88 Initiator Status Register */
275 	u32 tcr2;		/* 0x8c Target Control 2 Register */
276 	u32 tbatr0;		/* 0x90 Target Base Address Translation Register  0 */
277 	u32 tbatr1;		/* 0x94 Target Base Address Translation Register  1 */
278 	u32 tbatr2;		/* 0x98 Target Base Address Translation Register  2 */
279 	u32 tbatr3;		/* 0x9c Target Base Address Translation Register  3 */
280 	u32 tbatr4;		/* 0xa0 Target Base Address Translation Register  4 */
281 	u32 tbatr5;		/* 0xa4 Target Base Address Translation Register  5 */
282 	u32 intr;		/* 0xa8 Interrupt Register */
283 	u32 rsvd4[19];		/* 0xac - 0xf7 */
284 	u32 car;		/* 0xf8 Configuration Address Register */
285 } pci_t;
286 
287 typedef struct pci_arbiter {
288 	/* Pci Arbiter Registers */
289 	union {
290 		u32 acr;	/* Arbiter Control Register */
291 		u32 asr;	/* Arbiter Status Register */
292 	};
293 } pciarb_t;
294 
295 /* Register read/write struct */
296 typedef struct scm1 {
297 	u32 mpr;		/* 0x00 Master Privilege Register */
298 	u32 rsvd1[7];
299 	u32 pacra;		/* 0x20 Peripheral Access Control Register A */
300 	u32 pacrb;		/* 0x24 Peripheral Access Control Register B */
301 	u32 pacrc;		/* 0x28 Peripheral Access Control Register C */
302 	u32 pacrd;		/* 0x2C Peripheral Access Control Register D */
303 	u32 rsvd2[4];
304 	u32 pacre;		/* 0x40 Peripheral Access Control Register E */
305 	u32 pacrf;		/* 0x44 Peripheral Access Control Register F */
306 	u32 pacrg;		/* 0x48 Peripheral Access Control Register G */
307 } scm1_t;
308 
309 typedef struct scm2 {
310 	u8 rsvd1[19];		/* 0x00 - 0x12 */
311 	u8 wcr;			/* 0x13 */
312 	u16 rsvd2;		/* 0x14 - 0x15 */
313 	u16 cwcr;		/* 0x16 */
314 	u8 rsvd3[3];		/* 0x18 - 0x1A */
315 	u8 cwsr;		/* 0x1B */
316 	u8 rsvd4[3];		/* 0x1C - 0x1E */
317 	u8 scmisr;		/* 0x1F */
318 	u32 rsvd5;		/* 0x20 - 0x23 */
319 	u8 bcr;			/* 0x24 */
320 	u8 rsvd6[74];		/* 0x25 - 0x6F */
321 	u32 cfadr;		/* 0x70 */
322 	u8 rsvd7;		/* 0x74 */
323 	u8 cfier;		/* 0x75 */
324 	u8 cfloc;		/* 0x76 */
325 	u8 cfatr;		/* 0x77 */
326 	u32 rsvd8;		/* 0x78 - 0x7B */
327 	u32 cfdtr;		/* 0x7C */
328 } scm2_t;
329 
330 typedef struct rtcex {
331 	u32 rsvd1[3];
332 	u32 gocu;
333 	u32 gocl;
334 } rtcex_t;
335 #endif				/* __IMMAP_5445X__ */
336