xref: /rk3399_rockchip-uboot/include/configs/M53017EVB.h (revision dd9f054ede433de73b137987fb3dc066e8d24ebb)
1536e7dacSTsiChung Liew /*
2536e7dacSTsiChung Liew  * Configuation settings for the Freescale MCF53017EVB.
3536e7dacSTsiChung Liew  *
4536e7dacSTsiChung Liew  * Copyright (C) 2004-2008 Freescale Semiconductor, Inc.
5536e7dacSTsiChung Liew  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
6536e7dacSTsiChung Liew  *
7536e7dacSTsiChung Liew  * See file CREDITS for list of people who contributed to this
8536e7dacSTsiChung Liew  * project.
9536e7dacSTsiChung Liew  *
10536e7dacSTsiChung Liew  * This program is free software; you can redistribute it and/or
11536e7dacSTsiChung Liew  * modify it under the terms of the GNU General Public License as
12536e7dacSTsiChung Liew  * published by the Free Software Foundation; either version 2 of
13536e7dacSTsiChung Liew  * the License, or (at your option) any later version.
14536e7dacSTsiChung Liew  *
15536e7dacSTsiChung Liew  * This program is distributed in the hope that it will be useful,
16536e7dacSTsiChung Liew  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17536e7dacSTsiChung Liew  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
18536e7dacSTsiChung Liew  * GNU General Public License for more details.
19536e7dacSTsiChung Liew  *
20536e7dacSTsiChung Liew  * You should have received a copy of the GNU General Public License
21536e7dacSTsiChung Liew  * along with this program; if not, write to the Free Software
22536e7dacSTsiChung Liew  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23536e7dacSTsiChung Liew  * MA 02111-1307 USA
24536e7dacSTsiChung Liew  */
25536e7dacSTsiChung Liew 
26536e7dacSTsiChung Liew /*
27536e7dacSTsiChung Liew  * board/config.h - configuration options, board specific
28536e7dacSTsiChung Liew  */
29536e7dacSTsiChung Liew 
30536e7dacSTsiChung Liew #ifndef _M53017EVB_H
31536e7dacSTsiChung Liew #define _M53017EVB_H
32536e7dacSTsiChung Liew 
33536e7dacSTsiChung Liew /*
34536e7dacSTsiChung Liew  * High Level Configuration Options
35536e7dacSTsiChung Liew  * (easy to change)
36536e7dacSTsiChung Liew  */
37536e7dacSTsiChung Liew #define CONFIG_MCF5301x		/* define processor family */
38536e7dacSTsiChung Liew #define CONFIG_M53015		/* define processor type */
39536e7dacSTsiChung Liew 
40536e7dacSTsiChung Liew #define CONFIG_MCFUART
41536e7dacSTsiChung Liew #define CONFIG_SYS_UART_PORT		(0)
42536e7dacSTsiChung Liew #define CONFIG_BAUDRATE			115200
43536e7dacSTsiChung Liew #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600 , 19200 , 38400 , 57600, 115200 }
44536e7dacSTsiChung Liew 
45536e7dacSTsiChung Liew #undef CONFIG_WATCHDOG
46536e7dacSTsiChung Liew #define CONFIG_WATCHDOG_TIMEOUT		5000
47536e7dacSTsiChung Liew 
48536e7dacSTsiChung Liew /* Command line configuration */
49536e7dacSTsiChung Liew #include <config_cmd_default.h>
50536e7dacSTsiChung Liew 
51536e7dacSTsiChung Liew #define CONFIG_CMD_CACHE
52536e7dacSTsiChung Liew #define CONFIG_CMD_DATE
53536e7dacSTsiChung Liew #define CONFIG_CMD_ELF
54536e7dacSTsiChung Liew #define CONFIG_CMD_FLASH
55536e7dacSTsiChung Liew #undef CONFIG_CMD_I2C
56536e7dacSTsiChung Liew #define CONFIG_CMD_MEMORY
57536e7dacSTsiChung Liew #define CONFIG_CMD_MISC
58536e7dacSTsiChung Liew #define CONFIG_CMD_MII
59536e7dacSTsiChung Liew #define CONFIG_CMD_NET
60536e7dacSTsiChung Liew #define CONFIG_CMD_PING
61536e7dacSTsiChung Liew #define CONFIG_CMD_REGINFO
62536e7dacSTsiChung Liew 
63536e7dacSTsiChung Liew #define CONFIG_SYS_UNIFY_CACHE
64536e7dacSTsiChung Liew 
65536e7dacSTsiChung Liew #define CONFIG_MCFFEC
66536e7dacSTsiChung Liew #ifdef CONFIG_MCFFEC
67536e7dacSTsiChung Liew #	define CONFIG_NET_MULTI		1
68536e7dacSTsiChung Liew #	define CONFIG_MII		1
69536e7dacSTsiChung Liew #	define CONFIG_MII_INIT		1
70536e7dacSTsiChung Liew #	define CONFIG_SYS_DISCOVER_PHY
71536e7dacSTsiChung Liew #	define CONFIG_SYS_RX_ETH_BUFFER	8
729e8e9270STsiChung Liew #	define CONFIG_SYS_TX_ETH_BUFFER	8
739e8e9270STsiChung Liew #	define CONFIG_SYS_FEC_BUF_USE_SRAM
74536e7dacSTsiChung Liew #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
75536e7dacSTsiChung Liew #	define CONFIG_HAS_ETH1
76536e7dacSTsiChung Liew 
77536e7dacSTsiChung Liew #	define CONFIG_SYS_FEC0_PINMUX	0
78536e7dacSTsiChung Liew #	define CONFIG_SYS_FEC0_MIIBASE	CONFIG_SYS_FEC0_IOBASE
79536e7dacSTsiChung Liew #	define CONFIG_SYS_FEC1_PINMUX	0
80536e7dacSTsiChung Liew #	define CONFIG_SYS_FEC1_MIIBASE	CONFIG_SYS_FEC1_IOBASE
81536e7dacSTsiChung Liew #	define MCFFEC_TOUT_LOOP		50000
82052c0891STsiChung Liew 
83052c0891STsiChung Liew #	define CONFIG_BOOTARGS		"root=/dev/mtdblock3 rw rootfstype=jffs2"
84052c0891STsiChung Liew 
85536e7dacSTsiChung Liew /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
86536e7dacSTsiChung Liew #	ifndef CONFIG_SYS_DISCOVER_PHY
87536e7dacSTsiChung Liew #		define FECDUPLEX	FULL
88536e7dacSTsiChung Liew #		define FECSPEED		_100BASET
89536e7dacSTsiChung Liew #	else
90536e7dacSTsiChung Liew #		ifndef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
91536e7dacSTsiChung Liew #			define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
92536e7dacSTsiChung Liew #		endif
93536e7dacSTsiChung Liew #	endif			/* CONFIG_SYS_DISCOVER_PHY */
94536e7dacSTsiChung Liew #endif
95536e7dacSTsiChung Liew 
96536e7dacSTsiChung Liew #define CONFIG_MCFRTC
97536e7dacSTsiChung Liew #undef RTC_DEBUG
98536e7dacSTsiChung Liew #define CONFIG_SYS_RTC_CNT		(0x8000)
99536e7dacSTsiChung Liew #define CONFIG_SYS_RTC_SETUP		(RTC_OCEN_OSCBYP | RTC_OCEN_CLKEN)
100536e7dacSTsiChung Liew 
101536e7dacSTsiChung Liew /* Timer */
102536e7dacSTsiChung Liew #define CONFIG_MCFTMR
103536e7dacSTsiChung Liew #undef CONFIG_MCFPIT
104536e7dacSTsiChung Liew 
105536e7dacSTsiChung Liew /* I2C */
106536e7dacSTsiChung Liew #define CONFIG_FSL_I2C
107536e7dacSTsiChung Liew #define CONFIG_HARD_I2C			/* I2C with hw support */
108536e7dacSTsiChung Liew #undef CONFIG_SOFT_I2C			/* I2C bit-banged */
109536e7dacSTsiChung Liew #define CONFIG_SYS_I2C_SPEED		80000
110536e7dacSTsiChung Liew #define CONFIG_SYS_I2C_SLAVE		0x7F
111536e7dacSTsiChung Liew #define CONFIG_SYS_I2C_OFFSET		0x58000
112536e7dacSTsiChung Liew #define CONFIG_SYS_IMMR			CONFIG_SYS_MBAR
113536e7dacSTsiChung Liew 
114536e7dacSTsiChung Liew #define CONFIG_BOOTDELAY		1	/* autoboot after 5 seconds */
115536e7dacSTsiChung Liew #define CONFIG_UDP_CHECKSUM
116536e7dacSTsiChung Liew 
117536e7dacSTsiChung Liew #ifdef CONFIG_MCFFEC
118536e7dacSTsiChung Liew #	define CONFIG_ETHADDR	00:e0:0c:bc:e5:60
119536e7dacSTsiChung Liew #	define CONFIG_ETH1ADDR	00:e0:0c:bc:e5:61
120536e7dacSTsiChung Liew #	define CONFIG_IPADDR	192.162.1.2
121536e7dacSTsiChung Liew #	define CONFIG_NETMASK	255.255.255.0
122536e7dacSTsiChung Liew #	define CONFIG_SERVERIP	192.162.1.1
123536e7dacSTsiChung Liew #	define CONFIG_GATEWAYIP	192.162.1.1
124536e7dacSTsiChung Liew #	define CONFIG_OVERWRITE_ETHADDR_ONCE
125536e7dacSTsiChung Liew #endif				/* FEC_ENET */
126536e7dacSTsiChung Liew 
127536e7dacSTsiChung Liew #define CONFIG_HOSTNAME		M53017
128536e7dacSTsiChung Liew #define CONFIG_EXTRA_ENV_SETTINGS		\
129536e7dacSTsiChung Liew 	"netdev=eth0\0"				\
130536e7dacSTsiChung Liew 	"loadaddr=40010000\0"			\
131536e7dacSTsiChung Liew 	"u-boot=u-boot.bin\0"			\
132536e7dacSTsiChung Liew 	"load=tftp ${loadaddr) ${u-boot}\0"	\
133536e7dacSTsiChung Liew 	"upd=run load; run prog\0"		\
134536e7dacSTsiChung Liew 	"prog=prot off 0 3ffff;"		\
135536e7dacSTsiChung Liew 	"era 0 3ffff;"				\
136536e7dacSTsiChung Liew 	"cp.b ${loadaddr} 0 ${filesize};"	\
137536e7dacSTsiChung Liew 	"save\0"				\
138536e7dacSTsiChung Liew 	""
139536e7dacSTsiChung Liew 
140536e7dacSTsiChung Liew #define CONFIG_PRAM		512	/* 512 KB */
141536e7dacSTsiChung Liew #define CONFIG_SYS_PROMPT	"-> "
142536e7dacSTsiChung Liew #define CONFIG_SYS_LONGHELP	/* undef to save memory */
143536e7dacSTsiChung Liew 
144536e7dacSTsiChung Liew #ifdef CONFIG_CMD_KGDB
145536e7dacSTsiChung Liew #	define CONFIG_SYS_CBSIZE	1024	/* Console I/O Buffer Size */
146536e7dacSTsiChung Liew #else
147536e7dacSTsiChung Liew #	define CONFIG_SYS_CBSIZE	256	/* Console I/O Buffer Size */
148536e7dacSTsiChung Liew #endif
149536e7dacSTsiChung Liew 
150536e7dacSTsiChung Liew #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)	/* Print Buffer Size */
151536e7dacSTsiChung Liew #define CONFIG_SYS_MAXARGS	16		/* max number of cmd args */
152536e7dacSTsiChung Liew #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE	/* Boot Arg Buf Sz */
153536e7dacSTsiChung Liew #define CONFIG_SYS_LOAD_ADDR	0x40010000
154536e7dacSTsiChung Liew 
155536e7dacSTsiChung Liew #define CONFIG_SYS_HZ		1000
156536e7dacSTsiChung Liew #define CONFIG_SYS_CLK		80000000
157536e7dacSTsiChung Liew #define CONFIG_SYS_CPU_CLK	CONFIG_SYS_CLK * 3
158536e7dacSTsiChung Liew 
159536e7dacSTsiChung Liew #define CONFIG_SYS_MBAR		0xFC000000
160536e7dacSTsiChung Liew 
161536e7dacSTsiChung Liew /*
162536e7dacSTsiChung Liew  * Low Level Configuration Settings
163536e7dacSTsiChung Liew  * (address mappings, register initial values, etc.)
164536e7dacSTsiChung Liew  * You should know what you are doing if you make changes here.
165536e7dacSTsiChung Liew  */
166536e7dacSTsiChung Liew /*
167536e7dacSTsiChung Liew  * Definitions for initial stack pointer and data area (in DPRAM)
168536e7dacSTsiChung Liew  */
169536e7dacSTsiChung Liew #define CONFIG_SYS_INIT_RAM_ADDR	0x80000000
170536e7dacSTsiChung Liew #define CONFIG_SYS_INIT_RAM_END		0x20000	/* End of used area in internal SRAM */
1719e8e9270STsiChung Liew #define CONFIG_SYS_INIT_RAM_CTRL	0x221
172536e7dacSTsiChung Liew #define CONFIG_SYS_GBL_DATA_SIZE	128	/* size in bytes reserved for initial data */
173536e7dacSTsiChung Liew #define CONFIG_SYS_GBL_DATA_OFFSET	((CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) - 0x10)
174536e7dacSTsiChung Liew #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
175536e7dacSTsiChung Liew 
176536e7dacSTsiChung Liew /*
177536e7dacSTsiChung Liew  * Start addresses for the final memory configuration
178536e7dacSTsiChung Liew  * (Set up by the startup code)
179536e7dacSTsiChung Liew  * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
180536e7dacSTsiChung Liew  */
181536e7dacSTsiChung Liew #define CONFIG_SYS_SDRAM_BASE		0x40000000
182536e7dacSTsiChung Liew #define CONFIG_SYS_SDRAM_SIZE		64	/* SDRAM size in MB */
183536e7dacSTsiChung Liew #define CONFIG_SYS_SDRAM_CFG1		0x43711630
184536e7dacSTsiChung Liew #define CONFIG_SYS_SDRAM_CFG2		0x56670000
1859e8e9270STsiChung Liew #define CONFIG_SYS_SDRAM_CTRL		0xE1092000
186536e7dacSTsiChung Liew #define CONFIG_SYS_SDRAM_EMOD		0x80010000
187536e7dacSTsiChung Liew #define CONFIG_SYS_SDRAM_MODE		0x00CD0000
188536e7dacSTsiChung Liew 
189536e7dacSTsiChung Liew #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE + 0x400
190536e7dacSTsiChung Liew #define CONFIG_SYS_MEMTEST_END		((CONFIG_SYS_SDRAM_SIZE - 3) << 20)
191536e7dacSTsiChung Liew 
192536e7dacSTsiChung Liew #define CONFIG_SYS_MONITOR_BASE		(CONFIG_SYS_FLASH_BASE + 0x400)
193536e7dacSTsiChung Liew #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 256 kB for Monitor */
194536e7dacSTsiChung Liew 
195536e7dacSTsiChung Liew #define CONFIG_SYS_BOOTPARAMS_LEN	64*1024
196536e7dacSTsiChung Liew #define CONFIG_SYS_MALLOC_LEN		(128 << 10)	/* Reserve 128 kB for malloc() */
197536e7dacSTsiChung Liew 
198536e7dacSTsiChung Liew /*
199536e7dacSTsiChung Liew  * For booting Linux, the board info and command line data
200536e7dacSTsiChung Liew  * have to be in the first 8 MB of memory, since this is
201536e7dacSTsiChung Liew  * the maximum mapped by the Linux kernel during initialization ??
202536e7dacSTsiChung Liew  */
203536e7dacSTsiChung Liew #define CONFIG_SYS_BOOTMAPSZ		(CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20))
204d6e4baf4STsiChung Liew #define CONFIG_SYS_BOOTM_LEN		(CONFIG_SYS_SDRAM_SIZE << 20)
205536e7dacSTsiChung Liew 
206536e7dacSTsiChung Liew /*-----------------------------------------------------------------------
207536e7dacSTsiChung Liew  * FLASH organization
208536e7dacSTsiChung Liew  */
209536e7dacSTsiChung Liew #define CONFIG_SYS_FLASH_CFI
210536e7dacSTsiChung Liew #ifdef CONFIG_SYS_FLASH_CFI
211536e7dacSTsiChung Liew #	define CONFIG_FLASH_CFI_DRIVER		1
212bbf6bbffSTsiChung Liew #	define CONFIG_SYS_FLASH_USE_BUFFER_WRITE	1
213bbf6bbffSTsiChung Liew #	define CONFIG_FLASH_SPANSION_S29WS_N	1
2144567c7bfSTsiChung Liew #	define CONFIG_SYS_FLASH_SIZE		0x1000000	/* Max size that the board might have */
215536e7dacSTsiChung Liew #	define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
216536e7dacSTsiChung Liew #	define CONFIG_SYS_MAX_FLASH_BANKS	1	/* max number of memory banks */
217536e7dacSTsiChung Liew #	define CONFIG_SYS_MAX_FLASH_SECT	137	/* max number of sectors on one chip */
218536e7dacSTsiChung Liew #	define CONFIG_SYS_FLASH_PROTECTION	/* "Real" (hardware) sectors protection */
219536e7dacSTsiChung Liew #endif
220536e7dacSTsiChung Liew 
221536e7dacSTsiChung Liew #define CONFIG_SYS_FLASH_BASE		CONFIG_SYS_CS0_BASE
222536e7dacSTsiChung Liew 
223536e7dacSTsiChung Liew /* Configuration for environment
224536e7dacSTsiChung Liew  * Environment is embedded in u-boot in the second sector of the flash
225536e7dacSTsiChung Liew  */
226536e7dacSTsiChung Liew #define CONFIG_ENV_OFFSET		0x8000
227536e7dacSTsiChung Liew #define CONFIG_ENV_SIZE			0x1000
228536e7dacSTsiChung Liew #define CONFIG_ENV_SECT_SIZE		0x8000
229536e7dacSTsiChung Liew #define CONFIG_ENV_IS_IN_FLASH		1
230536e7dacSTsiChung Liew 
231536e7dacSTsiChung Liew /*-----------------------------------------------------------------------
232536e7dacSTsiChung Liew  * Cache Configuration
233536e7dacSTsiChung Liew  */
234536e7dacSTsiChung Liew #define CONFIG_SYS_CACHELINE_SIZE	16
235536e7dacSTsiChung Liew 
236*dd9f054eSTsiChung Liew #define ICACHE_STATUS			(CONFIG_SYS_INIT_RAM_ADDR + \
237*dd9f054eSTsiChung Liew 					 CONFIG_SYS_INIT_RAM_END - 8)
238*dd9f054eSTsiChung Liew #define DCACHE_STATUS			(CONFIG_SYS_INIT_RAM_ADDR + \
239*dd9f054eSTsiChung Liew 					 CONFIG_SYS_INIT_RAM_END - 4)
240*dd9f054eSTsiChung Liew #define CONFIG_SYS_ICACHE_INV		(CF_CACR_CINVA)
241*dd9f054eSTsiChung Liew #define CONFIG_SYS_CACHE_ACR0		(CONFIG_SYS_SDRAM_BASE | \
242*dd9f054eSTsiChung Liew 					 CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
243*dd9f054eSTsiChung Liew 					 CF_ACR_EN | CF_ACR_SM_ALL)
244*dd9f054eSTsiChung Liew #define CONFIG_SYS_CACHE_ICACR		(CF_CACR_EC | CF_CACR_CINVA | \
245*dd9f054eSTsiChung Liew 					 CF_CACR_DCM_P)
246*dd9f054eSTsiChung Liew 
247536e7dacSTsiChung Liew /*-----------------------------------------------------------------------
248536e7dacSTsiChung Liew  * Chipselect bank definitions
249536e7dacSTsiChung Liew  */
250536e7dacSTsiChung Liew /*
251536e7dacSTsiChung Liew  * CS0 - NOR Flash
252536e7dacSTsiChung Liew  * CS1 - Ext SRAM
253536e7dacSTsiChung Liew  * CS2 - Available
254536e7dacSTsiChung Liew  * CS3 - Available
255536e7dacSTsiChung Liew  * CS4 - Available
256536e7dacSTsiChung Liew  * CS5 - Available
257536e7dacSTsiChung Liew  */
258536e7dacSTsiChung Liew #define CONFIG_SYS_CS0_BASE		0
259536e7dacSTsiChung Liew #define CONFIG_SYS_CS0_MASK		0x00FF0001
260536e7dacSTsiChung Liew #define CONFIG_SYS_CS0_CTRL		0x00001FA0
261536e7dacSTsiChung Liew 
262536e7dacSTsiChung Liew #define CONFIG_SYS_CS1_BASE		0xC0000000
263536e7dacSTsiChung Liew #define CONFIG_SYS_CS1_MASK		0x00070001
264536e7dacSTsiChung Liew #define CONFIG_SYS_CS1_CTRL		0x00001FA0
265536e7dacSTsiChung Liew 
266536e7dacSTsiChung Liew #endif				/* _M53017EVB_H */
267