xref: /rk3399_rockchip-uboot/include/configs/sbc8349.h (revision 8b3637c662e8a322f542942e5ee76b95ed9d9e39)
191e25769SPaul Gortmaker /*
291e25769SPaul Gortmaker  * WindRiver SBC8349 U-Boot configuration file.
391e25769SPaul Gortmaker  * Copyright (c) 2006, 2007 Wind River Systems, Inc.
491e25769SPaul Gortmaker  *
591e25769SPaul Gortmaker  * Paul Gortmaker <paul.gortmaker@windriver.com>
691e25769SPaul Gortmaker  * Based on the MPC8349EMDS config.
791e25769SPaul Gortmaker  *
891e25769SPaul Gortmaker  * See file CREDITS for list of people who contributed to this
991e25769SPaul Gortmaker  * project.
1091e25769SPaul Gortmaker  *
1191e25769SPaul Gortmaker  * This program is free software; you can redistribute it and/or
1291e25769SPaul Gortmaker  * modify it under the terms of the GNU General Public License as
1391e25769SPaul Gortmaker  * published by the Free Software Foundation; either version 2 of
1491e25769SPaul Gortmaker  * the License, or (at your option) any later version.
1591e25769SPaul Gortmaker  *
1691e25769SPaul Gortmaker  * This program is distributed in the hope that it will be useful,
1791e25769SPaul Gortmaker  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1891e25769SPaul Gortmaker  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
1991e25769SPaul Gortmaker  * GNU General Public License for more details.
2091e25769SPaul Gortmaker  *
2191e25769SPaul Gortmaker  * You should have received a copy of the GNU General Public License
2291e25769SPaul Gortmaker  * along with this program; if not, write to the Free Software
2391e25769SPaul Gortmaker  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2491e25769SPaul Gortmaker  * MA 02111-1307 USA
2591e25769SPaul Gortmaker  */
2691e25769SPaul Gortmaker 
2791e25769SPaul Gortmaker /*
2891e25769SPaul Gortmaker  * sbc8349 board configuration file.
2991e25769SPaul Gortmaker  */
3091e25769SPaul Gortmaker 
3191e25769SPaul Gortmaker #ifndef __CONFIG_H
3291e25769SPaul Gortmaker #define __CONFIG_H
3391e25769SPaul Gortmaker 
3491e25769SPaul Gortmaker /*
3591e25769SPaul Gortmaker  * High Level Configuration Options
3691e25769SPaul Gortmaker  */
3791e25769SPaul Gortmaker #define CONFIG_E300		1	/* E300 Family */
380f898604SPeter Tyser #define CONFIG_MPC83xx		1	/* MPC83xx family */
392c7920afSPeter Tyser #define CONFIG_MPC834x		1	/* MPC834x family */
4091e25769SPaul Gortmaker #define CONFIG_MPC8349		1	/* MPC8349 specific */
4191e25769SPaul Gortmaker #define CONFIG_SBC8349		1	/* WRS SBC8349 board specific */
4291e25769SPaul Gortmaker 
432ae18241SWolfgang Denk #define	CONFIG_SYS_TEXT_BASE	0xFF800000
442ae18241SWolfgang Denk 
4591e25769SPaul Gortmaker /* Don't enable PCI2 on sbc834x - it doesn't exist physically. */
4691e25769SPaul Gortmaker #undef CONFIG_MPC83XX_PCI2		/* support for 2nd PCI controller */
4791e25769SPaul Gortmaker 
48c0d660fbSPaul Gortmaker /*
49c0d660fbSPaul Gortmaker  * The default if PCI isn't enabled, or if no PCI clk setting is given
50c0d660fbSPaul Gortmaker  * is 66MHz; this is what the board defaults to when the PCI slot is
51c0d660fbSPaul Gortmaker  * physically empty.  The board will automatically (i.e w/o jumpers)
52c0d660fbSPaul Gortmaker  * clock down to 33MHz if you insert a 33MHz PCI card.
53c0d660fbSPaul Gortmaker  */
542ae18241SWolfgang Denk #ifdef CONFIG_PCI_33M
5591e25769SPaul Gortmaker #define CONFIG_83XX_CLKIN	33000000	/* in Hz */
56c0d660fbSPaul Gortmaker #else	/* 66M */
57c0d660fbSPaul Gortmaker #define CONFIG_83XX_CLKIN	66000000	/* in Hz */
5891e25769SPaul Gortmaker #endif
5991e25769SPaul Gortmaker 
6091e25769SPaul Gortmaker #ifndef CONFIG_SYS_CLK_FREQ
612ae18241SWolfgang Denk #ifdef CONFIG_PCI_33M
6291e25769SPaul Gortmaker #define CONFIG_SYS_CLK_FREQ	33000000
6391e25769SPaul Gortmaker #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_8X1
64c0d660fbSPaul Gortmaker #else	/* 66M */
65c0d660fbSPaul Gortmaker #define CONFIG_SYS_CLK_FREQ	66000000
66c0d660fbSPaul Gortmaker #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_4X1
6791e25769SPaul Gortmaker #endif
6891e25769SPaul Gortmaker #endif
6991e25769SPaul Gortmaker 
7091e25769SPaul Gortmaker #undef CONFIG_BOARD_EARLY_INIT_F		/* call board_pre_init */
7191e25769SPaul Gortmaker 
726d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IMMR		0xE0000000
7391e25769SPaul Gortmaker 
746d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef CONFIG_SYS_DRAM_TEST				/* memory test, takes time */
756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	0x00000000	/* memtest region */
766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END		0x00100000
7791e25769SPaul Gortmaker 
7891e25769SPaul Gortmaker /*
7991e25769SPaul Gortmaker  * DDR Setup
8091e25769SPaul Gortmaker  */
8191e25769SPaul Gortmaker #undef CONFIG_DDR_ECC			/* only for ECC DDR module */
8291e25769SPaul Gortmaker #undef CONFIG_DDR_ECC_CMD		/* use DDR ECC user commands */
8391e25769SPaul Gortmaker #define CONFIG_SPD_EEPROM		/* use SPD EEPROM for DDR setup*/
846d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_83XX_DDR_USES_CS0		/* WRS; Fsl board uses CS2/CS3 */
8591e25769SPaul Gortmaker 
8691e25769SPaul Gortmaker /*
8791e25769SPaul Gortmaker  * 32-bit data path mode.
8891e25769SPaul Gortmaker  *
8991e25769SPaul Gortmaker  * Please note that using this mode for devices with the real density of 64-bit
9091e25769SPaul Gortmaker  * effectively reduces the amount of available memory due to the effect of
9191e25769SPaul Gortmaker  * wrapping around while translating address to row/columns, for example in the
9291e25769SPaul Gortmaker  * 256MB module the upper 128MB get aliased with contents of the lower
9391e25769SPaul Gortmaker  * 128MB); normally this define should be used for devices with real 32-bit
9491e25769SPaul Gortmaker  * data path.
9591e25769SPaul Gortmaker  */
9691e25769SPaul Gortmaker #undef CONFIG_DDR_32BIT
9791e25769SPaul Gortmaker 
986d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_BASE		0x00000000	/* DDR is system memory*/
996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE		CONFIG_SYS_DDR_BASE
1006d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_SDRAM_BASE	CONFIG_SYS_DDR_BASE
1016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL	(DDR_SDRAM_CLK_CNTL_SS_EN | \
10291e25769SPaul Gortmaker 				DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075)
10391e25769SPaul Gortmaker #define CONFIG_DDR_2T_TIMING
10491e25769SPaul Gortmaker 
10591e25769SPaul Gortmaker #if defined(CONFIG_SPD_EEPROM)
10691e25769SPaul Gortmaker /*
10791e25769SPaul Gortmaker  * Determine DDR configuration from I2C interface.
10891e25769SPaul Gortmaker  */
10991e25769SPaul Gortmaker #define SPD_EEPROM_ADDRESS	0x52		/* DDR DIMM */
11091e25769SPaul Gortmaker 
11191e25769SPaul Gortmaker #else
11291e25769SPaul Gortmaker /*
11391e25769SPaul Gortmaker  * Manually set up DDR parameters
11491e25769SPaul Gortmaker  * NB: manual DDR setup untested on sbc834x
11591e25769SPaul Gortmaker  */
1166d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_SIZE		256		/* MB */
1176d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_CONFIG		(CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10)
1186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_TIMING_1	0x36332321
1196d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_TIMING_2	0x00000800	/* P9-45,may need tuning */
1206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_CONTROL		0xc2000000	/* unbuffered,no DYN_PWR */
1216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_INTERVAL	0x04060100	/* autocharge,no open page */
12291e25769SPaul Gortmaker 
12391e25769SPaul Gortmaker #if defined(CONFIG_DDR_32BIT)
12491e25769SPaul Gortmaker /* set burst length to 8 for 32-bit data path */
1256d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_MODE		0x00000023	/* DLL,normal,seq,4/2.5, 8 burst len */
12691e25769SPaul Gortmaker #else
12791e25769SPaul Gortmaker /* the default burst length is 4 - for 64-bit data path */
1286d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_MODE		0x00000022	/* DLL,normal,seq,4/2.5, 4 burst len */
12991e25769SPaul Gortmaker #endif
13091e25769SPaul Gortmaker #endif
13191e25769SPaul Gortmaker 
13291e25769SPaul Gortmaker /*
13391e25769SPaul Gortmaker  * SDRAM on the Local Bus
13491e25769SPaul Gortmaker  */
1356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_SDRAM_BASE	0x10000000	/* Localbus SDRAM */
1366d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_SDRAM_SIZE	128		/* LBC SDRAM is 128MB */
13791e25769SPaul Gortmaker 
13891e25769SPaul Gortmaker /*
13991e25769SPaul Gortmaker  * FLASH on the Local Bus
14091e25769SPaul Gortmaker  */
1416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI				/* use the Common Flash Interface */
14200b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER			/* use the CFI driver */
1436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE		0xFF800000	/* start of FLASH   */
1446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_SIZE		8		/* flash size in MB */
1456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
14691e25769SPaul Gortmaker 
1476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR0_PRELIM		(CONFIG_SYS_FLASH_BASE |	/* flash Base address */ \
14898d92d8cSWolfgang Denk 				(2 << BR_PS_SHIFT) |	/* 16 bit port size */	 \
14991e25769SPaul Gortmaker 				BR_V)			/* valid */
15091e25769SPaul Gortmaker 
1516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR0_PRELIM		0xFF806FF7	/* 8 MB flash size */
1526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBLAWBAR0_PRELIM	CONFIG_SYS_FLASH_BASE	/* window base at flash base */
1536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBLAWAR0_PRELIM	0x80000016	/* 8 MB window size */
15491e25769SPaul Gortmaker 
1556d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_BANKS	1		/* number of banks */
1566d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_SECT	64		/* sectors per device */
15791e25769SPaul Gortmaker 
1586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef CONFIG_SYS_FLASH_CHECKSUM
1596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_ERASE_TOUT	60000	/* Flash Erase Timeout (ms) */
1606d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (ms) */
16191e25769SPaul Gortmaker 
16214d0a02aSWolfgang Denk #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE	/* start of monitor */
16391e25769SPaul Gortmaker 
1646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
1656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RAMBOOT
16691e25769SPaul Gortmaker #else
1676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_RAMBOOT
16891e25769SPaul Gortmaker #endif
16991e25769SPaul Gortmaker 
1706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_LOCK	1
1716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_ADDR	0xFD000000		/* Initial RAM address */
172553f0982SWolfgang Denk #define CONFIG_SYS_INIT_RAM_SIZE	0x1000			/* Size of used area in RAM*/
17391e25769SPaul Gortmaker 
17425ddd1fbSWolfgang Denk #define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
1756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
17691e25769SPaul Gortmaker 
1776d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN		(256 * 1024)		/* Reserve 256 kB for Mon */
1786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN		(128 * 1024)		/* Reserved for malloc */
17991e25769SPaul Gortmaker 
18091e25769SPaul Gortmaker /*
18191e25769SPaul Gortmaker  * Local Bus LCRR and LBCR regs
18291e25769SPaul Gortmaker  *    LCRR:  DLL bypass, Clock divider is 4
18391e25769SPaul Gortmaker  * External Local Bus rate is
18491e25769SPaul Gortmaker  *    CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
18591e25769SPaul Gortmaker  */
186c7190f02SKim Phillips #define CONFIG_SYS_LCRR_DBYP	LCRR_DBYP
187c7190f02SKim Phillips #define CONFIG_SYS_LCRR_CLKDIV	LCRR_CLKDIV_4
1886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LBCR	0x00000000
18991e25769SPaul Gortmaker 
1906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef CONFIG_SYS_LB_SDRAM	/* if board has SDRAM on local bus */
19191e25769SPaul Gortmaker 
1926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_LB_SDRAM
19391e25769SPaul Gortmaker /* Local bus BR2, OR2 definition for SDRAM if soldered on the board*/
19491e25769SPaul Gortmaker /*
19591e25769SPaul Gortmaker  * Base Register 2 and Option Register 2 configure SDRAM.
1966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD  * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000.
19791e25769SPaul Gortmaker  *
19891e25769SPaul Gortmaker  * For BR2, need:
19991e25769SPaul Gortmaker  *    Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0
20091e25769SPaul Gortmaker  *    port-size = 32-bits = BR2[19:20] = 11
20191e25769SPaul Gortmaker  *    no parity checking = BR2[21:22] = 00
20291e25769SPaul Gortmaker  *    SDRAM for MSEL = BR2[24:26] = 011
20391e25769SPaul Gortmaker  *    Valid = BR[31] = 1
20491e25769SPaul Gortmaker  *
20591e25769SPaul Gortmaker  * 0    4    8    12   16   20   24   28
20691e25769SPaul Gortmaker  * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861
20791e25769SPaul Gortmaker  *
2086d0f6bcfSJean-Christophe PLAGNIOL-VILLARD  * FIXME: CONFIG_SYS_LBC_SDRAM_BASE should be masked and OR'ed into
20991e25769SPaul Gortmaker  * FIXME: the top 17 bits of BR2.
21091e25769SPaul Gortmaker  */
21191e25769SPaul Gortmaker 
2126d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR2_PRELIM		0xF0001861 /* Port-size=32bit, MSEL=SDRAM */
2136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBLAWBAR2_PRELIM	0xF0000000
2146d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBLAWAR2_PRELIM	0x80000019 /* 64M */
21591e25769SPaul Gortmaker 
21691e25769SPaul Gortmaker /*
2176d0f6bcfSJean-Christophe PLAGNIOL-VILLARD  * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64.
21891e25769SPaul Gortmaker  *
21991e25769SPaul Gortmaker  * For OR2, need:
22091e25769SPaul Gortmaker  *    64MB mask for AM, OR2[0:7] = 1111 1100
22191e25769SPaul Gortmaker  *                 XAM, OR2[17:18] = 11
22291e25769SPaul Gortmaker  *    9 columns OR2[19-21] = 010
22391e25769SPaul Gortmaker  *    13 rows   OR2[23-25] = 100
22491e25769SPaul Gortmaker  *    EAD set for extra time OR[31] = 1
22591e25769SPaul Gortmaker  *
22691e25769SPaul Gortmaker  * 0    4    8    12   16   20   24   28
22791e25769SPaul Gortmaker  * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901
22891e25769SPaul Gortmaker  */
22991e25769SPaul Gortmaker 
2306d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR2_PRELIM	0xFC006901
23191e25769SPaul Gortmaker 
2326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LSRT	0x32000000    /* LB sdram refresh timer, about 6us */
2336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_MRTPR	0x20000000    /* LB refresh timer prescal, 266MHz/32 */
23491e25769SPaul Gortmaker 
235540dcf1cSKumar Gala #define CONFIG_SYS_LBC_LSDMR_COMMON    ( LSDMR_RFEN            \
236540dcf1cSKumar Gala 				| LSDMR_BSMA1516	\
237540dcf1cSKumar Gala 				| LSDMR_RFCR8		\
238540dcf1cSKumar Gala 				| LSDMR_PRETOACT6	\
239540dcf1cSKumar Gala 				| LSDMR_ACTTORW3	\
240540dcf1cSKumar Gala 				| LSDMR_BL8		\
241540dcf1cSKumar Gala 				| LSDMR_WRC3		\
242540dcf1cSKumar Gala 				| LSDMR_CL3		\
24391e25769SPaul Gortmaker 				)
24491e25769SPaul Gortmaker 
24591e25769SPaul Gortmaker /*
24691e25769SPaul Gortmaker  * SDRAM Controller configuration sequence.
24791e25769SPaul Gortmaker  */
248540dcf1cSKumar Gala #define CONFIG_SYS_LBC_LSDMR_1	(CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL)
249540dcf1cSKumar Gala #define CONFIG_SYS_LBC_LSDMR_2	(CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
250540dcf1cSKumar Gala #define CONFIG_SYS_LBC_LSDMR_3	(CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
251540dcf1cSKumar Gala #define CONFIG_SYS_LBC_LSDMR_4	(CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW)
252540dcf1cSKumar Gala #define CONFIG_SYS_LBC_LSDMR_5	(CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL)
25391e25769SPaul Gortmaker #endif
25491e25769SPaul Gortmaker 
25591e25769SPaul Gortmaker /*
25691e25769SPaul Gortmaker  * Serial Port
25791e25769SPaul Gortmaker  */
25891e25769SPaul Gortmaker #define CONFIG_CONS_INDEX     1
2596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550
2606d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_SERIAL
2616d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_REG_SIZE    1
2626d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
26391e25769SPaul Gortmaker 
2646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE  \
26591e25769SPaul Gortmaker 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
26691e25769SPaul Gortmaker 
2676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_IMMR+0x4500)
2686d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_IMMR+0x4600)
26991e25769SPaul Gortmaker 
27022d71a71SKim Phillips #define CONFIG_CMDLINE_EDITING	1	/* add command line history	*/
271a059e90eSKim Phillips #define CONFIG_AUTO_COMPLETE		/* add autocompletion support   */
27291e25769SPaul Gortmaker /* Use the HUSH parser */
2736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HUSH_PARSER
2746d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef  CONFIG_SYS_HUSH_PARSER
2756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
27691e25769SPaul Gortmaker #endif
27791e25769SPaul Gortmaker 
27891e25769SPaul Gortmaker /* pass open firmware flat tree */
279e496865eSPaul Gortmaker #define CONFIG_OF_LIBFDT	1
28091e25769SPaul Gortmaker #define CONFIG_OF_BOARD_SETUP	1
2815b8bc606SKim Phillips #define CONFIG_OF_STDOUT_VIA_ALIAS	1
28291e25769SPaul Gortmaker 
28391e25769SPaul Gortmaker /* I2C */
28491e25769SPaul Gortmaker #define CONFIG_HARD_I2C			/* I2C with hardware support*/
28591e25769SPaul Gortmaker #undef CONFIG_SOFT_I2C			/* I2C bit-banged */
28691e25769SPaul Gortmaker #define CONFIG_FSL_I2C
2876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
2886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_SLAVE		0x7F
2896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_NOPROBES	{0x69}	/* Don't probe these addrs */
2906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C1_OFFSET		0x3000
2916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C2_OFFSET		0x3100
2926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_OFFSET		CONFIG_SYS_I2C2_OFFSET
293efaf6f1bSPaul Gortmaker /* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SYS_SPD_BUS_NUM... */
29491e25769SPaul Gortmaker 
29591e25769SPaul Gortmaker /* TSEC */
2966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TSEC1_OFFSET 0x24000
2976d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
2986d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TSEC2_OFFSET 0x25000
2996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
30091e25769SPaul Gortmaker 
30191e25769SPaul Gortmaker /*
30291e25769SPaul Gortmaker  * General PCI
30391e25769SPaul Gortmaker  * Addresses are mapped 1-1.
30491e25769SPaul Gortmaker  */
3056d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_BASE	0x80000000
3066d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_PHYS	CONFIG_SYS_PCI1_MEM_BASE
3076d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_SIZE	0x10000000	/* 256M */
3086d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MMIO_BASE	0x90000000
3096d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MMIO_PHYS	CONFIG_SYS_PCI1_MMIO_BASE
3106d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MMIO_SIZE	0x10000000	/* 256M */
3116d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_BASE	0x00000000
3126d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_PHYS	0xE2000000
3136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_SIZE	0x00100000	/* 1M */
31491e25769SPaul Gortmaker 
3156d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_MEM_BASE	0xA0000000
3166d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_MEM_PHYS	CONFIG_SYS_PCI2_MEM_BASE
3176d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_MEM_SIZE	0x10000000	/* 256M */
3186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_MMIO_BASE	0xB0000000
3196d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_MMIO_PHYS	CONFIG_SYS_PCI2_MMIO_BASE
3206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_MMIO_SIZE	0x10000000	/* 256M */
3216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_IO_BASE	0x00000000
3226d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_IO_PHYS	0xE2100000
3236d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI2_IO_SIZE	0x00100000	/* 1M */
32491e25769SPaul Gortmaker 
32591e25769SPaul Gortmaker #if defined(CONFIG_PCI)
32691e25769SPaul Gortmaker 
32791e25769SPaul Gortmaker #define PCI_64BIT
32891e25769SPaul Gortmaker #define PCI_ONE_PCI1
32991e25769SPaul Gortmaker #if defined(PCI_64BIT)
33091e25769SPaul Gortmaker #undef PCI_ALL_PCI1
33191e25769SPaul Gortmaker #undef PCI_TWO_PCI1
33291e25769SPaul Gortmaker #undef PCI_ONE_PCI1
33391e25769SPaul Gortmaker #endif
33491e25769SPaul Gortmaker 
33591e25769SPaul Gortmaker #define CONFIG_PCI_PNP		/* do pci plug-and-play */
33691e25769SPaul Gortmaker 
33791e25769SPaul Gortmaker #undef CONFIG_EEPRO100
33891e25769SPaul Gortmaker #undef CONFIG_TULIP
33991e25769SPaul Gortmaker 
34091e25769SPaul Gortmaker #if !defined(CONFIG_PCI_PNP)
34191e25769SPaul Gortmaker 	#define PCI_ENET0_IOADDR	0xFIXME
34291e25769SPaul Gortmaker 	#define PCI_ENET0_MEMADDR	0xFIXME
34391e25769SPaul Gortmaker 	#define PCI_IDSEL_NUMBER	0xFIXME
34491e25769SPaul Gortmaker #endif
34591e25769SPaul Gortmaker 
34691e25769SPaul Gortmaker #undef CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
3476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057  /* Motorola */
34891e25769SPaul Gortmaker 
34991e25769SPaul Gortmaker #endif	/* CONFIG_PCI */
35091e25769SPaul Gortmaker 
35191e25769SPaul Gortmaker /*
35291e25769SPaul Gortmaker  * TSEC configuration
35391e25769SPaul Gortmaker  */
35491e25769SPaul Gortmaker #define CONFIG_TSEC_ENET		/* TSEC ethernet support */
35591e25769SPaul Gortmaker 
35691e25769SPaul Gortmaker #if defined(CONFIG_TSEC_ENET)
35791e25769SPaul Gortmaker 
358255a3577SKim Phillips #define CONFIG_TSEC1	1
359255a3577SKim Phillips #define CONFIG_TSEC1_NAME	"TSEC0"
360255a3577SKim Phillips #define CONFIG_TSEC2	1
361255a3577SKim Phillips #define CONFIG_TSEC2_NAME	"TSEC1"
36291e25769SPaul Gortmaker #define CONFIG_PHY_BCM5421S	1
36391e25769SPaul Gortmaker #define TSEC1_PHY_ADDR		0x19
36491e25769SPaul Gortmaker #define TSEC2_PHY_ADDR		0x1a
36591e25769SPaul Gortmaker #define TSEC1_PHYIDX		0
36691e25769SPaul Gortmaker #define TSEC2_PHYIDX		0
3673a79013eSAndy Fleming #define TSEC1_FLAGS		TSEC_GIGABIT
3683a79013eSAndy Fleming #define TSEC2_FLAGS		TSEC_GIGABIT
36991e25769SPaul Gortmaker 
37091e25769SPaul Gortmaker /* Options are: TSEC[0-1] */
37191e25769SPaul Gortmaker #define CONFIG_ETHPRIME		"TSEC0"
37291e25769SPaul Gortmaker 
37391e25769SPaul Gortmaker #endif	/* CONFIG_TSEC_ENET */
37491e25769SPaul Gortmaker 
37591e25769SPaul Gortmaker /*
37691e25769SPaul Gortmaker  * Environment
37791e25769SPaul Gortmaker  */
3786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifndef CONFIG_SYS_RAMBOOT
3795a1aceb0SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_IS_IN_FLASH	1
3806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + 0x40000)
3810e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SECT_SIZE	0x20000	/* 128K(one sector) for env */
3820e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SIZE		0x2000
38391e25769SPaul Gortmaker 
38491e25769SPaul Gortmaker /* Address and size of Redundant Environment Sector	*/
3850e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR_REDUND	(CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
3860e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SIZE)
38791e25769SPaul Gortmaker 
38891e25769SPaul Gortmaker #else
3896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_SYS_NO_FLASH		1	/* Flash is not usable now */
39093f6d725SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_IS_NOWHERE	1	/* Store ENV in memory only */
3916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - 0x1000)
3920e8d1586SJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_ENV_SIZE		0x2000
39391e25769SPaul Gortmaker #endif
39491e25769SPaul Gortmaker 
39591e25769SPaul Gortmaker #define CONFIG_LOADS_ECHO	1	/* echo on for serial download */
3966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOADS_BAUD_CHANGE	1	/* allow baudrate change */
39791e25769SPaul Gortmaker 
398866e3089SJon Loeliger 
399866e3089SJon 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 /*
409866e3089SJon Loeliger  * Command line configuration.
410866e3089SJon Loeliger  */
411866e3089SJon Loeliger #include <config_cmd_default.h>
412866e3089SJon Loeliger 
413866e3089SJon Loeliger #define CONFIG_CMD_I2C
414866e3089SJon Loeliger #define CONFIG_CMD_MII
415866e3089SJon Loeliger #define CONFIG_CMD_PING
416866e3089SJon Loeliger 
41791e25769SPaul Gortmaker #if defined(CONFIG_PCI)
418e496865eSPaul Gortmaker     #define CONFIG_CMD_PCI
41991e25769SPaul Gortmaker #endif
42091e25769SPaul Gortmaker 
4216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #if defined(CONFIG_SYS_RAMBOOT)
422bdab39d3SMike Frysinger     #undef CONFIG_CMD_SAVEENV
423866e3089SJon Loeliger     #undef CONFIG_CMD_LOADS
424866e3089SJon Loeliger #endif
425866e3089SJon Loeliger 
42691e25769SPaul Gortmaker 
42791e25769SPaul Gortmaker #undef CONFIG_WATCHDOG			/* watchdog disabled */
42891e25769SPaul Gortmaker 
42991e25769SPaul Gortmaker /*
43091e25769SPaul Gortmaker  * Miscellaneous configurable options
43191e25769SPaul Gortmaker  */
4326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP			/* undef to save memory */
4336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR	0x2000000	/* default load address */
4346d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT	"=> "		/* Monitor Command Prompt */
43591e25769SPaul Gortmaker 
436866e3089SJon Loeliger #if defined(CONFIG_CMD_KGDB)
4376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size */
43891e25769SPaul Gortmaker #else
4396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	#define CONFIG_SYS_CBSIZE	256		/* Console I/O Buffer Size */
44091e25769SPaul Gortmaker #endif
44191e25769SPaul Gortmaker 
4426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
4436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS	16		/* max number of command args */
4446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE	/* Boot Argument Buffer Size */
4456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HZ		1000		/* decrementer freq: 1ms ticks */
44691e25769SPaul Gortmaker 
44791e25769SPaul Gortmaker /*
44891e25769SPaul Gortmaker  * For booting Linux, the board info and command line data
4499f530d59SIra W. Snyder  * have to be in the first 256 MB of memory, since this is
45091e25769SPaul Gortmaker  * the maximum mapped by the Linux kernel during initialization.
45191e25769SPaul Gortmaker  */
4529f530d59SIra W. Snyder #define CONFIG_SYS_BOOTMAPSZ	(256 << 20)	/* Initial Memory map for Linux*/
45391e25769SPaul Gortmaker 
4546d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST  */
45591e25769SPaul Gortmaker 
45691e25769SPaul Gortmaker #if 1 /*528/264*/
4576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_LOW (\
45891e25769SPaul Gortmaker 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
45991e25769SPaul Gortmaker 	HRCWL_DDR_TO_SCB_CLK_1X1 |\
46091e25769SPaul Gortmaker 	HRCWL_CSB_TO_CLKIN |\
46191e25769SPaul Gortmaker 	HRCWL_VCO_1X2 |\
46291e25769SPaul Gortmaker 	HRCWL_CORE_TO_CSB_2X1)
46391e25769SPaul Gortmaker #elif 0 /*396/132*/
4646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_LOW (\
46591e25769SPaul Gortmaker 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
46691e25769SPaul Gortmaker 	HRCWL_DDR_TO_SCB_CLK_1X1 |\
46791e25769SPaul Gortmaker 	HRCWL_CSB_TO_CLKIN |\
46891e25769SPaul Gortmaker 	HRCWL_VCO_1X4 |\
46991e25769SPaul Gortmaker 	HRCWL_CORE_TO_CSB_3X1)
47091e25769SPaul Gortmaker #elif 0 /*264/132*/
4716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_LOW (\
47291e25769SPaul Gortmaker 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
47391e25769SPaul Gortmaker 	HRCWL_DDR_TO_SCB_CLK_1X1 |\
47491e25769SPaul Gortmaker 	HRCWL_CSB_TO_CLKIN |\
47591e25769SPaul Gortmaker 	HRCWL_VCO_1X4 |\
47691e25769SPaul Gortmaker 	HRCWL_CORE_TO_CSB_2X1)
47791e25769SPaul Gortmaker #elif 0 /*132/132*/
4786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_LOW (\
47991e25769SPaul Gortmaker 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
48091e25769SPaul Gortmaker 	HRCWL_DDR_TO_SCB_CLK_1X1 |\
48191e25769SPaul Gortmaker 	HRCWL_CSB_TO_CLKIN |\
48291e25769SPaul Gortmaker 	HRCWL_VCO_1X4 |\
48391e25769SPaul Gortmaker 	HRCWL_CORE_TO_CSB_1X1)
48491e25769SPaul Gortmaker #elif 0 /*264/264 */
4856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_LOW (\
48691e25769SPaul Gortmaker 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
48791e25769SPaul Gortmaker 	HRCWL_DDR_TO_SCB_CLK_1X1 |\
48891e25769SPaul Gortmaker 	HRCWL_CSB_TO_CLKIN |\
48991e25769SPaul Gortmaker 	HRCWL_VCO_1X4 |\
49091e25769SPaul Gortmaker 	HRCWL_CORE_TO_CSB_1X1)
49191e25769SPaul Gortmaker #endif
49291e25769SPaul Gortmaker 
49391e25769SPaul Gortmaker #if defined(PCI_64BIT)
4946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_HIGH (\
49591e25769SPaul Gortmaker 	HRCWH_PCI_HOST |\
49691e25769SPaul Gortmaker 	HRCWH_64_BIT_PCI |\
49791e25769SPaul Gortmaker 	HRCWH_PCI1_ARBITER_ENABLE |\
49891e25769SPaul Gortmaker 	HRCWH_PCI2_ARBITER_DISABLE |\
49991e25769SPaul Gortmaker 	HRCWH_CORE_ENABLE |\
50091e25769SPaul Gortmaker 	HRCWH_FROM_0X00000100 |\
50191e25769SPaul Gortmaker 	HRCWH_BOOTSEQ_DISABLE |\
50291e25769SPaul Gortmaker 	HRCWH_SW_WATCHDOG_DISABLE |\
50391e25769SPaul Gortmaker 	HRCWH_ROM_LOC_LOCAL_16BIT |\
50491e25769SPaul Gortmaker 	HRCWH_TSEC1M_IN_GMII |\
50591e25769SPaul Gortmaker 	HRCWH_TSEC2M_IN_GMII )
50691e25769SPaul Gortmaker #else
5076d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HRCW_HIGH (\
50891e25769SPaul Gortmaker 	HRCWH_PCI_HOST |\
50991e25769SPaul Gortmaker 	HRCWH_32_BIT_PCI |\
51091e25769SPaul Gortmaker 	HRCWH_PCI1_ARBITER_ENABLE |\
51191e25769SPaul Gortmaker 	HRCWH_PCI2_ARBITER_ENABLE |\
51291e25769SPaul Gortmaker 	HRCWH_CORE_ENABLE |\
51391e25769SPaul Gortmaker 	HRCWH_FROM_0X00000100 |\
51491e25769SPaul Gortmaker 	HRCWH_BOOTSEQ_DISABLE |\
51591e25769SPaul Gortmaker 	HRCWH_SW_WATCHDOG_DISABLE |\
51691e25769SPaul Gortmaker 	HRCWH_ROM_LOC_LOCAL_16BIT |\
51791e25769SPaul Gortmaker 	HRCWH_TSEC1M_IN_GMII |\
51891e25769SPaul Gortmaker 	HRCWH_TSEC2M_IN_GMII )
51991e25769SPaul Gortmaker #endif
52091e25769SPaul Gortmaker 
52191e25769SPaul Gortmaker /* System IO Config */
5223c9b1ee1SKim Phillips #define CONFIG_SYS_SICRH 0
5236d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SICRL SICRL_LDP_A
52491e25769SPaul Gortmaker 
5256d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HID0_INIT	0x000000000
5261a2e203bSKim Phillips #define CONFIG_SYS_HID0_FINAL	(HID0_ENABLE_MACHINE_CHECK | \
5271a2e203bSKim Phillips 				 HID0_ENABLE_INSTRUCTION_CACHE)
52891e25769SPaul Gortmaker 
5296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /* #define CONFIG_SYS_HID0_FINAL		(\
53091e25769SPaul Gortmaker 	HID0_ENABLE_INSTRUCTION_CACHE |\
53191e25769SPaul Gortmaker 	HID0_ENABLE_M_BIT |\
53291e25769SPaul Gortmaker 	HID0_ENABLE_ADDRESS_BROADCAST ) */
53391e25769SPaul Gortmaker 
53491e25769SPaul Gortmaker 
5356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HID2 HID2_HBE
53691e25769SPaul Gortmaker 
53731d82672SBecky Bruce #define CONFIG_HIGH_BATS	1	/* High BATs supported */
53831d82672SBecky Bruce 
53991e25769SPaul Gortmaker /* DDR @ 0x00000000 */
5406d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT0L	(CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
5416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT0U	(CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
54291e25769SPaul Gortmaker 
54391e25769SPaul Gortmaker /* PCI @ 0x80000000 */
54491e25769SPaul Gortmaker #ifdef CONFIG_PCI
5456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT1L	(CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
5466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT1U	(CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
5476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT2L	(CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
5486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT2U	(CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
54991e25769SPaul Gortmaker #else
5506d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT1L	(0)
5516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT1U	(0)
5526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT2L	(0)
5536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT2U	(0)
55491e25769SPaul Gortmaker #endif
55591e25769SPaul Gortmaker 
55691e25769SPaul Gortmaker #ifdef CONFIG_MPC83XX_PCI2
5576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT3L	(CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
5586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT3U	(CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
5596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT4L	(CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
5606d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT4U	(CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
56191e25769SPaul Gortmaker #else
5626d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT3L	(0)
5636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT3U	(0)
5646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT4L	(0)
5656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT4U	(0)
56691e25769SPaul Gortmaker #endif
56791e25769SPaul Gortmaker 
56891e25769SPaul Gortmaker /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 */
5696d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT5L	(CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
5706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT5U	(CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP)
57191e25769SPaul Gortmaker 
57291e25769SPaul Gortmaker /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
573c1230980SScott Wood #define CONFIG_SYS_IBAT6L	(0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \
574c1230980SScott Wood 				 BATL_GUARDEDSTORAGE)
5756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT6U	(0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
57691e25769SPaul Gortmaker 
5776d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT7L	(0)
5786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IBAT7U	(0)
57991e25769SPaul Gortmaker 
5806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT0L	CONFIG_SYS_IBAT0L
5816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT0U	CONFIG_SYS_IBAT0U
5826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT1L	CONFIG_SYS_IBAT1L
5836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT1U	CONFIG_SYS_IBAT1U
5846d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT2L	CONFIG_SYS_IBAT2L
5856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT2U	CONFIG_SYS_IBAT2U
5866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT3L	CONFIG_SYS_IBAT3L
5876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT3U	CONFIG_SYS_IBAT3U
5886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT4L	CONFIG_SYS_IBAT4L
5896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT4U	CONFIG_SYS_IBAT4U
5906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT5L	CONFIG_SYS_IBAT5L
5916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT5U	CONFIG_SYS_IBAT5U
5926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT6L	CONFIG_SYS_IBAT6L
5936d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT6U	CONFIG_SYS_IBAT6U
5946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT7L	CONFIG_SYS_IBAT7L
5956d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DBAT7U	CONFIG_SYS_IBAT7U
59691e25769SPaul Gortmaker 
597866e3089SJon Loeliger #if defined(CONFIG_CMD_KGDB)
59891e25769SPaul Gortmaker #define CONFIG_KGDB_BAUDRATE	230400	/* speed of kgdb serial port */
59991e25769SPaul Gortmaker #define CONFIG_KGDB_SER_INDEX	2	/* which serial port to use */
60091e25769SPaul Gortmaker #endif
60191e25769SPaul Gortmaker 
60291e25769SPaul Gortmaker /*
60391e25769SPaul Gortmaker  * Environment Configuration
60491e25769SPaul Gortmaker  */
60591e25769SPaul Gortmaker #define CONFIG_ENV_OVERWRITE
60691e25769SPaul Gortmaker 
60791e25769SPaul Gortmaker #if defined(CONFIG_TSEC_ENET)
60810327dc5SAndy Fleming #define CONFIG_HAS_ETH0
60991e25769SPaul Gortmaker #define CONFIG_HAS_ETH1
61091e25769SPaul Gortmaker #endif
61191e25769SPaul Gortmaker 
61291e25769SPaul Gortmaker #define CONFIG_HOSTNAME		SBC8349
613*8b3637c6SJoe Hershberger #define CONFIG_ROOTPATH		"/tftpboot/rootfs"
61491e25769SPaul Gortmaker #define CONFIG_BOOTFILE		uImage
61591e25769SPaul Gortmaker 
61679f516bcSKim Phillips #define CONFIG_LOADADDR		800000	/* default location for tftp and bootm */
61791e25769SPaul Gortmaker 
61891e25769SPaul Gortmaker #define CONFIG_BOOTDELAY	6	/* -1 disables auto-boot */
61991e25769SPaul Gortmaker #undef  CONFIG_BOOTARGS			/* the boot command will set bootargs */
62091e25769SPaul Gortmaker 
62191e25769SPaul Gortmaker #define CONFIG_BAUDRATE	 115200
62291e25769SPaul Gortmaker 
62391e25769SPaul Gortmaker #define	CONFIG_EXTRA_ENV_SETTINGS					\
62491e25769SPaul Gortmaker 	"netdev=eth0\0"							\
62591e25769SPaul Gortmaker 	"hostname=sbc8349\0"						\
62691e25769SPaul Gortmaker 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
62791e25769SPaul Gortmaker 		"nfsroot=${serverip}:${rootpath}\0"			\
62891e25769SPaul Gortmaker 	"ramargs=setenv bootargs root=/dev/ram rw\0"			\
62991e25769SPaul Gortmaker 	"addip=setenv bootargs ${bootargs} "				\
63091e25769SPaul Gortmaker 		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
63191e25769SPaul Gortmaker 		":${hostname}:${netdev}:off panic=1\0"			\
63291e25769SPaul Gortmaker 	"addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
63391e25769SPaul Gortmaker 	"flash_nfs=run nfsargs addip addtty;"				\
63491e25769SPaul Gortmaker 		"bootm ${kernel_addr}\0"				\
63591e25769SPaul Gortmaker 	"flash_self=run ramargs addip addtty;"				\
63691e25769SPaul Gortmaker 		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\
63791e25769SPaul Gortmaker 	"net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;"	\
63891e25769SPaul Gortmaker 		"bootm\0"						\
63991e25769SPaul Gortmaker 	"load=tftp 100000 /tftpboot/sbc8349/u-boot.bin\0"		\
640fe613cddSPaul Gortmaker 	"update=protect off ff800000 ff83ffff; "			\
641fe613cddSPaul Gortmaker 		"era ff800000 ff83ffff; cp.b 100000 ff800000 ${filesize}\0"	\
642d8ab58b2SDetlev Zundel 	"upd=run load update\0"						\
64379f516bcSKim Phillips 	"fdtaddr=780000\0"						\
64491e25769SPaul Gortmaker 	"fdtfile=sbc8349.dtb\0"						\
64591e25769SPaul Gortmaker 	""
64691e25769SPaul Gortmaker 
64791e25769SPaul Gortmaker #define CONFIG_NFSBOOTCOMMAND	                                        \
64891e25769SPaul Gortmaker    "setenv bootargs root=/dev/nfs rw "                                  \
64991e25769SPaul Gortmaker       "nfsroot=$serverip:$rootpath "                                    \
65091e25769SPaul Gortmaker       "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
65191e25769SPaul Gortmaker       "console=$consoledev,$baudrate $othbootargs;"                     \
65291e25769SPaul Gortmaker    "tftp $loadaddr $bootfile;"                                          \
65391e25769SPaul Gortmaker    "tftp $fdtaddr $fdtfile;"						\
65491e25769SPaul Gortmaker    "bootm $loadaddr - $fdtaddr"
65591e25769SPaul Gortmaker 
65691e25769SPaul Gortmaker #define CONFIG_RAMBOOTCOMMAND						\
65791e25769SPaul Gortmaker    "setenv bootargs root=/dev/ram rw "                                  \
65891e25769SPaul Gortmaker       "console=$consoledev,$baudrate $othbootargs;"                     \
65991e25769SPaul Gortmaker    "tftp $ramdiskaddr $ramdiskfile;"                                    \
66091e25769SPaul Gortmaker    "tftp $loadaddr $bootfile;"                                          \
66191e25769SPaul Gortmaker    "tftp $fdtaddr $fdtfile;"						\
66291e25769SPaul Gortmaker    "bootm $loadaddr $ramdiskaddr $fdtaddr"
66391e25769SPaul Gortmaker 
66491e25769SPaul Gortmaker #define CONFIG_BOOTCOMMAND	"run flash_self"
66591e25769SPaul Gortmaker 
66691e25769SPaul Gortmaker #endif	/* __CONFIG_H */
667