xref: /rk3399_rockchip-uboot/include/configs/M5275EVB.h (revision 0f3ba7e9783f352318f197a3148f6d5cc3d75bea)
1545c8e0aSMatthew Fettke /*
2545c8e0aSMatthew Fettke  * Configuation settings for the Motorola MC5275EVB board.
3545c8e0aSMatthew Fettke  *
4545c8e0aSMatthew Fettke  * By Arthur Shipkowski <art@videon-central.com>
5545c8e0aSMatthew Fettke  * Copyright (C) 2005 Videon Central, Inc.
6545c8e0aSMatthew Fettke  *
7545c8e0aSMatthew Fettke  * Based off of M5272C3 board code by Josef Baumgartner
8545c8e0aSMatthew Fettke  * <josef.baumgartner@telex.de>
9545c8e0aSMatthew Fettke  *
10545c8e0aSMatthew Fettke  * See file CREDITS for list of people who contributed to this
11545c8e0aSMatthew Fettke  * project.
12545c8e0aSMatthew Fettke  *
13545c8e0aSMatthew Fettke  * This program is free software; you can redistribute it and/or
14545c8e0aSMatthew Fettke  * modify it under the terms of the GNU General Public License as
15545c8e0aSMatthew Fettke  * published by the Free Software Foundation; either version 2 of
16545c8e0aSMatthew Fettke  * the License, or (at your option) any later version.
17545c8e0aSMatthew Fettke  *
18545c8e0aSMatthew Fettke  * This program is distributed in the hope that it will be useful,
19545c8e0aSMatthew Fettke  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20545c8e0aSMatthew Fettke  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
21545c8e0aSMatthew Fettke  * GNU General Public License for more details.
22545c8e0aSMatthew Fettke  *
23545c8e0aSMatthew Fettke  * You should have received a copy of the GNU General Public License
24545c8e0aSMatthew Fettke  * along with this program; if not, write to the Free Software
25545c8e0aSMatthew Fettke  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26545c8e0aSMatthew Fettke  * MA 02111-1307 USA
27545c8e0aSMatthew Fettke  */
28545c8e0aSMatthew Fettke 
29545c8e0aSMatthew Fettke /*
30545c8e0aSMatthew Fettke  * board/config.h - configuration options, board specific
31545c8e0aSMatthew Fettke  */
32545c8e0aSMatthew Fettke 
33545c8e0aSMatthew Fettke #ifndef _M5275EVB_H
34545c8e0aSMatthew Fettke #define _M5275EVB_H
35545c8e0aSMatthew Fettke 
36545c8e0aSMatthew Fettke /*
37545c8e0aSMatthew Fettke  * High Level Configuration Options
38545c8e0aSMatthew Fettke  * (easy to change)
39545c8e0aSMatthew Fettke  */
40545c8e0aSMatthew Fettke #define CONFIG_MCF52x2			/* define processor family */
41545c8e0aSMatthew Fettke #define CONFIG_M5275			/* define processor type */
42545c8e0aSMatthew Fettke #define CONFIG_M5275EVB			/* define board type */
43545c8e0aSMatthew Fettke 
44545c8e0aSMatthew Fettke #define CONFIG_MCFTMR
45545c8e0aSMatthew Fettke 
46545c8e0aSMatthew Fettke #define CONFIG_MCFUART
47545c8e0aSMatthew Fettke #define CFG_UART_PORT		(0)
48545c8e0aSMatthew Fettke #define CONFIG_BAUDRATE		19200
49545c8e0aSMatthew Fettke #define CFG_BAUDRATE_TABLE	{ 9600 , 19200 , 38400 , 57600, 115200 }
50545c8e0aSMatthew Fettke 
51545c8e0aSMatthew Fettke /* Configuration for environment
52545c8e0aSMatthew Fettke  * Environment is embedded in u-boot in the second sector of the flash
53545c8e0aSMatthew Fettke  */
54545c8e0aSMatthew Fettke #ifndef CONFIG_MONITOR_IS_IN_RAM
55545c8e0aSMatthew Fettke #define CFG_ENV_OFFSET		0x4000
56545c8e0aSMatthew Fettke #define CFG_ENV_SECT_SIZE	0x2000
57545c8e0aSMatthew Fettke #define CFG_ENV_IS_IN_FLASH	1
58545c8e0aSMatthew Fettke #define CFG_ENV_IS_EMBEDDED	1
59545c8e0aSMatthew Fettke #else
60545c8e0aSMatthew Fettke #define CFG_ENV_ADDR		0xffe04000
61545c8e0aSMatthew Fettke #define CFG_ENV_SECT_SIZE	0x2000
62545c8e0aSMatthew Fettke #define CFG_ENV_IS_IN_FLASH	1
63545c8e0aSMatthew Fettke #endif
64545c8e0aSMatthew Fettke 
65545c8e0aSMatthew Fettke /*
66545c8e0aSMatthew Fettke  * BOOTP options
67545c8e0aSMatthew Fettke  */
68545c8e0aSMatthew Fettke #define CONFIG_BOOTP_BOOTFILESIZE
69545c8e0aSMatthew Fettke #define CONFIG_BOOTP_BOOTPATH
70545c8e0aSMatthew Fettke #define CONFIG_BOOTP_GATEWAY
71545c8e0aSMatthew Fettke #define CONFIG_BOOTP_HOSTNAME
72545c8e0aSMatthew Fettke 
73545c8e0aSMatthew Fettke /* Available command configuration */
74545c8e0aSMatthew Fettke #include <config_cmd_default.h>
75545c8e0aSMatthew Fettke 
76545c8e0aSMatthew Fettke #define CONFIG_CMD_PING
77545c8e0aSMatthew Fettke #define CONFIG_CMD_MII
78545c8e0aSMatthew Fettke #define CONFIG_CMD_NET
79545c8e0aSMatthew Fettke #define CONFIG_CMD_ELF
80545c8e0aSMatthew Fettke #define CONFIG_CMD_FLASH
81545c8e0aSMatthew Fettke #define CONFIG_CMD_I2C
82545c8e0aSMatthew Fettke #define CONFIG_CMD_MEMORY
83545c8e0aSMatthew Fettke #define CONFIG_CMD_DHCP
84545c8e0aSMatthew Fettke 
85545c8e0aSMatthew Fettke #undef CONFIG_CMD_LOADS
86545c8e0aSMatthew Fettke #undef CONFIG_CMD_LOADB
87545c8e0aSMatthew Fettke 
88545c8e0aSMatthew Fettke #define CONFIG_MCFFEC
89545c8e0aSMatthew Fettke #ifdef CONFIG_MCFFEC
90545c8e0aSMatthew Fettke #define CONFIG_NET_MULTI	1
91545c8e0aSMatthew Fettke #define CONFIG_MII		1
92*0f3ba7e9STsiChung Liew #define CONFIG_MII_INIT		1
93545c8e0aSMatthew Fettke #define CFG_DISCOVER_PHY
94545c8e0aSMatthew Fettke #define CFG_RX_ETH_BUFFER	8
95545c8e0aSMatthew Fettke #define CFG_FAULT_ECHO_LINK_DOWN
96545c8e0aSMatthew Fettke #define CFG_FEC0_PINMUX		0
97545c8e0aSMatthew Fettke #define CFG_FEC0_MIIBASE	CFG_FEC0_IOBASE
98545c8e0aSMatthew Fettke #define CFG_FEC1_PINMUX		0
99545c8e0aSMatthew Fettke #define CFG_FEC1_MIIBASE	CFG_FEC1_IOBASE
100545c8e0aSMatthew Fettke #define MCFFEC_TOUT_LOOP	50000
101545c8e0aSMatthew Fettke #define CONFIG_HAS_ETH1
102545c8e0aSMatthew Fettke /* If CFG_DISCOVER_PHY is not defined - hardcoded */
103545c8e0aSMatthew Fettke #ifndef CFG_DISCOVER_PHY
104545c8e0aSMatthew Fettke #define FECDUPLEX		FULL
105545c8e0aSMatthew Fettke #define FECSPEED		_100BASET
106545c8e0aSMatthew Fettke #else
107545c8e0aSMatthew Fettke #ifndef CFG_FAULT_ECHO_LINK_DOWN
108545c8e0aSMatthew Fettke #define CFG_FAULT_ECHO_LINK_DOWN
109545c8e0aSMatthew Fettke #endif
110545c8e0aSMatthew Fettke #endif
111545c8e0aSMatthew Fettke #endif
112545c8e0aSMatthew Fettke 
113545c8e0aSMatthew Fettke /* I2C */
114545c8e0aSMatthew Fettke #define CONFIG_FSL_I2C
115545c8e0aSMatthew Fettke #define CONFIG_HARD_I2C		/* I2C with hw support */
116545c8e0aSMatthew Fettke #undef CONFIG_SOFT_I2C
117545c8e0aSMatthew Fettke #define CFG_I2C_SPEED		80000
118545c8e0aSMatthew Fettke #define CFG_I2C_SLAVE		0x7F
119545c8e0aSMatthew Fettke #define CFG_I2C_OFFSET		0x00000300
120545c8e0aSMatthew Fettke #define CFG_IMMR		CFG_MBAR
121545c8e0aSMatthew Fettke 
122545c8e0aSMatthew Fettke #ifdef CONFIG_MCFFEC
123545c8e0aSMatthew Fettke #define CONFIG_ETHADDR		00:06:3b:01:41:55
124545c8e0aSMatthew Fettke #define CONFIG_ETH1ADDR		00:0e:0c:bc:e5:60
125545c8e0aSMatthew Fettke #endif
126545c8e0aSMatthew Fettke 
127545c8e0aSMatthew Fettke #define CFG_PROMPT		"-> "
128545c8e0aSMatthew Fettke #define CFG_LONGHELP		/* undef to save memory	*/
129545c8e0aSMatthew Fettke 
130545c8e0aSMatthew Fettke #if (CONFIG_CMD_KGDB)
131545c8e0aSMatthew Fettke #	define CFG_CBSIZE	1024
132545c8e0aSMatthew Fettke #else
133545c8e0aSMatthew Fettke #	define CFG_CBSIZE	256
134545c8e0aSMatthew Fettke #endif
135545c8e0aSMatthew Fettke #define CFG_PBSIZE		(CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
136545c8e0aSMatthew Fettke #define CFG_MAXARGS		16
137545c8e0aSMatthew Fettke #define CFG_BARGSIZE		CFG_CBSIZE
138545c8e0aSMatthew Fettke 
139545c8e0aSMatthew Fettke #define CFG_LOAD_ADDR		0x800000
140545c8e0aSMatthew Fettke 
141545c8e0aSMatthew Fettke #define CONFIG_BOOTDELAY	5
142545c8e0aSMatthew Fettke #define CONFIG_BOOTCOMMAND	"bootm ffe40000"
143545c8e0aSMatthew Fettke #define CFG_MEMTEST_START	0x400
144545c8e0aSMatthew Fettke #define CFG_MEMTEST_END		0x380000
145545c8e0aSMatthew Fettke 
146545c8e0aSMatthew Fettke #define CFG_HZ			1000
147545c8e0aSMatthew Fettke #define CFG_CLK			150000000
148545c8e0aSMatthew Fettke 
149545c8e0aSMatthew Fettke /*
150545c8e0aSMatthew Fettke  * Low Level Configuration Settings
151545c8e0aSMatthew Fettke  * (address mappings, register initial values, etc.)
152545c8e0aSMatthew Fettke  * You should know what you are doing if you make changes here.
153545c8e0aSMatthew Fettke  */
154545c8e0aSMatthew Fettke 
155545c8e0aSMatthew Fettke #define CFG_MBAR		0x40000000
156545c8e0aSMatthew Fettke 
157545c8e0aSMatthew Fettke /*-----------------------------------------------------------------------
158545c8e0aSMatthew Fettke  * Definitions for initial stack pointer and data area (in DPRAM)
159545c8e0aSMatthew Fettke  */
160545c8e0aSMatthew Fettke #define CFG_INIT_RAM_ADDR	0x20000000
161545c8e0aSMatthew Fettke #define CFG_INIT_RAM_END	0x10000	/* End of used area in internal SRAM */
162545c8e0aSMatthew Fettke #define CFG_GBL_DATA_SIZE	1000	/* bytes reserved for initial data */
163545c8e0aSMatthew Fettke #define CFG_GBL_DATA_OFFSET	(CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
164545c8e0aSMatthew Fettke #define CFG_INIT_SP_OFFSET	CFG_GBL_DATA_OFFSET
165545c8e0aSMatthew Fettke 
166545c8e0aSMatthew Fettke /*-----------------------------------------------------------------------
167545c8e0aSMatthew Fettke  * Start addresses for the final memory configuration
168545c8e0aSMatthew Fettke  * (Set up by the startup code)
169545c8e0aSMatthew Fettke  * Please note that CFG_SDRAM_BASE _must_ start at 0
170545c8e0aSMatthew Fettke  */
171545c8e0aSMatthew Fettke #define CFG_SDRAM_BASE		0x00000000
172545c8e0aSMatthew Fettke #define CFG_SDRAM_SIZE		16	/* SDRAM size in MB */
173545c8e0aSMatthew Fettke #define CFG_FLASH_BASE		0xffe00000
174545c8e0aSMatthew Fettke 
175545c8e0aSMatthew Fettke #ifdef CONFIG_MONITOR_IS_IN_RAM
176545c8e0aSMatthew Fettke #define CFG_MONITOR_BASE	0x20000
177545c8e0aSMatthew Fettke #else
178545c8e0aSMatthew Fettke #define CFG_MONITOR_BASE	(CFG_FLASH_BASE + 0x400)
179545c8e0aSMatthew Fettke #endif
180545c8e0aSMatthew Fettke 
181545c8e0aSMatthew Fettke #define CFG_MONITOR_LEN		0x20000
182545c8e0aSMatthew Fettke #define CFG_MALLOC_LEN		(256 << 10)
183545c8e0aSMatthew Fettke #define CFG_BOOTPARAMS_LEN	64*1024
184545c8e0aSMatthew Fettke 
185545c8e0aSMatthew Fettke /*
186545c8e0aSMatthew Fettke  * For booting Linux, the board info and command line data
187545c8e0aSMatthew Fettke  * have to be in the first 8 MB of memory, since this is
188545c8e0aSMatthew Fettke  * the maximum mapped by the Linux kernel during initialization ??
189545c8e0aSMatthew Fettke  */
190545c8e0aSMatthew Fettke #define CFG_BOOTMAPSZ		(8 << 20)	/* Initial mmap for Linux */
191545c8e0aSMatthew Fettke 
192545c8e0aSMatthew Fettke /*-----------------------------------------------------------------------
193545c8e0aSMatthew Fettke  * FLASH organization
194545c8e0aSMatthew Fettke  */
195545c8e0aSMatthew Fettke #define CFG_MAX_FLASH_BANKS	1	/* max number of memory banks */
196545c8e0aSMatthew Fettke #define CFG_MAX_FLASH_SECT	11	/* max number of sectors on one chip */
197545c8e0aSMatthew Fettke #define CFG_FLASH_ERASE_TOUT	1000
198545c8e0aSMatthew Fettke 
199545c8e0aSMatthew Fettke #define CFG_FLASH_CFI		1
200545c8e0aSMatthew Fettke #define CFG_FLASH_CFI_DRIVER	1
201545c8e0aSMatthew Fettke #define CFG_FLASH_SIZE		0x200000
202545c8e0aSMatthew Fettke 
203545c8e0aSMatthew Fettke /*-----------------------------------------------------------------------
204545c8e0aSMatthew Fettke  * Cache Configuration
205545c8e0aSMatthew Fettke  */
206545c8e0aSMatthew Fettke #define CFG_CACHELINE_SIZE	16
207545c8e0aSMatthew Fettke 
208545c8e0aSMatthew Fettke /*-----------------------------------------------------------------------
209545c8e0aSMatthew Fettke  * Memory bank definitions
210545c8e0aSMatthew Fettke  */
211545c8e0aSMatthew Fettke #define CFG_AR0_PRELIM		(CFG_FLASH_BASE >> 16)
212545c8e0aSMatthew Fettke #define CFG_CR0_PRELIM		0x1980
213545c8e0aSMatthew Fettke #define CFG_MR0_PRELIM		0x001F0001
214545c8e0aSMatthew Fettke 
215545c8e0aSMatthew Fettke #define CFG_AR1_PRELIM		0x3000
216545c8e0aSMatthew Fettke #define CFG_CR1_PRELIM		0x1900
217545c8e0aSMatthew Fettke #define CFG_MR1_PRELIM		0x00070001
218545c8e0aSMatthew Fettke 
219545c8e0aSMatthew Fettke /*-----------------------------------------------------------------------
220545c8e0aSMatthew Fettke  * Port configuration
221545c8e0aSMatthew Fettke  */
222545c8e0aSMatthew Fettke #define CFG_FECI2C		0x0FA0
223545c8e0aSMatthew Fettke 
224545c8e0aSMatthew Fettke #endif	/* _M5275EVB_H */
225