blob: 8e1820267088fd0bb356436a96bc13a3e73ff839 [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
Anton Vorontsov1a8206c2009-01-08 04:26:12 +030067 u8 res9[0xB8];
Dave Liuf5035922006-10-25 14:41:21 -050068} sysconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050069
Jon Loeligerebc72242005-08-01 13:20:47 -050070/*
Eran Liberty9095d4a2005-07-28 10:08:46 -050071 * Watch Dog Timer (WDT) Registers
72 */
Dave Liuf5035922006-10-25 14:41:21 -050073typedef struct wdt83xx {
Jon Loeligerebc72242005-08-01 13:20:47 -050074 u8 res0[4];
Dave Liufba13692006-10-31 19:25:38 -060075 u32 swcrr; /* System watchdog control register */
76 u32 swcnr; /* System watchdog count register */
Jon Loeligerebc72242005-08-01 13:20:47 -050077 u8 res1[2];
Dave Liufba13692006-10-31 19:25:38 -060078 u16 swsrr; /* System watchdog service register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050079 u8 res2[0xF0];
Dave Liuf5035922006-10-25 14:41:21 -050080} wdt83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -050081
Eran Liberty9095d4a2005-07-28 10:08:46 -050082/*
83 * RTC/PIT Module Registers
84 */
Dave Liuf5035922006-10-25 14:41:21 -050085typedef struct rtclk83xx {
Dave Liufba13692006-10-31 19:25:38 -060086 u32 cnr; /* control register */
Dave Liufba13692006-10-31 19:25:38 -060087 u32 ldr; /* load register */
Dave Liufba13692006-10-31 19:25:38 -060088 u32 psr; /* prescale register */
Dave Liu0b6bc772006-12-07 21:11:58 +080089 u32 ctr; /* counter value field register */
Dave Liufba13692006-10-31 19:25:38 -060090 u32 evr; /* event register */
Dave Liufba13692006-10-31 19:25:38 -060091 u32 alr; /* alarm register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050092 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -050093} rtclk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050094
95/*
Dave Liu0b6bc772006-12-07 21:11:58 +080096 * Global timer module
Eran Liberty9095d4a2005-07-28 10:08:46 -050097 */
Dave Liuf5035922006-10-25 14:41:21 -050098typedef struct gtm83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +080099 u8 cfr1; /* Timer1/2 Configuration */
Dave Liufba13692006-10-31 19:25:38 -0600100 u8 res0[3];
Dave Liu0b6bc772006-12-07 21:11:58 +0800101 u8 cfr2; /* Timer3/4 Configuration */
Kim Phillips81a75f12011-08-14 23:09:39 -0500102 u8 res1[11];
Dave Liu0b6bc772006-12-07 21:11:58 +0800103 u16 mdr1; /* Timer1 Mode Register */
104 u16 mdr2; /* Timer2 Mode Register */
105 u16 rfr1; /* Timer1 Reference Register */
106 u16 rfr2; /* Timer2 Reference Register */
107 u16 cpr1; /* Timer1 Capture Register */
108 u16 cpr2; /* Timer2 Capture Register */
109 u16 cnr1; /* Timer1 Counter Register */
110 u16 cnr2; /* Timer2 Counter Register */
111 u16 mdr3; /* Timer3 Mode Register */
112 u16 mdr4; /* Timer4 Mode Register */
113 u16 rfr3; /* Timer3 Reference Register */
114 u16 rfr4; /* Timer4 Reference Register */
115 u16 cpr3; /* Timer3 Capture Register */
116 u16 cpr4; /* Timer4 Capture Register */
117 u16 cnr3; /* Timer3 Counter Register */
118 u16 cnr4; /* Timer4 Counter Register */
119 u16 evr1; /* Timer1 Event Register */
120 u16 evr2; /* Timer2 Event Register */
121 u16 evr3; /* Timer3 Event Register */
122 u16 evr4; /* Timer4 Event Register */
123 u16 psr1; /* Timer1 Prescaler Register */
124 u16 psr2; /* Timer2 Prescaler Register */
125 u16 psr3; /* Timer3 Prescaler Register */
126 u16 psr4; /* Timer4 Prescaler Register */
Dave Liufba13692006-10-31 19:25:38 -0600127 u8 res[0xC0];
Dave Liuf5035922006-10-25 14:41:21 -0500128} gtm83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500129
130/*
131 * Integrated Programmable Interrupt Controller
132 */
Dave Liuf5035922006-10-25 14:41:21 -0500133typedef struct ipic83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800134 u32 sicfr; /* System Global Interrupt Configuration Register */
135 u32 sivcr; /* System Global Interrupt Vector Register */
136 u32 sipnr_h; /* System Internal Interrupt Pending Register - High */
137 u32 sipnr_l; /* System Internal Interrupt Pending Register - Low */
138 u32 siprr_a; /* System Internal Interrupt Group A Priority Register */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500139 u32 siprr_b; /* System Internal Interrupt Group B Priority Register */
140 u32 siprr_c; /* System Internal Interrupt Group C Priority Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800141 u32 siprr_d; /* System Internal Interrupt Group D Priority Register */
142 u32 simsr_h; /* System Internal Interrupt Mask Register - High */
143 u32 simsr_l; /* System Internal Interrupt Mask Register - Low */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500144 u32 sicnr; /* System Internal Interrupt Control Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800145 u32 sepnr; /* System External Interrupt Pending Register */
146 u32 smprr_a; /* System Mixed Interrupt Group A Priority Register */
147 u32 smprr_b; /* System Mixed Interrupt Group B Priority Register */
148 u32 semsr; /* System External Interrupt Mask Register */
149 u32 secnr; /* System External Interrupt Control Register */
150 u32 sersr; /* System Error Status Register */
151 u32 sermr; /* System Error Mask Register */
152 u32 sercr; /* System Error Control Register */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500153 u32 sepcr; /* System External Interrupt Polarity Control Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800154 u32 sifcr_h; /* System Internal Interrupt Force Register - High */
155 u32 sifcr_l; /* System Internal Interrupt Force Register - Low */
156 u32 sefcr; /* System External Interrupt Force Register */
157 u32 serfr; /* System Error Force Register */
Dave Liufba13692006-10-31 19:25:38 -0600158 u32 scvcr; /* System Critical Interrupt Vector Register */
Dave Liufba13692006-10-31 19:25:38 -0600159 u32 smvcr; /* System Management Interrupt Vector Register */
Joe Hershberger0c72e662011-10-11 21:46:04 -0500160 u8 res[0x98];
Dave Liuf5035922006-10-25 14:41:21 -0500161} ipic83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500162
163/*
164 * System Arbiter Registers
165 */
Dave Liuf5035922006-10-25 14:41:21 -0500166typedef struct arbiter83xx {
Dave Liufba13692006-10-31 19:25:38 -0600167 u32 acr; /* Arbiter Configuration Register */
Dave Liufba13692006-10-31 19:25:38 -0600168 u32 atr; /* Arbiter Timers Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500169 u8 res[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800170 u32 aer; /* Arbiter Event Register */
171 u32 aidr; /* Arbiter Interrupt Definition Register */
172 u32 amr; /* Arbiter Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600173 u32 aeatr; /* Arbiter Event Attributes Register */
Dave Liufba13692006-10-31 19:25:38 -0600174 u32 aeadr; /* Arbiter Event Address Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800175 u32 aerr; /* Arbiter Event Response Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500176 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500177} arbiter83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500178
179/*
180 * Reset Module
181 */
Dave Liuf5035922006-10-25 14:41:21 -0500182typedef struct reset83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800183 u32 rcwl; /* Reset Configuration Word Low Register */
184 u32 rcwh; /* Reset Configuration Word High Register */
Dave Liufba13692006-10-31 19:25:38 -0600185 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800186 u32 rsr; /* Reset Status Register */
187 u32 rmr; /* Reset Mode Register */
188 u32 rpr; /* Reset protection Register */
189 u32 rcr; /* Reset Control Register */
190 u32 rcer; /* Reset Control Enable Register */
Dave Liufba13692006-10-31 19:25:38 -0600191 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500192} reset83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -0500193
Dave Liu0b6bc772006-12-07 21:11:58 +0800194/*
195 * Clock Module
196 */
Dave Liuf5035922006-10-25 14:41:21 -0500197typedef struct clk83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800198 u32 spmr; /* system PLL mode Register */
199 u32 occr; /* output clock control Register */
200 u32 sccr; /* system clock control Register */
Dave Liufba13692006-10-31 19:25:38 -0600201 u8 res0[0xF4];
Dave Liuf5035922006-10-25 14:41:21 -0500202} clk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500203
204/*
205 * Power Management Control Module
206 */
Dave Liuf5035922006-10-25 14:41:21 -0500207typedef struct pmc83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800208 u32 pmccr; /* PMC Configuration Register */
209 u32 pmcer; /* PMC Event Register */
210 u32 pmcmr; /* PMC Mask Register */
Scott Wood9f15d502007-04-16 14:31:55 -0500211 u32 pmccr1; /* PMC Configuration Register 1 */
212 u32 pmccr2; /* PMC Configuration Register 2 */
213 u8 res0[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500214} pmc83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500215
216/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800217 * General purpose I/O module
Eran Liberty9095d4a2005-07-28 10:08:46 -0500218 */
Dave Liuf5035922006-10-25 14:41:21 -0500219typedef struct gpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600220 u32 dir; /* direction register */
221 u32 odr; /* open drain register */
222 u32 dat; /* data register */
223 u32 ier; /* interrupt event register */
224 u32 imr; /* interrupt mask register */
225 u32 icr; /* external interrupt control register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500226 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -0500227} gpio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600228
Dave Liufba13692006-10-31 19:25:38 -0600229/*
230 * QE Ports Interrupts Registers
231 */
232typedef struct qepi83xx {
233 u8 res0[0xC];
234 u32 qepier; /* QE Ports Interrupt Event Register */
Dave Liufba13692006-10-31 19:25:38 -0600235 u32 qepimr; /* QE Ports Interrupt Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600236 u32 qepicr; /* QE Ports Interrupt Control Register */
Dave Liufba13692006-10-31 19:25:38 -0600237 u8 res1[0xE8];
238} qepi83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500239
Jon Loeligerebc72242005-08-01 13:20:47 -0500240/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800241 * QE Parallel I/O Ports
Dave Liufba13692006-10-31 19:25:38 -0600242 */
243typedef struct gpio_n {
244 u32 podr; /* Open Drain Register */
245 u32 pdat; /* Data Register */
246 u32 dir1; /* direction register 1 */
247 u32 dir2; /* direction register 2 */
248 u32 ppar1; /* Pin Assignment Register 1 */
249 u32 ppar2; /* Pin Assignment Register 2 */
250} gpio_n_t;
251
Dave Liu0b6bc772006-12-07 21:11:58 +0800252typedef struct qegpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600253 gpio_n_t ioport[0x7];
254 u8 res0[0x358];
Dave Liu0b6bc772006-12-07 21:11:58 +0800255} qepio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600256
257/*
258 * QE Secondary Bus Access Windows
259 */
Dave Liufba13692006-10-31 19:25:38 -0600260typedef struct qesba83xx {
261 u32 lbmcsar; /* Local bus memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600262 u32 sdmcsar; /* Secondary DDR memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600263 u8 res0[0x38];
264 u32 lbmcear; /* Local bus memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600265 u32 sdmcear; /* Secondary DDR memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600266 u8 res1[0x38];
Dave Liu0b6bc772006-12-07 21:11:58 +0800267 u32 lbmcar; /* Local bus memory controller attributes */
Dave Liufba13692006-10-31 19:25:38 -0600268 u32 sdmcar; /* Secondary DDR memory controller attributes */
Dave Liu0b6bc772006-12-07 21:11:58 +0800269 u8 res2[0x378];
Dave Liufba13692006-10-31 19:25:38 -0600270} qesba83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600271
272/*
York Suna21803d2013-11-18 10:29:32 -0800273 * DDR Memory Controller Memory Map for DDR1
274 * The structure of DDR2, or DDR3 is defined in fsl_immap.h
Eran Liberty9095d4a2005-07-28 10:08:46 -0500275 */
York Suna21803d2013-11-18 10:29:32 -0800276#if !defined(CONFIG_SYS_FSL_DDR2) && !defined(CONFIG_SYS_FSL_DDR3)
Dave Liufba13692006-10-31 19:25:38 -0600277typedef struct ddr_cs_bnds {
Jon Loeligerebc72242005-08-01 13:20:47 -0500278 u32 csbnds;
Dave Liufba13692006-10-31 19:25:38 -0600279 u8 res0[4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500280} ddr_cs_bnds_t;
281
Dave Liuf5035922006-10-25 14:41:21 -0500282typedef struct ddr83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800283 ddr_cs_bnds_t csbnds[4];/* Chip Select x Memory Bounds */
Jon Loeligerebc72242005-08-01 13:20:47 -0500284 u8 res0[0x60];
Dave Liu0b6bc772006-12-07 21:11:58 +0800285 u32 cs_config[4]; /* Chip Select x Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800286 u8 res1[0x70];
287 u32 timing_cfg_3; /* SDRAM Timing Configuration 3 */
288 u32 timing_cfg_0; /* SDRAM Timing Configuration 0 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800289 u32 timing_cfg_1; /* SDRAM Timing Configuration 1 */
290 u32 timing_cfg_2; /* SDRAM Timing Configuration 2 */
291 u32 sdram_cfg; /* SDRAM Control Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800292 u32 sdram_cfg2; /* SDRAM Control Configuration 2 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800293 u32 sdram_mode; /* SDRAM Mode Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800294 u32 sdram_mode2; /* SDRAM Mode Configuration 2 */
295 u32 sdram_md_cntl; /* SDRAM Mode Control */
Dave Liu0b6bc772006-12-07 21:11:58 +0800296 u32 sdram_interval; /* SDRAM Interval Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800297 u32 ddr_data_init; /* SDRAM Data Initialization */
298 u8 res2[4];
299 u32 sdram_clk_cntl; /* SDRAM Clock Control */
300 u8 res3[0x14];
301 u32 ddr_init_addr; /* DDR training initialization address */
302 u32 ddr_init_ext_addr; /* DDR training initialization extended address */
303 u8 res4[0xAA8];
304 u32 ddr_ip_rev1; /* DDR IP block revision 1 */
305 u32 ddr_ip_rev2; /* DDR IP block revision 2 */
306 u8 res5[0x200];
Dave Liu0b6bc772006-12-07 21:11:58 +0800307 u32 data_err_inject_hi; /* Memory Data Path Error Injection Mask High */
308 u32 data_err_inject_lo; /* Memory Data Path Error Injection Mask Low */
309 u32 ecc_err_inject; /* Memory Data Path Error Injection Mask ECC */
Dave Liue740c462006-12-07 21:13:15 +0800310 u8 res6[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800311 u32 capture_data_hi; /* Memory Data Path Read Capture High */
312 u32 capture_data_lo; /* Memory Data Path Read Capture Low */
313 u32 capture_ecc; /* Memory Data Path Read Capture ECC */
Dave Liue740c462006-12-07 21:13:15 +0800314 u8 res7[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800315 u32 err_detect; /* Memory Error Detect */
316 u32 err_disable; /* Memory Error Disable */
317 u32 err_int_en; /* Memory Error Interrupt Enable */
318 u32 capture_attributes; /* Memory Error Attributes Capture */
319 u32 capture_address; /* Memory Error Address Capture */
320 u32 capture_ext_address;/* Memory Error Extended Address Capture */
321 u32 err_sbe; /* Memory Single-Bit ECC Error Management */
Dave Liue740c462006-12-07 21:13:15 +0800322 u8 res8[0xA4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500323 u32 debug_reg;
Dave Liue740c462006-12-07 21:13:15 +0800324 u8 res9[0xFC];
Dave Liuf5035922006-10-25 14:41:21 -0500325} ddr83xx_t;
York Sune12ce982011-08-26 11:32:44 -0700326#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -0500327
328/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500329 * DUART
330 */
Dave Liufba13692006-10-31 19:25:38 -0600331typedef struct duart83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800332 u8 urbr_ulcr_udlb; /* combined register for URBR, UTHR and UDLB */
333 u8 uier_udmb; /* combined register for UIER and UDMB */
334 u8 uiir_ufcr_uafr; /* combined register for UIIR, UFCR and UAFR */
335 u8 ulcr; /* line control register */
336 u8 umcr; /* MODEM control register */
337 u8 ulsr; /* line status register */
338 u8 umsr; /* MODEM status register */
339 u8 uscr; /* scratch register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500340 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800341 u8 udsr; /* DMA status register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500342 u8 res1[3];
343 u8 res2[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500344} duart83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500345
346/*
Marian Balakowicz7ec9ebc2006-03-14 16:14:48 +0100347 * DMA/Messaging Unit
348 */
Dave Liuf5035922006-10-25 14:41:21 -0500349typedef struct dma83xx {
Dave Liufba13692006-10-31 19:25:38 -0600350 u32 res0[0xC]; /* 0x0-0x29 reseverd */
351 u32 omisr; /* 0x30 Outbound message interrupt status register */
352 u32 omimr; /* 0x34 Outbound message interrupt mask register */
353 u32 res1[0x6]; /* 0x38-0x49 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600354 u32 imr0; /* 0x50 Inbound message register 0 */
355 u32 imr1; /* 0x54 Inbound message register 1 */
356 u32 omr0; /* 0x58 Outbound message register 0 */
357 u32 omr1; /* 0x5C Outbound message register 1 */
Dave Liufba13692006-10-31 19:25:38 -0600358 u32 odr; /* 0x60 Outbound doorbell register */
359 u32 res2; /* 0x64-0x67 reserved */
360 u32 idr; /* 0x68 Inbound doorbell register */
361 u32 res3[0x5]; /* 0x6C-0x79 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600362 u32 imisr; /* 0x80 Inbound message interrupt status register */
363 u32 imimr; /* 0x84 Inbound message interrupt mask register */
364 u32 res4[0x1E]; /* 0x88-0x99 reserved */
Peter Tyser6f33a352009-06-30 17:15:51 -0500365 struct fsl_dma dma[4];
Dave Liuf5035922006-10-25 14:41:21 -0500366} dma83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500367
368/*
369 * PCI Software Configuration Registers
370 */
Dave Liuf5035922006-10-25 14:41:21 -0500371typedef struct pciconf83xx {
Dave Liufba13692006-10-31 19:25:38 -0600372 u32 config_address;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500373 u32 config_data;
374 u32 int_ack;
Dave Liufba13692006-10-31 19:25:38 -0600375 u8 res[116];
Dave Liuf5035922006-10-25 14:41:21 -0500376} pciconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500377
378/*
379 * PCI Outbound Translation Register
380 */
381typedef struct pci_outbound_window {
Dave Liufba13692006-10-31 19:25:38 -0600382 u32 potar;
383 u8 res0[4];
384 u32 pobar;
385 u8 res1[4];
386 u32 pocmr;
387 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500388} pot83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600389
Eran Liberty9095d4a2005-07-28 10:08:46 -0500390/*
391 * Sequencer
Jon Loeligerebc72242005-08-01 13:20:47 -0500392 */
Dave Liuf5035922006-10-25 14:41:21 -0500393typedef struct ios83xx {
Dave Liufba13692006-10-31 19:25:38 -0600394 pot83xx_t pot[6];
Dave Liufba13692006-10-31 19:25:38 -0600395 u8 res0[0x60];
396 u32 pmcr;
397 u8 res1[4];
398 u32 dtcr;
399 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500400} ios83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500401
402/*
403 * PCI Controller Control and Status Registers
404 */
Dave Liuf5035922006-10-25 14:41:21 -0500405typedef struct pcictrl83xx {
Dave Liufba13692006-10-31 19:25:38 -0600406 u32 esr;
Dave Liufba13692006-10-31 19:25:38 -0600407 u32 ecdr;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500408 u32 eer;
Dave Liufba13692006-10-31 19:25:38 -0600409 u32 eatcr;
Dave Liufba13692006-10-31 19:25:38 -0600410 u32 eacr;
411 u32 eeacr;
Dave Liufba13692006-10-31 19:25:38 -0600412 u32 edlcr;
413 u32 edhcr;
Dave Liufba13692006-10-31 19:25:38 -0600414 u32 gcr;
415 u32 ecr;
416 u32 gsr;
417 u8 res0[12];
418 u32 pitar2;
419 u8 res1[4];
420 u32 pibar2;
421 u32 piebar2;
422 u32 piwar2;
423 u8 res2[4];
424 u32 pitar1;
425 u8 res3[4];
426 u32 pibar1;
427 u32 piebar1;
428 u32 piwar1;
429 u8 res4[4];
430 u32 pitar0;
431 u8 res5[4];
432 u32 pibar0;
433 u8 res6[4];
434 u32 piwar0;
435 u8 res7[132];
Dave Liuf5035922006-10-25 14:41:21 -0500436} pcictrl83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500437
438/*
Jon Loeligerebc72242005-08-01 13:20:47 -0500439 * USB
Eran Liberty9095d4a2005-07-28 10:08:46 -0500440 */
Dave Liuf5035922006-10-25 14:41:21 -0500441typedef struct usb83xx {
Scott Wood9f15d502007-04-16 14:31:55 -0500442 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500443} usb83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500444
445/*
446 * TSEC
447 */
Dave Liuf5035922006-10-25 14:41:21 -0500448typedef struct tsec83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500449 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500450} tsec83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500451
452/*
453 * Security
454 */
Dave Liuf5035922006-10-25 14:41:21 -0500455typedef struct security83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500456 u8 fixme[0x10000];
Dave Liuf5035922006-10-25 14:41:21 -0500457} security83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500458
Dave Liu5245ff52007-09-18 12:36:11 +0800459/*
460 * PCI Express
461 */
Anton Vorontsov1a8206c2009-01-08 04:26:12 +0300462struct pex_inbound_window {
463 u32 ar;
464 u32 tar;
465 u32 barl;
466 u32 barh;
467};
468
469struct pex_outbound_window {
470 u32 ar;
471 u32 bar;
472 u32 tarl;
473 u32 tarh;
474};
475
476struct pex_csb_bridge {
477 u32 pex_csb_ver;
478 u32 pex_csb_cab;
479 u32 pex_csb_ctrl;
480 u8 res0[8];
481 u32 pex_dms_dstmr;
482 u8 res1[4];
483 u32 pex_cbs_stat;
484 u8 res2[0x20];
485 u32 pex_csb_obctrl;
486 u32 pex_csb_obstat;
487 u8 res3[0x98];
488 u32 pex_csb_ibctrl;
489 u32 pex_csb_ibstat;
490 u8 res4[0xb8];
491 u32 pex_wdma_ctrl;
492 u32 pex_wdma_addr;
493 u32 pex_wdma_stat;
494 u8 res5[0x94];
495 u32 pex_rdma_ctrl;
496 u32 pex_rdma_addr;
497 u32 pex_rdma_stat;
498 u8 res6[0xd4];
499 u32 pex_ombcr;
500 u32 pex_ombdr;
501 u8 res7[0x38];
502 u32 pex_imbcr;
503 u32 pex_imbdr;
504 u8 res8[0x38];
505 u32 pex_int_enb;
506 u32 pex_int_stat;
507 u32 pex_int_apio_vec1;
508 u32 pex_int_apio_vec2;
509 u8 res9[0x10];
510 u32 pex_int_ppio_vec1;
511 u32 pex_int_ppio_vec2;
512 u32 pex_int_wdma_vec1;
513 u32 pex_int_wdma_vec2;
514 u32 pex_int_rdma_vec1;
515 u32 pex_int_rdma_vec2;
516 u32 pex_int_misc_vec;
517 u8 res10[4];
518 u32 pex_int_axi_pio_enb;
519 u32 pex_int_axi_wdma_enb;
520 u32 pex_int_axi_rdma_enb;
521 u32 pex_int_axi_misc_enb;
522 u32 pex_int_axi_pio_stat;
523 u32 pex_int_axi_wdma_stat;
524 u32 pex_int_axi_rdma_stat;
525 u32 pex_int_axi_misc_stat;
526 u8 res11[0xa0];
527 struct pex_outbound_window pex_outbound_win[4];
528 u8 res12[0x100];
529 u32 pex_epiwtar0;
530 u32 pex_epiwtar1;
531 u32 pex_epiwtar2;
532 u32 pex_epiwtar3;
533 u8 res13[0x70];
534 struct pex_inbound_window pex_inbound_win[4];
535};
536
Dave Liu5245ff52007-09-18 12:36:11 +0800537typedef struct pex83xx {
Anton Vorontsov1a8206c2009-01-08 04:26:12 +0300538 u8 pex_cfg_header[0x404];
539 u32 pex_ltssm_stat;
540 u8 res0[0x30];
541 u32 pex_ack_replay_timeout;
542 u8 res1[4];
543 u32 pex_gclk_ratio;
544 u8 res2[0xc];
545 u32 pex_pm_timer;
546 u32 pex_pme_timeout;
547 u8 res3[4];
548 u32 pex_aspm_req_timer;
549 u8 res4[0x18];
550 u32 pex_ssvid_update;
551 u8 res5[0x34];
552 u32 pex_cfg_ready;
553 u8 res6[0x24];
554 u32 pex_bar_sizel;
555 u8 res7[4];
556 u32 pex_bar_sel;
557 u8 res8[0x20];
558 u32 pex_bar_pf;
559 u8 res9[0x88];
560 u32 pex_pme_to_ack_tor;
561 u8 res10[0xc];
562 u32 pex_ss_intr_mask;
563 u8 res11[0x25c];
564 struct pex_csb_bridge bridge;
565 u8 res12[0x160];
Dave Liu5245ff52007-09-18 12:36:11 +0800566} pex83xx_t;
567
568/*
569 * SATA
570 */
571typedef struct sata83xx {
572 u8 fixme[0x1000];
573} sata83xx_t;
574
575/*
576 * eSDHC
577 */
578typedef struct sdhc83xx {
579 u8 fixme[0x1000];
580} sdhc83xx_t;
581
582/*
583 * SerDes
584 */
585typedef struct serdes83xx {
Ilya Yanoka3e5fd52010-06-28 16:44:33 +0400586 u32 srdscr0;
587 u32 srdscr1;
588 u32 srdscr2;
589 u32 srdscr3;
590 u32 srdscr4;
591 u8 res0[0xc];
592 u32 srdsrstctl;
593 u8 res1[0xdc];
Dave Liu5245ff52007-09-18 12:36:11 +0800594} serdes83xx_t;
595
596/*
597 * On Chip ROM
598 */
599typedef struct rom83xx {
600 u8 mem[0x10000];
601} rom83xx_t;
602
Dave Liue0cfec82007-09-18 12:36:58 +0800603/*
604 * TDM
605 */
606typedef struct tdm83xx {
607 u8 fixme[0x200];
608} tdm83xx_t;
609
610/*
611 * TDM DMAC
612 */
613typedef struct tdmdmac83xx {
614 u8 fixme[0x2000];
615} tdmdmac83xx_t;
616
Mario Six0344f5e2019-01-21 09:17:27 +0100617#if defined(CONFIG_ARCH_MPC834X)
Dave Liu0b6bc772006-12-07 21:11:58 +0800618typedef struct immap {
619 sysconf83xx_t sysconf; /* System configuration */
620 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
621 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
622 rtclk83xx_t pit; /* Periodic Interval Timer */
623 gtm83xx_t gtm[2]; /* Global Timers Module */
624 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
625 arbiter83xx_t arbiter; /* System Arbiter Registers */
626 reset83xx_t reset; /* Reset Module */
627 clk83xx_t clk; /* System Clock Module */
628 pmc83xx_t pmc; /* Power Management Control Module */
629 gpio83xx_t gpio[2]; /* General purpose I/O module */
630 u8 res0[0x200];
631 u8 dll_ddr[0x100];
632 u8 dll_lbc[0x100];
633 u8 res1[0xE00];
York Sunf0626592013-09-30 09:22:09 -0700634#if defined(CONFIG_SYS_FSL_DDR2) || defined(CONFIG_SYS_FSL_DDR3)
York Suna21803d2013-11-18 10:29:32 -0800635 struct ccsr_ddr ddr; /* DDR Memory Controller Memory */
York Sune12ce982011-08-26 11:32:44 -0700636#else
637 ddr83xx_t ddr; /* DDR Memory Controller Memory */
638#endif
Dave Liu0b6bc772006-12-07 21:11:58 +0800639 fsl_i2c_t i2c[2]; /* I2C Controllers */
640 u8 res2[0x1300];
641 duart83xx_t duart[2]; /* DUART */
642 u8 res3[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500643 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu0b6bc772006-12-07 21:11:58 +0800644 u8 res4[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500645 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liu0b6bc772006-12-07 21:11:58 +0800646 dma83xx_t dma; /* DMA */
647 pciconf83xx_t pci_conf[2]; /* PCI Software Configuration Registers */
648 ios83xx_t ios; /* Sequencer */
649 pcictrl83xx_t pci_ctrl[2]; /* PCI Controller Control and Status Registers */
650 u8 res5[0x19900];
Scott Wood9f15d502007-04-16 14:31:55 -0500651 usb83xx_t usb[2];
652 tsec83xx_t tsec[2];
653 u8 res6[0xA000];
654 security83xx_t security;
655 u8 res7[0xC0000];
656} immap_t;
657
Mario Six9164bdd2019-01-21 09:17:25 +0100658#elif defined(CONFIG_ARCH_MPC8313)
Scott Wood9f15d502007-04-16 14:31:55 -0500659typedef struct immap {
660 sysconf83xx_t sysconf; /* System configuration */
661 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
662 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
663 rtclk83xx_t pit; /* Periodic Interval Timer */
664 gtm83xx_t gtm[2]; /* Global Timers Module */
665 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
666 arbiter83xx_t arbiter; /* System Arbiter Registers */
667 reset83xx_t reset; /* Reset Module */
668 clk83xx_t clk; /* System Clock Module */
669 pmc83xx_t pmc; /* Power Management Control Module */
670 gpio83xx_t gpio[1]; /* General purpose I/O module */
671 u8 res0[0x1300];
672 ddr83xx_t ddr; /* DDR Memory Controller Memory */
673 fsl_i2c_t i2c[2]; /* I2C Controllers */
674 u8 res1[0x1300];
675 duart83xx_t duart[2]; /* DUART */
676 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500677 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Scott Wood9f15d502007-04-16 14:31:55 -0500678 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500679 spi8xxx_t spi; /* Serial Peripheral Interface */
Scott Wood9f15d502007-04-16 14:31:55 -0500680 dma83xx_t dma; /* DMA */
681 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
682 u8 res4[0x80];
683 ios83xx_t ios; /* Sequencer */
684 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
685 u8 res5[0x1aa00];
686 usb83xx_t usb[1];
Dave Liu0b6bc772006-12-07 21:11:58 +0800687 tsec83xx_t tsec[2];
688 u8 res6[0xA000];
689 security83xx_t security;
690 u8 res7[0xC0000];
691} immap_t;
Dave Liufba13692006-10-31 19:25:38 -0600692
Mario Sixe9c932d2019-01-21 09:18:04 +0100693#elif defined(CONFIG_ARCH_MPC8308)
694typedef struct immap {
695 sysconf83xx_t sysconf; /* System configuration */
696 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
697 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
698 rtclk83xx_t pit; /* Periodic Interval Timer */
699 gtm83xx_t gtm[1]; /* Global Timers Module */
700 u8 res0[0x100];
701 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
702 arbiter83xx_t arbiter; /* System Arbiter Registers */
703 reset83xx_t reset; /* Reset Module */
704 clk83xx_t clk; /* System Clock Module */
705 pmc83xx_t pmc; /* Power Management Control Module */
706 gpio83xx_t gpio[1]; /* General purpose I/O module */
707 u8 res1[0x1300];
708 ddr83xx_t ddr; /* DDR Memory Controller Memory */
709 fsl_i2c_t i2c[2]; /* I2C Controllers */
710 u8 res2[0x1300];
711 duart83xx_t duart[2]; /* DUART */
712 u8 res3[0x900];
713 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
714 u8 res4[0x1000];
715 spi8xxx_t spi; /* Serial Peripheral Interface */
716 u8 res5[0x1000];
717 pex83xx_t pciexp[1]; /* PCI Express Controller */
718 u8 res6[0x19000];
719 usb83xx_t usb[1]; /* USB DR Controller */
720 tsec83xx_t tsec[2];
721 u8 res7[0x6000];
722 tdmdmac83xx_t tdmdmac; /* TDM DMAC */
723 sdhc83xx_t sdhc; /* SDHC Controller */
724 u8 res8[0xb4000];
725 serdes83xx_t serdes[1]; /* SerDes Registers */
726 u8 res9[0x1CF00];
727} immap_t;
728
Mario Six60b11232019-01-21 09:17:29 +0100729#elif defined(CONFIG_ARCH_MPC837X)
Dave Liu5245ff52007-09-18 12:36:11 +0800730typedef struct immap {
731 sysconf83xx_t sysconf; /* System configuration */
732 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
733 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
734 rtclk83xx_t pit; /* Periodic Interval Timer */
735 gtm83xx_t gtm[2]; /* Global Timers Module */
736 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
737 arbiter83xx_t arbiter; /* System Arbiter Registers */
738 reset83xx_t reset; /* Reset Module */
739 clk83xx_t clk; /* System Clock Module */
740 pmc83xx_t pmc; /* Power Management Control Module */
741 gpio83xx_t gpio[2]; /* General purpose I/O module */
742 u8 res0[0x1200];
743 ddr83xx_t ddr; /* DDR Memory Controller Memory */
744 fsl_i2c_t i2c[2]; /* I2C Controllers */
745 u8 res1[0x1300];
746 duart83xx_t duart[2]; /* DUART */
747 u8 res2[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500748 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu5245ff52007-09-18 12:36:11 +0800749 u8 res3[0x1000];
Ben Warren7efe9272008-01-16 22:37:35 -0500750 spi8xxx_t spi; /* Serial Peripheral Interface */
Dave Liu5245ff52007-09-18 12:36:11 +0800751 dma83xx_t dma; /* DMA */
752 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
753 u8 res4[0x80];
754 ios83xx_t ios; /* Sequencer */
755 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
756 u8 res5[0xa00];
757 pex83xx_t pciexp[2]; /* PCI Express Controller */
758 u8 res6[0xd000];
759 sata83xx_t sata[4]; /* SATA Controller */
760 u8 res7[0x7000];
761 usb83xx_t usb[1]; /* USB DR Controller */
762 tsec83xx_t tsec[2];
763 u8 res8[0x8000];
764 sdhc83xx_t sdhc; /* SDHC Controller */
765 u8 res9[0x1000];
766 security83xx_t security;
767 u8 res10[0xA3000];
768 serdes83xx_t serdes[2]; /* SerDes Registers */
769 u8 res11[0xCE00];
770 rom83xx_t rom; /* On Chip ROM */
771} immap_t;
772
Mario Six84eb4312019-01-21 09:17:28 +0100773#elif defined(CONFIG_ARCH_MPC8360)
Eran Liberty9095d4a2005-07-28 10:08:46 -0500774typedef struct immap {
Dave Liu0b6bc772006-12-07 21:11:58 +0800775 sysconf83xx_t sysconf; /* System configuration */
776 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
777 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
778 rtclk83xx_t pit; /* Periodic Interval Timer */
779 u8 res0[0x200];
780 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
781 arbiter83xx_t arbiter; /* System Arbiter Registers */
782 reset83xx_t reset; /* Reset Module */
783 clk83xx_t clk; /* System Clock Module */
784 pmc83xx_t pmc; /* Power Management Control Module */
785 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
786 u8 res1[0x300];
787 u8 dll_ddr[0x100];
788 u8 dll_lbc[0x100];
789 u8 res2[0x200];
790 qepio83xx_t qepio; /* QE Parallel I/O ports */
791 qesba83xx_t qesba; /* QE Secondary Bus Access Windows */
792 u8 res3[0x400];
793 ddr83xx_t ddr; /* DDR Memory Controller Memory */
794 fsl_i2c_t i2c[2]; /* I2C Controllers */
795 u8 res4[0x1300];
796 duart83xx_t duart[2]; /* DUART */
797 u8 res5[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500798 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liu0b6bc772006-12-07 21:11:58 +0800799 u8 res6[0x2000];
800 dma83xx_t dma; /* DMA */
801 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
802 u8 res7[128];
803 ios83xx_t ios; /* Sequencer (IOS) */
804 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
805 u8 res8[0x4A00];
806 ddr83xx_t ddr_secondary; /* Secondary DDR Memory Controller Memory Map */
807 u8 res9[0x22000];
808 security83xx_t security;
809 u8 res10[0xC0000];
810 u8 qe[0x100000]; /* QE block */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500811} immap_t;
Dave Liue740c462006-12-07 21:13:15 +0800812
Mario Sixbe07e552019-01-21 09:17:26 +0100813#elif defined(CONFIG_ARCH_MPC832X)
Dave Liue740c462006-12-07 21:13:15 +0800814typedef struct immap {
815 sysconf83xx_t sysconf; /* System configuration */
816 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
817 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
818 rtclk83xx_t pit; /* Periodic Interval Timer */
819 gtm83xx_t gtm[2]; /* Global Timers Module */
820 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
821 arbiter83xx_t arbiter; /* System Arbiter Registers */
822 reset83xx_t reset; /* Reset Module */
823 clk83xx_t clk; /* System Clock Module */
824 pmc83xx_t pmc; /* Power Management Control Module */
825 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
826 u8 res0[0x300];
827 u8 dll_ddr[0x100];
828 u8 dll_lbc[0x100];
829 u8 res1[0x200];
830 qepio83xx_t qepio; /* QE Parallel I/O ports */
831 u8 res2[0x800];
832 ddr83xx_t ddr; /* DDR Memory Controller Memory */
833 fsl_i2c_t i2c[2]; /* I2C Controllers */
834 u8 res3[0x1300];
835 duart83xx_t duart[2]; /* DUART */
836 u8 res4[0x900];
Becky Bruce0d4cee12010-06-17 11:37:20 -0500837 fsl_lbc_t im_lbc; /* Local Bus Controller Regs */
Dave Liue740c462006-12-07 21:13:15 +0800838 u8 res5[0x2000];
839 dma83xx_t dma; /* DMA */
840 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
841 u8 res6[128];
842 ios83xx_t ios; /* Sequencer (IOS) */
843 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
844 u8 res7[0x27A00];
845 security83xx_t security;
846 u8 res8[0xC0000];
847 u8 qe[0x100000]; /* QE block */
848} immap_t;
Dave Liu0b6bc772006-12-07 21:11:58 +0800849#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -0500850
Biwen Lidb5d53b2021-02-05 19:01:47 +0800851struct ccsr_gpio {
852 u32 gpdir;
853 u32 gpodr;
854 u32 gpdat;
855 u32 gpier;
856 u32 gpimr;
857 u32 gpicr;
858 union {
859 u32 gpibe;
860 u8 res0[0xE8];
861 };
862};
863
Tom Rinid5c3bf22022-10-28 20:27:12 -0400864#define CFG_SYS_MPC8xxx_DDR_OFFSET (0x2000)
Tom Rini376b88a2022-10-28 20:27:13 -0400865#define CFG_SYS_FSL_DDR_ADDR \
Tom Rinid5c3bf22022-10-28 20:27:12 -0400866 (CONFIG_SYS_IMMR + CFG_SYS_MPC8xxx_DDR_OFFSET)
867#define CFG_SYS_MPC83xx_DMA_OFFSET (0x8000)
868#define CFG_SYS_MPC83xx_DMA_ADDR \
869 (CONFIG_SYS_IMMR + CFG_SYS_MPC83xx_DMA_OFFSET)
870#define CFG_SYS_MPC83xx_ESDHC_OFFSET (0x2e000)
871#define CFG_SYS_MPC83xx_ESDHC_ADDR \
872 (CONFIG_SYS_IMMR + CFG_SYS_MPC83xx_ESDHC_OFFSET)
Valeriy Glushkov24e671d2009-06-30 15:48:40 +0300873
Becky Bruce0d4cee12010-06-17 11:37:20 -0500874#define CONFIG_SYS_LBC_ADDR (&((immap_t *)CONFIG_SYS_IMMR)->im_lbc)
Sandeep Gopalpetb5541ef2009-10-31 00:35:04 +0530875
876#define CONFIG_SYS_TSEC1_OFFSET 0x24000
Kumar Gala2e972932009-10-31 11:23:41 -0500877#define CONFIG_SYS_MDIO1_OFFSET 0x24000
Sandeep Gopalpetb5541ef2009-10-31 00:35:04 +0530878
879#define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
880#define MDIO_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_MDIO1_OFFSET)
Dave Liufba13692006-10-31 19:25:38 -0600881#endif /* __IMMAP_83xx__ */