xref: /rk3399_rockchip-uboot/include/configs/M5282EVB.h (revision 5296cb1d99c1dc52fbfb4f88595c69f097630be8)
1bf9e3b38Swdenk /*
2bf9e3b38Swdenk  * Configuation settings for the Motorola MC5282EVB board.
3bf9e3b38Swdenk  *
4bf9e3b38Swdenk  * (C) Copyright 2003 Josef Baumgartner <josef.baumgartner@telex.de>
5bf9e3b38Swdenk  *
61a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
7bf9e3b38Swdenk  */
8bf9e3b38Swdenk 
9bf9e3b38Swdenk /*
10bf9e3b38Swdenk  * board/config.h - configuration options, board specific
11bf9e3b38Swdenk  */
12bf9e3b38Swdenk 
134e5ca3ebSwdenk #ifndef _CONFIG_M5282EVB_H
144e5ca3ebSwdenk #define _CONFIG_M5282EVB_H
154e5ca3ebSwdenk 
16bf9e3b38Swdenk /*
17bf9e3b38Swdenk  * High Level Configuration Options
18bf9e3b38Swdenk  * (easy to change)
19bf9e3b38Swdenk  */
20f28e1bd9STsiChungLiew #define CONFIG_MCFTMR
214e5ca3ebSwdenk 
22f28e1bd9STsiChungLiew #define CONFIG_MCFUART
236d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UART_PORT		(0)
2479e0799cSTsiChung Liew #define CONFIG_BAUDRATE		115200
25bf9e3b38Swdenk 
26f28e1bd9STsiChungLiew #undef	CONFIG_MONITOR_IS_IN_RAM	/* define if monitor is started from a pre-loader */
27bf9e3b38Swdenk 
28bf9e3b38Swdenk /* Configuration for environment
29bf9e3b38Swdenk  * Environment is embedded in u-boot in the second sector of the flash
30bf9e3b38Swdenk  */
310e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		0xffe04000
320e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		0x2000
335a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH	1
34bf9e3b38Swdenk 
35*5296cb1dSangelo@sysam.it #define LDS_BOARD_TEXT \
36*5296cb1dSangelo@sysam.it 	. = DEFINED(env_offset) ? env_offset : .; \
37*5296cb1dSangelo@sysam.it 	common/env_embedded.o (.text*);
38*5296cb1dSangelo@sysam.it 
398353e139SJon Loeliger /*
40659e2f67SJon Loeliger  * BOOTP options
41659e2f67SJon Loeliger  */
42659e2f67SJon Loeliger #define CONFIG_BOOTP_BOOTFILESIZE
43659e2f67SJon Loeliger #define CONFIG_BOOTP_BOOTPATH
44659e2f67SJon Loeliger #define CONFIG_BOOTP_GATEWAY
45659e2f67SJon Loeliger #define CONFIG_BOOTP_HOSTNAME
46659e2f67SJon Loeliger 
47659e2f67SJon Loeliger /*
488353e139SJon Loeliger  * Command line configuration.
498353e139SJon Loeliger  */
508353e139SJon Loeliger #include <config_cmd_default.h>
51dd9f054eSTsiChung Liew #define CONFIG_CMD_CACHE
52f28e1bd9STsiChungLiew #define CONFIG_CMD_NET
53f28e1bd9STsiChungLiew #define CONFIG_CMD_PING
54f28e1bd9STsiChungLiew #define CONFIG_CMD_MII
55bf9e3b38Swdenk 
568353e139SJon Loeliger #undef CONFIG_CMD_LOADS
578353e139SJon Loeliger #undef CONFIG_CMD_LOADB
588353e139SJon Loeliger 
59f28e1bd9STsiChungLiew #define CONFIG_MCFFEC
60f28e1bd9STsiChungLiew #ifdef CONFIG_MCFFEC
61f28e1bd9STsiChungLiew #	define CONFIG_MII		1
620f3ba7e9STsiChung Liew #	define CONFIG_MII_INIT		1
636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_DISCOVER_PHY
646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_RX_ETH_BUFFER	8
656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
66f28e1bd9STsiChungLiew 
676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FEC0_PINMUX		0
686d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FEC0_MIIBASE		CONFIG_SYS_FEC0_IOBASE
69f28e1bd9STsiChungLiew #	define MCFFEC_TOUT_LOOP		50000
706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	ifndef CONFIG_SYS_DISCOVER_PHY
72f28e1bd9STsiChungLiew #		define FECDUPLEX	FULL
73f28e1bd9STsiChungLiew #		define FECSPEED		_100BASET
74f28e1bd9STsiChungLiew #	else
756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #		ifndef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #			define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
77f28e1bd9STsiChungLiew #		endif
786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	endif			/* CONFIG_SYS_DISCOVER_PHY */
79f28e1bd9STsiChungLiew #endif
808353e139SJon Loeliger 
81bf9e3b38Swdenk #define CONFIG_BOOTDELAY	5
82f28e1bd9STsiChungLiew #ifdef CONFIG_MCFFEC
83f28e1bd9STsiChungLiew #	define CONFIG_ETHADDR	00:e0:0c:bc:e5:60
84f28e1bd9STsiChungLiew #	define CONFIG_IPADDR	192.162.1.2
85f28e1bd9STsiChungLiew #	define CONFIG_NETMASK	255.255.255.0
86f28e1bd9STsiChungLiew #	define CONFIG_SERVERIP	192.162.1.1
87f28e1bd9STsiChungLiew #	define CONFIG_GATEWAYIP	192.162.1.1
88f28e1bd9STsiChungLiew #	define CONFIG_OVERWRITE_ETHADDR_ONCE
89f28e1bd9STsiChungLiew #endif				/* CONFIG_MCFFEC */
90f28e1bd9STsiChungLiew 
914cb4e654STsiChung Liew #define CONFIG_HOSTNAME		M5282EVB
92f28e1bd9STsiChungLiew #define CONFIG_EXTRA_ENV_SETTINGS		\
93f28e1bd9STsiChungLiew 	"netdev=eth0\0"				\
94f28e1bd9STsiChungLiew 	"loadaddr=10000\0"			\
95f28e1bd9STsiChungLiew 	"u-boot=u-boot.bin\0"			\
96f28e1bd9STsiChungLiew 	"load=tftp ${loadaddr) ${u-boot}\0"	\
97f28e1bd9STsiChungLiew 	"upd=run load; run prog\0"		\
98f28e1bd9STsiChungLiew 	"prog=prot off ffe00000 ffe3ffff;"	\
99f28e1bd9STsiChungLiew 	"era ffe00000 ffe3ffff;"		\
100f28e1bd9STsiChungLiew 	"cp.b ${loadaddr} ffe00000 ${filesize};"\
101f28e1bd9STsiChungLiew 	"save\0"				\
102f28e1bd9STsiChungLiew 	""
103bf9e3b38Swdenk 
1046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT		"-> "
1056d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_LONGHELP		/* undef to save memory         */
106bf9e3b38Swdenk 
1078353e139SJon Loeliger #if defined(CONFIG_CMD_KGDB)
1086d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size      */
109bf9e3b38Swdenk #else
1106d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size      */
111bf9e3b38Swdenk #endif
1126d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)	/* Print Buffer Size */
1136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_MAXARGS		16	/* max number of command args   */
1146d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE	/* Boot Argument Buffer Size    */
115bf9e3b38Swdenk 
1166d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR		0x20000
117bf9e3b38Swdenk 
1186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	0x400
1196d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END		0x380000
120bf9e3b38Swdenk 
1216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_CLK			64000000
122bf9e3b38Swdenk 
123f28e1bd9STsiChungLiew /* PLL Configuration: Ext Clock * 6 (see table 9-4 of MCF user manual) */
124f28e1bd9STsiChungLiew 
1256d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MFD			0x02	/* PLL Multiplication Factor Devider */
1266d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RFD			0x00	/* PLL Reduce Frecuency Devider */
127bf9e3b38Swdenk 
128bf9e3b38Swdenk /*
129bf9e3b38Swdenk  * Low Level Configuration Settings
130bf9e3b38Swdenk  * (address mappings, register initial values, etc.)
131bf9e3b38Swdenk  * You should know what you are doing if you make changes here.
132bf9e3b38Swdenk  */
1336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_MBAR		0x40000000
134bf9e3b38Swdenk 
135bf9e3b38Swdenk /*-----------------------------------------------------------------------
136bf9e3b38Swdenk  * Definitions for initial stack pointer and data area (in DPRAM)
137bf9e3b38Swdenk  */
1386d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_ADDR	0x20000000
139553f0982SWolfgang Denk #define CONFIG_SYS_INIT_RAM_SIZE	0x10000	/* Size of used area in internal SRAM    */
14025ddd1fbSWolfgang Denk #define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
1416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
142bf9e3b38Swdenk 
143bf9e3b38Swdenk /*-----------------------------------------------------------------------
144bf9e3b38Swdenk  * Start addresses for the final memory configuration
145bf9e3b38Swdenk  * (Set up by the startup code)
1466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD  * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
147bf9e3b38Swdenk  */
1486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE		0x00000000
1496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_SDRAM_SIZE		16	/* SDRAM size in MB */
150012522feSTsiChung Liew #define CONFIG_SYS_FLASH_BASE		CONFIG_SYS_CS0_BASE
1516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_INT_FLASH_BASE	0xf0000000
1526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INT_FLASH_ENABLE	0x21
153bf9e3b38Swdenk 
154bf9e3b38Swdenk /* If M5282 port is fully implemented the monitor base will be behind
155bf9e3b38Swdenk  * the vector table. */
15614d0a02aSWolfgang Denk #if (CONFIG_SYS_TEXT_BASE != CONFIG_SYS_INT_FLASH_BASE)
1576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_FLASH_BASE + 0x400)
158f28e1bd9STsiChungLiew #else
15914d0a02aSWolfgang Denk #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_TEXT_BASE + 0x418)	/* 24 Byte for CFM-Config */
160f28e1bd9STsiChungLiew #endif
161bf9e3b38Swdenk 
1626d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN		0x20000
1636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN		(256 << 10)
1646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTPARAMS_LEN	64*1024
165bf9e3b38Swdenk 
166bf9e3b38Swdenk /*
167bf9e3b38Swdenk  * For booting Linux, the board info and command line data
168bf9e3b38Swdenk  * have to be in the first 8 MB of memory, since this is
169bf9e3b38Swdenk  * the maximum mapped by the Linux kernel during initialization ??
170bf9e3b38Swdenk  */
1716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTMAPSZ		(CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20))
172bf9e3b38Swdenk 
173bf9e3b38Swdenk /*-----------------------------------------------------------------------
174bf9e3b38Swdenk  * FLASH organization
175bf9e3b38Swdenk  */
1766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI
1776d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_FLASH_CFI
178f28e1bd9STsiChungLiew 
17900b1883aSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_FLASH_CFI_DRIVER	1
1806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FLASH_SIZE		0x1000000	/* Max size that the board might have */
1816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
1826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_MAX_FLASH_BANKS	1	/* max number of memory banks */
1836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_MAX_FLASH_SECT	137	/* max number of sectors on one chip */
1846d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FLASH_PROTECTION	/* "Real" (hardware) sectors protection */
1856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FLASH_CHECKSUM
1866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #	define CONFIG_SYS_FLASH_BANKS_LIST	{ CONFIG_SYS_FLASH_BASE }
187f28e1bd9STsiChungLiew #endif
188bf9e3b38Swdenk 
189bf9e3b38Swdenk /*-----------------------------------------------------------------------
190bf9e3b38Swdenk  * Cache Configuration
191bf9e3b38Swdenk  */
1926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CACHELINE_SIZE	16
193bf9e3b38Swdenk 
194dd9f054eSTsiChung Liew #define ICACHE_STATUS			(CONFIG_SYS_INIT_RAM_ADDR + \
195553f0982SWolfgang Denk 					 CONFIG_SYS_INIT_RAM_SIZE - 8)
196dd9f054eSTsiChung Liew #define DCACHE_STATUS			(CONFIG_SYS_INIT_RAM_ADDR + \
197553f0982SWolfgang Denk 					 CONFIG_SYS_INIT_RAM_SIZE - 4)
198dd9f054eSTsiChung Liew #define CONFIG_SYS_ICACHE_INV		(CF_CACR_CINV + CF_CACR_DCM)
199dd9f054eSTsiChung Liew #define CONFIG_SYS_CACHE_ACR0		(CONFIG_SYS_SDRAM_BASE | \
200dd9f054eSTsiChung Liew 					 CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
201dd9f054eSTsiChung Liew 					 CF_ACR_EN | CF_ACR_SM_ALL)
202dd9f054eSTsiChung Liew #define CONFIG_SYS_CACHE_ICACR		(CF_CACR_CENB | CF_CACR_DISD | \
203dd9f054eSTsiChung Liew 					 CF_CACR_CEIB | CF_CACR_DBWE | \
204dd9f054eSTsiChung Liew 					 CF_CACR_EUSP)
205dd9f054eSTsiChung Liew 
206bf9e3b38Swdenk /*-----------------------------------------------------------------------
207bf9e3b38Swdenk  * Memory bank definitions
208bf9e3b38Swdenk  */
209012522feSTsiChung Liew #define CONFIG_SYS_CS0_BASE		0xFFE00000
210012522feSTsiChung Liew #define CONFIG_SYS_CS0_CTRL		0x00001980
211012522feSTsiChung Liew #define CONFIG_SYS_CS0_MASK		0x001F0001
212012522feSTsiChung Liew 
213bf9e3b38Swdenk /*-----------------------------------------------------------------------
214bf9e3b38Swdenk  * Port configuration
215bf9e3b38Swdenk  */
2166d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PACNT		0x0000000	/* Port A D[31:24] */
2176d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PADDR		0x0000000
2186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PADAT		0x0000000
219bf9e3b38Swdenk 
2206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBCNT		0x0000000	/* Port B D[23:16] */
2216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBDDR		0x0000000
2226d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBDAT		0x0000000
223f28e1bd9STsiChungLiew 
2246d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCCNT		0x0000000	/* Port C D[15:08] */
2256d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDDR		0x0000000
2266d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDAT		0x0000000
227f28e1bd9STsiChungLiew 
2286d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PDCNT		0x0000000	/* Port D D[07:00] */
2296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDDR		0x0000000
2306d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDAT		0x0000000
231f28e1bd9STsiChungLiew 
2326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PEHLPAR		0xC0
2336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PUAPAR		0x0F	/* UA0..UA3 = Uart 0 +1 */
2346d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDRUA		0x05
2356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PJPAR		0xFF
2364e5ca3ebSwdenk 
2374e5ca3ebSwdenk #endif				/* _CONFIG_M5282EVB_H */
238