xref: /rk3399_rockchip-uboot/include/configs/MPC8313ERDB.h (revision cfcc706c901d603707657919484e4f65467be9ff)
196b8a054SScott Wood /*
2e8d3ca8bSScott Wood  * Copyright (C) Freescale Semiconductor, Inc. 2006, 2010.
396b8a054SScott Wood  *
41a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
596b8a054SScott Wood  */
696b8a054SScott Wood /*
796b8a054SScott Wood  * mpc8313epb board configuration file
896b8a054SScott Wood  */
996b8a054SScott Wood 
1096b8a054SScott Wood #ifndef __CONFIG_H
1196b8a054SScott Wood #define __CONFIG_H
1296b8a054SScott Wood 
1396b8a054SScott Wood /*
1496b8a054SScott Wood  * High Level Configuration Options
1596b8a054SScott Wood  */
1696b8a054SScott Wood #define CONFIG_E300		1
172c7920afSPeter Tyser #define CONFIG_MPC831x		1
1896b8a054SScott Wood #define CONFIG_MPC8313		1
1996b8a054SScott Wood #define CONFIG_MPC8313ERDB	1
2096b8a054SScott Wood 
2122f4442dSScott Wood #ifdef CONFIG_NAND
2222f4442dSScott Wood #define CONFIG_SPL_INIT_MINIMAL
2322f4442dSScott Wood #define CONFIG_SPL_FLUSH_IMAGE
2422f4442dSScott Wood #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
2522f4442dSScott Wood #define CONFIG_SPL_MPC83XX_WAIT_FOR_NAND
2622f4442dSScott Wood 
2722f4442dSScott Wood #ifdef CONFIG_SPL_BUILD
2822f4442dSScott Wood #define CONFIG_NS16550_MIN_FUNCTIONS
2922f4442dSScott Wood #endif
3022f4442dSScott Wood 
3122f4442dSScott Wood #define CONFIG_SYS_TEXT_BASE	0x00100000 /* CONFIG_SYS_NAND_U_BOOT_DST */
3222f4442dSScott Wood #define CONFIG_SYS_TEXT_BASE_SPL 0xfff00000
3322f4442dSScott Wood #define CONFIG_SPL_MAX_SIZE	(4 * 1024)
346113d3f2SBenoît Thébaudeau #define CONFIG_SPL_PAD_TO	0x4000
3522f4442dSScott Wood 
36f1c574d4SScott Wood #define CONFIG_SYS_NAND_U_BOOT_SIZE  (512 << 10)
37f1c574d4SScott Wood #define CONFIG_SYS_NAND_U_BOOT_DST   0x00100000
38f1c574d4SScott Wood #define CONFIG_SYS_NAND_U_BOOT_START 0x00100100
39f1c574d4SScott Wood #define CONFIG_SYS_NAND_U_BOOT_OFFS  16384
40f1c574d4SScott Wood #define CONFIG_SYS_NAND_U_BOOT_RELOC 0x00010000
41f1c574d4SScott Wood #define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_RELOC + 0x10000)
42f1c574d4SScott Wood 
4322f4442dSScott Wood #ifdef CONFIG_SPL_BUILD
44f1c574d4SScott Wood #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE_SPL /* start of monitor */
4522f4442dSScott Wood #endif
4622f4442dSScott Wood 
4722f4442dSScott Wood #endif /* CONFIG_NAND */
48f1c574d4SScott Wood 
492ae18241SWolfgang Denk #ifndef CONFIG_SYS_TEXT_BASE
502ae18241SWolfgang Denk #define CONFIG_SYS_TEXT_BASE	0xFE000000
512ae18241SWolfgang Denk #endif
522ae18241SWolfgang Denk 
53f1c574d4SScott Wood #ifndef CONFIG_SYS_MONITOR_BASE
54f1c574d4SScott Wood #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE	/* start of monitor */
55f1c574d4SScott Wood #endif
56f1c574d4SScott Wood 
57842033e6SGabor Juhos #define CONFIG_PCI_INDIRECT_BRIDGE
580914f483SBecky Bruce #define CONFIG_FSL_ELBC 1
5996b8a054SScott Wood 
6089c7784eSTimur Tabi #define CONFIG_MISC_INIT_R
6189c7784eSTimur Tabi 
6289c7784eSTimur Tabi /*
6389c7784eSTimur Tabi  * On-board devices
644ce1e23bSYork Sun  *
654ce1e23bSYork Sun  * TSEC1 is VSC switch
664ce1e23bSYork Sun  * TSEC2 is SoC TSEC
6789c7784eSTimur Tabi  */
6889c7784eSTimur Tabi #define CONFIG_VSC7385_ENET
694ce1e23bSYork Sun #define CONFIG_TSEC2
7089c7784eSTimur Tabi 
716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_66MHZ
725c5d3242SKim Phillips #define CONFIG_83XX_CLKIN	66666667	/* in Hz */
736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #elif defined(CONFIG_SYS_33MHZ)
745c5d3242SKim Phillips #define CONFIG_83XX_CLKIN	33333333	/* in Hz */
7596b8a054SScott Wood #else
7696b8a054SScott Wood #error Unknown oscillator frequency.
7796b8a054SScott Wood #endif
7896b8a054SScott Wood 
7996b8a054SScott Wood #define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
8096b8a054SScott Wood 
810eaf8f9eSJoe Hershberger #define CONFIG_BOARD_EARLY_INIT_R		/* call board_early_init_r */
8296b8a054SScott Wood 
836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IMMR		0xE0000000
8496b8a054SScott Wood 
8522f4442dSScott Wood #if defined(CONFIG_NAND) && !defined(CONFIG_SPL_BUILD)
866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_DEFAULT_IMMR	CONFIG_SYS_IMMR
87e4c09508SScott Wood #endif
88e4c09508SScott Wood 
896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	0x00001000
906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END		0x07f00000
9196b8a054SScott Wood 
9296b8a054SScott Wood /* Early revs of this board will lock up hard when attempting
9396b8a054SScott Wood  * to access the PMC registers, unless a JTAG debugger is
9496b8a054SScott Wood  * connected, or some resistor modifications are made.
9596b8a054SScott Wood  */
966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_8313ERDB_BROKEN_PMC 1
9796b8a054SScott Wood 
986d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ACR_PIPE_DEP	3	/* Arbiter pipeline depth (0-3) */
996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ACR_RPTCNT		3	/* Arbiter repeat count (0-7) */
10096b8a054SScott Wood 
10196b8a054SScott Wood /*
10289c7784eSTimur Tabi  * Device configurations
10389c7784eSTimur Tabi  */
10489c7784eSTimur Tabi 
10589c7784eSTimur Tabi /* Vitesse 7385 */
10689c7784eSTimur Tabi 
10789c7784eSTimur Tabi #ifdef CONFIG_VSC7385_ENET
10889c7784eSTimur Tabi 
1094ce1e23bSYork Sun #define CONFIG_TSEC1
11089c7784eSTimur Tabi 
11189c7784eSTimur Tabi /* The flash address and size of the VSC7385 firmware image */
11289c7784eSTimur Tabi #define CONFIG_VSC7385_IMAGE		0xFE7FE000
11389c7784eSTimur Tabi #define CONFIG_VSC7385_IMAGE_SIZE	8192
11489c7784eSTimur Tabi 
11589c7784eSTimur Tabi #endif
11689c7784eSTimur Tabi 
11789c7784eSTimur Tabi /*
11896b8a054SScott Wood  * DDR Setup
11996b8a054SScott Wood  */
1206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_BASE		0x00000000 /* DDR is system memory*/
1216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE		CONFIG_SYS_DDR_BASE
1226d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_SDRAM_BASE	CONFIG_SYS_DDR_BASE
12396b8a054SScott Wood 
12496b8a054SScott Wood /*
12596b8a054SScott Wood  * Manually set up DDR parameters, as this board does not
12696b8a054SScott Wood  * seem to have the SPD connected to I2C.
12796b8a054SScott Wood  */
1286d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_SIZE	128		/* MB */
1292e651b24SJoe Hershberger #define CONFIG_SYS_DDR_CS0_CONFIG	(CSCONFIG_EN \
1302fef4020SJoe Hershberger 				| CSCONFIG_ODT_RD_NEVER \
1312fef4020SJoe Hershberger 				| CSCONFIG_ODT_WR_ONLY_CURRENT \
132261c07bcSJoe Hershberger 				| CSCONFIG_ROW_BIT_13 \
133261c07bcSJoe Hershberger 				| CSCONFIG_COL_BIT_10)
134e1d8ed2cSPoonam Aggrwal 				/* 0x80010102 */
13596b8a054SScott Wood 
1366d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_TIMING_3	0x00000000
1376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_TIMING_0	((0 << TIMING_CFG0_RWT_SHIFT) \
13896b8a054SScott Wood 				| (0 << TIMING_CFG0_WRT_SHIFT) \
13996b8a054SScott Wood 				| (0 << TIMING_CFG0_RRT_SHIFT) \
14096b8a054SScott Wood 				| (0 << TIMING_CFG0_WWT_SHIFT) \
14196b8a054SScott Wood 				| (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) \
14296b8a054SScott Wood 				| (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) \
14396b8a054SScott Wood 				| (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) \
14496b8a054SScott Wood 				| (2 << TIMING_CFG0_MRS_CYC_SHIFT))
14596b8a054SScott Wood 				/* 0x00220802 */
1466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_TIMING_1	((3 << TIMING_CFG1_PRETOACT_SHIFT) \
147e1d8ed2cSPoonam Aggrwal 				| (8 << TIMING_CFG1_ACTTOPRE_SHIFT) \
14896b8a054SScott Wood 				| (3 << TIMING_CFG1_ACTTORW_SHIFT) \
14996b8a054SScott Wood 				| (5 << TIMING_CFG1_CASLAT_SHIFT) \
150e1d8ed2cSPoonam Aggrwal 				| (10 << TIMING_CFG1_REFREC_SHIFT) \
15196b8a054SScott Wood 				| (3 << TIMING_CFG1_WRREC_SHIFT) \
15296b8a054SScott Wood 				| (2 << TIMING_CFG1_ACTTOACT_SHIFT) \
15396b8a054SScott Wood 				| (2 << TIMING_CFG1_WRTORD_SHIFT))
154e1d8ed2cSPoonam Aggrwal 				/* 0x3835a322 */
1556d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_TIMING_2	((1 << TIMING_CFG2_ADD_LAT_SHIFT) \
156e1d8ed2cSPoonam Aggrwal 				| (5 << TIMING_CFG2_CPO_SHIFT) \
15796b8a054SScott Wood 				| (2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) \
15896b8a054SScott Wood 				| (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) \
15996b8a054SScott Wood 				| (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) \
16096b8a054SScott Wood 				| (3 << TIMING_CFG2_CKE_PLS_SHIFT) \
161e1d8ed2cSPoonam Aggrwal 				| (6 << TIMING_CFG2_FOUR_ACT_SHIFT))
162e1d8ed2cSPoonam Aggrwal 				/* 0x129048c6 */ /* P9-45,may need tuning */
1636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_INTERVAL	((1296 << SDRAM_INTERVAL_REFINT_SHIFT) \
164e1d8ed2cSPoonam Aggrwal 				| (1280 << SDRAM_INTERVAL_BSTOPRE_SHIFT))
165e1d8ed2cSPoonam Aggrwal 				/* 0x05100500 */
16696b8a054SScott Wood #if defined(CONFIG_DDR_2T_TIMING)
1676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_CFG	(SDRAM_CFG_SREN \
168bbea46f7SKim Phillips 				| SDRAM_CFG_SDRAM_TYPE_DDR2 \
1692fef4020SJoe Hershberger 				| SDRAM_CFG_DBW_32 \
1702fef4020SJoe Hershberger 				| SDRAM_CFG_2T_EN)
1712fef4020SJoe Hershberger 				/* 0x43088000 */
17296b8a054SScott Wood #else
1736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_CFG	(SDRAM_CFG_SREN \
174bbea46f7SKim Phillips 				| SDRAM_CFG_SDRAM_TYPE_DDR2 \
1752fef4020SJoe Hershberger 				| SDRAM_CFG_DBW_32)
17696b8a054SScott Wood 				/* 0x43080000 */
17796b8a054SScott Wood #endif
1786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_CFG2		0x00401000
17996b8a054SScott Wood /* set burst length to 8 for 32-bit data path */
1806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_MODE	((0x4448 << SDRAM_MODE_ESD_SHIFT) \
181e1d8ed2cSPoonam Aggrwal 				| (0x0632 << SDRAM_MODE_SD_SHIFT))
182e1d8ed2cSPoonam Aggrwal 				/* 0x44480632 */
1836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_MODE_2	0x8000C000
18496b8a054SScott Wood 
1856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_CLK_CNTL	DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05
18696b8a054SScott Wood 				/*0x02000000*/
1876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDRCDR_VALUE	(DDRCDR_EN \
18896b8a054SScott Wood 				| DDRCDR_PZ_NOMZ \
18996b8a054SScott Wood 				| DDRCDR_NZ_NOMZ \
19096b8a054SScott Wood 				| DDRCDR_M_ODR)
19196b8a054SScott Wood 
19296b8a054SScott Wood /*
19396b8a054SScott Wood  * FLASH on the Local Bus
19496b8a054SScott Wood  */
1956d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI		/* use the Common Flash Interface */
19600b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER		/* use the CFI driver */
1976d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE		0xFE000000	/* start of FLASH   */
1986d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_SIZE		8	/* flash size in MB */
1996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_PROTECTION	1	/* Use h/w Flash protection. */
2006d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_EMPTY_INFO		/* display empty sectors */
2016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE	/* buffer up multiple bytes */
20296b8a054SScott Wood 
203261c07bcSJoe Hershberger #define CONFIG_SYS_NOR_BR_PRELIM	(CONFIG_SYS_FLASH_BASE \
2047d6a0982SJoe Hershberger 					| BR_PS_16	/* 16 bit port */ \
2057d6a0982SJoe Hershberger 					| BR_MS_GPCM	/* MSEL = GPCM */ \
206261c07bcSJoe Hershberger 					| BR_V)		/* valid */
2077d6a0982SJoe Hershberger #define CONFIG_SYS_NOR_OR_PRELIM	(MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
20896b8a054SScott Wood 				| OR_GPCM_XACS \
20996b8a054SScott Wood 				| OR_GPCM_SCY_9 \
21096b8a054SScott Wood 				| OR_GPCM_EHTR \
21196b8a054SScott Wood 				| OR_GPCM_EAD)
21296b8a054SScott Wood 				/* 0xFF006FF7	TODO SLOW 16 MB flash size */
213261c07bcSJoe Hershberger 					/* window base at flash base */
214261c07bcSJoe Hershberger #define CONFIG_SYS_LBLAWBAR0_PRELIM	CONFIG_SYS_FLASH_BASE
2157d6a0982SJoe Hershberger 					/* 16 MB window size */
2167d6a0982SJoe Hershberger #define CONFIG_SYS_LBLAWAR0_PRELIM	(LBLAWAR_EN | LBLAWAR_16MB)
21796b8a054SScott Wood 
2186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_BANKS	1	/* number of banks */
2196d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_SECT	135	/* sectors per device */
22096b8a054SScott Wood 
2216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_ERASE_TOUT	60000	/* Flash Erase Timeout (ms) */
2226d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (ms) */
22396b8a054SScott Wood 
224261c07bcSJoe Hershberger #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) && \
22522f4442dSScott Wood 	!defined(CONFIG_SPL_BUILD)
2266d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RAMBOOT
22796b8a054SScott Wood #endif
22896b8a054SScott Wood 
2296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_LOCK	1
230261c07bcSJoe Hershberger #define CONFIG_SYS_INIT_RAM_ADDR	0xFD000000	/* Initial RAM addr */
231553f0982SWolfgang Denk #define CONFIG_SYS_INIT_RAM_SIZE	0x1000	/* Size of used area in RAM*/
23296b8a054SScott Wood 
233261c07bcSJoe Hershberger #define CONFIG_SYS_GBL_DATA_OFFSET	\
234261c07bcSJoe Hershberger 			(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
2356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
23696b8a054SScott Wood 
2376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
23816c8c170SKevin Hao #define CONFIG_SYS_MONITOR_LEN	(512 * 1024)	/* Reserve 512 kB for Mon */
2396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN	(512 * 1024)	/* Reserved for malloc */
24096b8a054SScott Wood 
24196b8a054SScott Wood /*
24296b8a054SScott Wood  * Local Bus LCRR and LBCR regs
24396b8a054SScott Wood  */
244c7190f02SKim Phillips #define CONFIG_SYS_LCRR_EADC	LCRR_EADC_1
245c7190f02SKim Phillips #define CONFIG_SYS_LCRR_CLKDIV	LCRR_CLKDIV_4
2466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LBCR	(0x00040000 /* TODO */ \
24796b8a054SScott Wood 				| (0xFF << LBCR_BMT_SHIFT) \
24896b8a054SScott Wood 				| 0xF)	/* 0x0004ff0f */
24996b8a054SScott Wood 
250261c07bcSJoe Hershberger 				/* LB refresh timer prescal, 266MHz/32 */
251261c07bcSJoe Hershberger #define CONFIG_SYS_LBC_MRTPR	0x20000000  /*TODO */
25296b8a054SScott Wood 
253*cfcc706cSMiquel Raynal /* drivers/mtd/nand/raw/nand.c */
25422f4442dSScott Wood #if defined(CONFIG_NAND) && defined(CONFIG_SPL_BUILD)
2556d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NAND_BASE		0xFFF00000
256e4c09508SScott Wood #else
2576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NAND_BASE		0xE2800000
258e4c09508SScott Wood #endif
259e4c09508SScott Wood 
260e8d3ca8bSScott Wood #define CONFIG_MTD_PARTITION
261e8d3ca8bSScott Wood #define MTDIDS_DEFAULT			"nand0=e2800000.flash"
262e8d3ca8bSScott Wood #define MTDPARTS_DEFAULT		\
26363865278SKevin Hao 	"mtdparts=e2800000.flash:512k(uboot),128k(env),6m@1m(kernel),-(fs)"
264e8d3ca8bSScott Wood 
2656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_NAND_DEVICE	1
266acdab5c3SScott Wood #define CONFIG_NAND_FSL_ELBC 1
2676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NAND_BLOCK_SIZE 16384
2687d6a0982SJoe Hershberger #define CONFIG_SYS_NAND_WINDOW_SIZE (32 * 1024)
26996b8a054SScott Wood 
2706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NAND_BR_PRELIM	(CONFIG_SYS_NAND_BASE \
2717d6a0982SJoe Hershberger 				| BR_DECC_CHK_GEN	/* Use HW ECC */ \
272261c07bcSJoe Hershberger 				| BR_PS_8		/* 8 bit port */ \
27396b8a054SScott Wood 				| BR_MS_FCM		/* MSEL = FCM */ \
27496b8a054SScott Wood 				| BR_V)			/* valid */
2757d6a0982SJoe Hershberger #define CONFIG_SYS_NAND_OR_PRELIM	\
2767d6a0982SJoe Hershberger 				(P2SZ_TO_AM(CONFIG_SYS_NAND_WINDOW_SIZE) \
27796b8a054SScott Wood 				| OR_FCM_CSCT \
27896b8a054SScott Wood 				| OR_FCM_CST \
27996b8a054SScott Wood 				| OR_FCM_CHT \
28096b8a054SScott Wood 				| OR_FCM_SCY_1 \
28196b8a054SScott Wood 				| OR_FCM_TRLX \
28296b8a054SScott Wood 				| OR_FCM_EHTR)
28396b8a054SScott Wood 				/* 0xFFFF8396 */
284e4c09508SScott Wood 
28522f4442dSScott Wood #ifdef CONFIG_NAND
2866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NAND_BR_PRELIM
2876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NAND_OR_PRELIM
2886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NOR_BR_PRELIM
2896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NOR_OR_PRELIM
290e4c09508SScott Wood #else
2916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NOR_BR_PRELIM
2926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NOR_OR_PRELIM
2936d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NAND_BR_PRELIM
2946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NAND_OR_PRELIM
295e4c09508SScott Wood #endif
296e4c09508SScott Wood 
2976d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBLAWBAR1_PRELIM	CONFIG_SYS_NAND_BASE
2987d6a0982SJoe Hershberger #define CONFIG_SYS_LBLAWAR1_PRELIM	(LBLAWAR_EN | LBLAWAR_32KB)
29996b8a054SScott Wood 
3006d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NAND_LBLAWBAR_PRELIM CONFIG_SYS_LBLAWBAR1_PRELIM
3016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NAND_LBLAWAR_PRELIM CONFIG_SYS_LBLAWAR1_PRELIM
302e4c09508SScott Wood 
3037d6a0982SJoe Hershberger /* local bus write LED / read status buffer (BCSR) mapping */
3047d6a0982SJoe Hershberger #define CONFIG_SYS_BCSR_ADDR		0xFA000000
3057d6a0982SJoe Hershberger #define CONFIG_SYS_BCSR_SIZE		(32 * 1024)	/* 0x00008000 */
3067d6a0982SJoe Hershberger 					/* map at 0xFA000000 on LCS3 */
3077d6a0982SJoe Hershberger #define CONFIG_SYS_BR3_PRELIM		(CONFIG_SYS_BCSR_ADDR \
3087d6a0982SJoe Hershberger 					| BR_PS_8	/* 8 bit port */ \
3097d6a0982SJoe Hershberger 					| BR_MS_GPCM	/* MSEL = GPCM */ \
3107d6a0982SJoe Hershberger 					| BR_V)		/* valid */
3117d6a0982SJoe Hershberger 					/* 0xFA000801 */
3127d6a0982SJoe Hershberger #define CONFIG_SYS_OR3_PRELIM		(P2SZ_TO_AM(CONFIG_SYS_BCSR_SIZE) \
3137d6a0982SJoe Hershberger 					| OR_GPCM_CSNT \
3147d6a0982SJoe Hershberger 					| OR_GPCM_ACS_DIV2 \
3157d6a0982SJoe Hershberger 					| OR_GPCM_XACS \
3167d6a0982SJoe Hershberger 					| OR_GPCM_SCY_15 \
3177d6a0982SJoe Hershberger 					| OR_GPCM_TRLX_SET \
3187d6a0982SJoe Hershberger 					| OR_GPCM_EHTR_SET \
3197d6a0982SJoe Hershberger 					| OR_GPCM_EAD)
3207d6a0982SJoe Hershberger 					/* 0xFFFF8FF7 */
3217d6a0982SJoe Hershberger #define CONFIG_SYS_LBLAWBAR3_PRELIM	CONFIG_SYS_BCSR_ADDR
3227d6a0982SJoe Hershberger #define CONFIG_SYS_LBLAWAR3_PRELIM	(LBLAWAR_EN | LBLAWAR_32KB)
32396b8a054SScott Wood 
32489c7784eSTimur Tabi /* Vitesse 7385 */
32589c7784eSTimur Tabi 
32689c7784eSTimur Tabi #ifdef CONFIG_VSC7385_ENET
32789c7784eSTimur Tabi 
3287d6a0982SJoe Hershberger 					/* VSC7385 Base address on LCS2 */
3297d6a0982SJoe Hershberger #define CONFIG_SYS_VSC7385_BASE		0xF0000000
3307d6a0982SJoe Hershberger #define CONFIG_SYS_VSC7385_SIZE		(128 * 1024)	/* 0x00020000 */
3317d6a0982SJoe Hershberger 
3327d6a0982SJoe Hershberger #define CONFIG_SYS_BR2_PRELIM		(CONFIG_SYS_VSC7385_BASE \
3337d6a0982SJoe Hershberger 					| BR_PS_8	/* 8 bit port */ \
3347d6a0982SJoe Hershberger 					| BR_MS_GPCM	/* MSEL = GPCM */ \
3357d6a0982SJoe Hershberger 					| BR_V)		/* valid */
3367d6a0982SJoe Hershberger #define CONFIG_SYS_OR2_PRELIM		(P2SZ_TO_AM(CONFIG_SYS_VSC7385_SIZE) \
3377d6a0982SJoe Hershberger 					| OR_GPCM_CSNT \
3387d6a0982SJoe Hershberger 					| OR_GPCM_XACS \
3397d6a0982SJoe Hershberger 					| OR_GPCM_SCY_15 \
3407d6a0982SJoe Hershberger 					| OR_GPCM_SETA \
3417d6a0982SJoe Hershberger 					| OR_GPCM_TRLX_SET \
3427d6a0982SJoe Hershberger 					| OR_GPCM_EHTR_SET \
3437d6a0982SJoe Hershberger 					| OR_GPCM_EAD)
3447d6a0982SJoe Hershberger 					/* 0xFFFE09FF */
3457d6a0982SJoe Hershberger 
346261c07bcSJoe Hershberger 					/* Access window base at VSC7385 base */
347261c07bcSJoe Hershberger #define CONFIG_SYS_LBLAWBAR2_PRELIM	CONFIG_SYS_VSC7385_BASE
3487d6a0982SJoe Hershberger #define CONFIG_SYS_LBLAWAR2_PRELIM	(LBLAWAR_EN | LBLAWAR_128KB)
34989c7784eSTimur Tabi 
35089c7784eSTimur Tabi #endif
35189c7784eSTimur Tabi 
3520eaf8f9eSJoe Hershberger #define CONFIG_MPC83XX_GPIO 1
3530eaf8f9eSJoe Hershberger 
35496b8a054SScott Wood /*
35596b8a054SScott Wood  * Serial Port
35696b8a054SScott Wood  */
35796b8a054SScott Wood #define CONFIG_CONS_INDEX	1
3586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_SERIAL
3596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_REG_SIZE	1
36096b8a054SScott Wood 
3616d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE	\
36296b8a054SScott Wood 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
36396b8a054SScott Wood 
3646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_IMMR+0x4500)
3656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_IMMR+0x4600)
36696b8a054SScott Wood 
36796b8a054SScott Wood /* I2C */
36800f792e0SHeiko Schocher #define CONFIG_SYS_I2C
36900f792e0SHeiko Schocher #define CONFIG_SYS_I2C_FSL
37000f792e0SHeiko Schocher #define CONFIG_SYS_FSL_I2C_SPEED	400000
37100f792e0SHeiko Schocher #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
37200f792e0SHeiko Schocher #define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
37300f792e0SHeiko Schocher #define CONFIG_SYS_FSL_I2C2_SPEED	400000
37400f792e0SHeiko Schocher #define CONFIG_SYS_FSL_I2C2_SLAVE	0x7F
37500f792e0SHeiko Schocher #define CONFIG_SYS_FSL_I2C2_OFFSET	0x3100
37600f792e0SHeiko Schocher #define CONFIG_SYS_I2C_NOPROBES		{ {0, 0x69} }
37796b8a054SScott Wood 
37896b8a054SScott Wood /*
37996b8a054SScott Wood  * General PCI
38096b8a054SScott Wood  * Addresses are mapped 1-1.
38196b8a054SScott Wood  */
3826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_BASE	0x80000000
3836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_PHYS	CONFIG_SYS_PCI1_MEM_BASE
3846d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_SIZE	0x10000000	/* 256M */
3856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MMIO_BASE	0x90000000
3866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MMIO_PHYS	CONFIG_SYS_PCI1_MMIO_BASE
3876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MMIO_SIZE	0x10000000	/* 256M */
3886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_BASE	0x00000000
3896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_PHYS	0xE2000000
3906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_SIZE	0x00100000	/* 1M */
39196b8a054SScott Wood 
3926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057	/* Motorola */
39396b8a054SScott Wood 
39496b8a054SScott Wood /*
39589c7784eSTimur Tabi  * TSEC
39696b8a054SScott Wood  */
39796b8a054SScott Wood #define CONFIG_TSEC_ENET		/* TSEC ethernet support */
39896b8a054SScott Wood 
39989c7784eSTimur Tabi #define CONFIG_GMII			/* MII PHY management */
40089c7784eSTimur Tabi 
40189c7784eSTimur Tabi #ifdef CONFIG_TSEC1
40289c7784eSTimur Tabi #define CONFIG_HAS_ETH0
40389c7784eSTimur Tabi #define CONFIG_TSEC1_NAME	"TSEC0"
4046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TSEC1_OFFSET	0x24000
40589c7784eSTimur Tabi #define TSEC1_PHY_ADDR		0x1c
40689c7784eSTimur Tabi #define TSEC1_FLAGS		TSEC_GIGABIT
40789c7784eSTimur Tabi #define TSEC1_PHYIDX		0
40896b8a054SScott Wood #endif
40996b8a054SScott Wood 
41089c7784eSTimur Tabi #ifdef CONFIG_TSEC2
41189c7784eSTimur Tabi #define CONFIG_HAS_ETH1
412255a3577SKim Phillips #define CONFIG_TSEC2_NAME	"TSEC1"
4136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TSEC2_OFFSET	0x25000
41496b8a054SScott Wood #define TSEC2_PHY_ADDR		4
4153a79013eSAndy Fleming #define TSEC2_FLAGS		TSEC_GIGABIT
41696b8a054SScott Wood #define TSEC2_PHYIDX		0
41789c7784eSTimur Tabi #endif
41889c7784eSTimur Tabi 
41996b8a054SScott Wood /* Options are: TSEC[0-1] */
42096b8a054SScott Wood #define CONFIG_ETHPRIME			"TSEC1"
42196b8a054SScott Wood 
42296b8a054SScott Wood /*
42396b8a054SScott Wood  * Configure on-board RTC
42496b8a054SScott Wood  */
42596b8a054SScott Wood #define CONFIG_RTC_DS1337
4266d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_RTC_ADDR		0x68
42796b8a054SScott Wood 
42896b8a054SScott Wood /*
42996b8a054SScott Wood  * Environment
43096b8a054SScott Wood  */
43122f4442dSScott Wood #if defined(CONFIG_NAND)
4320e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_OFFSET		(512 * 1024)
4336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SECT_SIZE	CONFIG_SYS_NAND_BLOCK_SIZE
4340e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SIZE		CONFIG_ENV_SECT_SIZE
4350e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SIZE_REDUND	CONFIG_ENV_SIZE
4360e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_RANGE		(CONFIG_ENV_SECT_SIZE * 4)
437261c07bcSJoe Hershberger 	#define CONFIG_ENV_OFFSET_REDUND	\
438261c07bcSJoe Hershberger 					(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
4396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #elif !defined(CONFIG_SYS_RAMBOOT)
440261c07bcSJoe Hershberger 	#define CONFIG_ENV_ADDR		\
441261c07bcSJoe Hershberger 			(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
4420e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SECT_SIZE	0x10000	/* 64K(one sector) for env */
4430e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SIZE		0x2000
44496b8a054SScott Wood 
44596b8a054SScott Wood /* Address and size of Redundant Environment Sector */
44696b8a054SScott Wood #else
4476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - 0x1000)
4480e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SIZE		0x2000
44996b8a054SScott Wood #endif
45096b8a054SScott Wood 
45196b8a054SScott Wood #define CONFIG_LOADS_ECHO	1	/* echo on for serial download */
4526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOADS_BAUD_CHANGE	1	/* allow baudrate change */
45396b8a054SScott Wood 
4548ea5499aSJon Loeliger /*
455079a136cSJon Loeliger  * BOOTP options
456079a136cSJon Loeliger  */
457079a136cSJon Loeliger #define CONFIG_BOOTP_BOOTFILESIZE
458079a136cSJon Loeliger #define CONFIG_BOOTP_BOOTPATH
459079a136cSJon Loeliger #define CONFIG_BOOTP_GATEWAY
460079a136cSJon Loeliger #define CONFIG_BOOTP_HOSTNAME
461079a136cSJon Loeliger 
462079a136cSJon Loeliger /*
4638ea5499aSJon Loeliger  * Command line configuration.
4648ea5499aSJon Loeliger  */
4658ea5499aSJon Loeliger 
46696b8a054SScott Wood #define CONFIG_CMDLINE_EDITING 1
467a059e90eSKim Phillips #define CONFIG_AUTO_COMPLETE	/* add autocompletion support   */
46896b8a054SScott Wood 
46996b8a054SScott Wood /*
47096b8a054SScott Wood  * Miscellaneous configurable options
47196b8a054SScott Wood  */
4726d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP			/* undef to save memory */
4736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR	0x2000000	/* default load address */
4746d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size */
47596b8a054SScott Wood 
476261c07bcSJoe Hershberger 				/* Boot Argument Buffer Size */
477261c07bcSJoe Hershberger #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
47896b8a054SScott Wood 
47996b8a054SScott Wood /*
48096b8a054SScott Wood  * For booting Linux, the board info and command line data
4819f530d59SIra W. Snyder  * have to be in the first 256 MB of memory, since this is
48296b8a054SScott Wood  * the maximum mapped by the Linux kernel during initialization.
48396b8a054SScott Wood  */
484261c07bcSJoe Hershberger 				/* Initial Memory map for Linux*/
485261c07bcSJoe Hershberger #define CONFIG_SYS_BOOTMAPSZ	(256 << 20)
48663865278SKevin Hao #define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
48796b8a054SScott Wood 
4886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RCWH_PCIHOST 0x80000000	/* PCIHOST  */
48996b8a054SScott Wood 
4906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_66MHZ
49196b8a054SScott Wood 
49296b8a054SScott Wood /* 66MHz IN, 133MHz CSB, 266 DDR, 266 CORE */
49396b8a054SScott Wood /* 0x62040000 */
4946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_LOW (\
49596b8a054SScott Wood 	0x20000000 /* reserved, must be set */ |\
49696b8a054SScott Wood 	HRCWL_DDRCM |\
49796b8a054SScott Wood 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
49896b8a054SScott Wood 	HRCWL_DDR_TO_SCB_CLK_2X1 |\
49996b8a054SScott Wood 	HRCWL_CSB_TO_CLKIN_2X1 |\
50096b8a054SScott Wood 	HRCWL_CORE_TO_CSB_2X1)
50196b8a054SScott Wood 
5026d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 2)
503e4c09508SScott Wood 
5046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #elif defined(CONFIG_SYS_33MHZ)
50596b8a054SScott Wood 
50696b8a054SScott Wood /* 33MHz IN, 165MHz CSB, 330 DDR, 330 CORE */
50796b8a054SScott Wood /* 0x65040000 */
5086d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_LOW (\
50996b8a054SScott Wood 	0x20000000 /* reserved, must be set */ |\
51096b8a054SScott Wood 	HRCWL_DDRCM |\
51196b8a054SScott Wood 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
51296b8a054SScott Wood 	HRCWL_DDR_TO_SCB_CLK_2X1 |\
51396b8a054SScott Wood 	HRCWL_CSB_TO_CLKIN_5X1 |\
51496b8a054SScott Wood 	HRCWL_CORE_TO_CSB_2X1)
51596b8a054SScott Wood 
5166d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 5)
517e4c09508SScott Wood 
51896b8a054SScott Wood #endif
51996b8a054SScott Wood 
5206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_HIGH_BASE (\
52196b8a054SScott Wood 	HRCWH_PCI_HOST |\
52296b8a054SScott Wood 	HRCWH_PCI1_ARBITER_ENABLE |\
52396b8a054SScott Wood 	HRCWH_CORE_ENABLE |\
52496b8a054SScott Wood 	HRCWH_BOOTSEQ_DISABLE |\
52596b8a054SScott Wood 	HRCWH_SW_WATCHDOG_DISABLE |\
52696b8a054SScott Wood 	HRCWH_TSEC1M_IN_RGMII |\
52796b8a054SScott Wood 	HRCWH_TSEC2M_IN_RGMII |\
528e4c09508SScott Wood 	HRCWH_BIG_ENDIAN)
529e4c09508SScott Wood 
53022f4442dSScott Wood #ifdef CONFIG_NAND
5316d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_HIGH (CONFIG_SYS_HRCW_HIGH_BASE |\
532e4c09508SScott Wood 		       HRCWH_FROM_0XFFF00100 |\
533e4c09508SScott Wood 		       HRCWH_ROM_LOC_NAND_SP_8BIT |\
534e4c09508SScott Wood 		       HRCWH_RL_EXT_NAND)
535e4c09508SScott Wood #else
5366d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_HIGH (CONFIG_SYS_HRCW_HIGH_BASE |\
537e4c09508SScott Wood 		       HRCWH_FROM_0X00000100 |\
538e4c09508SScott Wood 		       HRCWH_ROM_LOC_LOCAL_16BIT |\
539e4c09508SScott Wood 		       HRCWH_RL_EXT_LEGACY)
540e4c09508SScott Wood #endif
54196b8a054SScott Wood 
54296b8a054SScott Wood /* System IO Config */
5436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SICRH	(SICRH_TSOBI1 | SICRH_TSOBI2)	/* RGMII */
5440eaf8f9eSJoe Hershberger 			/* Enable Internal USB Phy and GPIO on LCD Connector */
5450eaf8f9eSJoe Hershberger #define CONFIG_SYS_SICRL	(SICRL_USBDR_10 | SICRL_LBC)
54696b8a054SScott Wood 
5476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HID0_INIT	0x000000000
5486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HID0_FINAL	(HID0_ENABLE_MACHINE_CHECK | \
5491a2e203bSKim Phillips 				 HID0_ENABLE_INSTRUCTION_CACHE | \
55096b8a054SScott Wood 				 HID0_ENABLE_DYNAMIC_POWER_MANAGMENT)
55196b8a054SScott Wood 
5526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HID2 HID2_HBE
55396b8a054SScott Wood 
55431d82672SBecky Bruce #define CONFIG_HIGH_BATS	1	/* High BATs supported */
55531d82672SBecky Bruce 
55696b8a054SScott Wood /* DDR @ 0x00000000 */
55772cd4087SJoe Hershberger #define CONFIG_SYS_IBAT0L	(CONFIG_SYS_SDRAM_BASE | BATL_PP_RW)
558261c07bcSJoe Hershberger #define CONFIG_SYS_IBAT0U	(CONFIG_SYS_SDRAM_BASE \
559261c07bcSJoe Hershberger 				| BATU_BL_256M \
560261c07bcSJoe Hershberger 				| BATU_VS \
561261c07bcSJoe Hershberger 				| BATU_VP)
56296b8a054SScott Wood 
56396b8a054SScott Wood /* PCI @ 0x80000000 */
56472cd4087SJoe Hershberger #define CONFIG_SYS_IBAT1L	(CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_RW)
565261c07bcSJoe Hershberger #define CONFIG_SYS_IBAT1U	(CONFIG_SYS_PCI1_MEM_BASE \
566261c07bcSJoe Hershberger 				| BATU_BL_256M \
567261c07bcSJoe Hershberger 				| BATU_VS \
568261c07bcSJoe Hershberger 				| BATU_VP)
569261c07bcSJoe Hershberger #define CONFIG_SYS_IBAT2L	(CONFIG_SYS_PCI1_MMIO_BASE \
57072cd4087SJoe Hershberger 				| BATL_PP_RW \
571261c07bcSJoe Hershberger 				| BATL_CACHEINHIBIT \
572261c07bcSJoe Hershberger 				| BATL_GUARDEDSTORAGE)
573261c07bcSJoe Hershberger #define CONFIG_SYS_IBAT2U	(CONFIG_SYS_PCI1_MMIO_BASE \
574261c07bcSJoe Hershberger 				| BATU_BL_256M \
575261c07bcSJoe Hershberger 				| BATU_VS \
576261c07bcSJoe Hershberger 				| BATU_VP)
57796b8a054SScott Wood 
57896b8a054SScott Wood /* PCI2 not supported on 8313 */
5796d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT3L	(0)
5806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT3U	(0)
5816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT4L	(0)
5826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT4U	(0)
58396b8a054SScott Wood 
58496b8a054SScott Wood /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */
585261c07bcSJoe Hershberger #define CONFIG_SYS_IBAT5L	(CONFIG_SYS_IMMR \
58672cd4087SJoe Hershberger 				| BATL_PP_RW \
587261c07bcSJoe Hershberger 				| BATL_CACHEINHIBIT \
588261c07bcSJoe Hershberger 				| BATL_GUARDEDSTORAGE)
589261c07bcSJoe Hershberger #define CONFIG_SYS_IBAT5U	(CONFIG_SYS_IMMR \
590261c07bcSJoe Hershberger 				| BATU_BL_256M \
591261c07bcSJoe Hershberger 				| BATU_VS \
592261c07bcSJoe Hershberger 				| BATU_VP)
59396b8a054SScott Wood 
59496b8a054SScott Wood /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
59572cd4087SJoe Hershberger #define CONFIG_SYS_IBAT6L	(0xF0000000 | BATL_PP_RW | BATL_GUARDEDSTORAGE)
5966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT6U	(0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
59796b8a054SScott Wood 
5986d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT7L	(0)
5996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT7U	(0)
60096b8a054SScott Wood 
6016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT0L	CONFIG_SYS_IBAT0L
6026d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT0U	CONFIG_SYS_IBAT0U
6036d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT1L	CONFIG_SYS_IBAT1L
6046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT1U	CONFIG_SYS_IBAT1U
6056d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT2L	CONFIG_SYS_IBAT2L
6066d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT2U	CONFIG_SYS_IBAT2U
6076d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT3L	CONFIG_SYS_IBAT3L
6086d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT3U	CONFIG_SYS_IBAT3U
6096d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT4L	CONFIG_SYS_IBAT4L
6106d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT4U	CONFIG_SYS_IBAT4U
6116d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT5L	CONFIG_SYS_IBAT5L
6126d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT5U	CONFIG_SYS_IBAT5U
6136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT6L	CONFIG_SYS_IBAT6L
6146d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT6U	CONFIG_SYS_IBAT6U
6156d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT7L	CONFIG_SYS_IBAT7L
6166d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT7U	CONFIG_SYS_IBAT7U
61796b8a054SScott Wood 
61896b8a054SScott Wood /*
61996b8a054SScott Wood  * Environment Configuration
62096b8a054SScott Wood  */
62196b8a054SScott Wood #define CONFIG_ENV_OVERWRITE
62296b8a054SScott Wood 
623261c07bcSJoe Hershberger #define CONFIG_NETDEV		"eth1"
62496b8a054SScott Wood 
62596b8a054SScott Wood #define CONFIG_HOSTNAME		mpc8313erdb
6268b3637c6SJoe Hershberger #define CONFIG_ROOTPATH		"/nfs/root/path"
627b3f44c21SJoe Hershberger #define CONFIG_BOOTFILE		"uImage"
628261c07bcSJoe Hershberger 				/* U-Boot image on TFTP server */
629261c07bcSJoe Hershberger #define CONFIG_UBOOTPATH	"u-boot.bin"
630261c07bcSJoe Hershberger #define CONFIG_FDTFILE		"mpc8313erdb.dtb"
63196b8a054SScott Wood 
632261c07bcSJoe Hershberger 				/* default location for tftp and bootm */
633261c07bcSJoe Hershberger #define CONFIG_LOADADDR		800000
63496b8a054SScott Wood 
63596b8a054SScott Wood #define CONFIG_EXTRA_ENV_SETTINGS \
636261c07bcSJoe Hershberger 	"netdev=" CONFIG_NETDEV "\0"					\
63796b8a054SScott Wood 	"ethprime=TSEC1\0"						\
638261c07bcSJoe Hershberger 	"uboot=" CONFIG_UBOOTPATH "\0"					\
63996b8a054SScott Wood 	"tftpflash=tftpboot $loadaddr $uboot; "				\
6405368c55dSMarek Vasut 		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
6415368c55dSMarek Vasut 			" +$filesize; "	\
6425368c55dSMarek Vasut 		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
6435368c55dSMarek Vasut 			" +$filesize; "	\
6445368c55dSMarek Vasut 		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
6455368c55dSMarek Vasut 			" $filesize; "	\
6465368c55dSMarek Vasut 		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
6475368c55dSMarek Vasut 			" +$filesize; "	\
6485368c55dSMarek Vasut 		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
6495368c55dSMarek Vasut 			" $filesize\0"	\
65079f516bcSKim Phillips 	"fdtaddr=780000\0"						\
651261c07bcSJoe Hershberger 	"fdtfile=" CONFIG_FDTFILE "\0"					\
65296b8a054SScott Wood 	"console=ttyS0\0"						\
65396b8a054SScott Wood 	"setbootargs=setenv bootargs "					\
65496b8a054SScott Wood 		"root=$rootdev rw console=$console,$baudrate $othbootargs\0" \
65596b8a054SScott Wood 	"setipargs=setenv bootargs nfsroot=$serverip:$rootpath "	 \
656261c07bcSJoe Hershberger 		"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:"\
657261c07bcSJoe Hershberger 							"$netdev:off " \
65896b8a054SScott Wood 		"root=$rootdev rw console=$console,$baudrate $othbootargs\0"
65996b8a054SScott Wood 
66096b8a054SScott Wood #define CONFIG_NFSBOOTCOMMAND						\
66196b8a054SScott Wood 	"setenv rootdev /dev/nfs;"					\
66296b8a054SScott Wood 	"run setbootargs;"						\
66396b8a054SScott Wood 	"run setipargs;"						\
66496b8a054SScott Wood 	"tftp $loadaddr $bootfile;"					\
66596b8a054SScott Wood 	"tftp $fdtaddr $fdtfile;"					\
66696b8a054SScott Wood 	"bootm $loadaddr - $fdtaddr"
66796b8a054SScott Wood 
66896b8a054SScott Wood #define CONFIG_RAMBOOTCOMMAND						\
66996b8a054SScott Wood 	"setenv rootdev /dev/ram;"					\
67096b8a054SScott Wood 	"run setbootargs;"						\
67196b8a054SScott Wood 	"tftp $ramdiskaddr $ramdiskfile;"				\
67296b8a054SScott Wood 	"tftp $loadaddr $bootfile;"					\
67396b8a054SScott Wood 	"tftp $fdtaddr $fdtfile;"					\
67496b8a054SScott Wood 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
67596b8a054SScott Wood 
67696b8a054SScott Wood #endif	/* __CONFIG_H */
677