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_H
29#define __CONFIG_H
30
31#define CONFIG_PDM360NG 1
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48#define CONFIG_E300 1
49#define CONFIG_MPC512X 1
50#define CONFIG_FSL_DIU_FB 1
51
52#define CONFIG_SYS_TEXT_BASE 0xF0000000
53
54
55#define CONFIG_SYS_DEVICE_NULLDEV
56#define CONFIG_SILENT_CONSOLE
57
58
59#define CONFIG_VIDEO
60
61#if defined(CONFIG_VIDEO)
62#define CONFIG_CFB_CONSOLE
63#define CONFIG_VGA_AS_SINGLE_DEVICE
64#define CONFIG_SPLASH_SCREEN
65#define CONFIG_VIDEO_LOGO
66#define CONFIG_VIDEO_BMP_RLE8
67#endif
68
69#define CONFIG_SYS_MPC512X_CLKIN 33333333
70
71#define CONFIG_BOARD_EARLY_INIT_F
72#define CONFIG_MISC_INIT_R
73
74#define CONFIG_SYS_IMMR 0x80000000
75#define CONFIG_SYS_DIU_ADDR ((CONFIG_SYS_IMMR) + 0x2100)
76
77
78
79
80
81
82#define CONFIG_SYS_DDR_BASE 0x00000000
83#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
84#define CONFIG_SYS_MAX_RAM_SIZE 0x40000000
85
86
87#define CONFIG_SYS_IOCTRL_MUX_DDR 0x00000012
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135#define CONFIG_SYS_MDDRC_SYS_CFG 0xEA804A40
136#define CONFIG_SYS_MDDRC_TIME_CFG0 0x030C3D2E
137#define CONFIG_SYS_MDDRC_TIME_CFG1 0x68EC1168
138#define CONFIG_SYS_MDDRC_TIME_CFG2 0x34310864
139
140
141
142
143#define CONFIG_SYS_MDDRC_SYS_CFG_ALT1 0xE8604A40
144#define CONFIG_SYS_MDDRC_TIME_CFG0_ALT1 0x030C3D2E
145#define CONFIG_SYS_MDDRC_TIME_CFG1_ALT1 0x3CEC1168
146#define CONFIG_SYS_MDDRC_TIME_CFG2_ALT1 0x33310863
147
148#define CONFIG_SYS_MDDRC_SYS_CFG_EN 0xF0000000
149
150#define CONFIG_SYS_DDRCMD_NOP 0x01380000
151#define CONFIG_SYS_DDRCMD_PCHG_ALL 0x01100400
152#define CONFIG_SYS_DDRCMD_EM2 0x01020000
153#define CONFIG_SYS_DDRCMD_EM3 0x01030000
154
155#define CONFIG_SYS_DDRCMD_EN_DLL 0x01010040
156#define CONFIG_SYS_DDRCMD_RES_DLL 0x01000100
157#define CONFIG_SYS_DDRCMD_RFSH 0x01080000
158#define CONFIG_SYS_MICRON_INIT_DEV_OP 0x01000432
159
160#define CONFIG_SYS_DDRCMD_OCD_DEFAULT 0x010107C0
161
162#define CONFIG_SYS_DDRCMD_OCD_EXIT 0x01010440
163
164
165#define CONFIG_SYS_MDDRCGRP_PM_CFG1 0x00077777
166#define CONFIG_SYS_MDDRCGRP_PM_CFG2 0x00000000
167#define CONFIG_SYS_MDDRCGRP_HIPRIO_CFG 0x00000001
168#define CONFIG_SYS_MDDRCGRP_LUT0_MU 0xFFEEDDCC
169#define CONFIG_SYS_MDDRCGRP_LUT0_ML 0xBBAAAAAA
170#define CONFIG_SYS_MDDRCGRP_LUT1_MU 0x66666666
171#define CONFIG_SYS_MDDRCGRP_LUT1_ML 0x55555555
172#define CONFIG_SYS_MDDRCGRP_LUT2_MU 0x44444444
173#define CONFIG_SYS_MDDRCGRP_LUT2_ML 0x44444444
174#define CONFIG_SYS_MDDRCGRP_LUT3_MU 0x55555555
175#define CONFIG_SYS_MDDRCGRP_LUT3_ML 0x55555558
176#define CONFIG_SYS_MDDRCGRP_LUT4_MU 0x11111111
177#define CONFIG_SYS_MDDRCGRP_LUT4_ML 0x11111122
178#define CONFIG_SYS_MDDRCGRP_LUT0_AU 0xaaaaaaaa
179#define CONFIG_SYS_MDDRCGRP_LUT0_AL 0xaaaaaaaa
180#define CONFIG_SYS_MDDRCGRP_LUT1_AU 0x66666666
181#define CONFIG_SYS_MDDRCGRP_LUT1_AL 0x66666666
182#define CONFIG_SYS_MDDRCGRP_LUT2_AU 0x11111111
183#define CONFIG_SYS_MDDRCGRP_LUT2_AL 0x11111111
184#define CONFIG_SYS_MDDRCGRP_LUT3_AU 0x11111111
185#define CONFIG_SYS_MDDRCGRP_LUT3_AL 0x11111111
186#define CONFIG_SYS_MDDRCGRP_LUT4_AU 0x11111111
187#define CONFIG_SYS_MDDRCGRP_LUT4_AL 0x11111111
188
189
190
191
192#define CONFIG_SYS_FLASH_CFI
193#define CONFIG_FLASH_CFI_DRIVER
194#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
195
196#define CONFIG_SYS_FLASH_BASE 0xF0000000
197#define CONFIG_SYS_FLASH_SIZE 0x08000000
198
199#define CONFIG_SYS_FLASH1_BASE (CONFIG_SYS_FLASH_BASE + \
200 CONFIG_SYS_FLASH_SIZE)
201#define CONFIG_SYS_MAX_FLASH_SECT 512
202#define CONFIG_SYS_MAX_FLASH_BANKS 2
203#define CONFIG_SYS_FLASH_BANKS_LIST \
204 {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH1_BASE}
205
206#define CONFIG_SYS_SRAM_BASE 0x50000000
207#define CONFIG_SYS_SRAM_SIZE 0x00020000
208
209
210#define CONFIG_SYS_CS0_CFG 0x05059350
211
212#define CONFIG_SYS_CS1_CFG 0x05059350
213
214#define CONFIG_SYS_MRAM_BASE 0x50040000
215#define CONFIG_SYS_MRAM_SIZE 0x00020000
216
217#define CONFIG_SYS_CS2_CFG 0x05059110
218
219
220#define CONFIG_SYS_CS_ALETIMING 0x00000007
221
222
223
224
225#define CONFIG_CMD_NAND
226#define CONFIG_NAND_MPC5121_NFC
227#define CONFIG_SYS_NAND_BASE 0x40000000
228#define CONFIG_SYS_MAX_NAND_DEVICE 1
229#define CONFIG_SYS_NAND_SELECT_DEVICE
230
231
232
233
234#define CONFIG_FSL_NFC_WIDTH 1
235#define CONFIG_FSL_NFC_WRITE_SIZE 2048
236#define CONFIG_FSL_NFC_SPARE_SIZE 64
237#define CONFIG_FSL_NFC_CHIPS CONFIG_SYS_MAX_NAND_DEVICE
238
239
240
241
242#define CONFIG_CMD_MTDPARTS
243#define CONFIG_MTD_DEVICE
244#define CONFIG_FLASH_CFI_MTD
245#define MTDIDS_DEFAULT "nor0=f0000000.flash,nor1=f8000000.flash," \
246 "nand0=MPC5121 NAND"
247
248
249
250
251#define MTDPARTS_DEFAULT "mtdparts=f0000000.flash:512k(u-boot)," \
252 "256k(environment1)," \
253 "256k(environment2)," \
254 "256k(splash-factory)," \
255 "2m(FIT: recovery)," \
256 "4608k(fs-recovery)," \
257 "256k(splash-customer),"\
258 "5m(FIT: kernel+dtb)," \
259 "64m(rootfs squash)ro," \
260 "51m(userfs ubi);" \
261 "f8000000.flash:-(unused);" \
262 "MPC5121 NAND:1024m(extended-userfs)"
263
264
265
266
267
268#ifdef CONFIG_CMD_MTDPARTS
269#define CONFIG_FDT_FIXUP_PARTITIONS
270#endif
271
272#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
273#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
274#ifdef CONFIG_FSL_DIU_FB
275#define CONFIG_SYS_MALLOC_LEN (6 * 1024 * 1024)
276#else
277#define CONFIG_SYS_MALLOC_LEN (512 * 1024)
278#endif
279
280
281
282
283#define CONFIG_CONS_INDEX 1
284
285
286
287
288#define CONFIG_PSC_CONSOLE 6
289#if CONFIG_PSC_CONSOLE != 6
290#error CONFIG_PSC_CONSOLE must be 6
291#endif
292
293#define CONSOLE_FIFO_TX_SIZE FIFOC_PSC6_TX_SIZE
294#define CONSOLE_FIFO_TX_ADDR FIFOC_PSC6_TX_ADDR
295#define CONSOLE_FIFO_RX_SIZE FIFOC_PSC6_RX_SIZE
296#define CONSOLE_FIFO_RX_ADDR FIFOC_PSC6_RX_ADDR
297
298
299
300
301#define CONFIG_SERIAL_MULTI
302#define CONFIG_SYS_PSC1
303#define CONFIG_SYS_PSC4
304#define CONFIG_SYS_PSC6
305
306
307
308
309#define CONFIG_SYS_PDM360NG_COPROC_READ_DELAY 5000
310#define CONFIG_SYS_PDM360NG_COPROC_BAUDRATE 38400
311
312
313
314
315#define CONFIG_HARD_I2C
316#define CONFIG_I2C_MULTI_BUS
317#define CONFIG_I2C_CMD_TREE
318
319#define CONFIG_SYS_I2C_SPEED 100000
320#define CONFIG_SYS_I2C_SLAVE 0x7F
321
322
323
324
325#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
326#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
327#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
328#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
329
330
331
332
333#define CONFIG_SYS_I2C_EEPROM_BUS_NUM 0
334#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x10
335
336
337
338
339#define CONFIG_ENV_OVERWRITE
340
341
342
343
344#define CONFIG_MPC512x_FEC 1
345#define CONFIG_PHY_ADDR 0x1F
346#define CONFIG_MII 1
347#define CONFIG_FEC_AN_TIMEOUT 1
348#define CONFIG_HAS_ETH0
349
350
351
352
353#define CONFIG_RTC_M41T62
354#define CONFIG_SYS_I2C_RTC_ADDR 0x68
355
356
357
358
359#define CONFIG_ENV_IS_IN_FLASH 1
360
361#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
362 CONFIG_SYS_MONITOR_LEN)
363#define CONFIG_ENV_SIZE 0x2000
364#define CONFIG_ENV_SECT_SIZE 0x40000
365
366
367#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
368#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
369
370#define CONFIG_LOADS_ECHO 1
371#define CONFIG_SYS_LOADS_BAUD_CHANGE 1
372
373#include <config_cmd_default.h>
374
375#define CONFIG_CMD_ASKENV
376#define CONFIG_CMD_DATE
377#define CONFIG_CMD_DHCP
378#define CONFIG_CMD_EEPROM
379#define CONFIG_CMD_I2C
380#define CONFIG_CMD_MII
381#define CONFIG_CMD_PING
382#define CONFIG_CMD_REGINFO
383
384#ifdef CONFIG_VIDEO
385#define CONFIG_CMD_BMP
386#endif
387
388
389
390
391#define CONFIG_SYS_LONGHELP
392#define CONFIG_SYS_LOAD_ADDR 0x2000000
393#define CONFIG_SYS_PROMPT "=> "
394
395#ifdef CONFIG_CMD_KGDB
396 #define CONFIG_SYS_CBSIZE 1024
397#else
398 #define CONFIG_SYS_CBSIZE 256
399#endif
400
401
402#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
403
404#define CONFIG_SYS_MAXARGS 16
405
406#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
407
408#define CONFIG_SYS_HZ 1000
409
410
411
412
413
414
415
416#define CONFIG_SYS_BOOTMAPSZ (256 << 20)
417
418
419#define CONFIG_SYS_DCACHE_SIZE 32768
420#define CONFIG_SYS_CACHELINE_SIZE 32
421#ifdef CONFIG_CMD_KGDB
422
423#define CONFIG_SYS_CACHELINE_SHIFT 5
424#endif
425
426#define CONFIG_SYS_HID0_INIT 0x000000000
427#define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | HID0_ICE)
428#define CONFIG_SYS_HID2 HID2_HBE
429
430#define CONFIG_HIGH_BATS 1
431
432#ifdef CONFIG_CMD_KGDB
433#define CONFIG_KGDB_BAUDRATE 230400
434#define CONFIG_KGDB_SER_INDEX 2
435#endif
436
437#ifdef CONFIG_SERIAL_MULTI
438
439#define CONFIG_POST (CONFIG_SYS_POST_COPROC)
440#endif
441
442
443
444
445#define CONFIG_TIMESTAMP
446
447#define CONFIG_HOSTNAME pdm360ng
448
449#define CONFIG_LOADADDR 400000
450
451#define CONFIG_BOOTDELAY 5
452
453#define CONFIG_PREBOOT "echo;" \
454 "echo PDM360NG SAMPLE;" \
455 "echo"
456
457#define CONFIG_BOOTCOMMAND "run env_cont"
458
459#define CONFIG_OF_LIBFDT 1
460#define CONFIG_OF_BOARD_SETUP 1
461#define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES 1
462#define CONFIG_FIT
463#define CONFIG_FIT_VERBOSE
464
465#define OF_CPU "PowerPC,5121@0"
466#define OF_SOC_COMPAT "fsl,mpc5121-immr"
467#define OF_TBCLK (bd->bi_busfreq / 4)
468#define OF_STDOUT_PATH "/soc@80000000/serial@11600"
469
470
471
472
473#include "mpc5121-common.h"
474
475#endif
476