1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28#ifndef __CONFIG_KM8XX_H
29#define __CONFIG_KM8XX_H
30
31
32
33
34
35
36#define CONFIG_KM8XX 1
37
38
39#include "keymile-common.h"
40
41#if defined(CONFIG_KMSUPX4)
42#undef CONFIG_I2C_MUX
43#endif
44
45#define CONFIG_8xx_GCLK_FREQ 66000000
46
47#define CONFIG_SYS_SMC_UCODE_PATCH 1
48#define CONFIG_SYS_SMC_DPMEM_OFFSET 0x1fc0
49#define CONFIG_8xx_CONS_SMC1 1
50#define CONFIG_SYS_SMC_RXBUFLEN 128
51#define CONFIG_SYS_MAXIDLE 10
52
53#define CONFIG_SYS_CPM_BOOTCOUNT_ADDR 0x1eb0
54
55
56
57
58#define BOOTFLASH_START F0000000
59#define CONFIG_PRAM 512
60
61#define CONFIG_PREBOOT "echo;" \
62 "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
63 "echo"
64
65#define BOOTFLASH_START F0000000
66#define CONFIG_PRAM 512
67
68#if defined(CONFIG_MGSUVD)
69#define CONFIG_ENV_IVM "EEprom_ivm=pca9544a:70:4 \0"
70#else
71#define CONFIG_ENV_IVM ""
72#endif
73
74#define MTDIDS_DEFAULT "nor0=app"
75#define MTDPARTS_DEFAULT \
76 "mtdparts=app:384k(u-boot),128k(env),128k(envred),128k(free)," \
77 "1536k(esw0),8704k(rootfs0),1536k(esw1),2432k(rootfs1),640k(var)," \
78 "768k(cfg)"
79
80#define CONFIG_EXTRA_ENV_SETTINGS \
81 CONFIG_KM_DEF_ENV \
82 "rootpath=/opt/eldk/ppc_8xx\0" \
83 "addcon=setenv bootargs ${bootargs} " \
84 "console=ttyCPM0,${baudrate}\0" \
85 "mtdids=nor0=app \0" \
86 "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \
87 "partition=nor0,9 \0" \
88 "new_env=prot off F0060000 F009FFFF; era F0060000 F009FFFF \0" \
89 CONFIG_ENV_IVM \
90 ""
91
92#undef CONFIG_RTC_MPC8xx
93
94#define CONFIG_TIMESTAMP
95
96
97
98
99
100
101
102
103
104#define CONFIG_SYS_IMMR 0xFFF00000
105
106
107
108
109#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
110#define CONFIG_SYS_INIT_RAM_END 0x2F00
111#define CONFIG_SYS_GBL_DATA_SIZE 64
112#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
113#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
114
115
116
117
118
119
120#define CONFIG_SYS_SDRAM_BASE 0x00000000
121#define CONFIG_SYS_FLASH_BASE 0xf0000000
122#define CONFIG_SYS_MONITOR_LEN (384 << 10)
123#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
124#define CONFIG_SYS_MALLOC_LEN (256 << 10)
125
126
127
128
129
130
131#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
132
133
134
135
136
137#define CONFIG_SYS_MAX_FLASH_BANKS 1
138#define CONFIG_SYS_FLASH_SIZE 32
139#define CONFIG_SYS_FLASH_CFI
140#define CONFIG_FLASH_CFI_DRIVER
141
142#define CONFIG_SYS_MAX_FLASH_SECT 256
143
144#define CONFIG_SYS_FLASH_ERASE_TOUT 120000
145#define CONFIG_SYS_FLASH_WRITE_TOUT 500
146
147#define CONFIG_ENV_IS_IN_FLASH 1
148#define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN
149#define CONFIG_ENV_SIZE 0x04000
150#define CONFIG_ENV_SECT_SIZE 0x20000
151
152
153#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET+CONFIG_ENV_SECT_SIZE)
154#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
155#define CONFIG_ENV_BUFFER_PRINT 1
156
157
158
159
160#define CONFIG_SYS_CACHELINE_SIZE 16
161#if defined(CONFIG_CMD_KGDB)
162#define CONFIG_SYS_CACHELINE_SHIFT 4
163#endif
164
165
166
167
168
169
170
171#define CONFIG_SYS_SYPCR 0xffffff89
172
173
174
175
176
177#if defined(CONFIG_MGSUVD)
178#define CONFIG_SYS_SIUMCR 0x00610480
179#else
180#define CONFIG_SYS_SIUMCR 0x00610400
181#endif
182
183
184
185
186
187
188#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
189
190
191
192
193
194
195#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
196
197
198
199
200
201
202
203#if defined(CONFIG_MGSUVD)
204#define SCCR_MASK 0x01800000
205#else
206#define SCCR_MASK 0x00000000
207#endif
208#define CONFIG_SYS_SCCR 0x01800000
209
210#define CONFIG_SYS_DER 0
211
212
213
214
215
216
217
218#define FLASH_BASE0_PRELIM 0xf0000000
219
220
221
222
223
224#define CONFIG_SYS_REMAP_OR_AM 0x80000000
225#define CONFIG_SYS_PRELIM_OR_AM 0xE0000000
226
227
228
229
230#define CONFIG_SYS_OR0_PRELIM 0xfe000954
231#define CONFIG_SYS_BR0_PRELIM 0xf0000401
232
233
234
235
236
237#define SDRAM_BASE1_PRELIM 0x00000000
238#define SDRAM_MAX_SIZE (64 << 20)
239
240
241#define CONFIG_SYS_OR_TIMING_SDRAM 0x00000A00
242
243#define CONFIG_SYS_OR1_PRELIM 0xfc000800
244#define CONFIG_SYS_BR1_PRELIM (0x000000C0 | 0x01)
245
246#define CONFIG_SYS_MPTPR 0x0200
247
248
249#if defined(CONFIG_MGSUVD)
250#define CONFIG_SYS_MBMR 0x10964111
251#else
252#define CONFIG_SYS_MBMR 0x20964111
253#endif
254#define CONFIG_SYS_MAR 0x00000088
255
256
257
258
259
260
261
262
263#define CONFIG_SYS_PTA_PER_CLK ((4096 * 64 * 1000) / (4 * 64))
264
265
266
267#define CONFIG_SYS_PIGGY_BASE (0x30000000)
268#if defined(CONFIG_MGSUVD)
269#define CONFIG_SYS_OR3_PRELIM (0xfe000d24)
270#define CONFIG_SYS_BR3_PRELIM (0x30000401)
271#else
272#define CONFIG_SYS_OR3_PRELIM (0xf8000d26)
273#define CONFIG_SYS_BR3_PRELIM (0x30000401)
274#endif
275
276
277
278
279
280
281#define BOOTFLAG_COLD 0x01
282#define BOOTFLAG_WARM 0x02
283
284#define CONFIG_SCC3_ENET
285#define CONFIG_ETHPRIME "SCC ETHERNET"
286#define CONFIG_HAS_ETH0
287
288
289#define CONFIG_OF_LIBFDT 1
290#define CONFIG_OF_BOARD_SETUP 1
291
292#define OF_STDOUT_PATH "/soc/cpm/serial@a80"
293
294
295#undef CONFIG_HARD_I2C
296#define CONFIG_SOFT_I2C 1
297
298#define CONFIG_SYS_I2C_SPEED 50000
299#define CONFIG_SYS_I2C_SLAVE 0x7F
300#define I2C_SOFT_DECLARATIONS
301
302
303
304
305#define I2C_BASE_DIR ((u16 *)(CONFIG_SYS_PIGGY_BASE + 0x04))
306#define I2C_BASE_PORT ((u8 *)(CONFIG_SYS_PIGGY_BASE + 0x09))
307
308#define SDA_BIT 0x40
309#define SCL_BIT 0x80
310#define SDA_CONF 0x1000
311#define SCL_CONF 0x2000
312
313#define I2C_ACTIVE do {} while (0)
314#define I2C_TRISTATE do {} while (0)
315#define I2C_READ ((in_8(I2C_BASE_PORT) & SDA_BIT) == SDA_BIT)
316#define I2C_SDA(bit) if(bit) { \
317 clrbits(be16, I2C_BASE_DIR, SDA_CONF); \
318 } else { \
319 clrbits(8, I2C_BASE_PORT, SDA_BIT); \
320 setbits(be16, I2C_BASE_DIR, SDA_CONF); \
321 }
322#define I2C_SCL(bit) if(bit) { \
323 clrbits(be16, I2C_BASE_DIR, SCL_CONF); \
324 } else { \
325 clrbits(8, I2C_BASE_PORT, SCL_BIT); \
326 setbits(be16, I2C_BASE_DIR, SCL_CONF); \
327 }
328#define I2C_DELAY udelay(50)
329
330#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
331
332
333#define CONFIG_DTT_LM75 1
334#if defined(CONFIG_MGSUVD)
335#define CONFIG_DTT_SENSORS {0, 2, 4, 6}
336#else
337#define CONFIG_DTT_SENSORS {0}
338#endif
339#define CONFIG_SYS_DTT_MAX_TEMP 70
340#define CONFIG_SYS_DTT_LOW_TEMP -30
341#define CONFIG_SYS_DTT_HYSTERESIS 3
342#define CONFIG_SYS_DTT_BUS_NUM (CONFIG_SYS_MAX_I2C_BUS)
343#endif
344