xref: /openbmc/u-boot/include/configs/MPC8568MDS.h (revision e46fedfeb214d118b9983d11fcc929ed49f5ccd7)
167431059SAndy Fleming /*
25f7bbd13SKumar Gala  * Copyright 2004-2007, 2010-2011 Freescale Semiconductor.
367431059SAndy Fleming  *
467431059SAndy Fleming  * See file CREDITS for list of people who contributed to this
567431059SAndy Fleming  * project.
667431059SAndy Fleming  *
767431059SAndy Fleming  * This program is free software; you can redistribute it and/or
867431059SAndy Fleming  * modify it under the terms of the GNU General Public License as
967431059SAndy Fleming  * published by the Free Software Foundation; either version 2 of
1067431059SAndy Fleming  * the License, or (at your option) any later version.
1167431059SAndy Fleming  *
1267431059SAndy Fleming  * This program is distributed in the hope that it will be useful,
1367431059SAndy Fleming  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1467431059SAndy Fleming  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
1567431059SAndy Fleming  * GNU General Public License for more details.
1667431059SAndy Fleming  *
1767431059SAndy Fleming  * You should have received a copy of the GNU General Public License
1867431059SAndy Fleming  * along with this program; if not, write to the Free Software
1967431059SAndy Fleming  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2067431059SAndy Fleming  * MA 02111-1307 USA
2167431059SAndy Fleming  */
2267431059SAndy Fleming 
2367431059SAndy Fleming /*
2467431059SAndy Fleming  * mpc8568mds board configuration file
2567431059SAndy Fleming  */
2667431059SAndy Fleming #ifndef __CONFIG_H
2767431059SAndy Fleming #define __CONFIG_H
2867431059SAndy Fleming 
2967431059SAndy Fleming /* High Level Configuration Options */
3067431059SAndy Fleming #define CONFIG_BOOKE		1	/* BOOKE */
3167431059SAndy Fleming #define CONFIG_E500		1	/* BOOKE e500 family */
3267431059SAndy Fleming #define CONFIG_MPC85xx		1	/* MPC8540/60/55/41/48/68 */
3367431059SAndy Fleming #define CONFIG_MPC8568		1	/* MPC8568 specific */
3467431059SAndy Fleming #define CONFIG_MPC8568MDS	1	/* MPC8568MDS board specific */
3567431059SAndy Fleming 
362ae18241SWolfgang Denk #define	CONFIG_SYS_TEXT_BASE	0xfff80000
372ae18241SWolfgang Denk 
385f7bbd13SKumar Gala #define CONFIG_SYS_SRIO
395f7bbd13SKumar Gala #define CONFIG_SRIO1			/* SRIO port 1 */
405f7bbd13SKumar Gala 
411563f56eSHaiying Wang #define CONFIG_PCI		1	/* Enable PCI/PCIE */
421563f56eSHaiying Wang #define CONFIG_PCI1		1	/* PCI controller */
431563f56eSHaiying Wang #define CONFIG_PCIE1		1	/* PCIE controller */
441563f56eSHaiying Wang #define CONFIG_FSL_PCI_INIT	1	/* use common fsl pci init code */
458ff3de61SKumar Gala #define CONFIG_FSL_PCIE_RESET	1	/* need PCIe reset errata */
460151cbacSKumar Gala #define CONFIG_SYS_PCI_64BIT	1	/* enable 64-bit PCI resources */
4767431059SAndy Fleming #define CONFIG_TSEC_ENET		/* tsec ethernet support */
48b96c83d4SAndy Fleming #define CONFIG_QE			/* Enable QE */
4967431059SAndy Fleming #define CONFIG_ENV_OVERWRITE
504d3521ccSKumar Gala #define CONFIG_FSL_LAW		1	/* Use common FSL init code */
5167431059SAndy Fleming 
5267431059SAndy Fleming #ifndef __ASSEMBLY__
5367431059SAndy Fleming extern unsigned long get_clock_freq(void);
5467431059SAndy Fleming #endif						  /*Replace a call to get_clock_freq (after it is implemented)*/
5567431059SAndy Fleming #define CONFIG_SYS_CLK_FREQ	66000000 /*TODO: restore if wanting to read from BCSR: get_clock_freq()*/ /* sysclk for MPC85xx */
5667431059SAndy Fleming 
5767431059SAndy Fleming /*
5867431059SAndy Fleming  * These can be toggled for performance analysis, otherwise use default.
5967431059SAndy Fleming  */
607a1ac419SHaiying Wang #define CONFIG_L2_CACHE				/* toggle L2 cache	*/
6167431059SAndy Fleming #define CONFIG_BTB				/* toggle branch predition */
6267431059SAndy Fleming 
6367431059SAndy Fleming /*
6467431059SAndy Fleming  * Only possible on E500 Version 2 or newer cores.
6567431059SAndy Fleming  */
6667431059SAndy Fleming #define CONFIG_ENABLE_36BIT_PHYS	1
6767431059SAndy Fleming 
6867431059SAndy Fleming 
6967431059SAndy Fleming #define CONFIG_BOARD_EARLY_INIT_F	1	/* Call board_pre_init */
7067431059SAndy Fleming 
716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	0x00200000	/* memtest works on */
726d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END		0x00400000
7367431059SAndy Fleming 
74*e46fedfeSTimur Tabi #define CONFIG_SYS_CCSRBAR		0xe0000000
75*e46fedfeSTimur Tabi #define CONFIG_SYS_CCSRBAR_PHYS_LOW	CONFIG_SYS_CCSRBAR
7667431059SAndy Fleming 
77e6f5b35bSJon Loeliger /* DDR Setup */
78e6f5b35bSJon Loeliger #define CONFIG_FSL_DDR2
79e6f5b35bSJon Loeliger #undef CONFIG_FSL_DDR_INTERACTIVE
80e6f5b35bSJon Loeliger #define CONFIG_SPD_EEPROM		/* Use SPD EEPROM for DDR setup*/
81e6f5b35bSJon Loeliger #define CONFIG_DDR_SPD
829b0ad1b1SDave Liu #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER	/* DDR controller or DMA? */
83e6f5b35bSJon Loeliger 
84e6f5b35bSJon Loeliger #define CONFIG_MEM_INIT_VALUE	0xDeadBeef
85e6f5b35bSJon Loeliger 
866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_SDRAM_BASE	0x00000000	/* DDR is system memory*/
876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE		CONFIG_SYS_DDR_SDRAM_BASE
8867431059SAndy Fleming 
89e6f5b35bSJon Loeliger #define CONFIG_NUM_DDR_CONTROLLERS	1
90e6f5b35bSJon Loeliger #define CONFIG_DIMM_SLOTS_PER_CTLR	1
91e6f5b35bSJon Loeliger #define CONFIG_CHIP_SELECTS_PER_CTRL	(2 * CONFIG_DIMM_SLOTS_PER_CTLR)
9267431059SAndy Fleming 
93e6f5b35bSJon Loeliger /* I2C addresses of SPD EEPROMs */
94e6f5b35bSJon Loeliger #define SPD_EEPROM_ADDRESS	0x51	/* CTLR 0 DIMM 0 */
95e6f5b35bSJon Loeliger 
96e6f5b35bSJon Loeliger /* Make sure required options are set */
9767431059SAndy Fleming #ifndef CONFIG_SPD_EEPROM
9867431059SAndy Fleming #error ("CONFIG_SPD_EEPROM is required")
9967431059SAndy Fleming #endif
10067431059SAndy Fleming 
10167431059SAndy Fleming #undef CONFIG_CLOCKS_IN_MHZ
10267431059SAndy Fleming 
10367431059SAndy Fleming /*
10467431059SAndy Fleming  * Local Bus Definitions
10567431059SAndy Fleming  */
10667431059SAndy Fleming 
10767431059SAndy Fleming /*
10867431059SAndy Fleming  * FLASH on the Local Bus
10967431059SAndy Fleming  * Two banks, 8M each, using the CFI driver.
11067431059SAndy Fleming  * Boot from BR0/OR0 bank at 0xff00_0000
11167431059SAndy Fleming  * Alternate BR1/OR1 bank at 0xff80_0000
11267431059SAndy Fleming  *
11367431059SAndy Fleming  * BR0, BR1:
11467431059SAndy Fleming  *    Base address 0 = 0xff00_0000 = BR0[0:16] = 1111 1111 0000 0000 0
11567431059SAndy Fleming  *    Base address 1 = 0xff80_0000 = BR1[0:16] = 1111 1111 1000 0000 0
11667431059SAndy Fleming  *    Port Size = 16 bits = BRx[19:20] = 10
11767431059SAndy Fleming  *    Use GPCM = BRx[24:26] = 000
11867431059SAndy Fleming  *    Valid = BRx[31] = 1
11967431059SAndy Fleming  *
12067431059SAndy Fleming  * 0    4    8    12   16   20   24   28
12167431059SAndy Fleming  * 1111 1111 1000 0000 0001 0000 0000 0001 = ff801001    BR0
12267431059SAndy Fleming  * 1111 1111 0000 0000 0001 0000 0000 0001 = ff001001    BR1
12367431059SAndy Fleming  *
12467431059SAndy Fleming  * OR0, OR1:
12567431059SAndy Fleming  *    Addr Mask = 8M = ORx[0:16] = 1111 1111 1000 0000 0
12667431059SAndy Fleming  *    Reserved ORx[17:18] = 11, confusion here?
12767431059SAndy Fleming  *    CSNT = ORx[20] = 1
12867431059SAndy Fleming  *    ACS = half cycle delay = ORx[21:22] = 11
12967431059SAndy Fleming  *    SCY = 6 = ORx[24:27] = 0110
13067431059SAndy Fleming  *    TRLX = use relaxed timing = ORx[29] = 1
13167431059SAndy Fleming  *    EAD = use external address latch delay = OR[31] = 1
13267431059SAndy Fleming  *
13367431059SAndy Fleming  * 0    4    8    12   16   20   24   28
13467431059SAndy Fleming  * 1111 1111 1000 0000 0110 1110 0110 0101 = ff806e65    ORx
13567431059SAndy Fleming  */
1366d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BCSR_BASE		0xf8000000
13767431059SAndy Fleming 
1386d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE		0xfe000000	/* start of FLASH 32M */
13967431059SAndy Fleming 
14067431059SAndy Fleming /*Chip select 0 - Flash*/
1416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR0_PRELIM		0xfe001001
1426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_OR0_PRELIM		0xfe006ff7
14367431059SAndy Fleming 
14467431059SAndy Fleming /*Chip slelect 1 - BCSR*/
1456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR1_PRELIM		0xf8000801
1466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_OR1_PRELIM		0xffffe9f7
14767431059SAndy Fleming 
1486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /*#define CONFIG_SYS_FLASH_BANKS_LIST	{0xff800000, CONFIG_SYS_FLASH_BASE} */
1496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_BANKS		1		/* number of banks */
1506d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_SECT		512		/* sectors per device */
1516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef	CONFIG_SYS_FLASH_CHECKSUM
1526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_ERASE_TOUT	60000	/* Flash Erase Timeout (ms) */
1536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_WRITE_TOUT	500		/* Flash Write Timeout (ms) */
15467431059SAndy Fleming 
15514d0a02aSWolfgang Denk #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE	/* start of monitor */
15667431059SAndy Fleming 
15700b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER
1586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI
1596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_EMPTY_INFO
16067431059SAndy Fleming 
16167431059SAndy Fleming 
16267431059SAndy Fleming /*
16367431059SAndy Fleming  * SDRAM on the LocalBus
16467431059SAndy Fleming  */
1656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_SDRAM_BASE	0xf0000000	/* Localbus SDRAM	 */
1666d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_SDRAM_SIZE	64			/* LBC SDRAM is 64MB */
16767431059SAndy Fleming 
16867431059SAndy Fleming 
16967431059SAndy Fleming /*Chip select 2 - SDRAM*/
1706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR2_PRELIM      0xf0001861
1716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR2_PRELIM		0xfc006901
17267431059SAndy Fleming 
1736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LCRR		0x00030004	/* LB clock ratio reg */
1746d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LBCR		0x00000000	/* LB config reg */
1756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LSRT		0x20000000	/* LB sdram refresh timer */
1766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_MRTPR		0x00000000	/* LB refresh timer prescal*/
17767431059SAndy Fleming 
17867431059SAndy Fleming /*
17967431059SAndy Fleming  * Common settings for all Local Bus SDRAM commands.
18067431059SAndy Fleming  * At run time, either BSMA1516 (for CPU 1.1)
18167431059SAndy Fleming  *                  or BSMA1617 (for CPU 1.0) (old)
18267431059SAndy Fleming  * is OR'ed in too.
18367431059SAndy Fleming  */
184b0fe93edSKumar Gala #define CONFIG_SYS_LBC_LSDMR_COMMON	( LSDMR_RFCR16		\
185b0fe93edSKumar Gala 				| LSDMR_PRETOACT7	\
186b0fe93edSKumar Gala 				| LSDMR_ACTTORW7	\
187b0fe93edSKumar Gala 				| LSDMR_BL8		\
188b0fe93edSKumar Gala 				| LSDMR_WRC4		\
189b0fe93edSKumar Gala 				| LSDMR_CL3		\
190b0fe93edSKumar Gala 				| LSDMR_RFEN		\
19167431059SAndy Fleming 				)
19267431059SAndy Fleming 
19367431059SAndy Fleming /*
19467431059SAndy Fleming  * The bcsr registers are connected to CS3 on MDS.
19567431059SAndy Fleming  * The new memory map places bcsr at 0xf8000000.
19667431059SAndy Fleming  *
19767431059SAndy Fleming  * For BR3, need:
19867431059SAndy Fleming  *    Base address of 0xf8000000 = BR[0:16] = 1111 1000 0000 0000 0
19967431059SAndy Fleming  *    port-size = 8-bits  = BR[19:20] = 01
20067431059SAndy Fleming  *    no parity checking  = BR[21:22] = 00
20167431059SAndy Fleming  *    GPMC for MSEL       = BR[24:26] = 000
20267431059SAndy Fleming  *    Valid               = BR[31]    = 1
20367431059SAndy Fleming  *
20467431059SAndy Fleming  * 0    4    8    12   16   20   24   28
20567431059SAndy Fleming  * 1111 1000 0000 0000 0000 1000 0000 0001 = f8000801
20667431059SAndy Fleming  *
20767431059SAndy Fleming  * For OR3, need:
20867431059SAndy Fleming  *    1 MB mask for AM,   OR[0:16]  = 1111 1111 1111 0000 0
20967431059SAndy Fleming  *    disable buffer ctrl OR[19]    = 0
21067431059SAndy Fleming  *    CSNT                OR[20]    = 1
21167431059SAndy Fleming  *    ACS                 OR[21:22] = 11
21267431059SAndy Fleming  *    XACS                OR[23]    = 1
21367431059SAndy Fleming  *    SCY 15 wait states  OR[24:27] = 1111	max is suboptimal but safe
21467431059SAndy Fleming  *    SETA                OR[28]    = 0
21567431059SAndy Fleming  *    TRLX                OR[29]    = 1
21667431059SAndy Fleming  *    EHTR                OR[30]    = 1
21767431059SAndy Fleming  *    EAD extra time      OR[31]    = 1
21867431059SAndy Fleming  *
21967431059SAndy Fleming  * 0    4    8    12   16   20   24   28
22067431059SAndy Fleming  * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7
22167431059SAndy Fleming  */
2226d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BCSR (0xf8000000)
22367431059SAndy Fleming 
22467431059SAndy Fleming /*Chip slelect 4 - PIB*/
2256d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR4_PRELIM   0xf8008801
2266d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR4_PRELIM   0xffffe9f7
22767431059SAndy Fleming 
22867431059SAndy Fleming /*Chip select 5 - PIB*/
2296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR5_PRELIM	 0xf8010801
2306d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR5_PRELIM	 0xffff69f7
23167431059SAndy Fleming 
2326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_LOCK	1
2336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_ADDR	0xe4010000	/* Initial RAM address */
234553f0982SWolfgang Denk #define CONFIG_SYS_INIT_RAM_SIZE	0x4000	    /* Size of used area in RAM */
23567431059SAndy Fleming 
23625ddd1fbSWolfgang Denk #define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
2376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
23867431059SAndy Fleming 
2396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN		(256 * 1024) /* Reserve 256 kB for Mon */
2406d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN		(128 * 1024)	/* Reserved for malloc */
24167431059SAndy Fleming 
24267431059SAndy Fleming /* Serial Port */
24367431059SAndy Fleming #define CONFIG_CONS_INDEX		1
2446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550
2456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_SERIAL
2466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_REG_SIZE    1
2476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
24867431059SAndy Fleming 
2496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE  \
25067431059SAndy Fleming 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
25167431059SAndy Fleming 
2526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
2536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
25467431059SAndy Fleming 
25567431059SAndy Fleming /* Use the HUSH parser*/
2566d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HUSH_PARSER
2576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef  CONFIG_SYS_HUSH_PARSER
2586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
25967431059SAndy Fleming #endif
26067431059SAndy Fleming 
26167431059SAndy Fleming /* pass open firmware flat tree */
262c480861bSKumar Gala #define CONFIG_OF_LIBFDT		1
26367431059SAndy Fleming #define CONFIG_OF_BOARD_SETUP		1
264c480861bSKumar Gala #define CONFIG_OF_STDOUT_VIA_ALIAS	1
26567431059SAndy Fleming 
26667431059SAndy Fleming /*
26767431059SAndy Fleming  * I2C
26867431059SAndy Fleming  */
26967431059SAndy Fleming #define CONFIG_FSL_I2C		/* Use FSL common I2C driver */
27067431059SAndy Fleming #define CONFIG_HARD_I2C		/* I2C with hardware support*/
27167431059SAndy Fleming #undef	CONFIG_SOFT_I2C			/* I2C bit-banged */
272c59e4091SHaiying Wang #define CONFIG_I2C_MULTI_BUS
2736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
2746d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_EEPROM_ADDR	0x52
2756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_SLAVE		0x7F
2766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_NOPROBES        {{0,0x69}}	/* Don't probe these addrs */
2776d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_OFFSET		0x3000
2786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C2_OFFSET		0x3100
27967431059SAndy Fleming 
28067431059SAndy Fleming /*
28167431059SAndy Fleming  * General PCI
28267431059SAndy Fleming  * Memory Addresses are mapped 1-1. I/O is mapped from 0
28367431059SAndy Fleming  */
2845af0fdd8SKumar Gala #define CONFIG_SYS_PCI1_MEM_VIRT	0x80000000
28510795f42SKumar Gala #define CONFIG_SYS_PCI1_MEM_BUS	0x80000000
2865af0fdd8SKumar Gala #define CONFIG_SYS_PCI1_MEM_PHYS	0x80000000
2876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_SIZE	0x20000000	/* 512M */
288aca5f018SKumar Gala #define CONFIG_SYS_PCI1_IO_VIRT	0xe2000000
2895f91ef6aSKumar Gala #define CONFIG_SYS_PCI1_IO_BUS	0x00000000
2906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_PHYS	0xe2000000
2916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_SIZE	0x00800000	/* 8M */
29267431059SAndy Fleming 
2933f6f9d76SKumar Gala #define CONFIG_SYS_PCIE1_NAME		"Slot"
2945af0fdd8SKumar Gala #define CONFIG_SYS_PCIE1_MEM_VIRT	0xa0000000
29510795f42SKumar Gala #define CONFIG_SYS_PCIE1_MEM_BUS	0xa0000000
2965af0fdd8SKumar Gala #define CONFIG_SYS_PCIE1_MEM_PHYS	0xa0000000
2976d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000	/* 512M */
298aca5f018SKumar Gala #define CONFIG_SYS_PCIE1_IO_VIRT	0xe2800000
2995f91ef6aSKumar Gala #define CONFIG_SYS_PCIE1_IO_BUS	0x00000000
3006d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCIE1_IO_PHYS	0xe2800000
3016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCIE1_IO_SIZE	0x00800000	/* 8M */
30267431059SAndy Fleming 
3035f7bbd13SKumar Gala #define CONFIG_SYS_SRIO1_MEM_VIRT	0xC0000000
3045f7bbd13SKumar Gala #define CONFIG_SYS_SRIO1_MEM_BUS	0xC0000000
3055f7bbd13SKumar Gala #define CONFIG_SYS_SRIO1_MEM_PHYS	CONFIG_SYS_SRIO1_MEM_BUS
3065f7bbd13SKumar Gala #define CONFIG_SYS_SRIO1_MEM_SIZE	0x20000000	/* 512M */
30767431059SAndy Fleming 
308da9d4610SAndy Fleming #ifdef CONFIG_QE
309da9d4610SAndy Fleming /*
310da9d4610SAndy Fleming  * QE UEC ethernet configuration
311da9d4610SAndy Fleming  */
312da9d4610SAndy Fleming #define CONFIG_UEC_ETH
313da9d4610SAndy Fleming #ifndef CONFIG_TSEC_ENET
31478b7a8efSKim Phillips #define CONFIG_ETHPRIME         "UEC0"
315da9d4610SAndy Fleming #endif
316da9d4610SAndy Fleming #define CONFIG_PHY_MODE_NEED_CHANGE
317da9d4610SAndy Fleming #define CONFIG_eTSEC_MDIO_BUS
318da9d4610SAndy Fleming 
319da9d4610SAndy Fleming #ifdef CONFIG_eTSEC_MDIO_BUS
320da9d4610SAndy Fleming #define CONFIG_MIIM_ADDRESS	0xE0024520
321da9d4610SAndy Fleming #endif
322da9d4610SAndy Fleming 
323da9d4610SAndy Fleming #define CONFIG_UEC_ETH1         /* GETH1 */
324da9d4610SAndy Fleming 
325da9d4610SAndy Fleming #ifdef CONFIG_UEC_ETH1
3266d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_UCC_NUM        0       /* UCC1 */
3276d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_RX_CLK         QE_CLK_NONE
3286d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_TX_CLK         QE_CLK16
3296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_ETH_TYPE       GIGA_ETH
3306d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_PHY_ADDR       7
331865ff856SAndy Fleming #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_ID
332582c55a0SHeiko Schocher #define CONFIG_SYS_UEC1_INTERFACE_SPEED 1000
333da9d4610SAndy Fleming #endif
334da9d4610SAndy Fleming 
335da9d4610SAndy Fleming #define CONFIG_UEC_ETH2         /* GETH2 */
336da9d4610SAndy Fleming 
337da9d4610SAndy Fleming #ifdef CONFIG_UEC_ETH2
3386d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_UCC_NUM        1       /* UCC2 */
3396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_RX_CLK         QE_CLK_NONE
3406d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_TX_CLK         QE_CLK16
3416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_ETH_TYPE       GIGA_ETH
3426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_PHY_ADDR       1
343865ff856SAndy Fleming #define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_ID
344582c55a0SHeiko Schocher #define CONFIG_SYS_UEC2_INTERFACE_SPEED 1000
345da9d4610SAndy Fleming #endif
346da9d4610SAndy Fleming #endif /* CONFIG_QE */
347da9d4610SAndy Fleming 
348f30ad49bSHaiying Wang #if defined(CONFIG_PCI)
349f30ad49bSHaiying Wang 
350f30ad49bSHaiying Wang #define CONFIG_NET_MULTI
351f30ad49bSHaiying Wang #define CONFIG_PCI_PNP			/* do pci plug-and-play */
352f30ad49bSHaiying Wang 
35367431059SAndy Fleming #undef CONFIG_EEPRO100
35467431059SAndy Fleming #undef CONFIG_TULIP
35567431059SAndy Fleming 
35667431059SAndy Fleming #undef CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
3576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057  /* Motorola */
35867431059SAndy Fleming 
35967431059SAndy Fleming #endif	/* CONFIG_PCI */
36067431059SAndy Fleming 
36167431059SAndy Fleming #ifndef CONFIG_NET_MULTI
36267431059SAndy Fleming #define CONFIG_NET_MULTI	1
36367431059SAndy Fleming #endif
36467431059SAndy Fleming 
365da9d4610SAndy Fleming #if defined(CONFIG_TSEC_ENET)
366da9d4610SAndy Fleming 
36767431059SAndy Fleming #define CONFIG_MII		1	/* MII PHY management */
368255a3577SKim Phillips #define CONFIG_TSEC1	1
369255a3577SKim Phillips #define CONFIG_TSEC1_NAME	"eTSEC0"
370255a3577SKim Phillips #define CONFIG_TSEC2	1
371255a3577SKim Phillips #define CONFIG_TSEC2_NAME	"eTSEC1"
37267431059SAndy Fleming 
37367431059SAndy Fleming #define TSEC1_PHY_ADDR		2
37467431059SAndy Fleming #define TSEC2_PHY_ADDR		3
37567431059SAndy Fleming 
37667431059SAndy Fleming #define TSEC1_PHYIDX		0
37767431059SAndy Fleming #define TSEC2_PHYIDX		0
37867431059SAndy Fleming 
3793a79013eSAndy Fleming #define TSEC1_FLAGS		TSEC_GIGABIT
3803a79013eSAndy Fleming #define TSEC2_FLAGS		TSEC_GIGABIT
3813a79013eSAndy Fleming 
382b96c83d4SAndy Fleming /* Options are: eTSEC[0-1] */
38367431059SAndy Fleming #define CONFIG_ETHPRIME		"eTSEC0"
38467431059SAndy Fleming 
38567431059SAndy Fleming #endif	/* CONFIG_TSEC_ENET */
38667431059SAndy Fleming 
38767431059SAndy Fleming /*
38867431059SAndy Fleming  * Environment
38967431059SAndy Fleming  */
3905a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH	1
3916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + 0x40000)
3920e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE	0x40000	/* 256K(one sector) for env */
3930e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		0x2000
39467431059SAndy Fleming 
39567431059SAndy Fleming #define CONFIG_LOADS_ECHO	1	/* echo on for serial download */
3966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOADS_BAUD_CHANGE	1	/* allow baudrate change */
39767431059SAndy Fleming 
3982835e518SJon Loeliger 
3992835e518SJon Loeliger /*
400079a136cSJon Loeliger  * BOOTP options
401079a136cSJon Loeliger  */
402079a136cSJon Loeliger #define CONFIG_BOOTP_BOOTFILESIZE
403079a136cSJon Loeliger #define CONFIG_BOOTP_BOOTPATH
404079a136cSJon Loeliger #define CONFIG_BOOTP_GATEWAY
405079a136cSJon Loeliger #define CONFIG_BOOTP_HOSTNAME
406079a136cSJon Loeliger 
407079a136cSJon Loeliger 
408079a136cSJon Loeliger /*
4092835e518SJon Loeliger  * Command line configuration.
4102835e518SJon Loeliger  */
4112835e518SJon Loeliger #include <config_cmd_default.h>
4122835e518SJon Loeliger 
4132835e518SJon Loeliger #define CONFIG_CMD_PING
4142835e518SJon Loeliger #define CONFIG_CMD_I2C
4152835e518SJon Loeliger #define CONFIG_CMD_MII
41682ac8c97SKumar Gala #define CONFIG_CMD_ELF
4171c9aa76bSKumar Gala #define CONFIG_CMD_IRQ
4181c9aa76bSKumar Gala #define CONFIG_CMD_SETEXPR
419199e262eSBecky Bruce #define CONFIG_CMD_REGINFO
4202835e518SJon Loeliger 
42167431059SAndy Fleming #if defined(CONFIG_PCI)
4222835e518SJon Loeliger     #define CONFIG_CMD_PCI
42367431059SAndy Fleming #endif
4242835e518SJon Loeliger 
42567431059SAndy Fleming 
42667431059SAndy Fleming #undef CONFIG_WATCHDOG			/* watchdog disabled */
42767431059SAndy Fleming 
42867431059SAndy Fleming /*
42967431059SAndy Fleming  * Miscellaneous configurable options
43067431059SAndy Fleming  */
4316d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP			/* undef to save memory	*/
43222abb2d2SKumar Gala #define CONFIG_CMDLINE_EDITING			/* Command-line editing */
4335be58f5fSKim Phillips #define CONFIG_AUTO_COMPLETE			/* add autocompletion support */
4346d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR	0x2000000	/* default load address */
4356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT	"=> "		/* Monitor Command Prompt */
4362835e518SJon Loeliger #if defined(CONFIG_CMD_KGDB)
4376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size */
43867431059SAndy Fleming #else
4396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE	256			/* Console I/O Buffer Size */
44067431059SAndy Fleming #endif
4416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
4426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS	16		/* max number of command args */
4436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE	/* Boot Argument Buffer Size */
4446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HZ		1000		/* decrementer freq: 1ms ticks */
44567431059SAndy Fleming 
44667431059SAndy Fleming /*
44767431059SAndy Fleming  * For booting Linux, the board info and command line data
448a832ac41SKumar Gala  * have to be in the first 64 MB of memory, since this is
44967431059SAndy Fleming  * the maximum mapped by the Linux kernel during initialization.
45067431059SAndy Fleming  */
451a832ac41SKumar Gala #define CONFIG_SYS_BOOTMAPSZ	(64 << 20)	/* Initial Memory map for Linux*/
452a832ac41SKumar Gala #define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
45367431059SAndy Fleming 
4542835e518SJon Loeliger #if defined(CONFIG_CMD_KGDB)
45567431059SAndy Fleming #define CONFIG_KGDB_BAUDRATE	230400	/* speed to run kgdb serial port */
45667431059SAndy Fleming #define CONFIG_KGDB_SER_INDEX	2	/* which serial port to use */
45767431059SAndy Fleming #endif
45867431059SAndy Fleming 
45967431059SAndy Fleming /*
46067431059SAndy Fleming  * Environment Configuration
46167431059SAndy Fleming  */
46267431059SAndy Fleming 
46367431059SAndy Fleming /* The mac addresses for all ethernet interface */
464da9d4610SAndy Fleming #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_UEC_ETH)
465da9d4610SAndy Fleming #define CONFIG_HAS_ETH0
46667431059SAndy Fleming #define CONFIG_ETHADDR   00:E0:0C:00:00:FD
46767431059SAndy Fleming #define CONFIG_HAS_ETH1
46867431059SAndy Fleming #define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
46967431059SAndy Fleming #define CONFIG_HAS_ETH2
47067431059SAndy Fleming #define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
471da9d4610SAndy Fleming #define CONFIG_HAS_ETH3
472da9d4610SAndy Fleming #define CONFIG_ETH3ADDR  00:E0:0C:00:03:FD
47367431059SAndy Fleming #endif
47467431059SAndy Fleming 
47567431059SAndy Fleming #define CONFIG_IPADDR    192.168.1.253
47667431059SAndy Fleming 
47767431059SAndy Fleming #define CONFIG_HOSTNAME  unknown
47867431059SAndy Fleming #define CONFIG_ROOTPATH  /nfsroot
47967431059SAndy Fleming #define CONFIG_BOOTFILE  your.uImage
48067431059SAndy Fleming 
48167431059SAndy Fleming #define CONFIG_SERVERIP  192.168.1.1
48267431059SAndy Fleming #define CONFIG_GATEWAYIP 192.168.1.1
48367431059SAndy Fleming #define CONFIG_NETMASK   255.255.255.0
48467431059SAndy Fleming 
48567431059SAndy Fleming #define CONFIG_LOADADDR  200000   /*default location for tftp and bootm*/
48667431059SAndy Fleming 
48767431059SAndy Fleming #define CONFIG_BOOTDELAY 10       /* -1 disables auto-boot */
48867431059SAndy Fleming #undef  CONFIG_BOOTARGS           /* the boot command will set bootargs*/
48967431059SAndy Fleming 
49067431059SAndy Fleming #define CONFIG_BAUDRATE	115200
49167431059SAndy Fleming 
49267431059SAndy Fleming #define	CONFIG_EXTRA_ENV_SETTINGS				        \
49367431059SAndy Fleming    "netdev=eth0\0"                                                      \
49467431059SAndy Fleming    "consoledev=ttyS0\0"                                                 \
49567431059SAndy Fleming    "ramdiskaddr=600000\0"                                               \
49667431059SAndy Fleming    "ramdiskfile=your.ramdisk.u-boot\0"					\
49767431059SAndy Fleming    "fdtaddr=400000\0"							\
49867431059SAndy Fleming    "fdtfile=your.fdt.dtb\0"						\
49967431059SAndy Fleming    "nfsargs=setenv bootargs root=/dev/nfs rw "				\
50067431059SAndy Fleming       "nfsroot=$serverip:$rootpath "					\
50167431059SAndy Fleming       "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
50267431059SAndy Fleming       "console=$consoledev,$baudrate $othbootargs\0"			\
50367431059SAndy Fleming    "ramargs=setenv bootargs root=/dev/ram rw "				\
50467431059SAndy Fleming       "console=$consoledev,$baudrate $othbootargs\0"			\
50567431059SAndy Fleming 
50667431059SAndy Fleming 
50767431059SAndy Fleming #define CONFIG_NFSBOOTCOMMAND	                                        \
50867431059SAndy Fleming    "run nfsargs;"							\
50967431059SAndy Fleming    "tftp $loadaddr $bootfile;"                                          \
51067431059SAndy Fleming    "tftp $fdtaddr $fdtfile;"						\
51167431059SAndy Fleming    "bootm $loadaddr - $fdtaddr"
51267431059SAndy Fleming 
51367431059SAndy Fleming 
51467431059SAndy Fleming #define CONFIG_RAMBOOTCOMMAND \
51567431059SAndy Fleming    "run ramargs;"							\
51667431059SAndy Fleming    "tftp $ramdiskaddr $ramdiskfile;"                                    \
51767431059SAndy Fleming    "tftp $loadaddr $bootfile;"                                          \
51867431059SAndy Fleming    "bootm $loadaddr $ramdiskaddr"
51967431059SAndy Fleming 
52067431059SAndy Fleming #define CONFIG_BOOTCOMMAND  CONFIG_NFSBOOTCOMMAND
52167431059SAndy Fleming 
52267431059SAndy Fleming #endif	/* __CONFIG_H */
523