blob: 6717e0bd65935fbf4ba6e6d949b7a841fc964bfb [file] [log] [blame]
TsiChung Liewbf9a5212009-06-12 11:29:00 +00001/*
2 * MCF520x Internal Memory Map
3 *
4 * Copyright (C) 2004-2009 Freescale Semiconductor, Inc.
5 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
6 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
TsiChung Liewbf9a5212009-06-12 11:29:00 +00008 */
9
10#ifndef __IMMAP_520X__
11#define __IMMAP_520X__
12
13#define MMAP_SCM1 (CONFIG_SYS_MBAR + 0x00000000)
14#define MMAP_XBS (CONFIG_SYS_MBAR + 0x00004000)
15#define MMAP_FBCS (CONFIG_SYS_MBAR + 0x00008000)
16#define MMAP_FEC0 (CONFIG_SYS_MBAR + 0x00030000)
17#define MMAP_SCM2 (CONFIG_SYS_MBAR + 0x00040000)
18#define MMAP_EDMA (CONFIG_SYS_MBAR + 0x00044000)
19#define MMAP_INTC0 (CONFIG_SYS_MBAR + 0x00048000)
20#define MMAP_INTCACK (CONFIG_SYS_MBAR + 0x00054000)
21#define MMAP_I2C (CONFIG_SYS_MBAR + 0x00058000)
22#define MMAP_QSPI (CONFIG_SYS_MBAR + 0x0005C000)
23#define MMAP_UART0 (CONFIG_SYS_MBAR + 0x00060000)
24#define MMAP_UART1 (CONFIG_SYS_MBAR + 0x00064000)
25#define MMAP_UART2 (CONFIG_SYS_MBAR + 0x00068000)
26#define MMAP_DTMR0 (CONFIG_SYS_MBAR + 0x00070000)
27#define MMAP_DTMR1 (CONFIG_SYS_MBAR + 0x00074000)
28#define MMAP_DTMR2 (CONFIG_SYS_MBAR + 0x00078000)
29#define MMAP_DTMR3 (CONFIG_SYS_MBAR + 0x0007C000)
30#define MMAP_PIT0 (CONFIG_SYS_MBAR + 0x00080000)
31#define MMAP_PIT1 (CONFIG_SYS_MBAR + 0x00084000)
32#define MMAP_EPORT0 (CONFIG_SYS_MBAR + 0x00088000)
33#define MMAP_WDOG (CONFIG_SYS_MBAR + 0x0008C000)
34#define MMAP_PLL (CONFIG_SYS_MBAR + 0x00090000)
35#define MMAP_RCM (CONFIG_SYS_MBAR + 0x000A0000)
36#define MMAP_CCM (CONFIG_SYS_MBAR + 0x000A0004)
37#define MMAP_GPIO (CONFIG_SYS_MBAR + 0x000A4000)
38#define MMAP_SDRAM (CONFIG_SYS_MBAR + 0x000A8000)
39
40#include <asm/coldfire/crossbar.h>
41#include <asm/coldfire/edma.h>
42#include <asm/coldfire/eport.h>
43#include <asm/coldfire/flexbus.h>
44#include <asm/coldfire/intctrl.h>
45#include <asm/coldfire/qspi.h>
46
47/* System Controller Module */
48typedef struct scm1 {
49 u32 mpr; /* 0x00 Master Privilege */
50 u32 rsvd1[7];
51 u32 pacra; /* 0x20 Peripheral Access Ctrl A */
52 u32 pacrb; /* 0x24 Peripheral Access Ctrl B */
53 u32 pacrc; /* 0x28 Peripheral Access Ctrl C */
54 u32 pacrd; /* 0x2C Peripheral Access Ctrl D */
55 u32 rsvd2[4];
56 u32 pacre; /* 0x40 Peripheral Access Ctrl E */
57 u32 pacrf; /* 0x44 Peripheral Access Ctrl F */
58 u32 rsvd3[3];
59 u32 bmt; /* 0x50 bus monitor */
60} scm1_t;
61
62typedef struct scm2 {
63 u8 rsvd1[19]; /* 0x00 - 0x12 */
64 u8 wcr; /* 0x13 */
65 u16 rsvd2; /* 0x14 - 0x15 */
66 u16 cwcr; /* 0x16 */
67 u8 rsvd3[3]; /* 0x18 - 0x1A */
68 u8 cwsr; /* 0x1B */
69 u8 rsvd4[3]; /* 0x1C - 0x1E */
70 u8 scmisr; /* 0x1F */
71 u8 rsvd5[79]; /* 0x20 - 0x6F */
72 u32 cfadr; /* 0x70 */
73 u8 rsvd7; /* 0x74 */
74 u8 cfier; /* 0x75 */
75 u8 cfloc; /* 0x76 */
76 u8 cfatr; /* 0x77 */
77 u32 rsvd8; /* 0x78 - 0x7B */
78 u32 cfdtr; /* 0x7C */
79} scm2_t;
80
81/* Chip configuration module */
82typedef struct rcm {
83 u8 rcr;
84 u8 rsr;
85} rcm_t;
86
87typedef struct ccm_ctrl {
88 u16 ccr; /* 0x00 Chip Cfg */
89 u16 res1; /* 0x02 */
90 u16 rcon; /* 0x04 Reset Cfg */
91 u16 cir; /* 0x06 Chip ID */
92} ccm_t;
93
94/* GPIO port */
95typedef struct gpio_ctrl {
96 /* Port Output Data */
97 u8 podr_busctl; /* 0x00 */
98 u8 podr_be; /* 0x01 */
99 u8 podr_cs; /* 0x02 */
100 u8 podr_feci2c; /* 0x03 */
101 u8 podr_qspi; /* 0x04 */
102 u8 podr_timer; /* 0x05 */
103 u8 podr_uart; /* 0x06 */
104 u8 podr_fech; /* 0x07 */
105 u8 podr_fecl; /* 0x08 */
106 u8 res01[3]; /* 0x9 - 0x0B */
107
108 /* Port Data Direction */
109 u8 pddr_busctl; /* 0x0C */
110 u8 pddr_be; /* 0x0D */
111 u8 pddr_cs; /* 0x0E */
112 u8 pddr_feci2c; /* 0x0F */
113 u8 pddr_qspi; /* 0x10*/
114 u8 pddr_timer; /* 0x11 */
115 u8 pddr_uart; /* 0x12 */
116 u8 pddr_fech; /* 0x13 */
117 u8 pddr_fecl; /* 0x14 */
118 u8 res02[5]; /* 0x15 - 0x19 */
119
120 /* Port Data Direction */
121 u8 ppdr_cs; /* 0x1A */
122 u8 ppdr_feci2c; /* 0x1B */
123 u8 ppdr_qspi; /* 0x1C */
124 u8 ppdr_timer; /* 0x1D */
125 u8 ppdr_uart; /* 0x1E */
126 u8 ppdr_fech; /* 0x1F */
127 u8 ppdr_fecl; /* 0x20 */
128 u8 res03[3]; /* 0x21 - 0x23 */
129
130 /* Port Clear Output Data */
131 u8 pclrr_busctl; /* 0x24 */
132 u8 pclrr_be; /* 0x25 */
133 u8 pclrr_cs; /* 0x26 */
134 u8 pclrr_feci2c; /* 0x27 */
135 u8 pclrr_qspi; /* 0x28 */
136 u8 pclrr_timer; /* 0x29 */
137 u8 pclrr_uart; /* 0x2A */
138 u8 pclrr_fech; /* 0x2B */
139 u8 pclrr_fecl; /* 0x2C */
140 u8 res04[3]; /* 0x2D - 0x2F */
141
142 /* Pin Assignment */
143 u8 par_busctl; /* 0x30 */
144 u8 par_be; /* 0x31 */
145 u8 par_cs; /* 0x32 */
146 u8 par_feci2c; /* 0x33 */
147 u8 par_qspi; /* 0x34 */
148 u8 par_timer; /* 0x35 */
149 u16 par_uart; /* 0x36 */
150 u8 par_fec; /* 0x38 */
151 u8 par_irq; /* 0x39 */
152
153 /* Mode Select Control */
154 /* Drive Strength Control */
155 u8 mscr_fb; /* 0x3A */
156 u8 mscr_sdram; /* 0x3B */
157
158 u8 dscr_i2c; /* 0x3C */
159 u8 dscr_misc; /* 0x3D */
160 u8 dscr_fec; /* 0x3E */
161 u8 dscr_uart; /* 0x3F */
162 u8 dscr_qspi; /* 0x40 */
163} gpio_t;
164
165/* SDRAM controller */
166typedef struct sdram_ctrl {
167 u32 mode; /* 0x00 Mode/Extended Mode */
168 u32 ctrl; /* 0x04 Ctrl */
169 u32 cfg1; /* 0x08 Cfg 1 */
170 u32 cfg2; /* 0x0C Cfg 2 */
171 u32 res1[64]; /* 0x10 - 0x10F */
172 u32 cs0; /* 0x110 Chip Select 0 Cfg */
173 u32 cs1; /* 0x114 Chip Select 1 Cfg */
174} sdram_t;
175
176/* Clock Module */
177typedef struct pll_ctrl {
178 u8 odr; /* 0x00 Output divider */
179 u8 rsvd1;
180 u8 cr; /* 0x02 Control */
181 u8 rsvd2;
182 u8 mdr; /* 0x04 Modulation Divider */
183 u8 rsvd3;
184 u8 fdr; /* 0x06 Feedback Divider */
185 u8 rsvd4;
186} pll_t;
187
188/* Watchdog registers */
189typedef struct wdog_ctrl {
190 u16 cr; /* 0x00 Control */
191 u16 mr; /* 0x02 Modulus */
192 u16 cntr; /* 0x04 Count */
193 u16 sr; /* 0x06 Service */
194} wdog_t;
195
196#endif /* __IMMAP_520X__ */