blob: 57189c9136b8bf922755e23e246424457dddf1a4 [file] [log] [blame]
Eran Liberty9095d4a2005-07-28 10:08:46 -05001/*
York Sune12ce982011-08-26 11:32:44 -07002 * Copyright 2004-2011 Freescale Semiconductor, Inc.
Jon Loeligerebc72242005-08-01 13:20:47 -05003 *
Dave Liuf5035922006-10-25 14:41:21 -05004 * MPC83xx Internal Memory Map
5 *
Dave Liu0b6bc772006-12-07 21:11:58 +08006 * Contributors:
7 * Dave Liu <daveliu@freescale.com>
8 * Tanya Jiang <tanya.jiang@freescale.com>
9 * Mandy Lavi <mandy.lavi@freescale.com>
10 * Eran Liberty <liberty@freescale.com>
Dave Liuf5035922006-10-25 14:41:21 -050011 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +020012 * SPDX-License-Identifier: GPL-2.0+
Eran Liberty9095d4a2005-07-28 10:08:46 -050013 */
Dave Liuf5035922006-10-25 14:41:21 -050014#ifndef __IMMAP_83xx__
15#define __IMMAP_83xx__
Eran Liberty9095d4a2005-07-28 10:08:46 -050016
17#include <asm/types.h>
Timur Tabiab347542006-11-03 19:15:00 -060018#include <asm/fsl_i2c.h>
Ben Warren7efe9272008-01-16 22:37:35 -050019#include <asm/mpc8xxx_spi.h>
Haiying Wang4f84bbd2008-10-29 11:05:55 -040020#include <asm/fsl_lbc.h>
Peter Tyser6f33a352009-06-30 17:15:51 -050021#include <asm/fsl_dma.h>
Eran Liberty9095d4a2005-07-28 10:08:46 -050022
Jon Loeligerebc72242005-08-01 13:20:47 -050023/*
Dave Liu0b6bc772006-12-07 21:11:58 +080024 * Local Access Window
Eran Liberty9095d4a2005-07-28 10:08:46 -050025 */
Dave Liuf5035922006-10-25 14:41:21 -050026typedef struct law83xx {
Dave Liufba13692006-10-31 19:25:38 -060027 u32 bar; /* LBIU local access window base address register */
Dave Liufba13692006-10-31 19:25:38 -060028 u32 ar; /* LBIU local access window attribute register */
Dave Liuf5035922006-10-25 14:41:21 -050029} law83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050030
Jon Loeligerebc72242005-08-01 13:20:47 -050031/*
Dave Liu0b6bc772006-12-07 21:11:58 +080032 * System configuration registers
Eran Liberty9095d4a2005-07-28 10:08:46 -050033 */
Dave Liuf5035922006-10-25 14:41:21 -050034typedef struct sysconf83xx {
Dave Liufba13692006-10-31 19:25:38 -060035 u32 immrbar; /* Internal memory map base address register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050036 u8 res0[0x04];
Dave Liufba13692006-10-31 19:25:38 -060037 u32 altcbar; /* Alternate configuration base address register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050038 u8 res1[0x14];
Dave Liufba13692006-10-31 19:25:38 -060039 law83xx_t lblaw[4]; /* LBIU local access window */
Eran Liberty9095d4a2005-07-28 10:08:46 -050040 u8 res2[0x20];
Dave Liufba13692006-10-31 19:25:38 -060041 law83xx_t pcilaw[2]; /* PCI local access window */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030042 u8 res3[0x10];
43 law83xx_t pcielaw[2]; /* PCI Express local access window */
44 u8 res4[0x10];
Dave Liufba13692006-10-31 19:25:38 -060045 law83xx_t ddrlaw[2]; /* DDR local access window */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030046 u8 res5[0x50];
Dave Liufba13692006-10-31 19:25:38 -060047 u32 sgprl; /* System General Purpose Register Low */
48 u32 sgprh; /* System General Purpose Register High */
49 u32 spridr; /* System Part and Revision ID Register */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030050 u8 res6[0x04];
Dave Liufba13692006-10-31 19:25:38 -060051 u32 spcr; /* System Priority Configuration Register */
Dave Liu0b6bc772006-12-07 21:11:58 +080052 u32 sicrl; /* System I/O Configuration Register Low */
53 u32 sicrh; /* System I/O Configuration Register High */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030054 u8 res7[0x04];
Nick Spence67c2e5c2008-08-22 23:52:40 -070055 u32 sidcr0; /* System I/O Delay Configuration Register 0 */
56 u32 sidcr1; /* System I/O Delay Configuration Register 1 */
Dave Liue740c462006-12-07 21:13:15 +080057 u32 ddrcdr; /* DDR Control Driver Register */
58 u32 ddrdsr; /* DDR Debug Status Register */
Dave Liu5245ff52007-09-18 12:36:11 +080059 u32 obir; /* Output Buffer Impedance Register */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030060 u8 res8[0xC];
61 u32 pecr1; /* PCI Express control register 1 */
Gerlando Falauto74735552012-10-10 22:13:07 +000062#if defined(CONFIG_MPC830x)
63 u32 sdhccr; /* eSDHC Control Registers for MPC830x */
Ilya Yanoka3e5fd52010-06-28 16:44:33 +040064#else
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030065 u32 pecr2; /* PCI Express control register 2 */
Ilya Yanoka3e5fd52010-06-28 16:44:33 +040066#endif
Gerlando Falautofe201cb2012-10-10 22:13:08 +000067#if defined(CONFIG_MPC8309)
68 u32 can_dbg_ctrl;
69 u32 res9a;
70 u32 gpr1;
71 u8 res9b[0xAC];
72#else
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030073 u8 res9[0xB8];
Gerlando Falautofe201cb2012-10-10 22:13:08 +000074#endif
Dave Liuf5035922006-10-25 14:41:21 -050075} sysconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050076
Jon Loeligerebc72242005-08-01 13:20:47 -050077/*
Eran Liberty9095d4a2005-07-28 10:08:46 -050078 * Watch Dog Timer (WDT) Registers
79 */
Dave Liuf5035922006-10-25 14:41:21 -050080typedef struct wdt83xx {
Jon Loeligerebc72242005-08-01 13:20:47 -050081 u8 res0[4];
Dave Liufba13692006-10-31 19:25:38 -060082 u32 swcrr; /* System watchdog control register */
83 u32 swcnr; /* System watchdog count register */
Jon Loeligerebc72242005-08-01 13:20:47 -050084 u8 res1[2];
Dave Liufba13692006-10-31 19:25:38 -060085 u16 swsrr; /* System watchdog service register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050086 u8 res2[0xF0];
Dave Liuf5035922006-10-25 14:41:21 -050087} wdt83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -050088
Eran Liberty9095d4a2005-07-28 10:08:46 -050089/*
90 * RTC/PIT Module Registers
91 */
Dave Liuf5035922006-10-25 14:41:21 -050092typedef struct rtclk83xx {
Dave Liufba13692006-10-31 19:25:38 -060093 u32 cnr; /* control register */
Dave Liufba13692006-10-31 19:25:38 -060094 u32 ldr; /* load register */
Dave Liufba13692006-10-31 19:25:38 -060095 u32 psr; /* prescale register */
Dave Liu0b6bc772006-12-07 21:11:58 +080096 u32 ctr; /* counter value field register */
Dave Liufba13692006-10-31 19:25:38 -060097 u32 evr; /* event register */
Dave Liufba13692006-10-31 19:25:38 -060098 u32 alr; /* alarm register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050099 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -0500100} rtclk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500101
102/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800103 * Global timer module
Eran Liberty9095d4a2005-07-28 10:08:46 -0500104 */
Dave Liuf5035922006-10-25 14:41:21 -0500105typedef struct gtm83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800106 u8 cfr1; /* Timer1/2 Configuration */
Dave Liufba13692006-10-31 19:25:38 -0600107 u8 res0[3];
Dave Liu0b6bc772006-12-07 21:11:58 +0800108 u8 cfr2; /* Timer3/4 Configuration */
Kim Phillips81a75f12011-08-14 23:09:39 -0500109 u8 res1[11];
Dave Liu0b6bc772006-12-07 21:11:58 +0800110 u16 mdr1; /* Timer1 Mode Register */
111 u16 mdr2; /* Timer2 Mode Register */
112 u16 rfr1; /* Timer1 Reference Register */
113 u16 rfr2; /* Timer2 Reference Register */
114 u16 cpr1; /* Timer1 Capture Register */
115 u16 cpr2; /* Timer2 Capture Register */
116 u16 cnr1; /* Timer1 Counter Register */
117 u16 cnr2; /* Timer2 Counter Register */
118 u16 mdr3; /* Timer3 Mode Register */
119 u16 mdr4; /* Timer4 Mode Register */
120 u16 rfr3; /* Timer3 Reference Register */
121 u16 rfr4; /* Timer4 Reference Register */
122 u16 cpr3; /* Timer3 Capture Register */
123 u16 cpr4; /* Timer4 Capture Register */
124 u16 cnr3; /* Timer3 Counter Register */
125 u16 cnr4; /* Timer4 Counter Register */
126 u16 evr1; /* Timer1 Event Register */
127 u16 evr2; /* Timer2 Event Register */
128 u16 evr3; /* Timer3 Event Register */
129 u16 evr4; /* Timer4 Event Register */
130 u16 psr1; /* Timer1 Prescaler Register */
131 u16 psr2; /* Timer2 Prescaler Register */
132 u16 psr3; /* Timer3 Prescaler Register */
133 u16 psr4; /* Timer4 Prescaler Register */
Dave Liufba13692006-10-31 19:25:38 -0600134 u8 res[0xC0];
Dave Liuf5035922006-10-25 14:41:21 -0500135} gtm83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500136
137/*
138 * Integrated Programmable Interrupt Controller
139 */
Dave Liuf5035922006-10-25 14:41:21 -0500140typedef struct ipic83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800141 u32 sicfr; /* System Global Interrupt Configuration Register */
142 u32 sivcr; /* System Global Interrupt Vector Register */
143 u32 sipnr_h; /* System Internal Interrupt Pending Register - High */
144 u32 sipnr_l; /* System Internal Interrupt Pending Register - Low */
145 u32 siprr_a; /* System Internal Interrupt Group A Priority Register */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500146 u32 siprr_b; /* System Internal Interrupt Group B Priority Register */
147 u32 siprr_c; /* System Internal Interrupt Group C Priority Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800148 u32 siprr_d; /* System Internal Interrupt Group D Priority Register */
149 u32 simsr_h; /* System Internal Interrupt Mask Register - High */
150 u32 simsr_l; /* System Internal Interrupt Mask Register - Low */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500151 u32 sicnr; /* System Internal Interrupt Control Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800152 u32 sepnr; /* System External Interrupt Pending Register */
153 u32 smprr_a; /* System Mixed Interrupt Group A Priority Register */
154 u32 smprr_b; /* System Mixed Interrupt Group B Priority Register */
155 u32 semsr; /* System External Interrupt Mask Register */
156 u32 secnr; /* System External Interrupt Control Register */
157 u32 sersr; /* System Error Status Register */
158 u32 sermr; /* System Error Mask Register */
159 u32 sercr; /* System Error Control Register */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500160 u32 sepcr; /* System External Interrupt Polarity Control Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800161 u32 sifcr_h; /* System Internal Interrupt Force Register - High */
162 u32 sifcr_l; /* System Internal Interrupt Force Register - Low */
163 u32 sefcr; /* System External Interrupt Force Register */
164 u32 serfr; /* System Error Force Register */
Dave Liufba13692006-10-31 19:25:38 -0600165 u32 scvcr; /* System Critical Interrupt Vector Register */
Dave Liufba13692006-10-31 19:25:38 -0600166 u32 smvcr; /* System Management Interrupt Vector Register */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500167 u8 res[0x98];
Dave Liuf5035922006-10-25 14:41:21 -0500168} ipic83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500169
170/*
171 * System Arbiter Registers
172 */
Dave Liuf5035922006-10-25 14:41:21 -0500173typedef struct arbiter83xx {
Dave Liufba13692006-10-31 19:25:38 -0600174 u32 acr; /* Arbiter Configuration Register */
Dave Liufba13692006-10-31 19:25:38 -0600175 u32 atr; /* Arbiter Timers Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500176 u8 res[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800177 u32 aer; /* Arbiter Event Register */
178 u32 aidr; /* Arbiter Interrupt Definition Register */
179 u32 amr; /* Arbiter Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600180 u32 aeatr; /* Arbiter Event Attributes Register */
Dave Liufba13692006-10-31 19:25:38 -0600181 u32 aeadr; /* Arbiter Event Address Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800182 u32 aerr; /* Arbiter Event Response Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500183 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500184} arbiter83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500185
186/*
187 * Reset Module
188 */
Dave Liuf5035922006-10-25 14:41:21 -0500189typedef struct reset83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800190 u32 rcwl; /* Reset Configuration Word Low Register */
191 u32 rcwh; /* Reset Configuration Word High Register */
Dave Liufba13692006-10-31 19:25:38 -0600192 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800193 u32 rsr; /* Reset Status Register */
194 u32 rmr; /* Reset Mode Register */
195 u32 rpr; /* Reset protection Register */
196 u32 rcr; /* Reset Control Register */
197 u32 rcer; /* Reset Control Enable Register */
Dave Liufba13692006-10-31 19:25:38 -0600198 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500199} reset83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -0500200
Dave Liu0b6bc772006-12-07 21:11:58 +0800201/*
202 * Clock Module
203 */
Dave Liuf5035922006-10-25 14:41:21 -0500204typedef struct clk83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800205 u32 spmr; /* system PLL mode Register */
206 u32 occr; /* output clock control Register */
207 u32 sccr; /* system clock control Register */
Dave Liufba13692006-10-31 19:25:38 -0600208 u8 res0[0xF4];
Dave Liuf5035922006-10-25 14:41:21 -0500209} clk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500210
211/*
212 * Power Management Control Module
213 */
Dave Liuf5035922006-10-25 14:41:21 -0500214typedef struct pmc83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800215 u32 pmccr; /* PMC Configuration Register */
216 u32 pmcer; /* PMC Event Register */
217 u32 pmcmr; /* PMC Mask Register */
Scott Wood9f15d502007-04-16 14:31:55 -0500218 u32 pmccr1; /* PMC Configuration Register 1 */
219 u32 pmccr2; /* PMC Configuration Register 2 */
220 u8 res0[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500221} pmc83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500222
223/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800224 * General purpose I/O module
Eran Liberty9095d4a2005-07-28 10:08:46 -0500225 */
Dave Liuf5035922006-10-25 14:41:21 -0500226typedef struct gpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600227 u32 dir; /* direction register */
228 u32 odr; /* open drain register */
229 u32 dat; /* data register */
230 u32 ier; /* interrupt event register */
231 u32 imr; /* interrupt mask register */
232 u32 icr; /* external interrupt control register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500233 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -0500234} gpio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600235
Dave Liufba13692006-10-31 19:25:38 -0600236/*
237 * QE Ports Interrupts Registers
238 */
239typedef struct qepi83xx {
240 u8 res0[0xC];
241 u32 qepier; /* QE Ports Interrupt Event Register */
Dave Liufba13692006-10-31 19:25:38 -0600242 u32 qepimr; /* QE Ports Interrupt Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600243 u32 qepicr; /* QE Ports Interrupt Control Register */
Dave Liufba13692006-10-31 19:25:38 -0600244 u8 res1[0xE8];
245} qepi83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500246
Jon Loeligerebc72242005-08-01 13:20:47 -0500247/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800248 * QE Parallel I/O Ports
Dave Liufba13692006-10-31 19:25:38 -0600249 */
250typedef struct gpio_n {
251 u32 podr; /* Open Drain Register */
252 u32 pdat; /* Data Register */
253 u32 dir1; /* direction register 1 */
254 u32 dir2; /* direction register 2 */
255 u32 ppar1; /* Pin Assignment Register 1 */
256 u32 ppar2; /* Pin Assignment Register 2 */
257} gpio_n_t;
258
Dave Liu0b6bc772006-12-07 21:11:58 +0800259typedef struct qegpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600260 gpio_n_t ioport[0x7];
261 u8 res0[0x358];
Dave Liu0b6bc772006-12-07 21:11:58 +0800262} qepio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600263
264/*
265 * QE Secondary Bus Access Windows
266 */
Dave Liufba13692006-10-31 19:25:38 -0600267typedef struct qesba83xx {
268 u32 lbmcsar; /* Local bus memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600269 u32 sdmcsar; /* Secondary DDR memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600270 u8 res0[0x38];
271 u32 lbmcear; /* Local bus memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600272 u32 sdmcear; /* Secondary DDR memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600273 u8 res1[0x38];
Dave Liu0b6bc772006-12-07 21:11:58 +0800274 u32 lbmcar; /* Local bus memory controller attributes */
Dave Liufba13692006-10-31 19:25:38 -0600275 u32 sdmcar; /* Secondary DDR memory controller attributes */
Dave Liu0b6bc772006-12-07 21:11:58 +0800276 u8 res2[0x378];
Dave Liufba13692006-10-31 19:25:38 -0600277} qesba83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600278
279/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500280 * DDR Memory Controller Memory Map
281 */
York Sune12ce982011-08-26 11:32:44 -0700282#if defined(CONFIG_FSL_DDR2) || defined(CONFIG_FSL_DDR3)
283typedef struct ccsr_ddr {
284 u32 cs0_bnds; /* Chip Select 0 Memory Bounds */
285 u8 res1[4];
286 u32 cs1_bnds; /* Chip Select 1 Memory Bounds */
287 u8 res2[4];
288 u32 cs2_bnds; /* Chip Select 2 Memory Bounds */
289 u8 res3[4];
290 u32 cs3_bnds; /* Chip Select 3 Memory Bounds */
291 u8 res4[100];
292 u32 cs0_config; /* Chip Select Configuration */
293 u32 cs1_config; /* Chip Select Configuration */
294 u32 cs2_config; /* Chip Select Configuration */
295 u32 cs3_config; /* Chip Select Configuration */
296 u8 res4a[48];
297 u32 cs0_config_2; /* Chip Select Configuration 2 */
298 u32 cs1_config_2; /* Chip Select Configuration 2 */
299 u32 cs2_config_2; /* Chip Select Configuration 2 */
300 u32 cs3_config_2; /* Chip Select Configuration 2 */
301 u8 res5[48];
302 u32 timing_cfg_3; /* SDRAM Timing Configuration 3 */
303 u32 timing_cfg_0; /* SDRAM Timing Configuration 0 */
304 u32 timing_cfg_1; /* SDRAM Timing Configuration 1 */
305 u32 timing_cfg_2; /* SDRAM Timing Configuration 2 */
306 u32 sdram_cfg; /* SDRAM Control Configuration */
307 u32 sdram_cfg_2; /* SDRAM Control Configuration 2 */
308 u32 sdram_mode; /* SDRAM Mode Configuration */
309 u32 sdram_mode_2; /* SDRAM Mode Configuration 2 */
310 u32 sdram_md_cntl; /* SDRAM Mode Control */
311 u32 sdram_interval; /* SDRAM Interval Configuration */
312 u32 sdram_data_init; /* SDRAM Data initialization */
313 u8 res6[4];
314 u32 sdram_clk_cntl; /* SDRAM Clock Control */
315 u8 res7[20];
316 u32 init_addr; /* training init addr */
317 u32 init_ext_addr; /* training init extended addr */
318 u8 res8_1[16];
319 u32 timing_cfg_4; /* SDRAM Timing Configuration 4 */
320 u32 timing_cfg_5; /* SDRAM Timing Configuration 5 */
321 u8 reg8_1a[8];
322 u32 ddr_zq_cntl; /* ZQ calibration control*/
323 u32 ddr_wrlvl_cntl; /* write leveling control*/
324 u8 reg8_1aa[4];
325 u32 ddr_sr_cntr; /* self refresh counter */
326 u32 ddr_sdram_rcw_1; /* Control Words 1 */
327 u32 ddr_sdram_rcw_2; /* Control Words 2 */
328 u8 reg_1ab[8];
329 u32 ddr_wrlvl_cntl_2; /* write leveling control 2 */
330 u32 ddr_wrlvl_cntl_3; /* write leveling control 3 */
331 u8 res8_1b[104];
332 u32 sdram_mode_3; /* SDRAM Mode Configuration 3 */
333 u32 sdram_mode_4; /* SDRAM Mode Configuration 4 */
334 u32 sdram_mode_5; /* SDRAM Mode Configuration 5 */
335 u32 sdram_mode_6; /* SDRAM Mode Configuration 6 */
336 u32 sdram_mode_7; /* SDRAM Mode Configuration 7 */
337 u32 sdram_mode_8; /* SDRAM Mode Configuration 8 */
338 u8 res8_1ba[0x908];
339 u32 ddr_dsr1; /* Debug Status 1 */
340 u32 ddr_dsr2; /* Debug Status 2 */
341 u32 ddr_cdr1; /* Control Driver 1 */
342 u32 ddr_cdr2; /* Control Driver 2 */
343 u8 res8_1c[200];
344 u32 ip_rev1; /* IP Block Revision 1 */
345 u32 ip_rev2; /* IP Block Revision 2 */
346 u32 eor; /* Enhanced Optimization Register */
347 u8 res8_2[252];
348 u32 mtcr; /* Memory Test Control Register */
349 u8 res8_3[28];
350 u32 mtp1; /* Memory Test Pattern 1 */
351 u32 mtp2; /* Memory Test Pattern 2 */
352 u32 mtp3; /* Memory Test Pattern 3 */
353 u32 mtp4; /* Memory Test Pattern 4 */
354 u32 mtp5; /* Memory Test Pattern 5 */
355 u32 mtp6; /* Memory Test Pattern 6 */
356 u32 mtp7; /* Memory Test Pattern 7 */
357 u32 mtp8; /* Memory Test Pattern 8 */
358 u32 mtp9; /* Memory Test Pattern 9 */
359 u32 mtp10; /* Memory Test Pattern 10 */
360 u8 res8_4[184];
361 u32 data_err_inject_hi; /* Data Path Err Injection Mask High */
362 u32 data_err_inject_lo; /* Data Path Err Injection Mask Low */
363 u32 ecc_err_inject; /* Data Path Err Injection Mask ECC */
364 u8 res9[20];
365 u32 capture_data_hi; /* Data Path Read Capture High */
366 u32 capture_data_lo; /* Data Path Read Capture Low */
367 u32 capture_ecc; /* Data Path Read Capture ECC */
368 u8 res10[20];
369 u32 err_detect; /* Error Detect */
370 u32 err_disable; /* Error Disable */
371 u32 err_int_en;
372 u32 capture_attributes; /* Error Attrs Capture */
373 u32 capture_address; /* Error Addr Capture */
374 u32 capture_ext_address; /* Error Extended Addr Capture */
375 u32 err_sbe; /* Single-Bit ECC Error Management */
376 u8 res11[164];
377 u32 debug[32]; /* debug_1 to debug_32 */
378 u8 res12[128];
379} ccsr_ddr_t;
380#else
Dave Liufba13692006-10-31 19:25:38 -0600381typedef struct ddr_cs_bnds {
Jon Loeligerebc72242005-08-01 13:20:47 -0500382 u32 csbnds;
Dave Liufba13692006-10-31 19:25:38 -0600383 u8 res0[4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500384} ddr_cs_bnds_t;
385
Dave Liuf5035922006-10-25 14:41:21 -0500386typedef struct ddr83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800387 ddr_cs_bnds_t csbnds[4];/* Chip Select x Memory Bounds */
Jon Loeligerebc72242005-08-01 13:20:47 -0500388 u8 res0[0x60];
Dave Liu0b6bc772006-12-07 21:11:58 +0800389 u32 cs_config[4]; /* Chip Select x Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800390 u8 res1[0x70];
391 u32 timing_cfg_3; /* SDRAM Timing Configuration 3 */
392 u32 timing_cfg_0; /* SDRAM Timing Configuration 0 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800393 u32 timing_cfg_1; /* SDRAM Timing Configuration 1 */
394 u32 timing_cfg_2; /* SDRAM Timing Configuration 2 */
395 u32 sdram_cfg; /* SDRAM Control Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800396 u32 sdram_cfg2; /* SDRAM Control Configuration 2 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800397 u32 sdram_mode; /* SDRAM Mode Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800398 u32 sdram_mode2; /* SDRAM Mode Configuration 2 */
399 u32 sdram_md_cntl; /* SDRAM Mode Control */
Dave Liu0b6bc772006-12-07 21:11:58 +0800400 u32 sdram_interval; /* SDRAM Interval Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800401 u32 ddr_data_init; /* SDRAM Data Initialization */
402 u8 res2[4];
403 u32 sdram_clk_cntl; /* SDRAM Clock Control */
404 u8 res3[0x14];
405 u32 ddr_init_addr; /* DDR training initialization address */
406 u32 ddr_init_ext_addr; /* DDR training initialization extended address */
407 u8 res4[0xAA8];
408 u32 ddr_ip_rev1; /* DDR IP block revision 1 */
409 u32 ddr_ip_rev2; /* DDR IP block revision 2 */
410 u8 res5[0x200];
Dave Liu0b6bc772006-12-07 21:11:58 +0800411 u32 data_err_inject_hi; /* Memory Data Path Error Injection Mask High */
412 u32 data_err_inject_lo; /* Memory Data Path Error Injection Mask Low */
413 u32 ecc_err_inject; /* Memory Data Path Error Injection Mask ECC */
Dave Liue740c462006-12-07 21:13:15 +0800414 u8 res6[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800415 u32 capture_data_hi; /* Memory Data Path Read Capture High */
416 u32 capture_data_lo; /* Memory Data Path Read Capture Low */
417 u32 capture_ecc; /* Memory Data Path Read Capture ECC */
Dave Liue740c462006-12-07 21:13:15 +0800418 u8 res7[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800419 u32 err_detect; /* Memory Error Detect */
420 u32 err_disable; /* Memory Error Disable */
421 u32 err_int_en; /* Memory Error Interrupt Enable */
422 u32 capture_attributes; /* Memory Error Attributes Capture */
423 u32 capture_address; /* Memory Error Address Capture */
424 u32 capture_ext_address;/* Memory Error Extended Address Capture */
425 u32 err_sbe; /* Memory Single-Bit ECC Error Management */
Dave Liue740c462006-12-07 21:13:15 +0800426 u8 res8[0xA4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500427 u32 debug_reg;
Dave Liue740c462006-12-07 21:13:15 +0800428 u8 res9[0xFC];
Dave Liuf5035922006-10-25 14:41:21 -0500429} ddr83xx_t;
York Sune12ce982011-08-26 11:32:44 -0700430#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -0500431
432/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500433 * DUART
434 */
Dave Liufba13692006-10-31 19:25:38 -0600435typedef struct duart83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800436 u8 urbr_ulcr_udlb; /* combined register for URBR, UTHR and UDLB */
437 u8 uier_udmb; /* combined register for UIER and UDMB */
438 u8 uiir_ufcr_uafr; /* combined register for UIIR, UFCR and UAFR */
439 u8 ulcr; /* line control register */
440 u8 umcr; /* MODEM control register */
441 u8 ulsr; /* line status register */
442 u8 umsr; /* MODEM status register */
443 u8 uscr; /* scratch register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500444 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800445 u8 udsr; /* DMA status register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500446 u8 res1[3];
447 u8 res2[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500448} duart83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500449
450/*
Marian Balakowicz7ec9ebc2006-03-14 16:14:48 +0100451 * DMA/Messaging Unit
452 */
Dave Liuf5035922006-10-25 14:41:21 -0500453typedef struct dma83xx {
Dave Liufba13692006-10-31 19:25:38 -0600454 u32 res0[0xC]; /* 0x0-0x29 reseverd */
455 u32 omisr; /* 0x30 Outbound message interrupt status register */
456 u32 omimr; /* 0x34 Outbound message interrupt mask register */
457 u32 res1[0x6]; /* 0x38-0x49 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600458 u32 imr0; /* 0x50 Inbound message register 0 */
459 u32 imr1; /* 0x54 Inbound message register 1 */
460 u32 omr0; /* 0x58 Outbound message register 0 */
461 u32 omr1; /* 0x5C Outbound message register 1 */
Dave Liufba13692006-10-31 19:25:38 -0600462 u32 odr; /* 0x60 Outbound doorbell register */
463 u32 res2; /* 0x64-0x67 reserved */
464 u32 idr; /* 0x68 Inbound doorbell register */
465 u32 res3[0x5]; /* 0x6C-0x79 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600466 u32 imisr; /* 0x80 Inbound message interrupt status register */
467 u32 imimr; /* 0x84 Inbound message interrupt mask register */
468 u32 res4[0x1E]; /* 0x88-0x99 reserved */
Peter Tyser6f33a352009-06-30 17:15:51 -0500469 struct fsl_dma dma[4];
Dave Liuf5035922006-10-25 14:41:21 -0500470} dma83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500471
472/*
473 * PCI Software Configuration Registers
474 */
Dave Liuf5035922006-10-25 14:41:21 -0500475typedef struct pciconf83xx {
Dave Liufba13692006-10-31 19:25:38 -0600476 u32 config_address;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500477 u32 config_data;
478 u32 int_ack;
Dave Liufba13692006-10-31 19:25:38 -0600479 u8 res[116];
Dave Liuf5035922006-10-25 14:41:21 -0500480} pciconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500481
482/*
483 * PCI Outbound Translation Register
484 */
485typedef struct pci_outbound_window {
Dave Liufba13692006-10-31 19:25:38 -0600486 u32 potar;
487 u8 res0[4];
488 u32 pobar;
489 u8 res1[4];
490 u32 pocmr;
491 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500492} pot83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600493
Eran Liberty9095d4a2005-07-28 10:08:46 -0500494/*
495 * Sequencer
Jon Loeligerebc72242005-08-01 13:20:47 -0500496 */
Dave Liuf5035922006-10-25 14:41:21 -0500497typedef struct ios83xx {
Dave Liufba13692006-10-31 19:25:38 -0600498 pot83xx_t pot[6];
Dave Liufba13692006-10-31 19:25:38 -0600499 u8 res0[0x60];
500 u32 pmcr;
501 u8 res1[4];
502 u32 dtcr;
503 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500504} ios83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500505
506/*
507 * PCI Controller Control and Status Registers
508 */
Dave Liuf5035922006-10-25 14:41:21 -0500509typedef struct pcictrl83xx {
Dave Liufba13692006-10-31 19:25:38 -0600510 u32 esr;
Dave Liufba13692006-10-31 19:25:38 -0600511 u32 ecdr;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500512 u32 eer;
Dave Liufba13692006-10-31 19:25:38 -0600513 u32 eatcr;
Dave Liufba13692006-10-31 19:25:38 -0600514 u32 eacr;
515 u32 eeacr;
Dave Liufba13692006-10-31 19:25:38 -0600516 u32 edlcr;
517 u32 edhcr;
Dave Liufba13692006-10-31 19:25:38 -0600518 u32 gcr;
519 u32 ecr;
520 u32 gsr;
521 u8 res0[12];
522 u32 pitar2;
523 u8 res1[4];
524 u32 pibar2;
525 u32 piebar2;
526 u32 piwar2;
527 u8 res2[4];
528 u32 pitar1;
529 u8 res3[4];
530 u32 pibar1;
531 u32 piebar1;
532 u32 piwar1;
533 u8 res4[4];
534 u32 pitar0;
535 u8 res5[4];
536 u32 pibar0;
537 u8 res6[4];
538 u32 piwar0;
539 u8 res7[132];
Dave Liuf5035922006-10-25 14:41:21 -0500540} pcictrl83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500541
542/*
Jon Loeligerebc72242005-08-01 13:20:47 -0500543 * USB
Eran Liberty9095d4a2005-07-28 10:08:46 -0500544 */
Dave Liuf5035922006-10-25 14:41:21 -0500545typedef struct usb83xx {
Scott Wood9f15d502007-04-16 14:31:55 -0500546 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500547} usb83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500548
549/*
550 * TSEC
551 */
Dave Liuf5035922006-10-25 14:41:21 -0500552typedef struct tsec83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500553 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500554} tsec83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500555
556/*
557 * Security
558 */
Dave Liuf5035922006-10-25 14:41:21 -0500559typedef struct security83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500560 u8 fixme[0x10000];
Dave Liuf5035922006-10-25 14:41:21 -0500561} security83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500562
Dave Liu5245ff52007-09-18 12:36:11 +0800563/*
564 * PCI Express
565 */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +0300566struct pex_inbound_window {
567 u32 ar;
568 u32 tar;
569 u32 barl;
570 u32 barh;
571};
572
573struct pex_outbound_window {
574 u32 ar;
575 u32 bar;
576 u32 tarl;
577 u32 tarh;
578};
579
580struct pex_csb_bridge {
581 u32 pex_csb_ver;
582 u32 pex_csb_cab;
583 u32 pex_csb_ctrl;
584 u8 res0[8];
585 u32 pex_dms_dstmr;
586 u8 res1[4];
587 u32 pex_cbs_stat;
588 u8 res2[0x20];
589 u32 pex_csb_obctrl;
590 u32 pex_csb_obstat;
591 u8 res3[0x98];
592 u32 pex_csb_ibctrl;
593 u32 pex_csb_ibstat;
594 u8 res4[0xb8];
595 u32 pex_wdma_ctrl;
596 u32 pex_wdma_addr;
597 u32 pex_wdma_stat;
598 u8 res5[0x94];
599 u32 pex_rdma_ctrl;
600 u32 pex_rdma_addr;
601 u32 pex_rdma_stat;
602 u8 res6[0xd4];
603 u32 pex_ombcr;
604 u32 pex_ombdr;
605 u8 res7[0x38];
606 u32 pex_imbcr;
607 u32 pex_imbdr;
608 u8 res8[0x38];
609 u32 pex_int_enb;
610 u32 pex_int_stat;
611 u32 pex_int_apio_vec1;
612 u32 pex_int_apio_vec2;
613 u8 res9[0x10];
614 u32 pex_int_ppio_vec1;
615 u32 pex_int_ppio_vec2;
616 u32 pex_int_wdma_vec1;
617 u32 pex_int_wdma_vec2;
618 u32 pex_int_rdma_vec1;
619 u32 pex_int_rdma_vec2;
620 u32 pex_int_misc_vec;
621 u8 res10[4];
622 u32 pex_int_axi_pio_enb;
623 u32 pex_int_axi_wdma_enb;
624 u32 pex_int_axi_rdma_enb;
625 u32 pex_int_axi_misc_enb;
626 u32 pex_int_axi_pio_stat;
627 u32 pex_int_axi_wdma_stat;
628 u32 pex_int_axi_rdma_stat;
629 u32 pex_int_axi_misc_stat;
630 u8 res11[0xa0];
631 struct pex_outbound_window pex_outbound_win[4];
632 u8 res12[0x100];
633 u32 pex_epiwtar0;
634 u32 pex_epiwtar1;
635 u32 pex_epiwtar2;
636 u32 pex_epiwtar3;
637 u8 res13[0x70];
638 struct pex_inbound_window pex_inbound_win[4];
639};
640
Dave Liu5245ff52007-09-18 12:36:11 +0800641typedef struct pex83xx {
Anton Vorontsov1a8206c2009-01-08 04:26:12 +0300642 u8 pex_cfg_header[0x404];
643 u32 pex_ltssm_stat;
644 u8 res0[0x30];
645 u32 pex_ack_replay_timeout;
646 u8 res1[4];
647 u32 pex_gclk_ratio;
648 u8 res2[0xc];
649 u32 pex_pm_timer;
650 u32 pex_pme_timeout;
651 u8 res3[4];
652 u32 pex_aspm_req_timer;
653 u8 res4[0x18];
654 u32 pex_ssvid_update;
655 u8 res5[0x34];
656 u32 pex_cfg_ready;
657 u8 res6[0x24];
658 u32 pex_bar_sizel;
659 u8 res7[4];
660 u32 pex_bar_sel;
661 u8 res8[0x20];
662 u32 pex_bar_pf;
663 u8 res9[0x88];
664 u32 pex_pme_to_ack_tor;
665 u8 res10[0xc];
666 u32 pex_ss_intr_mask;
667 u8 res11[0x25c];
668 struct pex_csb_bridge bridge;
669 u8 res12[0x160];
Dave Liu5245ff52007-09-18 12:36:11 +0800670} pex83xx_t;
671
672/*
673 * SATA
674 */
675typedef struct sata83xx {
676 u8 fixme[0x1000];
677} sata83xx_t;
678
679/*
680 * eSDHC
681 */
682typedef struct sdhc83xx {
683 u8 fixme[0x1000];
684} sdhc83xx_t;
685
686/*
687 * SerDes
688 */
689typedef struct serdes83xx {
Ilya Yanoka3e5fd52010-06-28 16:44:33 +0400690 u32 srdscr0;
691 u32 srdscr1;
692 u32 srdscr2;
693 u32 srdscr3;
694 u32 srdscr4;
695 u8 res0[0xc];
696 u32 srdsrstctl;
697 u8 res1[0xdc];
Dave Liu5245ff52007-09-18 12:36:11 +0800698} serdes83xx_t;
699
700/*
701 * On Chip ROM
702 */
703typedef struct rom83xx {
Gerlando Falautofe201cb2012-10-10 22:13:08 +0000704#if defined(CONFIG_MPC8309)
705 u8 mem[0x8000];
706#else
Dave Liu5245ff52007-09-18 12:36:11 +0800707 u8 mem[0x10000];
Gerlando Falautofe201cb2012-10-10 22:13:08 +0000708#endif
Dave Liu5245ff52007-09-18 12:36:11 +0800709} rom83xx_t;
710
Dave Liue0cfec82007-09-18 12:36:58 +0800711/*
712 * TDM
713 */
714typedef struct tdm83xx {
715 u8 fixme[0x200];
716} tdm83xx_t;
717
718/*
719 * TDM DMAC
720 */
721typedef struct tdmdmac83xx {
722 u8 fixme[0x2000];
723} tdmdmac83xx_t;
724
Peter Tyser72f2d392009-05-22 17:23:25 -0500725#if defined(CONFIG_MPC834x)
Dave Liu0b6bc772006-12-07 21:11:58 +0800726typedef struct immap {
727 sysconf83xx_t sysconf; /* System configuration */
728 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
729 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
730 rtclk83xx_t pit; /* Periodic Interval Timer */
731 gtm83xx_t gtm[2]; /* Global Timers Module */
732 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
733 arbiter83xx_t arbiter; /* System Arbiter Registers */
734 reset83xx_t reset; /* Reset Module */
735 clk83xx_t clk; /* System Clock Module */
736 pmc83xx_t pmc; /* Power Management Control Module */
737 gpio83xx_t gpio[2]; /* General purpose I/O module */
738 u8 res0[0x200];
739 u8 dll_ddr[0x100];
740 u8 dll_lbc[0x100];
741 u8 res1[0xE00];
York Sune12ce982011-08-26 11:32:44 -0700742#if defined(CONFIG_FSL_DDR2) || defined(CONFIG_FSL_DDR3)
743 ccsr_ddr_t ddr; /* DDR Memory Controller Memory */
744#else
745 ddr83xx_t ddr; /* DDR Memory Controller Memory */
746#endif
Dave Liu0b6bc772006-12-07 21:11:58 +0800747 fsl_i2c_t i2c[2]; /* I2C Controllers */
748 u8 res2[0x1300];
749 duart83xx_t duart[2]; /* DUART */
750 u8 res3[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500751 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu0b6bc772006-12-07 21:11:58 +0800752 u8 res4[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500753 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liu0b6bc772006-12-07 21:11:58 +0800754 dma83xx_t dma; /* DMA */
755 pciconf83xx_t pci_conf[2]; /* PCI Software Configuration Registers */
756 ios83xx_t ios; /* Sequencer */
757 pcictrl83xx_t pci_ctrl[2]; /* PCI Controller Control and Status Registers */
758 u8 res5[0x19900];
Scott Wood9f15d502007-04-16 14:31:55 -0500759 usb83xx_t usb[2];
760 tsec83xx_t tsec[2];
761 u8 res6[0xA000];
762 security83xx_t security;
763 u8 res7[0xC0000];
764} immap_t;
765
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300766#ifdef CONFIG_HAS_FSL_MPH_USB
767#define CONFIG_SYS_MPC83xx_USB_OFFSET 0x22000 /* use the MPH controller */
768#else
769#define CONFIG_SYS_MPC83xx_USB_OFFSET 0x23000 /* use the DR controller */
770#endif
771
Dave Liue0cfec82007-09-18 12:36:58 +0800772#elif defined(CONFIG_MPC8313)
Scott Wood9f15d502007-04-16 14:31:55 -0500773typedef struct immap {
774 sysconf83xx_t sysconf; /* System configuration */
775 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
776 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
777 rtclk83xx_t pit; /* Periodic Interval Timer */
778 gtm83xx_t gtm[2]; /* Global Timers Module */
779 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
780 arbiter83xx_t arbiter; /* System Arbiter Registers */
781 reset83xx_t reset; /* Reset Module */
782 clk83xx_t clk; /* System Clock Module */
783 pmc83xx_t pmc; /* Power Management Control Module */
784 gpio83xx_t gpio[1]; /* General purpose I/O module */
785 u8 res0[0x1300];
786 ddr83xx_t ddr; /* DDR Memory Controller Memory */
787 fsl_i2c_t i2c[2]; /* I2C Controllers */
788 u8 res1[0x1300];
789 duart83xx_t duart[2]; /* DUART */
790 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500791 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Scott Wood9f15d502007-04-16 14:31:55 -0500792 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500793 spi8xxx_t spi; /* Serial Peripheral Interface */
Scott Wood9f15d502007-04-16 14:31:55 -0500794 dma83xx_t dma; /* DMA */
795 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
796 u8 res4[0x80];
797 ios83xx_t ios; /* Sequencer */
798 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
799 u8 res5[0x1aa00];
800 usb83xx_t usb[1];
Dave Liu0b6bc772006-12-07 21:11:58 +0800801 tsec83xx_t tsec[2];
802 u8 res6[0xA000];
803 security83xx_t security;
804 u8 res7[0xC0000];
805} immap_t;
Dave Liufba13692006-10-31 19:25:38 -0600806
Ilya Yanoka3e5fd52010-06-28 16:44:33 +0400807#elif defined(CONFIG_MPC8308) || defined(CONFIG_MPC8315)
Dave Liue0cfec82007-09-18 12:36:58 +0800808typedef struct immap {
809 sysconf83xx_t sysconf; /* System configuration */
810 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
811 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
812 rtclk83xx_t pit; /* Periodic Interval Timer */
813 gtm83xx_t gtm[2]; /* Global Timers Module */
814 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
815 arbiter83xx_t arbiter; /* System Arbiter Registers */
816 reset83xx_t reset; /* Reset Module */
817 clk83xx_t clk; /* System Clock Module */
818 pmc83xx_t pmc; /* Power Management Control Module */
819 gpio83xx_t gpio[1]; /* General purpose I/O module */
820 u8 res0[0x1300];
821 ddr83xx_t ddr; /* DDR Memory Controller Memory */
822 fsl_i2c_t i2c[2]; /* I2C Controllers */
823 u8 res1[0x1300];
824 duart83xx_t duart[2]; /* DUART */
825 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500826 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liue0cfec82007-09-18 12:36:58 +0800827 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500828 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liue0cfec82007-09-18 12:36:58 +0800829 dma83xx_t dma; /* DMA */
830 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
831 u8 res4[0x80];
832 ios83xx_t ios; /* Sequencer */
833 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
834 u8 res5[0xa00];
835 pex83xx_t pciexp[2]; /* PCI Express Controller */
836 u8 res6[0xb000];
837 tdm83xx_t tdm; /* TDM Controller */
838 u8 res7[0x1e00];
839 sata83xx_t sata[2]; /* SATA Controller */
840 u8 res8[0x9000];
841 usb83xx_t usb[1]; /* USB DR Controller */
842 tsec83xx_t tsec[2];
843 u8 res9[0x6000];
844 tdmdmac83xx_t tdmdmac; /* TDM DMAC */
845 u8 res10[0x2000];
846 security83xx_t security;
847 u8 res11[0xA3000];
848 serdes83xx_t serdes[1]; /* SerDes Registers */
849 u8 res12[0x1CF00];
850} immap_t;
851
Peter Tyser72f2d392009-05-22 17:23:25 -0500852#elif defined(CONFIG_MPC837x)
Dave Liu5245ff52007-09-18 12:36:11 +0800853typedef struct immap {
854 sysconf83xx_t sysconf; /* System configuration */
855 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
856 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
857 rtclk83xx_t pit; /* Periodic Interval Timer */
858 gtm83xx_t gtm[2]; /* Global Timers Module */
859 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
860 arbiter83xx_t arbiter; /* System Arbiter Registers */
861 reset83xx_t reset; /* Reset Module */
862 clk83xx_t clk; /* System Clock Module */
863 pmc83xx_t pmc; /* Power Management Control Module */
864 gpio83xx_t gpio[2]; /* General purpose I/O module */
865 u8 res0[0x1200];
866 ddr83xx_t ddr; /* DDR Memory Controller Memory */
867 fsl_i2c_t i2c[2]; /* I2C Controllers */
868 u8 res1[0x1300];
869 duart83xx_t duart[2]; /* DUART */
870 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500871 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu5245ff52007-09-18 12:36:11 +0800872 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500873 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liu5245ff52007-09-18 12:36:11 +0800874 dma83xx_t dma; /* DMA */
875 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
876 u8 res4[0x80];
877 ios83xx_t ios; /* Sequencer */
878 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
879 u8 res5[0xa00];
880 pex83xx_t pciexp[2]; /* PCI Express Controller */
881 u8 res6[0xd000];
882 sata83xx_t sata[4]; /* SATA Controller */
883 u8 res7[0x7000];
884 usb83xx_t usb[1]; /* USB DR Controller */
885 tsec83xx_t tsec[2];
886 u8 res8[0x8000];
887 sdhc83xx_t sdhc; /* SDHC Controller */
888 u8 res9[0x1000];
889 security83xx_t security;
890 u8 res10[0xA3000];
891 serdes83xx_t serdes[2]; /* SerDes Registers */
892 u8 res11[0xCE00];
893 rom83xx_t rom; /* On Chip ROM */
894} immap_t;
895
Dave Liu0b6bc772006-12-07 21:11:58 +0800896#elif defined(CONFIG_MPC8360)
Eran Liberty9095d4a2005-07-28 10:08:46 -0500897typedef struct immap {
Dave Liu0b6bc772006-12-07 21:11:58 +0800898 sysconf83xx_t sysconf; /* System configuration */
899 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
900 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
901 rtclk83xx_t pit; /* Periodic Interval Timer */
902 u8 res0[0x200];
903 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
904 arbiter83xx_t arbiter; /* System Arbiter Registers */
905 reset83xx_t reset; /* Reset Module */
906 clk83xx_t clk; /* System Clock Module */
907 pmc83xx_t pmc; /* Power Management Control Module */
908 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
909 u8 res1[0x300];
910 u8 dll_ddr[0x100];
911 u8 dll_lbc[0x100];
912 u8 res2[0x200];
913 qepio83xx_t qepio; /* QE Parallel I/O ports */
914 qesba83xx_t qesba; /* QE Secondary Bus Access Windows */
915 u8 res3[0x400];
916 ddr83xx_t ddr; /* DDR Memory Controller Memory */
917 fsl_i2c_t i2c[2]; /* I2C Controllers */
918 u8 res4[0x1300];
919 duart83xx_t duart[2]; /* DUART */
920 u8 res5[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500921 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu0b6bc772006-12-07 21:11:58 +0800922 u8 res6[0x2000];
923 dma83xx_t dma; /* DMA */
924 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
925 u8 res7[128];
926 ios83xx_t ios; /* Sequencer (IOS) */
927 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
928 u8 res8[0x4A00];
929 ddr83xx_t ddr_secondary; /* Secondary DDR Memory Controller Memory Map */
930 u8 res9[0x22000];
931 security83xx_t security;
932 u8 res10[0xC0000];
933 u8 qe[0x100000]; /* QE block */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500934} immap_t;
Dave Liue740c462006-12-07 21:13:15 +0800935
Peter Tyser72f2d392009-05-22 17:23:25 -0500936#elif defined(CONFIG_MPC832x)
Dave Liue740c462006-12-07 21:13:15 +0800937typedef struct immap {
938 sysconf83xx_t sysconf; /* System configuration */
939 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
940 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
941 rtclk83xx_t pit; /* Periodic Interval Timer */
942 gtm83xx_t gtm[2]; /* Global Timers Module */
943 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
944 arbiter83xx_t arbiter; /* System Arbiter Registers */
945 reset83xx_t reset; /* Reset Module */
946 clk83xx_t clk; /* System Clock Module */
947 pmc83xx_t pmc; /* Power Management Control Module */
948 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
949 u8 res0[0x300];
950 u8 dll_ddr[0x100];
951 u8 dll_lbc[0x100];
952 u8 res1[0x200];
953 qepio83xx_t qepio; /* QE Parallel I/O ports */
954 u8 res2[0x800];
955 ddr83xx_t ddr; /* DDR Memory Controller Memory */
956 fsl_i2c_t i2c[2]; /* I2C Controllers */
957 u8 res3[0x1300];
958 duart83xx_t duart[2]; /* DUART */
959 u8 res4[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500960 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liue740c462006-12-07 21:13:15 +0800961 u8 res5[0x2000];
962 dma83xx_t dma; /* DMA */
963 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
964 u8 res6[128];
965 ios83xx_t ios; /* Sequencer (IOS) */
966 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
967 u8 res7[0x27A00];
968 security83xx_t security;
969 u8 res8[0xC0000];
970 u8 qe[0x100000]; /* QE block */
Gerlando Falautofe201cb2012-10-10 22:13:08 +0000971} immap_t;
972#elif defined(CONFIG_MPC8309)
973typedef struct immap {
974 sysconf83xx_t sysconf; /* System configuration */
975 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
976 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
977 rtclk83xx_t pit; /* Periodic Interval Timer */
978 gtm83xx_t gtm[2]; /* Global Timers Module */
979 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
980 arbiter83xx_t arbiter; /* System Arbiter Registers */
981 reset83xx_t reset; /* Reset Module */
982 clk83xx_t clk; /* System Clock Module */
983 pmc83xx_t pmc; /* Power Management Control Module */
984 gpio83xx_t gpio[2]; /* General purpose I/O module */
985 u8 res0[0x500]; /* res0 1.25 KBytes added for 8309 */
986 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
987 qepio83xx_t qepio; /* QE Parallel I/O ports */
988 u8 res1[0x800];
989 ddr83xx_t ddr; /* DDR Memory Controller Memory */
990 fsl_i2c_t i2c[2]; /* I2C Controllers */
991 u8 res2[0x1300];
992 duart83xx_t duart[2]; /* DUART */
993 u8 res3[0x200];
994 duart83xx_t duart1[2]; /* DUART */
995 u8 res4[0x500];
996 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
997 u8 res5[0x1000];
998 u8 spi[0x100];
999 u8 res6[0xf00];
1000 dma83xx_t dma; /* DMA */
1001 pciconf83xx_t pci_conf[1]; /* PCI Configuration Registers */
1002 u8 res7[0x80];
1003 ios83xx_t ios; /* Sequencer (IOS) */
1004 pcictrl83xx_t pci_ctrl[1]; /* PCI Control & Status Registers */
1005 u8 res8[0x13A00];
1006 u8 can1[0x1000]; /* Flexcan 1 */
1007 u8 can2[0x1000]; /* Flexcan 2 */
1008 u8 res9[0x5000];
1009 usb83xx_t usb;
1010 u8 res10[0x5000];
1011 u8 can3[0x1000]; /* Flexcan 3 */
1012 u8 can4[0x1000]; /* Flexcan 4 */
1013 u8 res11[0x1000];
1014 u8 dma1[0x2000]; /* DMA */
1015 sdhc83xx_t sdhc; /* SDHC Controller */
1016 u8 res12[0xC1000];
1017 rom83xx_t rom; /* On Chip ROM */
1018 u8 res13[0x8000];
1019 u8 qe[0x100000]; /* QE block */
1020 u8 res14[0xE00000];/* Added for 8309 */
Dave Liue740c462006-12-07 21:13:15 +08001021} immap_t;
Dave Liu0b6bc772006-12-07 21:11:58 +08001022#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -05001023
Andy Fleming992562c2012-10-23 19:03:46 -05001024#define CONFIG_SYS_MPC8xxx_DDR_OFFSET (0x2000)
1025#define CONFIG_SYS_MPC8xxx_DDR_ADDR \
1026 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR_OFFSET)
Peter Tyser6f33a352009-06-30 17:15:51 -05001027#define CONFIG_SYS_MPC83xx_DMA_OFFSET (0x8000)
York Sune12ce982011-08-26 11:32:44 -07001028#define CONFIG_SYS_MPC83xx_DMA_ADDR \
1029 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_DMA_OFFSET)
Andy Fleming1463b4b2008-10-30 16:50:14 -05001030#define CONFIG_SYS_MPC83xx_ESDHC_OFFSET (0x2e000)
York Sune12ce982011-08-26 11:32:44 -07001031#define CONFIG_SYS_MPC83xx_ESDHC_ADDR \
1032 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_ESDHC_OFFSET)
Valeriy Glushkov24e671d2009-06-30 15:48:40 +03001033
1034#ifndef CONFIG_SYS_MPC83xx_USB_OFFSET
1035#define CONFIG_SYS_MPC83xx_USB_OFFSET 0x23000
1036#endif
Vivek Mahajan288f7fb2009-05-25 17:23:16 +05301037#define CONFIG_SYS_MPC83xx_USB_ADDR \
1038 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB_OFFSET)
Becky Bruce0d4cee12010-06-17 11:37:20 -05001039#define CONFIG_SYS_LBC_ADDR (&((immap_t *)CONFIG_SYS_IMMR)->im_lbc)
Sandeep Gopalpetb5541ef2009-10-31 00:35:04 +05301040
1041#define CONFIG_SYS_TSEC1_OFFSET 0x24000
Kumar Gala2e972932009-10-31 11:23:41 -05001042#define CONFIG_SYS_MDIO1_OFFSET 0x24000
Sandeep Gopalpetb5541ef2009-10-31 00:35:04 +05301043
1044#define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
1045#define MDIO_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_MDIO1_OFFSET)
Dave Liufba13692006-10-31 19:25:38 -06001046#endif /* __IMMAP_83xx__ */