xref: /rk3399_rockchip-uboot/arch/powerpc/include/asm/immap_83xx.h (revision f15ea6e1d67782a1626d4a4922b6c20e380085e5)
1a47a12beSStefan Roese /*
2d29d17d7SYork Sun  * Copyright 2004-2011 Freescale Semiconductor, Inc.
3a47a12beSStefan Roese  *
4a47a12beSStefan Roese  * MPC83xx Internal Memory Map
5a47a12beSStefan Roese  *
6a47a12beSStefan Roese  * Contributors:
7a47a12beSStefan Roese  *	Dave Liu <daveliu@freescale.com>
8a47a12beSStefan Roese  *	Tanya Jiang <tanya.jiang@freescale.com>
9a47a12beSStefan Roese  *	Mandy Lavi <mandy.lavi@freescale.com>
10a47a12beSStefan Roese  *	Eran Liberty <liberty@freescale.com>
11a47a12beSStefan Roese  *
121a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
13a47a12beSStefan Roese  */
14a47a12beSStefan Roese #ifndef __IMMAP_83xx__
15a47a12beSStefan Roese #define __IMMAP_83xx__
16a47a12beSStefan Roese 
17*9a17eb5bSYork Sun #include <fsl_immap.h>
18a47a12beSStefan Roese #include <asm/types.h>
19a47a12beSStefan Roese #include <asm/fsl_i2c.h>
20a47a12beSStefan Roese #include <asm/mpc8xxx_spi.h>
21a47a12beSStefan Roese #include <asm/fsl_lbc.h>
22a47a12beSStefan Roese #include <asm/fsl_dma.h>
23a47a12beSStefan Roese 
24a47a12beSStefan Roese /*
25a47a12beSStefan Roese  * Local Access Window
26a47a12beSStefan Roese  */
27a47a12beSStefan Roese typedef struct law83xx {
28a47a12beSStefan Roese 	u32 bar;		/* LBIU local access window base address register */
29a47a12beSStefan Roese 	u32 ar;			/* LBIU local access window attribute register */
30a47a12beSStefan Roese } law83xx_t;
31a47a12beSStefan Roese 
32a47a12beSStefan Roese /*
33a47a12beSStefan Roese  * System configuration registers
34a47a12beSStefan Roese  */
35a47a12beSStefan Roese typedef struct sysconf83xx {
36a47a12beSStefan Roese 	u32 immrbar;		/* Internal memory map base address register */
37a47a12beSStefan Roese 	u8 res0[0x04];
38a47a12beSStefan Roese 	u32 altcbar;		/* Alternate configuration base address register */
39a47a12beSStefan Roese 	u8 res1[0x14];
40a47a12beSStefan Roese 	law83xx_t lblaw[4];	/* LBIU local access window */
41a47a12beSStefan Roese 	u8 res2[0x20];
42a47a12beSStefan Roese 	law83xx_t pcilaw[2];	/* PCI local access window */
43a47a12beSStefan Roese 	u8 res3[0x10];
44a47a12beSStefan Roese 	law83xx_t pcielaw[2];	/* PCI Express local access window */
45a47a12beSStefan Roese 	u8 res4[0x10];
46a47a12beSStefan Roese 	law83xx_t ddrlaw[2];	/* DDR local access window */
47a47a12beSStefan Roese 	u8 res5[0x50];
48a47a12beSStefan Roese 	u32 sgprl;		/* System General Purpose Register Low */
49a47a12beSStefan Roese 	u32 sgprh;		/* System General Purpose Register High */
50a47a12beSStefan Roese 	u32 spridr;		/* System Part and Revision ID Register */
51a47a12beSStefan Roese 	u8 res6[0x04];
52a47a12beSStefan Roese 	u32 spcr;		/* System Priority Configuration Register */
53a47a12beSStefan Roese 	u32 sicrl;		/* System I/O Configuration Register Low */
54a47a12beSStefan Roese 	u32 sicrh;		/* System I/O Configuration Register High */
55a47a12beSStefan Roese 	u8 res7[0x04];
56a47a12beSStefan Roese 	u32 sidcr0;		/* System I/O Delay Configuration Register 0 */
57a47a12beSStefan Roese 	u32 sidcr1;		/* System I/O Delay Configuration Register 1 */
58a47a12beSStefan Roese 	u32 ddrcdr;		/* DDR Control Driver Register */
59a47a12beSStefan Roese 	u32 ddrdsr;		/* DDR Debug Status Register */
60a47a12beSStefan Roese 	u32 obir;		/* Output Buffer Impedance Register */
61a47a12beSStefan Roese 	u8 res8[0xC];
62a47a12beSStefan Roese 	u32 pecr1;		/* PCI Express control register 1 */
638afad91fSGerlando Falauto #if defined(CONFIG_MPC830x)
648afad91fSGerlando Falauto 	u32 sdhccr;		/* eSDHC Control Registers for MPC830x */
657c619ddcSIlya Yanok #else
66a47a12beSStefan Roese 	u32 pecr2;		/* PCI Express control register 2 */
677c619ddcSIlya Yanok #endif
68a88731a6SGerlando Falauto #if defined(CONFIG_MPC8309)
69a88731a6SGerlando Falauto 	u32 can_dbg_ctrl;
70a88731a6SGerlando Falauto 	u32 res9a;
71a88731a6SGerlando Falauto 	u32 gpr1;
72a88731a6SGerlando Falauto 	u8 res9b[0xAC];
73a88731a6SGerlando Falauto #else
74a47a12beSStefan Roese 	u8 res9[0xB8];
75a88731a6SGerlando Falauto #endif
76a47a12beSStefan Roese } sysconf83xx_t;
77a47a12beSStefan Roese 
78a47a12beSStefan Roese /*
79a47a12beSStefan Roese  * Watch Dog Timer (WDT) Registers
80a47a12beSStefan Roese  */
81a47a12beSStefan Roese typedef struct wdt83xx {
82a47a12beSStefan Roese 	u8 res0[4];
83a47a12beSStefan Roese 	u32 swcrr;		/* System watchdog control register */
84a47a12beSStefan Roese 	u32 swcnr;		/* System watchdog count register */
85a47a12beSStefan Roese 	u8 res1[2];
86a47a12beSStefan Roese 	u16 swsrr;		/* System watchdog service register */
87a47a12beSStefan Roese 	u8 res2[0xF0];
88a47a12beSStefan Roese } wdt83xx_t;
89a47a12beSStefan Roese 
90a47a12beSStefan Roese /*
91a47a12beSStefan Roese  * RTC/PIT Module Registers
92a47a12beSStefan Roese  */
93a47a12beSStefan Roese typedef struct rtclk83xx {
94a47a12beSStefan Roese 	u32 cnr;		/* control register */
95a47a12beSStefan Roese 	u32 ldr;		/* load register */
96a47a12beSStefan Roese 	u32 psr;		/* prescale register */
97a47a12beSStefan Roese 	u32 ctr;		/* counter value field register */
98a47a12beSStefan Roese 	u32 evr;		/* event register */
99a47a12beSStefan Roese 	u32 alr;		/* alarm register */
100a47a12beSStefan Roese 	u8 res0[0xE8];
101a47a12beSStefan Roese } rtclk83xx_t;
102a47a12beSStefan Roese 
103a47a12beSStefan Roese /*
104a47a12beSStefan Roese  * Global timer module
105a47a12beSStefan Roese  */
106a47a12beSStefan Roese typedef struct gtm83xx {
107a47a12beSStefan Roese 	u8 cfr1;		/* Timer1/2 Configuration */
108a47a12beSStefan Roese 	u8 res0[3];
109a47a12beSStefan Roese 	u8 cfr2;		/* Timer3/4 Configuration */
11063063cc7SKim Phillips 	u8 res1[11];
111a47a12beSStefan Roese 	u16 mdr1;		/* Timer1 Mode Register */
112a47a12beSStefan Roese 	u16 mdr2;		/* Timer2 Mode Register */
113a47a12beSStefan Roese 	u16 rfr1;		/* Timer1 Reference Register */
114a47a12beSStefan Roese 	u16 rfr2;		/* Timer2 Reference Register */
115a47a12beSStefan Roese 	u16 cpr1;		/* Timer1 Capture Register */
116a47a12beSStefan Roese 	u16 cpr2;		/* Timer2 Capture Register */
117a47a12beSStefan Roese 	u16 cnr1;		/* Timer1 Counter Register */
118a47a12beSStefan Roese 	u16 cnr2;		/* Timer2 Counter Register */
119a47a12beSStefan Roese 	u16 mdr3;		/* Timer3 Mode Register */
120a47a12beSStefan Roese 	u16 mdr4;		/* Timer4 Mode Register */
121a47a12beSStefan Roese 	u16 rfr3;		/* Timer3 Reference Register */
122a47a12beSStefan Roese 	u16 rfr4;		/* Timer4 Reference Register */
123a47a12beSStefan Roese 	u16 cpr3;		/* Timer3 Capture Register */
124a47a12beSStefan Roese 	u16 cpr4;		/* Timer4 Capture Register */
125a47a12beSStefan Roese 	u16 cnr3;		/* Timer3 Counter Register */
126a47a12beSStefan Roese 	u16 cnr4;		/* Timer4 Counter Register */
127a47a12beSStefan Roese 	u16 evr1;		/* Timer1 Event Register */
128a47a12beSStefan Roese 	u16 evr2;		/* Timer2 Event Register */
129a47a12beSStefan Roese 	u16 evr3;		/* Timer3 Event Register */
130a47a12beSStefan Roese 	u16 evr4;		/* Timer4 Event Register */
131a47a12beSStefan Roese 	u16 psr1;		/* Timer1 Prescaler Register */
132a47a12beSStefan Roese 	u16 psr2;		/* Timer2 Prescaler Register */
133a47a12beSStefan Roese 	u16 psr3;		/* Timer3 Prescaler Register */
134a47a12beSStefan Roese 	u16 psr4;		/* Timer4 Prescaler Register */
135a47a12beSStefan Roese 	u8 res[0xC0];
136a47a12beSStefan Roese } gtm83xx_t;
137a47a12beSStefan Roese 
138a47a12beSStefan Roese /*
139a47a12beSStefan Roese  * Integrated Programmable Interrupt Controller
140a47a12beSStefan Roese  */
141a47a12beSStefan Roese typedef struct ipic83xx {
142a47a12beSStefan Roese 	u32 sicfr;		/* System Global Interrupt Configuration Register */
143a47a12beSStefan Roese 	u32 sivcr;		/* System Global Interrupt Vector Register */
144a47a12beSStefan Roese 	u32 sipnr_h;		/* System Internal Interrupt Pending Register - High */
145a47a12beSStefan Roese 	u32 sipnr_l;		/* System Internal Interrupt Pending Register - Low */
146a47a12beSStefan Roese 	u32 siprr_a;		/* System Internal Interrupt Group A Priority Register */
1474713db66SJoe Hershberger 	u32 siprr_b;		/* System Internal Interrupt Group B Priority Register */
1484713db66SJoe Hershberger 	u32 siprr_c;		/* System Internal Interrupt Group C Priority Register */
149a47a12beSStefan Roese 	u32 siprr_d;		/* System Internal Interrupt Group D Priority Register */
150a47a12beSStefan Roese 	u32 simsr_h;		/* System Internal Interrupt Mask Register - High */
151a47a12beSStefan Roese 	u32 simsr_l;		/* System Internal Interrupt Mask Register - Low */
1524713db66SJoe Hershberger 	u32 sicnr;		/* System Internal Interrupt Control Register */
153a47a12beSStefan Roese 	u32 sepnr;		/* System External Interrupt Pending Register */
154a47a12beSStefan Roese 	u32 smprr_a;		/* System Mixed Interrupt Group A Priority Register */
155a47a12beSStefan Roese 	u32 smprr_b;		/* System Mixed Interrupt Group B Priority Register */
156a47a12beSStefan Roese 	u32 semsr;		/* System External Interrupt Mask Register */
157a47a12beSStefan Roese 	u32 secnr;		/* System External Interrupt Control Register */
158a47a12beSStefan Roese 	u32 sersr;		/* System Error Status Register */
159a47a12beSStefan Roese 	u32 sermr;		/* System Error Mask Register */
160a47a12beSStefan Roese 	u32 sercr;		/* System Error Control Register */
1614713db66SJoe Hershberger 	u32 sepcr;		/* System External Interrupt Polarity Control Register */
162a47a12beSStefan Roese 	u32 sifcr_h;		/* System Internal Interrupt Force Register - High */
163a47a12beSStefan Roese 	u32 sifcr_l;		/* System Internal Interrupt Force Register - Low */
164a47a12beSStefan Roese 	u32 sefcr;		/* System External Interrupt Force Register */
165a47a12beSStefan Roese 	u32 serfr;		/* System Error Force Register */
166a47a12beSStefan Roese 	u32 scvcr;		/* System Critical Interrupt Vector Register */
167a47a12beSStefan Roese 	u32 smvcr;		/* System Management Interrupt Vector Register */
1684713db66SJoe Hershberger 	u8 res[0x98];
169a47a12beSStefan Roese } ipic83xx_t;
170a47a12beSStefan Roese 
171a47a12beSStefan Roese /*
172a47a12beSStefan Roese  * System Arbiter Registers
173a47a12beSStefan Roese  */
174a47a12beSStefan Roese typedef struct arbiter83xx {
175a47a12beSStefan Roese 	u32 acr;		/* Arbiter Configuration Register */
176a47a12beSStefan Roese 	u32 atr;		/* Arbiter Timers Register */
177a47a12beSStefan Roese 	u8 res[4];
178a47a12beSStefan Roese 	u32 aer;		/* Arbiter Event Register */
179a47a12beSStefan Roese 	u32 aidr;		/* Arbiter Interrupt Definition Register */
180a47a12beSStefan Roese 	u32 amr;		/* Arbiter Mask Register */
181a47a12beSStefan Roese 	u32 aeatr;		/* Arbiter Event Attributes Register */
182a47a12beSStefan Roese 	u32 aeadr;		/* Arbiter Event Address Register */
183a47a12beSStefan Roese 	u32 aerr;		/* Arbiter Event Response Register */
184a47a12beSStefan Roese 	u8 res1[0xDC];
185a47a12beSStefan Roese } arbiter83xx_t;
186a47a12beSStefan Roese 
187a47a12beSStefan Roese /*
188a47a12beSStefan Roese  * Reset Module
189a47a12beSStefan Roese  */
190a47a12beSStefan Roese typedef struct reset83xx {
191a47a12beSStefan Roese 	u32 rcwl;		/* Reset Configuration Word Low Register */
192a47a12beSStefan Roese 	u32 rcwh;		/* Reset Configuration Word High Register */
193a47a12beSStefan Roese 	u8 res0[8];
194a47a12beSStefan Roese 	u32 rsr;		/* Reset Status Register */
195a47a12beSStefan Roese 	u32 rmr;		/* Reset Mode Register */
196a47a12beSStefan Roese 	u32 rpr;		/* Reset protection Register */
197a47a12beSStefan Roese 	u32 rcr;		/* Reset Control Register */
198a47a12beSStefan Roese 	u32 rcer;		/* Reset Control Enable Register */
199a47a12beSStefan Roese 	u8 res1[0xDC];
200a47a12beSStefan Roese } reset83xx_t;
201a47a12beSStefan Roese 
202a47a12beSStefan Roese /*
203a47a12beSStefan Roese  * Clock Module
204a47a12beSStefan Roese  */
205a47a12beSStefan Roese typedef struct clk83xx {
206a47a12beSStefan Roese 	u32 spmr;		/* system PLL mode Register */
207a47a12beSStefan Roese 	u32 occr;		/* output clock control Register */
208a47a12beSStefan Roese 	u32 sccr;		/* system clock control Register */
209a47a12beSStefan Roese 	u8 res0[0xF4];
210a47a12beSStefan Roese } clk83xx_t;
211a47a12beSStefan Roese 
212a47a12beSStefan Roese /*
213a47a12beSStefan Roese  * Power Management Control Module
214a47a12beSStefan Roese  */
215a47a12beSStefan Roese typedef struct pmc83xx {
216a47a12beSStefan Roese 	u32 pmccr;		/* PMC Configuration Register */
217a47a12beSStefan Roese 	u32 pmcer;		/* PMC Event Register */
218a47a12beSStefan Roese 	u32 pmcmr;		/* PMC Mask Register */
219a47a12beSStefan Roese 	u32 pmccr1;		/* PMC Configuration Register 1 */
220a47a12beSStefan Roese 	u32 pmccr2;		/* PMC Configuration Register 2 */
221a47a12beSStefan Roese 	u8 res0[0xEC];
222a47a12beSStefan Roese } pmc83xx_t;
223a47a12beSStefan Roese 
224a47a12beSStefan Roese /*
225a47a12beSStefan Roese  * General purpose I/O module
226a47a12beSStefan Roese  */
227a47a12beSStefan Roese typedef struct gpio83xx {
228a47a12beSStefan Roese 	u32 dir;		/* direction register */
229a47a12beSStefan Roese 	u32 odr;		/* open drain register */
230a47a12beSStefan Roese 	u32 dat;		/* data register */
231a47a12beSStefan Roese 	u32 ier;		/* interrupt event register */
232a47a12beSStefan Roese 	u32 imr;		/* interrupt mask register */
233a47a12beSStefan Roese 	u32 icr;		/* external interrupt control register */
234a47a12beSStefan Roese 	u8 res0[0xE8];
235a47a12beSStefan Roese } gpio83xx_t;
236a47a12beSStefan Roese 
237a47a12beSStefan Roese /*
238a47a12beSStefan Roese  * QE Ports Interrupts Registers
239a47a12beSStefan Roese  */
240a47a12beSStefan Roese typedef struct qepi83xx {
241a47a12beSStefan Roese 	u8 res0[0xC];
242a47a12beSStefan Roese 	u32 qepier;		/* QE Ports Interrupt Event Register */
243a47a12beSStefan Roese 	u32 qepimr;		/* QE Ports Interrupt Mask Register */
244a47a12beSStefan Roese 	u32 qepicr;		/* QE Ports Interrupt Control Register */
245a47a12beSStefan Roese 	u8 res1[0xE8];
246a47a12beSStefan Roese } qepi83xx_t;
247a47a12beSStefan Roese 
248a47a12beSStefan Roese /*
249a47a12beSStefan Roese  * QE Parallel I/O Ports
250a47a12beSStefan Roese  */
251a47a12beSStefan Roese typedef struct gpio_n {
252a47a12beSStefan Roese 	u32 podr;		/* Open Drain Register */
253a47a12beSStefan Roese 	u32 pdat;		/* Data Register */
254a47a12beSStefan Roese 	u32 dir1;		/* direction register 1 */
255a47a12beSStefan Roese 	u32 dir2;		/* direction register 2 */
256a47a12beSStefan Roese 	u32 ppar1;		/* Pin Assignment Register 1 */
257a47a12beSStefan Roese 	u32 ppar2;		/* Pin Assignment Register 2 */
258a47a12beSStefan Roese } gpio_n_t;
259a47a12beSStefan Roese 
260a47a12beSStefan Roese typedef struct qegpio83xx {
261a47a12beSStefan Roese 	gpio_n_t ioport[0x7];
262a47a12beSStefan Roese 	u8 res0[0x358];
263a47a12beSStefan Roese } qepio83xx_t;
264a47a12beSStefan Roese 
265a47a12beSStefan Roese /*
266a47a12beSStefan Roese  * QE Secondary Bus Access Windows
267a47a12beSStefan Roese  */
268a47a12beSStefan Roese typedef struct qesba83xx {
269a47a12beSStefan Roese 	u32 lbmcsar;		/* Local bus memory controller start address */
270a47a12beSStefan Roese 	u32 sdmcsar;		/* Secondary DDR memory controller start address */
271a47a12beSStefan Roese 	u8 res0[0x38];
272a47a12beSStefan Roese 	u32 lbmcear;		/* Local bus memory controller end address */
273a47a12beSStefan Roese 	u32 sdmcear;		/* Secondary DDR memory controller end address */
274a47a12beSStefan Roese 	u8 res1[0x38];
275a47a12beSStefan Roese 	u32 lbmcar;		/* Local bus memory controller attributes */
276a47a12beSStefan Roese 	u32 sdmcar;		/* Secondary DDR memory controller attributes */
277a47a12beSStefan Roese 	u8 res2[0x378];
278a47a12beSStefan Roese } qesba83xx_t;
279a47a12beSStefan Roese 
280a47a12beSStefan Roese /*
281*9a17eb5bSYork Sun  * DDR Memory Controller Memory Map for DDR1
282*9a17eb5bSYork Sun  * The structure of DDR2, or DDR3 is defined in fsl_immap.h
283a47a12beSStefan Roese  */
284*9a17eb5bSYork Sun #if !defined(CONFIG_SYS_FSL_DDR2) && !defined(CONFIG_SYS_FSL_DDR3)
285a47a12beSStefan Roese typedef struct ddr_cs_bnds {
286a47a12beSStefan Roese 	u32 csbnds;
287a47a12beSStefan Roese 	u8 res0[4];
288a47a12beSStefan Roese } ddr_cs_bnds_t;
289a47a12beSStefan Roese 
290a47a12beSStefan Roese typedef struct ddr83xx {
291a47a12beSStefan Roese 	ddr_cs_bnds_t csbnds[4];/* Chip Select x Memory Bounds */
292a47a12beSStefan Roese 	u8 res0[0x60];
293a47a12beSStefan Roese 	u32 cs_config[4];	/* Chip Select x Configuration */
294a47a12beSStefan Roese 	u8 res1[0x70];
295a47a12beSStefan Roese 	u32 timing_cfg_3;	/* SDRAM Timing Configuration 3 */
296a47a12beSStefan Roese 	u32 timing_cfg_0;	/* SDRAM Timing Configuration 0 */
297a47a12beSStefan Roese 	u32 timing_cfg_1;	/* SDRAM Timing Configuration 1 */
298a47a12beSStefan Roese 	u32 timing_cfg_2;	/* SDRAM Timing Configuration 2 */
299a47a12beSStefan Roese 	u32 sdram_cfg;		/* SDRAM Control Configuration */
300a47a12beSStefan Roese 	u32 sdram_cfg2;		/* SDRAM Control Configuration 2 */
301a47a12beSStefan Roese 	u32 sdram_mode;		/* SDRAM Mode Configuration */
302a47a12beSStefan Roese 	u32 sdram_mode2;	/* SDRAM Mode Configuration 2 */
303a47a12beSStefan Roese 	u32 sdram_md_cntl;	/* SDRAM Mode Control */
304a47a12beSStefan Roese 	u32 sdram_interval;	/* SDRAM Interval Configuration */
305a47a12beSStefan Roese 	u32 ddr_data_init;	/* SDRAM Data Initialization */
306a47a12beSStefan Roese 	u8 res2[4];
307a47a12beSStefan Roese 	u32 sdram_clk_cntl;	/* SDRAM Clock Control */
308a47a12beSStefan Roese 	u8 res3[0x14];
309a47a12beSStefan Roese 	u32 ddr_init_addr;	/* DDR training initialization address */
310a47a12beSStefan Roese 	u32 ddr_init_ext_addr;	/* DDR training initialization extended address */
311a47a12beSStefan Roese 	u8 res4[0xAA8];
312a47a12beSStefan Roese 	u32 ddr_ip_rev1;	/* DDR IP block revision 1 */
313a47a12beSStefan Roese 	u32 ddr_ip_rev2;	/* DDR IP block revision 2 */
314a47a12beSStefan Roese 	u8 res5[0x200];
315a47a12beSStefan Roese 	u32 data_err_inject_hi;	/* Memory Data Path Error Injection Mask High */
316a47a12beSStefan Roese 	u32 data_err_inject_lo;	/* Memory Data Path Error Injection Mask Low */
317a47a12beSStefan Roese 	u32 ecc_err_inject;	/* Memory Data Path Error Injection Mask ECC */
318a47a12beSStefan Roese 	u8 res6[0x14];
319a47a12beSStefan Roese 	u32 capture_data_hi;	/* Memory Data Path Read Capture High */
320a47a12beSStefan Roese 	u32 capture_data_lo;	/* Memory Data Path Read Capture Low */
321a47a12beSStefan Roese 	u32 capture_ecc;	/* Memory Data Path Read Capture ECC */
322a47a12beSStefan Roese 	u8 res7[0x14];
323a47a12beSStefan Roese 	u32 err_detect;		/* Memory Error Detect */
324a47a12beSStefan Roese 	u32 err_disable;	/* Memory Error Disable */
325a47a12beSStefan Roese 	u32 err_int_en;		/* Memory Error Interrupt Enable */
326a47a12beSStefan Roese 	u32 capture_attributes;	/* Memory Error Attributes Capture */
327a47a12beSStefan Roese 	u32 capture_address;	/* Memory Error Address Capture */
328a47a12beSStefan Roese 	u32 capture_ext_address;/* Memory Error Extended Address Capture */
329a47a12beSStefan Roese 	u32 err_sbe;		/* Memory Single-Bit ECC Error Management */
330a47a12beSStefan Roese 	u8 res8[0xA4];
331a47a12beSStefan Roese 	u32 debug_reg;
332a47a12beSStefan Roese 	u8 res9[0xFC];
333a47a12beSStefan Roese } ddr83xx_t;
334d29d17d7SYork Sun #endif
335a47a12beSStefan Roese 
336a47a12beSStefan Roese /*
337a47a12beSStefan Roese  * DUART
338a47a12beSStefan Roese  */
339a47a12beSStefan Roese typedef struct duart83xx {
340a47a12beSStefan Roese 	u8 urbr_ulcr_udlb;	/* combined register for URBR, UTHR and UDLB */
341a47a12beSStefan Roese 	u8 uier_udmb;		/* combined register for UIER and UDMB */
342a47a12beSStefan Roese 	u8 uiir_ufcr_uafr;	/* combined register for UIIR, UFCR and UAFR */
343a47a12beSStefan Roese 	u8 ulcr;		/* line control register */
344a47a12beSStefan Roese 	u8 umcr;		/* MODEM control register */
345a47a12beSStefan Roese 	u8 ulsr;		/* line status register */
346a47a12beSStefan Roese 	u8 umsr;		/* MODEM status register */
347a47a12beSStefan Roese 	u8 uscr;		/* scratch register */
348a47a12beSStefan Roese 	u8 res0[8];
349a47a12beSStefan Roese 	u8 udsr;		/* DMA status register */
350a47a12beSStefan Roese 	u8 res1[3];
351a47a12beSStefan Roese 	u8 res2[0xEC];
352a47a12beSStefan Roese } duart83xx_t;
353a47a12beSStefan Roese 
354a47a12beSStefan Roese /*
355a47a12beSStefan Roese  * DMA/Messaging Unit
356a47a12beSStefan Roese  */
357a47a12beSStefan Roese typedef struct dma83xx {
358a47a12beSStefan Roese 	u32 res0[0xC];		/* 0x0-0x29 reseverd */
359a47a12beSStefan Roese 	u32 omisr;		/* 0x30 Outbound message interrupt status register */
360a47a12beSStefan Roese 	u32 omimr;		/* 0x34 Outbound message interrupt mask register */
361a47a12beSStefan Roese 	u32 res1[0x6];		/* 0x38-0x49 reserved */
362a47a12beSStefan Roese 	u32 imr0;		/* 0x50 Inbound message register 0 */
363a47a12beSStefan Roese 	u32 imr1;		/* 0x54 Inbound message register 1 */
364a47a12beSStefan Roese 	u32 omr0;		/* 0x58 Outbound message register 0 */
365a47a12beSStefan Roese 	u32 omr1;		/* 0x5C Outbound message register 1 */
366a47a12beSStefan Roese 	u32 odr;		/* 0x60 Outbound doorbell register */
367a47a12beSStefan Roese 	u32 res2;		/* 0x64-0x67 reserved */
368a47a12beSStefan Roese 	u32 idr;		/* 0x68 Inbound doorbell register */
369a47a12beSStefan Roese 	u32 res3[0x5];		/* 0x6C-0x79 reserved */
370a47a12beSStefan Roese 	u32 imisr;		/* 0x80 Inbound message interrupt status register */
371a47a12beSStefan Roese 	u32 imimr;		/* 0x84 Inbound message interrupt mask register */
372a47a12beSStefan Roese 	u32 res4[0x1E];		/* 0x88-0x99 reserved */
373a47a12beSStefan Roese 	struct fsl_dma dma[4];
374a47a12beSStefan Roese } dma83xx_t;
375a47a12beSStefan Roese 
376a47a12beSStefan Roese /*
377a47a12beSStefan Roese  * PCI Software Configuration Registers
378a47a12beSStefan Roese  */
379a47a12beSStefan Roese typedef struct pciconf83xx {
380a47a12beSStefan Roese 	u32 config_address;
381a47a12beSStefan Roese 	u32 config_data;
382a47a12beSStefan Roese 	u32 int_ack;
383a47a12beSStefan Roese 	u8 res[116];
384a47a12beSStefan Roese } pciconf83xx_t;
385a47a12beSStefan Roese 
386a47a12beSStefan Roese /*
387a47a12beSStefan Roese  * PCI Outbound Translation Register
388a47a12beSStefan Roese  */
389a47a12beSStefan Roese typedef struct pci_outbound_window {
390a47a12beSStefan Roese 	u32 potar;
391a47a12beSStefan Roese 	u8 res0[4];
392a47a12beSStefan Roese 	u32 pobar;
393a47a12beSStefan Roese 	u8 res1[4];
394a47a12beSStefan Roese 	u32 pocmr;
395a47a12beSStefan Roese 	u8 res2[4];
396a47a12beSStefan Roese } pot83xx_t;
397a47a12beSStefan Roese 
398a47a12beSStefan Roese /*
399a47a12beSStefan Roese  * Sequencer
400a47a12beSStefan Roese  */
401a47a12beSStefan Roese typedef struct ios83xx {
402a47a12beSStefan Roese 	pot83xx_t pot[6];
403a47a12beSStefan Roese 	u8 res0[0x60];
404a47a12beSStefan Roese 	u32 pmcr;
405a47a12beSStefan Roese 	u8 res1[4];
406a47a12beSStefan Roese 	u32 dtcr;
407a47a12beSStefan Roese 	u8 res2[4];
408a47a12beSStefan Roese } ios83xx_t;
409a47a12beSStefan Roese 
410a47a12beSStefan Roese /*
411a47a12beSStefan Roese  * PCI Controller Control and Status Registers
412a47a12beSStefan Roese  */
413a47a12beSStefan Roese typedef struct pcictrl83xx {
414a47a12beSStefan Roese 	u32 esr;
415a47a12beSStefan Roese 	u32 ecdr;
416a47a12beSStefan Roese 	u32 eer;
417a47a12beSStefan Roese 	u32 eatcr;
418a47a12beSStefan Roese 	u32 eacr;
419a47a12beSStefan Roese 	u32 eeacr;
420a47a12beSStefan Roese 	u32 edlcr;
421a47a12beSStefan Roese 	u32 edhcr;
422a47a12beSStefan Roese 	u32 gcr;
423a47a12beSStefan Roese 	u32 ecr;
424a47a12beSStefan Roese 	u32 gsr;
425a47a12beSStefan Roese 	u8 res0[12];
426a47a12beSStefan Roese 	u32 pitar2;
427a47a12beSStefan Roese 	u8 res1[4];
428a47a12beSStefan Roese 	u32 pibar2;
429a47a12beSStefan Roese 	u32 piebar2;
430a47a12beSStefan Roese 	u32 piwar2;
431a47a12beSStefan Roese 	u8 res2[4];
432a47a12beSStefan Roese 	u32 pitar1;
433a47a12beSStefan Roese 	u8 res3[4];
434a47a12beSStefan Roese 	u32 pibar1;
435a47a12beSStefan Roese 	u32 piebar1;
436a47a12beSStefan Roese 	u32 piwar1;
437a47a12beSStefan Roese 	u8 res4[4];
438a47a12beSStefan Roese 	u32 pitar0;
439a47a12beSStefan Roese 	u8 res5[4];
440a47a12beSStefan Roese 	u32 pibar0;
441a47a12beSStefan Roese 	u8 res6[4];
442a47a12beSStefan Roese 	u32 piwar0;
443a47a12beSStefan Roese 	u8 res7[132];
444a47a12beSStefan Roese } pcictrl83xx_t;
445a47a12beSStefan Roese 
446a47a12beSStefan Roese /*
447a47a12beSStefan Roese  * USB
448a47a12beSStefan Roese  */
449a47a12beSStefan Roese typedef struct usb83xx {
450a47a12beSStefan Roese 	u8 fixme[0x1000];
451a47a12beSStefan Roese } usb83xx_t;
452a47a12beSStefan Roese 
453a47a12beSStefan Roese /*
454a47a12beSStefan Roese  * TSEC
455a47a12beSStefan Roese  */
456a47a12beSStefan Roese typedef struct tsec83xx {
457a47a12beSStefan Roese 	u8 fixme[0x1000];
458a47a12beSStefan Roese } tsec83xx_t;
459a47a12beSStefan Roese 
460a47a12beSStefan Roese /*
461a47a12beSStefan Roese  * Security
462a47a12beSStefan Roese  */
463a47a12beSStefan Roese typedef struct security83xx {
464a47a12beSStefan Roese 	u8 fixme[0x10000];
465a47a12beSStefan Roese } security83xx_t;
466a47a12beSStefan Roese 
467a47a12beSStefan Roese /*
468a47a12beSStefan Roese  *  PCI Express
469a47a12beSStefan Roese  */
470a47a12beSStefan Roese struct pex_inbound_window {
471a47a12beSStefan Roese 	u32 ar;
472a47a12beSStefan Roese 	u32 tar;
473a47a12beSStefan Roese 	u32 barl;
474a47a12beSStefan Roese 	u32 barh;
475a47a12beSStefan Roese };
476a47a12beSStefan Roese 
477a47a12beSStefan Roese struct pex_outbound_window {
478a47a12beSStefan Roese 	u32 ar;
479a47a12beSStefan Roese 	u32 bar;
480a47a12beSStefan Roese 	u32 tarl;
481a47a12beSStefan Roese 	u32 tarh;
482a47a12beSStefan Roese };
483a47a12beSStefan Roese 
484a47a12beSStefan Roese struct pex_csb_bridge {
485a47a12beSStefan Roese 	u32 pex_csb_ver;
486a47a12beSStefan Roese 	u32 pex_csb_cab;
487a47a12beSStefan Roese 	u32 pex_csb_ctrl;
488a47a12beSStefan Roese 	u8 res0[8];
489a47a12beSStefan Roese 	u32 pex_dms_dstmr;
490a47a12beSStefan Roese 	u8 res1[4];
491a47a12beSStefan Roese 	u32 pex_cbs_stat;
492a47a12beSStefan Roese 	u8 res2[0x20];
493a47a12beSStefan Roese 	u32 pex_csb_obctrl;
494a47a12beSStefan Roese 	u32 pex_csb_obstat;
495a47a12beSStefan Roese 	u8 res3[0x98];
496a47a12beSStefan Roese 	u32 pex_csb_ibctrl;
497a47a12beSStefan Roese 	u32 pex_csb_ibstat;
498a47a12beSStefan Roese 	u8 res4[0xb8];
499a47a12beSStefan Roese 	u32 pex_wdma_ctrl;
500a47a12beSStefan Roese 	u32 pex_wdma_addr;
501a47a12beSStefan Roese 	u32 pex_wdma_stat;
502a47a12beSStefan Roese 	u8 res5[0x94];
503a47a12beSStefan Roese 	u32 pex_rdma_ctrl;
504a47a12beSStefan Roese 	u32 pex_rdma_addr;
505a47a12beSStefan Roese 	u32 pex_rdma_stat;
506a47a12beSStefan Roese 	u8 res6[0xd4];
507a47a12beSStefan Roese 	u32 pex_ombcr;
508a47a12beSStefan Roese 	u32 pex_ombdr;
509a47a12beSStefan Roese 	u8 res7[0x38];
510a47a12beSStefan Roese 	u32 pex_imbcr;
511a47a12beSStefan Roese 	u32 pex_imbdr;
512a47a12beSStefan Roese 	u8 res8[0x38];
513a47a12beSStefan Roese 	u32 pex_int_enb;
514a47a12beSStefan Roese 	u32 pex_int_stat;
515a47a12beSStefan Roese 	u32 pex_int_apio_vec1;
516a47a12beSStefan Roese 	u32 pex_int_apio_vec2;
517a47a12beSStefan Roese 	u8 res9[0x10];
518a47a12beSStefan Roese 	u32 pex_int_ppio_vec1;
519a47a12beSStefan Roese 	u32 pex_int_ppio_vec2;
520a47a12beSStefan Roese 	u32 pex_int_wdma_vec1;
521a47a12beSStefan Roese 	u32 pex_int_wdma_vec2;
522a47a12beSStefan Roese 	u32 pex_int_rdma_vec1;
523a47a12beSStefan Roese 	u32 pex_int_rdma_vec2;
524a47a12beSStefan Roese 	u32 pex_int_misc_vec;
525a47a12beSStefan Roese 	u8 res10[4];
526a47a12beSStefan Roese 	u32 pex_int_axi_pio_enb;
527a47a12beSStefan Roese 	u32 pex_int_axi_wdma_enb;
528a47a12beSStefan Roese 	u32 pex_int_axi_rdma_enb;
529a47a12beSStefan Roese 	u32 pex_int_axi_misc_enb;
530a47a12beSStefan Roese 	u32 pex_int_axi_pio_stat;
531a47a12beSStefan Roese 	u32 pex_int_axi_wdma_stat;
532a47a12beSStefan Roese 	u32 pex_int_axi_rdma_stat;
533a47a12beSStefan Roese 	u32 pex_int_axi_misc_stat;
534a47a12beSStefan Roese 	u8 res11[0xa0];
535a47a12beSStefan Roese 	struct pex_outbound_window pex_outbound_win[4];
536a47a12beSStefan Roese 	u8 res12[0x100];
537a47a12beSStefan Roese 	u32 pex_epiwtar0;
538a47a12beSStefan Roese 	u32 pex_epiwtar1;
539a47a12beSStefan Roese 	u32 pex_epiwtar2;
540a47a12beSStefan Roese 	u32 pex_epiwtar3;
541a47a12beSStefan Roese 	u8 res13[0x70];
542a47a12beSStefan Roese 	struct pex_inbound_window pex_inbound_win[4];
543a47a12beSStefan Roese };
544a47a12beSStefan Roese 
545a47a12beSStefan Roese typedef struct pex83xx {
546a47a12beSStefan Roese 	u8 pex_cfg_header[0x404];
547a47a12beSStefan Roese 	u32 pex_ltssm_stat;
548a47a12beSStefan Roese 	u8 res0[0x30];
549a47a12beSStefan Roese 	u32 pex_ack_replay_timeout;
550a47a12beSStefan Roese 	u8 res1[4];
551a47a12beSStefan Roese 	u32 pex_gclk_ratio;
552a47a12beSStefan Roese 	u8 res2[0xc];
553a47a12beSStefan Roese 	u32 pex_pm_timer;
554a47a12beSStefan Roese 	u32 pex_pme_timeout;
555a47a12beSStefan Roese 	u8 res3[4];
556a47a12beSStefan Roese 	u32 pex_aspm_req_timer;
557a47a12beSStefan Roese 	u8 res4[0x18];
558a47a12beSStefan Roese 	u32 pex_ssvid_update;
559a47a12beSStefan Roese 	u8 res5[0x34];
560a47a12beSStefan Roese 	u32 pex_cfg_ready;
561a47a12beSStefan Roese 	u8 res6[0x24];
562a47a12beSStefan Roese 	u32 pex_bar_sizel;
563a47a12beSStefan Roese 	u8 res7[4];
564a47a12beSStefan Roese 	u32 pex_bar_sel;
565a47a12beSStefan Roese 	u8 res8[0x20];
566a47a12beSStefan Roese 	u32 pex_bar_pf;
567a47a12beSStefan Roese 	u8 res9[0x88];
568a47a12beSStefan Roese 	u32 pex_pme_to_ack_tor;
569a47a12beSStefan Roese 	u8 res10[0xc];
570a47a12beSStefan Roese 	u32 pex_ss_intr_mask;
571a47a12beSStefan Roese 	u8 res11[0x25c];
572a47a12beSStefan Roese 	struct pex_csb_bridge bridge;
573a47a12beSStefan Roese 	u8 res12[0x160];
574a47a12beSStefan Roese } pex83xx_t;
575a47a12beSStefan Roese 
576a47a12beSStefan Roese /*
577a47a12beSStefan Roese  * SATA
578a47a12beSStefan Roese  */
579a47a12beSStefan Roese typedef struct sata83xx {
580a47a12beSStefan Roese 	u8 fixme[0x1000];
581a47a12beSStefan Roese } sata83xx_t;
582a47a12beSStefan Roese 
583a47a12beSStefan Roese /*
584a47a12beSStefan Roese  * eSDHC
585a47a12beSStefan Roese  */
586a47a12beSStefan Roese typedef struct sdhc83xx {
587a47a12beSStefan Roese 	u8 fixme[0x1000];
588a47a12beSStefan Roese } sdhc83xx_t;
589a47a12beSStefan Roese 
590a47a12beSStefan Roese /*
591a47a12beSStefan Roese  * SerDes
592a47a12beSStefan Roese  */
593a47a12beSStefan Roese typedef struct serdes83xx {
5947c619ddcSIlya Yanok 	u32 srdscr0;
5957c619ddcSIlya Yanok 	u32 srdscr1;
5967c619ddcSIlya Yanok 	u32 srdscr2;
5977c619ddcSIlya Yanok 	u32 srdscr3;
5987c619ddcSIlya Yanok 	u32 srdscr4;
5997c619ddcSIlya Yanok 	u8 res0[0xc];
6007c619ddcSIlya Yanok 	u32 srdsrstctl;
6017c619ddcSIlya Yanok 	u8 res1[0xdc];
602a47a12beSStefan Roese } serdes83xx_t;
603a47a12beSStefan Roese 
604a47a12beSStefan Roese /*
605a47a12beSStefan Roese  * On Chip ROM
606a47a12beSStefan Roese  */
607a47a12beSStefan Roese typedef struct rom83xx {
608a88731a6SGerlando Falauto #if defined(CONFIG_MPC8309)
609a88731a6SGerlando Falauto 	u8 mem[0x8000];
610a88731a6SGerlando Falauto #else
611a47a12beSStefan Roese 	u8 mem[0x10000];
612a88731a6SGerlando Falauto #endif
613a47a12beSStefan Roese } rom83xx_t;
614a47a12beSStefan Roese 
615a47a12beSStefan Roese /*
616a47a12beSStefan Roese  * TDM
617a47a12beSStefan Roese  */
618a47a12beSStefan Roese typedef struct tdm83xx {
619a47a12beSStefan Roese 	u8 fixme[0x200];
620a47a12beSStefan Roese } tdm83xx_t;
621a47a12beSStefan Roese 
622a47a12beSStefan Roese /*
623a47a12beSStefan Roese  * TDM DMAC
624a47a12beSStefan Roese  */
625a47a12beSStefan Roese typedef struct tdmdmac83xx {
626a47a12beSStefan Roese 	u8 fixme[0x2000];
627a47a12beSStefan Roese } tdmdmac83xx_t;
628a47a12beSStefan Roese 
629a47a12beSStefan Roese #if defined(CONFIG_MPC834x)
630a47a12beSStefan Roese typedef struct immap {
631a47a12beSStefan Roese 	sysconf83xx_t		sysconf;	/* System configuration */
632a47a12beSStefan Roese 	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
633a47a12beSStefan Roese 	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
634a47a12beSStefan Roese 	rtclk83xx_t		pit;		/* Periodic Interval Timer */
635a47a12beSStefan Roese 	gtm83xx_t		gtm[2];		/* Global Timers Module */
636a47a12beSStefan Roese 	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
637a47a12beSStefan Roese 	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
638a47a12beSStefan Roese 	reset83xx_t		reset;		/* Reset Module */
639a47a12beSStefan Roese 	clk83xx_t		clk;		/* System Clock Module */
640a47a12beSStefan Roese 	pmc83xx_t		pmc;		/* Power Management Control Module */
641a47a12beSStefan Roese 	gpio83xx_t		gpio[2];	/* General purpose I/O module */
642a47a12beSStefan Roese 	u8			res0[0x200];
643a47a12beSStefan Roese 	u8			dll_ddr[0x100];
644a47a12beSStefan Roese 	u8			dll_lbc[0x100];
645a47a12beSStefan Roese 	u8			res1[0xE00];
6465614e71bSYork Sun #if defined(CONFIG_SYS_FSL_DDR2) || defined(CONFIG_SYS_FSL_DDR3)
647*9a17eb5bSYork Sun 	struct ccsr_ddr		ddr;	/* DDR Memory Controller Memory */
648d29d17d7SYork Sun #else
649a47a12beSStefan Roese 	ddr83xx_t		ddr;	/* DDR Memory Controller Memory */
650d29d17d7SYork Sun #endif
651a47a12beSStefan Roese 	fsl_i2c_t		i2c[2];		/* I2C Controllers */
652a47a12beSStefan Roese 	u8			res2[0x1300];
653a47a12beSStefan Roese 	duart83xx_t		duart[2];	/* DUART */
654a47a12beSStefan Roese 	u8			res3[0x900];
655f51cdaf1SBecky Bruce 	fsl_lbc_t		im_lbc;		/* Local Bus Controller Regs */
656a47a12beSStefan Roese 	u8			res4[0x1000];
657a47a12beSStefan Roese 	spi8xxx_t		spi;		/* Serial Peripheral Interface */
658a47a12beSStefan Roese 	dma83xx_t		dma;		/* DMA */
659a47a12beSStefan Roese 	pciconf83xx_t		pci_conf[2];	/* PCI Software Configuration Registers */
660a47a12beSStefan Roese 	ios83xx_t		ios;		/* Sequencer */
661a47a12beSStefan Roese 	pcictrl83xx_t		pci_ctrl[2];	/* PCI Controller Control and Status Registers */
662a47a12beSStefan Roese 	u8			res5[0x19900];
663a47a12beSStefan Roese 	usb83xx_t		usb[2];
664a47a12beSStefan Roese 	tsec83xx_t		tsec[2];
665a47a12beSStefan Roese 	u8			res6[0xA000];
666a47a12beSStefan Roese 	security83xx_t		security;
667a47a12beSStefan Roese 	u8			res7[0xC0000];
668a47a12beSStefan Roese } immap_t;
669a47a12beSStefan Roese 
6704e2e0df9Sramneek mehresh #ifndef	CONFIG_MPC834x
671a47a12beSStefan Roese #ifdef CONFIG_HAS_FSL_MPH_USB
67277354e9dSramneek mehresh #define CONFIG_SYS_MPC83xx_USB1_OFFSET  0x22000	/* use the MPH controller */
67377354e9dSramneek mehresh #define CONFIG_SYS_MPC83xx_USB2_OFFSET	0
674a47a12beSStefan Roese #else
67577354e9dSramneek mehresh #define CONFIG_SYS_MPC83xx_USB1_OFFSET	0
67677354e9dSramneek mehresh #define CONFIG_SYS_MPC83xx_USB2_OFFSET  0x23000	/* use the DR controller */
677a47a12beSStefan Roese #endif
6784e2e0df9Sramneek mehresh #else
6794e2e0df9Sramneek mehresh #define CONFIG_SYS_MPC83xx_USB1_OFFSET	0x22000
6804e2e0df9Sramneek mehresh #define CONFIG_SYS_MPC83xx_USB2_OFFSET  0x23000
6814e2e0df9Sramneek mehresh #endif
682a47a12beSStefan Roese 
683a47a12beSStefan Roese #elif defined(CONFIG_MPC8313)
684a47a12beSStefan Roese typedef struct immap {
685a47a12beSStefan Roese 	sysconf83xx_t		sysconf;	/* System configuration */
686a47a12beSStefan Roese 	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
687a47a12beSStefan Roese 	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
688a47a12beSStefan Roese 	rtclk83xx_t		pit;		/* Periodic Interval Timer */
689a47a12beSStefan Roese 	gtm83xx_t		gtm[2];		/* Global Timers Module */
690a47a12beSStefan Roese 	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
691a47a12beSStefan Roese 	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
692a47a12beSStefan Roese 	reset83xx_t		reset;		/* Reset Module */
693a47a12beSStefan Roese 	clk83xx_t		clk;		/* System Clock Module */
694a47a12beSStefan Roese 	pmc83xx_t		pmc;		/* Power Management Control Module */
695a47a12beSStefan Roese 	gpio83xx_t		gpio[1];	/* General purpose I/O module */
696a47a12beSStefan Roese 	u8			res0[0x1300];
697a47a12beSStefan Roese 	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
698a47a12beSStefan Roese 	fsl_i2c_t		i2c[2];		/* I2C Controllers */
699a47a12beSStefan Roese 	u8			res1[0x1300];
700a47a12beSStefan Roese 	duart83xx_t		duart[2];	/* DUART */
701a47a12beSStefan Roese 	u8			res2[0x900];
702f51cdaf1SBecky Bruce 	fsl_lbc_t		im_lbc;		/* Local Bus Controller Regs */
703a47a12beSStefan Roese 	u8			res3[0x1000];
704a47a12beSStefan Roese 	spi8xxx_t		spi;		/* Serial Peripheral Interface */
705a47a12beSStefan Roese 	dma83xx_t		dma;		/* DMA */
706a47a12beSStefan Roese 	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
707a47a12beSStefan Roese 	u8			res4[0x80];
708a47a12beSStefan Roese 	ios83xx_t		ios;		/* Sequencer */
709a47a12beSStefan Roese 	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
710a47a12beSStefan Roese 	u8			res5[0x1aa00];
711a47a12beSStefan Roese 	usb83xx_t		usb[1];
712a47a12beSStefan Roese 	tsec83xx_t		tsec[2];
713a47a12beSStefan Roese 	u8			res6[0xA000];
714a47a12beSStefan Roese 	security83xx_t		security;
715a47a12beSStefan Roese 	u8			res7[0xC0000];
716a47a12beSStefan Roese } immap_t;
717a47a12beSStefan Roese 
7187c619ddcSIlya Yanok #elif defined(CONFIG_MPC8308) || defined(CONFIG_MPC8315)
719a47a12beSStefan Roese typedef struct immap {
720a47a12beSStefan Roese 	sysconf83xx_t		sysconf;	/* System configuration */
721a47a12beSStefan Roese 	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
722a47a12beSStefan Roese 	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
723a47a12beSStefan Roese 	rtclk83xx_t		pit;		/* Periodic Interval Timer */
724a47a12beSStefan Roese 	gtm83xx_t		gtm[2];		/* Global Timers Module */
725a47a12beSStefan Roese 	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
726a47a12beSStefan Roese 	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
727a47a12beSStefan Roese 	reset83xx_t		reset;		/* Reset Module */
728a47a12beSStefan Roese 	clk83xx_t		clk;		/* System Clock Module */
729a47a12beSStefan Roese 	pmc83xx_t		pmc;		/* Power Management Control Module */
730a47a12beSStefan Roese 	gpio83xx_t		gpio[1];	/* General purpose I/O module */
731a47a12beSStefan Roese 	u8			res0[0x1300];
732a47a12beSStefan Roese 	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
733a47a12beSStefan Roese 	fsl_i2c_t		i2c[2];		/* I2C Controllers */
734a47a12beSStefan Roese 	u8			res1[0x1300];
735a47a12beSStefan Roese 	duart83xx_t		duart[2];	/* DUART */
736a47a12beSStefan Roese 	u8			res2[0x900];
737f51cdaf1SBecky Bruce 	fsl_lbc_t		im_lbc;		/* Local Bus Controller Regs */
738a47a12beSStefan Roese 	u8			res3[0x1000];
739a47a12beSStefan Roese 	spi8xxx_t		spi;		/* Serial Peripheral Interface */
740a47a12beSStefan Roese 	dma83xx_t		dma;		/* DMA */
741a47a12beSStefan Roese 	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
742a47a12beSStefan Roese 	u8			res4[0x80];
743a47a12beSStefan Roese 	ios83xx_t		ios;		/* Sequencer */
744a47a12beSStefan Roese 	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
745a47a12beSStefan Roese 	u8			res5[0xa00];
746a47a12beSStefan Roese 	pex83xx_t		pciexp[2];	/* PCI Express Controller */
747a47a12beSStefan Roese 	u8			res6[0xb000];
748a47a12beSStefan Roese 	tdm83xx_t		tdm;		/* TDM Controller */
749a47a12beSStefan Roese 	u8			res7[0x1e00];
750a47a12beSStefan Roese 	sata83xx_t		sata[2];	/* SATA Controller */
751a47a12beSStefan Roese 	u8			res8[0x9000];
752a47a12beSStefan Roese 	usb83xx_t		usb[1];		/* USB DR Controller */
753a47a12beSStefan Roese 	tsec83xx_t		tsec[2];
754a47a12beSStefan Roese 	u8			res9[0x6000];
755a47a12beSStefan Roese 	tdmdmac83xx_t		tdmdmac;	/* TDM DMAC */
756a47a12beSStefan Roese 	u8			res10[0x2000];
757a47a12beSStefan Roese 	security83xx_t		security;
758a47a12beSStefan Roese 	u8			res11[0xA3000];
759a47a12beSStefan Roese 	serdes83xx_t		serdes[1];	/* SerDes Registers */
760a47a12beSStefan Roese 	u8			res12[0x1CF00];
761a47a12beSStefan Roese } immap_t;
762a47a12beSStefan Roese 
763a47a12beSStefan Roese #elif defined(CONFIG_MPC837x)
764a47a12beSStefan Roese typedef struct immap {
765a47a12beSStefan Roese 	sysconf83xx_t		sysconf;	/* System configuration */
766a47a12beSStefan Roese 	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
767a47a12beSStefan Roese 	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
768a47a12beSStefan Roese 	rtclk83xx_t		pit;		/* Periodic Interval Timer */
769a47a12beSStefan Roese 	gtm83xx_t		gtm[2];		/* Global Timers Module */
770a47a12beSStefan Roese 	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
771a47a12beSStefan Roese 	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
772a47a12beSStefan Roese 	reset83xx_t		reset;		/* Reset Module */
773a47a12beSStefan Roese 	clk83xx_t		clk;		/* System Clock Module */
774a47a12beSStefan Roese 	pmc83xx_t		pmc;		/* Power Management Control Module */
775a47a12beSStefan Roese 	gpio83xx_t		gpio[2];	/* General purpose I/O module */
776a47a12beSStefan Roese 	u8			res0[0x1200];
777a47a12beSStefan Roese 	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
778a47a12beSStefan Roese 	fsl_i2c_t		i2c[2];		/* I2C Controllers */
779a47a12beSStefan Roese 	u8			res1[0x1300];
780a47a12beSStefan Roese 	duart83xx_t		duart[2];	/* DUART */
781a47a12beSStefan Roese 	u8			res2[0x900];
782f51cdaf1SBecky Bruce 	fsl_lbc_t		im_lbc;		/* Local Bus Controller Regs */
783a47a12beSStefan Roese 	u8			res3[0x1000];
784a47a12beSStefan Roese 	spi8xxx_t		spi;		/* Serial Peripheral Interface */
785a47a12beSStefan Roese 	dma83xx_t		dma;		/* DMA */
786a47a12beSStefan Roese 	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
787a47a12beSStefan Roese 	u8			res4[0x80];
788a47a12beSStefan Roese 	ios83xx_t		ios;		/* Sequencer */
789a47a12beSStefan Roese 	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
790a47a12beSStefan Roese 	u8			res5[0xa00];
791a47a12beSStefan Roese 	pex83xx_t		pciexp[2];	/* PCI Express Controller */
792a47a12beSStefan Roese 	u8			res6[0xd000];
793a47a12beSStefan Roese 	sata83xx_t		sata[4];	/* SATA Controller */
794a47a12beSStefan Roese 	u8			res7[0x7000];
795a47a12beSStefan Roese 	usb83xx_t		usb[1];		/* USB DR Controller */
796a47a12beSStefan Roese 	tsec83xx_t		tsec[2];
797a47a12beSStefan Roese 	u8			res8[0x8000];
798a47a12beSStefan Roese 	sdhc83xx_t		sdhc;		/* SDHC Controller */
799a47a12beSStefan Roese 	u8			res9[0x1000];
800a47a12beSStefan Roese 	security83xx_t		security;
801a47a12beSStefan Roese 	u8			res10[0xA3000];
802a47a12beSStefan Roese 	serdes83xx_t		serdes[2];	/* SerDes Registers */
803a47a12beSStefan Roese 	u8			res11[0xCE00];
804a47a12beSStefan Roese 	rom83xx_t		rom;		/* On Chip ROM */
805a47a12beSStefan Roese } immap_t;
806a47a12beSStefan Roese 
807a47a12beSStefan Roese #elif defined(CONFIG_MPC8360)
808a47a12beSStefan Roese typedef struct immap {
809a47a12beSStefan Roese 	sysconf83xx_t		sysconf;	/* System configuration */
810a47a12beSStefan Roese 	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
811a47a12beSStefan Roese 	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
812a47a12beSStefan Roese 	rtclk83xx_t		pit;		/* Periodic Interval Timer */
813a47a12beSStefan Roese 	u8			res0[0x200];
814a47a12beSStefan Roese 	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
815a47a12beSStefan Roese 	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
816a47a12beSStefan Roese 	reset83xx_t		reset;		/* Reset Module */
817a47a12beSStefan Roese 	clk83xx_t		clk;		/* System Clock Module */
818a47a12beSStefan Roese 	pmc83xx_t		pmc;		/* Power Management Control Module */
819a47a12beSStefan Roese 	qepi83xx_t		qepi;		/* QE Ports Interrupts Registers */
820a47a12beSStefan Roese 	u8			res1[0x300];
821a47a12beSStefan Roese 	u8			dll_ddr[0x100];
822a47a12beSStefan Roese 	u8			dll_lbc[0x100];
823a47a12beSStefan Roese 	u8			res2[0x200];
824a47a12beSStefan Roese 	qepio83xx_t		qepio;		/* QE Parallel I/O ports */
825a47a12beSStefan Roese 	qesba83xx_t		qesba;		/* QE Secondary Bus Access Windows */
826a47a12beSStefan Roese 	u8			res3[0x400];
827a47a12beSStefan Roese 	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
828a47a12beSStefan Roese 	fsl_i2c_t		i2c[2];		/* I2C Controllers */
829a47a12beSStefan Roese 	u8			res4[0x1300];
830a47a12beSStefan Roese 	duart83xx_t		duart[2];	/* DUART */
831a47a12beSStefan Roese 	u8			res5[0x900];
832f51cdaf1SBecky Bruce 	fsl_lbc_t		im_lbc;		/* Local Bus Controller Regs */
833a47a12beSStefan Roese 	u8			res6[0x2000];
834a47a12beSStefan Roese 	dma83xx_t		dma;		/* DMA */
835a47a12beSStefan Roese 	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
836a47a12beSStefan Roese 	u8			res7[128];
837a47a12beSStefan Roese 	ios83xx_t		ios;		/* Sequencer (IOS) */
838a47a12beSStefan Roese 	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
839a47a12beSStefan Roese 	u8			res8[0x4A00];
840a47a12beSStefan Roese 	ddr83xx_t		ddr_secondary;	/* Secondary DDR Memory Controller Memory Map */
841a47a12beSStefan Roese 	u8			res9[0x22000];
842a47a12beSStefan Roese 	security83xx_t		security;
843a47a12beSStefan Roese 	u8			res10[0xC0000];
844a47a12beSStefan Roese 	u8			qe[0x100000];	/* QE block */
845a47a12beSStefan Roese } immap_t;
846a47a12beSStefan Roese 
847a47a12beSStefan Roese #elif defined(CONFIG_MPC832x)
848a47a12beSStefan Roese typedef struct immap {
849a47a12beSStefan Roese 	sysconf83xx_t		sysconf;	/* System configuration */
850a47a12beSStefan Roese 	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
851a47a12beSStefan Roese 	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
852a47a12beSStefan Roese 	rtclk83xx_t		pit;		/* Periodic Interval Timer */
853a47a12beSStefan Roese 	gtm83xx_t		gtm[2];		/* Global Timers Module */
854a47a12beSStefan Roese 	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
855a47a12beSStefan Roese 	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
856a47a12beSStefan Roese 	reset83xx_t		reset;		/* Reset Module */
857a47a12beSStefan Roese 	clk83xx_t		clk;		/* System Clock Module */
858a47a12beSStefan Roese 	pmc83xx_t		pmc;		/* Power Management Control Module */
859a47a12beSStefan Roese 	qepi83xx_t		qepi;		/* QE Ports Interrupts Registers */
860a47a12beSStefan Roese 	u8			res0[0x300];
861a47a12beSStefan Roese 	u8			dll_ddr[0x100];
862a47a12beSStefan Roese 	u8			dll_lbc[0x100];
863a47a12beSStefan Roese 	u8			res1[0x200];
864a47a12beSStefan Roese 	qepio83xx_t		qepio;		/* QE Parallel I/O ports */
865a47a12beSStefan Roese 	u8			res2[0x800];
866a47a12beSStefan Roese 	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
867a47a12beSStefan Roese 	fsl_i2c_t		i2c[2];		/* I2C Controllers */
868a47a12beSStefan Roese 	u8			res3[0x1300];
869a47a12beSStefan Roese 	duart83xx_t		duart[2];	/* DUART */
870a47a12beSStefan Roese 	u8			res4[0x900];
871f51cdaf1SBecky Bruce 	fsl_lbc_t		im_lbc;		/* Local Bus Controller Regs */
872a47a12beSStefan Roese 	u8			res5[0x2000];
873a47a12beSStefan Roese 	dma83xx_t		dma;		/* DMA */
874a47a12beSStefan Roese 	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
875a47a12beSStefan Roese 	u8			res6[128];
876a47a12beSStefan Roese 	ios83xx_t		ios;		/* Sequencer (IOS) */
877a47a12beSStefan Roese 	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
878a47a12beSStefan Roese 	u8			res7[0x27A00];
879a47a12beSStefan Roese 	security83xx_t		security;
880a47a12beSStefan Roese 	u8			res8[0xC0000];
881a47a12beSStefan Roese 	u8			qe[0x100000];	/* QE block */
882a47a12beSStefan Roese } immap_t;
883a88731a6SGerlando Falauto #elif defined(CONFIG_MPC8309)
884a88731a6SGerlando Falauto typedef struct immap {
885a88731a6SGerlando Falauto 	sysconf83xx_t		sysconf;	/* System configuration */
886a88731a6SGerlando Falauto 	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
887a88731a6SGerlando Falauto 	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
888a88731a6SGerlando Falauto 	rtclk83xx_t		pit;		/* Periodic Interval Timer */
889a88731a6SGerlando Falauto 	gtm83xx_t		gtm[2];		/* Global Timers Module */
890a88731a6SGerlando Falauto 	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
891a88731a6SGerlando Falauto 	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
892a88731a6SGerlando Falauto 	reset83xx_t		reset;		/* Reset Module */
893a88731a6SGerlando Falauto 	clk83xx_t		clk;		/* System Clock Module */
894a88731a6SGerlando Falauto 	pmc83xx_t		pmc;		/* Power Management Control Module */
895a88731a6SGerlando Falauto 	gpio83xx_t		gpio[2];	/* General purpose I/O module */
896a88731a6SGerlando Falauto 	u8			res0[0x500];	/* res0 1.25 KBytes added for 8309 */
897a88731a6SGerlando Falauto 	qepi83xx_t		qepi;		/* QE Ports Interrupts Registers */
898a88731a6SGerlando Falauto 	qepio83xx_t		qepio;		/* QE Parallel I/O ports */
899a88731a6SGerlando Falauto 	u8			res1[0x800];
900a88731a6SGerlando Falauto 	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
901a88731a6SGerlando Falauto 	fsl_i2c_t		i2c[2];		/* I2C Controllers */
902a88731a6SGerlando Falauto 	u8			res2[0x1300];
903a88731a6SGerlando Falauto 	duart83xx_t		duart[2];	/* DUART */
904a88731a6SGerlando Falauto 	u8			res3[0x200];
905a88731a6SGerlando Falauto 	duart83xx_t		duart1[2];	/* DUART */
906a88731a6SGerlando Falauto 	u8			res4[0x500];
907a88731a6SGerlando Falauto 	fsl_lbc_t		im_lbc;		/* Local Bus Controller Regs */
908a88731a6SGerlando Falauto 	u8			res5[0x1000];
909a88731a6SGerlando Falauto 	u8			spi[0x100];
910a88731a6SGerlando Falauto 	u8			res6[0xf00];
911a88731a6SGerlando Falauto 	dma83xx_t		dma;		/* DMA */
912a88731a6SGerlando Falauto 	pciconf83xx_t		pci_conf[1];	/* PCI Configuration Registers */
913a88731a6SGerlando Falauto 	u8			res7[0x80];
914a88731a6SGerlando Falauto 	ios83xx_t		ios;		/* Sequencer (IOS) */
915a88731a6SGerlando Falauto 	pcictrl83xx_t		pci_ctrl[1];	/* PCI Control & Status Registers */
916a88731a6SGerlando Falauto 	u8			res8[0x13A00];
917a88731a6SGerlando Falauto 	u8			can1[0x1000];	/* Flexcan 1 */
918a88731a6SGerlando Falauto 	u8			can2[0x1000];	/* Flexcan 2 */
919a88731a6SGerlando Falauto 	u8			res9[0x5000];
920a88731a6SGerlando Falauto 	usb83xx_t		usb;
921a88731a6SGerlando Falauto 	u8			res10[0x5000];
922a88731a6SGerlando Falauto 	u8			can3[0x1000];	/* Flexcan 3 */
923a88731a6SGerlando Falauto 	u8			can4[0x1000];	/* Flexcan 4 */
924a88731a6SGerlando Falauto 	u8			res11[0x1000];
925a88731a6SGerlando Falauto 	u8			dma1[0x2000];	/* DMA */
926a88731a6SGerlando Falauto 	sdhc83xx_t		sdhc;		/* SDHC Controller */
927a88731a6SGerlando Falauto 	u8			res12[0xC1000];
928a88731a6SGerlando Falauto 	rom83xx_t		rom;		/* On Chip ROM */
929a88731a6SGerlando Falauto 	u8			res13[0x8000];
930a88731a6SGerlando Falauto 	u8			qe[0x100000];	/* QE block */
931a88731a6SGerlando Falauto 	u8			res14[0xE00000];/* Added for 8309 */
932a88731a6SGerlando Falauto } immap_t;
933a47a12beSStefan Roese #endif
934a47a12beSStefan Roese 
935e76cd5d4SAndy Fleming #define CONFIG_SYS_MPC8xxx_DDR_OFFSET	(0x2000)
9365614e71bSYork Sun #define CONFIG_SYS_FSL_DDR_ADDR \
937e76cd5d4SAndy Fleming 			(CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR_OFFSET)
938a47a12beSStefan Roese #define CONFIG_SYS_MPC83xx_DMA_OFFSET	(0x8000)
939d29d17d7SYork Sun #define CONFIG_SYS_MPC83xx_DMA_ADDR \
940d29d17d7SYork Sun 			(CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_DMA_OFFSET)
941a47a12beSStefan Roese #define CONFIG_SYS_MPC83xx_ESDHC_OFFSET	(0x2e000)
942d29d17d7SYork Sun #define CONFIG_SYS_MPC83xx_ESDHC_ADDR \
943d29d17d7SYork Sun 			(CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_ESDHC_OFFSET)
944a47a12beSStefan Roese 
94577354e9dSramneek mehresh #ifndef CONFIG_SYS_MPC83xx_USB1_OFFSET
94677354e9dSramneek mehresh #define CONFIG_SYS_MPC83xx_USB1_OFFSET  0x23000
947a47a12beSStefan Roese #endif
94877354e9dSramneek mehresh #define CONFIG_SYS_MPC83xx_USB1_ADDR \
94977354e9dSramneek mehresh 			(CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB1_OFFSET)
95077354e9dSramneek mehresh #if defined(CONFIG_MPC834x)
95177354e9dSramneek mehresh #define CONFIG_SYS_MPC83xx_USB2_ADDR \
95277354e9dSramneek mehresh 			(CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB2_OFFSET)
95377354e9dSramneek mehresh #endif
954f51cdaf1SBecky Bruce #define CONFIG_SYS_LBC_ADDR (&((immap_t *)CONFIG_SYS_IMMR)->im_lbc)
955a47a12beSStefan Roese 
956a47a12beSStefan Roese #define CONFIG_SYS_TSEC1_OFFSET		0x24000
957a47a12beSStefan Roese #define CONFIG_SYS_MDIO1_OFFSET		0x24000
958a47a12beSStefan Roese 
959a47a12beSStefan Roese #define TSEC_BASE_ADDR		(CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
960a47a12beSStefan Roese #define MDIO_BASE_ADDR		(CONFIG_SYS_IMMR + CONFIG_SYS_MDIO1_OFFSET)
961a47a12beSStefan Roese #endif				/* __IMMAP_83xx__ */
962