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