blob: bf7a4b9250c20fbb2640b4c76802cd8c56017ea3 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Eran Liberty9095d4a2005-07-28 10:08:46 -05002/*
York Sune12ce982011-08-26 11:32:44 -07003 * Copyright 2004-2011 Freescale Semiconductor, Inc.
Jon Loeligerebc72242005-08-01 13:20:47 -05004 *
Dave Liuf5035922006-10-25 14:41:21 -05005 * MPC83xx Internal Memory Map
6 *
Dave Liu0b6bc772006-12-07 21:11:58 +08007 * Contributors:
8 * Dave Liu <daveliu@freescale.com>
9 * Tanya Jiang <tanya.jiang@freescale.com>
10 * Mandy Lavi <mandy.lavi@freescale.com>
11 * Eran Liberty <liberty@freescale.com>
Eran Liberty9095d4a2005-07-28 10:08:46 -050012 */
Dave Liuf5035922006-10-25 14:41:21 -050013#ifndef __IMMAP_83xx__
14#define __IMMAP_83xx__
Eran Liberty9095d4a2005-07-28 10:08:46 -050015
York Suna21803d2013-11-18 10:29:32 -080016#include <fsl_immap.h>
Eran Liberty9095d4a2005-07-28 10:08:46 -050017#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 */
Mario Sixb2e701c2019-01-21 09:17:24 +010062#if defined(CONFIG_ARCH_MPC830X)
Gerlando Falauto74735552012-10-10 22:13:07 +000063 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
Mario Sixb2e701c2019-01-21 09:17:24 +010067#if defined(CONFIG_ARCH_MPC8309)
Gerlando Falautofe201cb2012-10-10 22:13:08 +000068 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/*
York Suna21803d2013-11-18 10:29:32 -0800280 * DDR Memory Controller Memory Map for DDR1
281 * The structure of DDR2, or DDR3 is defined in fsl_immap.h
Eran Liberty9095d4a2005-07-28 10:08:46 -0500282 */
York Suna21803d2013-11-18 10:29:32 -0800283#if !defined(CONFIG_SYS_FSL_DDR2) && !defined(CONFIG_SYS_FSL_DDR3)
Dave Liufba13692006-10-31 19:25:38 -0600284typedef struct ddr_cs_bnds {
Jon Loeligerebc72242005-08-01 13:20:47 -0500285 u32 csbnds;
Dave Liufba13692006-10-31 19:25:38 -0600286 u8 res0[4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500287} ddr_cs_bnds_t;
288
Dave Liuf5035922006-10-25 14:41:21 -0500289typedef struct ddr83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800290 ddr_cs_bnds_t csbnds[4];/* Chip Select x Memory Bounds */
Jon Loeligerebc72242005-08-01 13:20:47 -0500291 u8 res0[0x60];
Dave Liu0b6bc772006-12-07 21:11:58 +0800292 u32 cs_config[4]; /* Chip Select x Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800293 u8 res1[0x70];
294 u32 timing_cfg_3; /* SDRAM Timing Configuration 3 */
295 u32 timing_cfg_0; /* SDRAM Timing Configuration 0 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800296 u32 timing_cfg_1; /* SDRAM Timing Configuration 1 */
297 u32 timing_cfg_2; /* SDRAM Timing Configuration 2 */
298 u32 sdram_cfg; /* SDRAM Control Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800299 u32 sdram_cfg2; /* SDRAM Control Configuration 2 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800300 u32 sdram_mode; /* SDRAM Mode Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800301 u32 sdram_mode2; /* SDRAM Mode Configuration 2 */
302 u32 sdram_md_cntl; /* SDRAM Mode Control */
Dave Liu0b6bc772006-12-07 21:11:58 +0800303 u32 sdram_interval; /* SDRAM Interval Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800304 u32 ddr_data_init; /* SDRAM Data Initialization */
305 u8 res2[4];
306 u32 sdram_clk_cntl; /* SDRAM Clock Control */
307 u8 res3[0x14];
308 u32 ddr_init_addr; /* DDR training initialization address */
309 u32 ddr_init_ext_addr; /* DDR training initialization extended address */
310 u8 res4[0xAA8];
311 u32 ddr_ip_rev1; /* DDR IP block revision 1 */
312 u32 ddr_ip_rev2; /* DDR IP block revision 2 */
313 u8 res5[0x200];
Dave Liu0b6bc772006-12-07 21:11:58 +0800314 u32 data_err_inject_hi; /* Memory Data Path Error Injection Mask High */
315 u32 data_err_inject_lo; /* Memory Data Path Error Injection Mask Low */
316 u32 ecc_err_inject; /* Memory Data Path Error Injection Mask ECC */
Dave Liue740c462006-12-07 21:13:15 +0800317 u8 res6[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800318 u32 capture_data_hi; /* Memory Data Path Read Capture High */
319 u32 capture_data_lo; /* Memory Data Path Read Capture Low */
320 u32 capture_ecc; /* Memory Data Path Read Capture ECC */
Dave Liue740c462006-12-07 21:13:15 +0800321 u8 res7[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800322 u32 err_detect; /* Memory Error Detect */
323 u32 err_disable; /* Memory Error Disable */
324 u32 err_int_en; /* Memory Error Interrupt Enable */
325 u32 capture_attributes; /* Memory Error Attributes Capture */
326 u32 capture_address; /* Memory Error Address Capture */
327 u32 capture_ext_address;/* Memory Error Extended Address Capture */
328 u32 err_sbe; /* Memory Single-Bit ECC Error Management */
Dave Liue740c462006-12-07 21:13:15 +0800329 u8 res8[0xA4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500330 u32 debug_reg;
Dave Liue740c462006-12-07 21:13:15 +0800331 u8 res9[0xFC];
Dave Liuf5035922006-10-25 14:41:21 -0500332} ddr83xx_t;
York Sune12ce982011-08-26 11:32:44 -0700333#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -0500334
335/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500336 * DUART
337 */
Dave Liufba13692006-10-31 19:25:38 -0600338typedef struct duart83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800339 u8 urbr_ulcr_udlb; /* combined register for URBR, UTHR and UDLB */
340 u8 uier_udmb; /* combined register for UIER and UDMB */
341 u8 uiir_ufcr_uafr; /* combined register for UIIR, UFCR and UAFR */
342 u8 ulcr; /* line control register */
343 u8 umcr; /* MODEM control register */
344 u8 ulsr; /* line status register */
345 u8 umsr; /* MODEM status register */
346 u8 uscr; /* scratch register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500347 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800348 u8 udsr; /* DMA status register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500349 u8 res1[3];
350 u8 res2[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500351} duart83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500352
353/*
Marian Balakowicz7ec9ebc2006-03-14 16:14:48 +0100354 * DMA/Messaging Unit
355 */
Dave Liuf5035922006-10-25 14:41:21 -0500356typedef struct dma83xx {
Dave Liufba13692006-10-31 19:25:38 -0600357 u32 res0[0xC]; /* 0x0-0x29 reseverd */
358 u32 omisr; /* 0x30 Outbound message interrupt status register */
359 u32 omimr; /* 0x34 Outbound message interrupt mask register */
360 u32 res1[0x6]; /* 0x38-0x49 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600361 u32 imr0; /* 0x50 Inbound message register 0 */
362 u32 imr1; /* 0x54 Inbound message register 1 */
363 u32 omr0; /* 0x58 Outbound message register 0 */
364 u32 omr1; /* 0x5C Outbound message register 1 */
Dave Liufba13692006-10-31 19:25:38 -0600365 u32 odr; /* 0x60 Outbound doorbell register */
366 u32 res2; /* 0x64-0x67 reserved */
367 u32 idr; /* 0x68 Inbound doorbell register */
368 u32 res3[0x5]; /* 0x6C-0x79 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600369 u32 imisr; /* 0x80 Inbound message interrupt status register */
370 u32 imimr; /* 0x84 Inbound message interrupt mask register */
371 u32 res4[0x1E]; /* 0x88-0x99 reserved */
Peter Tyser6f33a352009-06-30 17:15:51 -0500372 struct fsl_dma dma[4];
Dave Liuf5035922006-10-25 14:41:21 -0500373} dma83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500374
375/*
376 * PCI Software Configuration Registers
377 */
Dave Liuf5035922006-10-25 14:41:21 -0500378typedef struct pciconf83xx {
Dave Liufba13692006-10-31 19:25:38 -0600379 u32 config_address;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500380 u32 config_data;
381 u32 int_ack;
Dave Liufba13692006-10-31 19:25:38 -0600382 u8 res[116];
Dave Liuf5035922006-10-25 14:41:21 -0500383} pciconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500384
385/*
386 * PCI Outbound Translation Register
387 */
388typedef struct pci_outbound_window {
Dave Liufba13692006-10-31 19:25:38 -0600389 u32 potar;
390 u8 res0[4];
391 u32 pobar;
392 u8 res1[4];
393 u32 pocmr;
394 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500395} pot83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600396
Eran Liberty9095d4a2005-07-28 10:08:46 -0500397/*
398 * Sequencer
Jon Loeligerebc72242005-08-01 13:20:47 -0500399 */
Dave Liuf5035922006-10-25 14:41:21 -0500400typedef struct ios83xx {
Dave Liufba13692006-10-31 19:25:38 -0600401 pot83xx_t pot[6];
Dave Liufba13692006-10-31 19:25:38 -0600402 u8 res0[0x60];
403 u32 pmcr;
404 u8 res1[4];
405 u32 dtcr;
406 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500407} ios83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500408
409/*
410 * PCI Controller Control and Status Registers
411 */
Dave Liuf5035922006-10-25 14:41:21 -0500412typedef struct pcictrl83xx {
Dave Liufba13692006-10-31 19:25:38 -0600413 u32 esr;
Dave Liufba13692006-10-31 19:25:38 -0600414 u32 ecdr;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500415 u32 eer;
Dave Liufba13692006-10-31 19:25:38 -0600416 u32 eatcr;
Dave Liufba13692006-10-31 19:25:38 -0600417 u32 eacr;
418 u32 eeacr;
Dave Liufba13692006-10-31 19:25:38 -0600419 u32 edlcr;
420 u32 edhcr;
Dave Liufba13692006-10-31 19:25:38 -0600421 u32 gcr;
422 u32 ecr;
423 u32 gsr;
424 u8 res0[12];
425 u32 pitar2;
426 u8 res1[4];
427 u32 pibar2;
428 u32 piebar2;
429 u32 piwar2;
430 u8 res2[4];
431 u32 pitar1;
432 u8 res3[4];
433 u32 pibar1;
434 u32 piebar1;
435 u32 piwar1;
436 u8 res4[4];
437 u32 pitar0;
438 u8 res5[4];
439 u32 pibar0;
440 u8 res6[4];
441 u32 piwar0;
442 u8 res7[132];
Dave Liuf5035922006-10-25 14:41:21 -0500443} pcictrl83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500444
445/*
Jon Loeligerebc72242005-08-01 13:20:47 -0500446 * USB
Eran Liberty9095d4a2005-07-28 10:08:46 -0500447 */
Dave Liuf5035922006-10-25 14:41:21 -0500448typedef struct usb83xx {
Scott Wood9f15d502007-04-16 14:31:55 -0500449 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500450} usb83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500451
452/*
453 * TSEC
454 */
Dave Liuf5035922006-10-25 14:41:21 -0500455typedef struct tsec83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500456 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500457} tsec83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500458
459/*
460 * Security
461 */
Dave Liuf5035922006-10-25 14:41:21 -0500462typedef struct security83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500463 u8 fixme[0x10000];
Dave Liuf5035922006-10-25 14:41:21 -0500464} security83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500465
Dave Liu5245ff52007-09-18 12:36:11 +0800466/*
467 * PCI Express
468 */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +0300469struct pex_inbound_window {
470 u32 ar;
471 u32 tar;
472 u32 barl;
473 u32 barh;
474};
475
476struct pex_outbound_window {
477 u32 ar;
478 u32 bar;
479 u32 tarl;
480 u32 tarh;
481};
482
483struct pex_csb_bridge {
484 u32 pex_csb_ver;
485 u32 pex_csb_cab;
486 u32 pex_csb_ctrl;
487 u8 res0[8];
488 u32 pex_dms_dstmr;
489 u8 res1[4];
490 u32 pex_cbs_stat;
491 u8 res2[0x20];
492 u32 pex_csb_obctrl;
493 u32 pex_csb_obstat;
494 u8 res3[0x98];
495 u32 pex_csb_ibctrl;
496 u32 pex_csb_ibstat;
497 u8 res4[0xb8];
498 u32 pex_wdma_ctrl;
499 u32 pex_wdma_addr;
500 u32 pex_wdma_stat;
501 u8 res5[0x94];
502 u32 pex_rdma_ctrl;
503 u32 pex_rdma_addr;
504 u32 pex_rdma_stat;
505 u8 res6[0xd4];
506 u32 pex_ombcr;
507 u32 pex_ombdr;
508 u8 res7[0x38];
509 u32 pex_imbcr;
510 u32 pex_imbdr;
511 u8 res8[0x38];
512 u32 pex_int_enb;
513 u32 pex_int_stat;
514 u32 pex_int_apio_vec1;
515 u32 pex_int_apio_vec2;
516 u8 res9[0x10];
517 u32 pex_int_ppio_vec1;
518 u32 pex_int_ppio_vec2;
519 u32 pex_int_wdma_vec1;
520 u32 pex_int_wdma_vec2;
521 u32 pex_int_rdma_vec1;
522 u32 pex_int_rdma_vec2;
523 u32 pex_int_misc_vec;
524 u8 res10[4];
525 u32 pex_int_axi_pio_enb;
526 u32 pex_int_axi_wdma_enb;
527 u32 pex_int_axi_rdma_enb;
528 u32 pex_int_axi_misc_enb;
529 u32 pex_int_axi_pio_stat;
530 u32 pex_int_axi_wdma_stat;
531 u32 pex_int_axi_rdma_stat;
532 u32 pex_int_axi_misc_stat;
533 u8 res11[0xa0];
534 struct pex_outbound_window pex_outbound_win[4];
535 u8 res12[0x100];
536 u32 pex_epiwtar0;
537 u32 pex_epiwtar1;
538 u32 pex_epiwtar2;
539 u32 pex_epiwtar3;
540 u8 res13[0x70];
541 struct pex_inbound_window pex_inbound_win[4];
542};
543
Dave Liu5245ff52007-09-18 12:36:11 +0800544typedef struct pex83xx {
Anton Vorontsov1a8206c2009-01-08 04:26:12 +0300545 u8 pex_cfg_header[0x404];
546 u32 pex_ltssm_stat;
547 u8 res0[0x30];
548 u32 pex_ack_replay_timeout;
549 u8 res1[4];
550 u32 pex_gclk_ratio;
551 u8 res2[0xc];
552 u32 pex_pm_timer;
553 u32 pex_pme_timeout;
554 u8 res3[4];
555 u32 pex_aspm_req_timer;
556 u8 res4[0x18];
557 u32 pex_ssvid_update;
558 u8 res5[0x34];
559 u32 pex_cfg_ready;
560 u8 res6[0x24];
561 u32 pex_bar_sizel;
562 u8 res7[4];
563 u32 pex_bar_sel;
564 u8 res8[0x20];
565 u32 pex_bar_pf;
566 u8 res9[0x88];
567 u32 pex_pme_to_ack_tor;
568 u8 res10[0xc];
569 u32 pex_ss_intr_mask;
570 u8 res11[0x25c];
571 struct pex_csb_bridge bridge;
572 u8 res12[0x160];
Dave Liu5245ff52007-09-18 12:36:11 +0800573} pex83xx_t;
574
575/*
576 * SATA
577 */
578typedef struct sata83xx {
579 u8 fixme[0x1000];
580} sata83xx_t;
581
582/*
583 * eSDHC
584 */
585typedef struct sdhc83xx {
586 u8 fixme[0x1000];
587} sdhc83xx_t;
588
589/*
590 * SerDes
591 */
592typedef struct serdes83xx {
Ilya Yanoka3e5fd52010-06-28 16:44:33 +0400593 u32 srdscr0;
594 u32 srdscr1;
595 u32 srdscr2;
596 u32 srdscr3;
597 u32 srdscr4;
598 u8 res0[0xc];
599 u32 srdsrstctl;
600 u8 res1[0xdc];
Dave Liu5245ff52007-09-18 12:36:11 +0800601} serdes83xx_t;
602
603/*
604 * On Chip ROM
605 */
606typedef struct rom83xx {
Mario Sixb2e701c2019-01-21 09:17:24 +0100607#if defined(CONFIG_ARCH_MPC8309)
Gerlando Falautofe201cb2012-10-10 22:13:08 +0000608 u8 mem[0x8000];
609#else
Dave Liu5245ff52007-09-18 12:36:11 +0800610 u8 mem[0x10000];
Gerlando Falautofe201cb2012-10-10 22:13:08 +0000611#endif
Dave Liu5245ff52007-09-18 12:36:11 +0800612} rom83xx_t;
613
Dave Liue0cfec82007-09-18 12:36:58 +0800614/*
615 * TDM
616 */
617typedef struct tdm83xx {
618 u8 fixme[0x200];
619} tdm83xx_t;
620
621/*
622 * TDM DMAC
623 */
624typedef struct tdmdmac83xx {
625 u8 fixme[0x2000];
626} tdmdmac83xx_t;
627
Mario Six0344f5e2019-01-21 09:17:27 +0100628#if defined(CONFIG_ARCH_MPC834X)
Dave Liu0b6bc772006-12-07 21:11:58 +0800629typedef struct immap {
630 sysconf83xx_t sysconf; /* System configuration */
631 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
632 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
633 rtclk83xx_t pit; /* Periodic Interval Timer */
634 gtm83xx_t gtm[2]; /* Global Timers Module */
635 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
636 arbiter83xx_t arbiter; /* System Arbiter Registers */
637 reset83xx_t reset; /* Reset Module */
638 clk83xx_t clk; /* System Clock Module */
639 pmc83xx_t pmc; /* Power Management Control Module */
640 gpio83xx_t gpio[2]; /* General purpose I/O module */
641 u8 res0[0x200];
642 u8 dll_ddr[0x100];
643 u8 dll_lbc[0x100];
644 u8 res1[0xE00];
York Sunf0626592013-09-30 09:22:09 -0700645#if defined(CONFIG_SYS_FSL_DDR2) || defined(CONFIG_SYS_FSL_DDR3)
York Suna21803d2013-11-18 10:29:32 -0800646 struct ccsr_ddr ddr; /* DDR Memory Controller Memory */
York Sune12ce982011-08-26 11:32:44 -0700647#else
648 ddr83xx_t ddr; /* DDR Memory Controller Memory */
649#endif
Dave Liu0b6bc772006-12-07 21:11:58 +0800650 fsl_i2c_t i2c[2]; /* I2C Controllers */
651 u8 res2[0x1300];
652 duart83xx_t duart[2]; /* DUART */
653 u8 res3[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500654 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu0b6bc772006-12-07 21:11:58 +0800655 u8 res4[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500656 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liu0b6bc772006-12-07 21:11:58 +0800657 dma83xx_t dma; /* DMA */
658 pciconf83xx_t pci_conf[2]; /* PCI Software Configuration Registers */
659 ios83xx_t ios; /* Sequencer */
660 pcictrl83xx_t pci_ctrl[2]; /* PCI Controller Control and Status Registers */
661 u8 res5[0x19900];
Scott Wood9f15d502007-04-16 14:31:55 -0500662 usb83xx_t usb[2];
663 tsec83xx_t tsec[2];
664 u8 res6[0xA000];
665 security83xx_t security;
666 u8 res7[0xC0000];
667} immap_t;
668
Mario Six0344f5e2019-01-21 09:17:27 +0100669#ifndef CONFIG_ARCH_MPC834X
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300670#ifdef CONFIG_HAS_FSL_MPH_USB
ramneek mehresh16b08062013-09-12 16:35:49 +0530671#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0x22000 /* use the MPH controller */
672#define CONFIG_SYS_MPC83xx_USB2_OFFSET 0
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300673#else
ramneek mehresh16b08062013-09-12 16:35:49 +0530674#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0
675#define CONFIG_SYS_MPC83xx_USB2_OFFSET 0x23000 /* use the DR controller */
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300676#endif
ramneek mehresh51009b62013-10-19 19:33:04 +0530677#else
678#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0x22000
679#define CONFIG_SYS_MPC83xx_USB2_OFFSET 0x23000
680#endif
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300681
Mario Six9164bdd2019-01-21 09:17:25 +0100682#elif defined(CONFIG_ARCH_MPC8313)
Scott Wood9f15d502007-04-16 14:31:55 -0500683typedef struct immap {
684 sysconf83xx_t sysconf; /* System configuration */
685 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
686 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
687 rtclk83xx_t pit; /* Periodic Interval Timer */
688 gtm83xx_t gtm[2]; /* Global Timers Module */
689 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
690 arbiter83xx_t arbiter; /* System Arbiter Registers */
691 reset83xx_t reset; /* Reset Module */
692 clk83xx_t clk; /* System Clock Module */
693 pmc83xx_t pmc; /* Power Management Control Module */
694 gpio83xx_t gpio[1]; /* General purpose I/O module */
695 u8 res0[0x1300];
696 ddr83xx_t ddr; /* DDR Memory Controller Memory */
697 fsl_i2c_t i2c[2]; /* I2C Controllers */
698 u8 res1[0x1300];
699 duart83xx_t duart[2]; /* DUART */
700 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500701 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Scott Wood9f15d502007-04-16 14:31:55 -0500702 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500703 spi8xxx_t spi; /* Serial Peripheral Interface */
Scott Wood9f15d502007-04-16 14:31:55 -0500704 dma83xx_t dma; /* DMA */
705 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
706 u8 res4[0x80];
707 ios83xx_t ios; /* Sequencer */
708 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
709 u8 res5[0x1aa00];
710 usb83xx_t usb[1];
Dave Liu0b6bc772006-12-07 21:11:58 +0800711 tsec83xx_t tsec[2];
712 u8 res6[0xA000];
713 security83xx_t security;
714 u8 res7[0xC0000];
715} immap_t;
Dave Liufba13692006-10-31 19:25:38 -0600716
Mario Six9164bdd2019-01-21 09:17:25 +0100717#elif defined(CONFIG_ARCH_MPC8308) || defined(CONFIG_ARCH_MPC8315)
Dave Liue0cfec82007-09-18 12:36:58 +0800718typedef struct immap {
719 sysconf83xx_t sysconf; /* System configuration */
720 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
721 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
722 rtclk83xx_t pit; /* Periodic Interval Timer */
723 gtm83xx_t gtm[2]; /* Global Timers Module */
724 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
725 arbiter83xx_t arbiter; /* System Arbiter Registers */
726 reset83xx_t reset; /* Reset Module */
727 clk83xx_t clk; /* System Clock Module */
728 pmc83xx_t pmc; /* Power Management Control Module */
729 gpio83xx_t gpio[1]; /* General purpose I/O module */
730 u8 res0[0x1300];
731 ddr83xx_t ddr; /* DDR Memory Controller Memory */
732 fsl_i2c_t i2c[2]; /* I2C Controllers */
733 u8 res1[0x1300];
734 duart83xx_t duart[2]; /* DUART */
735 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500736 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liue0cfec82007-09-18 12:36:58 +0800737 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500738 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liue0cfec82007-09-18 12:36:58 +0800739 dma83xx_t dma; /* DMA */
740 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
741 u8 res4[0x80];
742 ios83xx_t ios; /* Sequencer */
743 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
744 u8 res5[0xa00];
745 pex83xx_t pciexp[2]; /* PCI Express Controller */
746 u8 res6[0xb000];
747 tdm83xx_t tdm; /* TDM Controller */
748 u8 res7[0x1e00];
749 sata83xx_t sata[2]; /* SATA Controller */
750 u8 res8[0x9000];
751 usb83xx_t usb[1]; /* USB DR Controller */
752 tsec83xx_t tsec[2];
753 u8 res9[0x6000];
754 tdmdmac83xx_t tdmdmac; /* TDM DMAC */
755 u8 res10[0x2000];
756 security83xx_t security;
757 u8 res11[0xA3000];
758 serdes83xx_t serdes[1]; /* SerDes Registers */
759 u8 res12[0x1CF00];
760} immap_t;
761
Peter Tyser72f2d392009-05-22 17:23:25 -0500762#elif defined(CONFIG_MPC837x)
Dave Liu5245ff52007-09-18 12:36:11 +0800763typedef struct immap {
764 sysconf83xx_t sysconf; /* System configuration */
765 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
766 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
767 rtclk83xx_t pit; /* Periodic Interval Timer */
768 gtm83xx_t gtm[2]; /* Global Timers Module */
769 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
770 arbiter83xx_t arbiter; /* System Arbiter Registers */
771 reset83xx_t reset; /* Reset Module */
772 clk83xx_t clk; /* System Clock Module */
773 pmc83xx_t pmc; /* Power Management Control Module */
774 gpio83xx_t gpio[2]; /* General purpose I/O module */
775 u8 res0[0x1200];
776 ddr83xx_t ddr; /* DDR Memory Controller Memory */
777 fsl_i2c_t i2c[2]; /* I2C Controllers */
778 u8 res1[0x1300];
779 duart83xx_t duart[2]; /* DUART */
780 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500781 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu5245ff52007-09-18 12:36:11 +0800782 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500783 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liu5245ff52007-09-18 12:36:11 +0800784 dma83xx_t dma; /* DMA */
785 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
786 u8 res4[0x80];
787 ios83xx_t ios; /* Sequencer */
788 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
789 u8 res5[0xa00];
790 pex83xx_t pciexp[2]; /* PCI Express Controller */
791 u8 res6[0xd000];
792 sata83xx_t sata[4]; /* SATA Controller */
793 u8 res7[0x7000];
794 usb83xx_t usb[1]; /* USB DR Controller */
795 tsec83xx_t tsec[2];
796 u8 res8[0x8000];
797 sdhc83xx_t sdhc; /* SDHC Controller */
798 u8 res9[0x1000];
799 security83xx_t security;
800 u8 res10[0xA3000];
801 serdes83xx_t serdes[2]; /* SerDes Registers */
802 u8 res11[0xCE00];
803 rom83xx_t rom; /* On Chip ROM */
804} immap_t;
805
Dave Liu0b6bc772006-12-07 21:11:58 +0800806#elif defined(CONFIG_MPC8360)
Eran Liberty9095d4a2005-07-28 10:08:46 -0500807typedef struct immap {
Dave Liu0b6bc772006-12-07 21:11:58 +0800808 sysconf83xx_t sysconf; /* System configuration */
809 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
810 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
811 rtclk83xx_t pit; /* Periodic Interval Timer */
812 u8 res0[0x200];
813 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
814 arbiter83xx_t arbiter; /* System Arbiter Registers */
815 reset83xx_t reset; /* Reset Module */
816 clk83xx_t clk; /* System Clock Module */
817 pmc83xx_t pmc; /* Power Management Control Module */
818 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
819 u8 res1[0x300];
820 u8 dll_ddr[0x100];
821 u8 dll_lbc[0x100];
822 u8 res2[0x200];
823 qepio83xx_t qepio; /* QE Parallel I/O ports */
824 qesba83xx_t qesba; /* QE Secondary Bus Access Windows */
825 u8 res3[0x400];
826 ddr83xx_t ddr; /* DDR Memory Controller Memory */
827 fsl_i2c_t i2c[2]; /* I2C Controllers */
828 u8 res4[0x1300];
829 duart83xx_t duart[2]; /* DUART */
830 u8 res5[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500831 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu0b6bc772006-12-07 21:11:58 +0800832 u8 res6[0x2000];
833 dma83xx_t dma; /* DMA */
834 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
835 u8 res7[128];
836 ios83xx_t ios; /* Sequencer (IOS) */
837 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
838 u8 res8[0x4A00];
839 ddr83xx_t ddr_secondary; /* Secondary DDR Memory Controller Memory Map */
840 u8 res9[0x22000];
841 security83xx_t security;
842 u8 res10[0xC0000];
843 u8 qe[0x100000]; /* QE block */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500844} immap_t;
Dave Liue740c462006-12-07 21:13:15 +0800845
Mario Sixbe07e552019-01-21 09:17:26 +0100846#elif defined(CONFIG_ARCH_MPC832X)
Dave Liue740c462006-12-07 21:13:15 +0800847typedef struct immap {
848 sysconf83xx_t sysconf; /* System configuration */
849 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
850 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
851 rtclk83xx_t pit; /* Periodic Interval Timer */
852 gtm83xx_t gtm[2]; /* Global Timers Module */
853 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
854 arbiter83xx_t arbiter; /* System Arbiter Registers */
855 reset83xx_t reset; /* Reset Module */
856 clk83xx_t clk; /* System Clock Module */
857 pmc83xx_t pmc; /* Power Management Control Module */
858 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
859 u8 res0[0x300];
860 u8 dll_ddr[0x100];
861 u8 dll_lbc[0x100];
862 u8 res1[0x200];
863 qepio83xx_t qepio; /* QE Parallel I/O ports */
864 u8 res2[0x800];
865 ddr83xx_t ddr; /* DDR Memory Controller Memory */
866 fsl_i2c_t i2c[2]; /* I2C Controllers */
867 u8 res3[0x1300];
868 duart83xx_t duart[2]; /* DUART */
869 u8 res4[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500870 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liue740c462006-12-07 21:13:15 +0800871 u8 res5[0x2000];
872 dma83xx_t dma; /* DMA */
873 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
874 u8 res6[128];
875 ios83xx_t ios; /* Sequencer (IOS) */
876 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
877 u8 res7[0x27A00];
878 security83xx_t security;
879 u8 res8[0xC0000];
880 u8 qe[0x100000]; /* QE block */
Gerlando Falautofe201cb2012-10-10 22:13:08 +0000881} immap_t;
Mario Sixb2e701c2019-01-21 09:17:24 +0100882#elif defined(CONFIG_ARCH_MPC8309)
Gerlando Falautofe201cb2012-10-10 22:13:08 +0000883typedef struct immap {
884 sysconf83xx_t sysconf; /* System configuration */
885 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
886 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
887 rtclk83xx_t pit; /* Periodic Interval Timer */
888 gtm83xx_t gtm[2]; /* Global Timers Module */
889 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
890 arbiter83xx_t arbiter; /* System Arbiter Registers */
891 reset83xx_t reset; /* Reset Module */
892 clk83xx_t clk; /* System Clock Module */
893 pmc83xx_t pmc; /* Power Management Control Module */
894 gpio83xx_t gpio[2]; /* General purpose I/O module */
895 u8 res0[0x500]; /* res0 1.25 KBytes added for 8309 */
896 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
897 qepio83xx_t qepio; /* QE Parallel I/O ports */
898 u8 res1[0x800];
899 ddr83xx_t ddr; /* DDR Memory Controller Memory */
900 fsl_i2c_t i2c[2]; /* I2C Controllers */
901 u8 res2[0x1300];
902 duart83xx_t duart[2]; /* DUART */
903 u8 res3[0x200];
904 duart83xx_t duart1[2]; /* DUART */
905 u8 res4[0x500];
906 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
907 u8 res5[0x1000];
908 u8 spi[0x100];
909 u8 res6[0xf00];
910 dma83xx_t dma; /* DMA */
911 pciconf83xx_t pci_conf[1]; /* PCI Configuration Registers */
912 u8 res7[0x80];
913 ios83xx_t ios; /* Sequencer (IOS) */
914 pcictrl83xx_t pci_ctrl[1]; /* PCI Control & Status Registers */
915 u8 res8[0x13A00];
916 u8 can1[0x1000]; /* Flexcan 1 */
917 u8 can2[0x1000]; /* Flexcan 2 */
918 u8 res9[0x5000];
919 usb83xx_t usb;
920 u8 res10[0x5000];
921 u8 can3[0x1000]; /* Flexcan 3 */
922 u8 can4[0x1000]; /* Flexcan 4 */
923 u8 res11[0x1000];
924 u8 dma1[0x2000]; /* DMA */
925 sdhc83xx_t sdhc; /* SDHC Controller */
926 u8 res12[0xC1000];
927 rom83xx_t rom; /* On Chip ROM */
928 u8 res13[0x8000];
929 u8 qe[0x100000]; /* QE block */
930 u8 res14[0xE00000];/* Added for 8309 */
Dave Liue740c462006-12-07 21:13:15 +0800931} immap_t;
Dave Liu0b6bc772006-12-07 21:11:58 +0800932#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -0500933
Andy Fleming992562c2012-10-23 19:03:46 -0500934#define CONFIG_SYS_MPC8xxx_DDR_OFFSET (0x2000)
York Sunf0626592013-09-30 09:22:09 -0700935#define CONFIG_SYS_FSL_DDR_ADDR \
Andy Fleming992562c2012-10-23 19:03:46 -0500936 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC8xxx_DDR_OFFSET)
Peter Tyser6f33a352009-06-30 17:15:51 -0500937#define CONFIG_SYS_MPC83xx_DMA_OFFSET (0x8000)
York Sune12ce982011-08-26 11:32:44 -0700938#define CONFIG_SYS_MPC83xx_DMA_ADDR \
939 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_DMA_OFFSET)
Andy Fleming1463b4b2008-10-30 16:50:14 -0500940#define CONFIG_SYS_MPC83xx_ESDHC_OFFSET (0x2e000)
York Sune12ce982011-08-26 11:32:44 -0700941#define CONFIG_SYS_MPC83xx_ESDHC_ADDR \
942 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_ESDHC_OFFSET)
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300943
ramneek mehresh16b08062013-09-12 16:35:49 +0530944#ifndef CONFIG_SYS_MPC83xx_USB1_OFFSET
945#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0x23000
946#endif
947#define CONFIG_SYS_MPC83xx_USB1_ADDR \
948 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB1_OFFSET)
Mario Six0344f5e2019-01-21 09:17:27 +0100949#if defined(CONFIG_ARCH_MPC834X)
ramneek mehresh16b08062013-09-12 16:35:49 +0530950#define CONFIG_SYS_MPC83xx_USB2_ADDR \
951 (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB2_OFFSET)
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300952#endif
Becky Bruce0d4cee12010-06-17 11:37:20 -0500953#define CONFIG_SYS_LBC_ADDR (&((immap_t *)CONFIG_SYS_IMMR)->im_lbc)
Sandeep Gopalpetb5541ef2009-10-31 00:35:04 +0530954
955#define CONFIG_SYS_TSEC1_OFFSET 0x24000
Kumar Gala2e972932009-10-31 11:23:41 -0500956#define CONFIG_SYS_MDIO1_OFFSET 0x24000
Sandeep Gopalpetb5541ef2009-10-31 00:35:04 +0530957
958#define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
959#define MDIO_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_MDIO1_OFFSET)
Dave Liufba13692006-10-31 19:25:38 -0600960#endif /* __IMMAP_83xx__ */