xref: /rk3399_rockchip-uboot/include/configs/ea20.h (revision 17a8904b2791cdb495370c0e21c95f4ddd4fe877)
1649a33e4SStefano Babic /*
2649a33e4SStefano Babic  * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
3649a33e4SStefano Babic  *
4649a33e4SStefano Babic  * Based on davinci_dvevm.h. Original Copyrights follow:
5649a33e4SStefano Babic  *
6649a33e4SStefano Babic  * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
7649a33e4SStefano Babic  *
8649a33e4SStefano Babic  * This program is free software; you can redistribute it and/or modify
9649a33e4SStefano Babic  * it under the terms of the GNU General Public License as published by
10649a33e4SStefano Babic  * the Free Software Foundation; either version 2 of the License, or
11649a33e4SStefano Babic  * (at your option) any later version.
12649a33e4SStefano Babic  *
13649a33e4SStefano Babic  * This program is distributed in the hope that it will be useful,
14649a33e4SStefano Babic  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15649a33e4SStefano Babic  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16649a33e4SStefano Babic  * GNU General Public License for more details.
17649a33e4SStefano Babic  *
18649a33e4SStefano Babic  * You should have received a copy of the GNU General Public License
19649a33e4SStefano Babic  * along with this program; if not, write to the Free Software
20649a33e4SStefano Babic  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21649a33e4SStefano Babic  */
22649a33e4SStefano Babic 
23649a33e4SStefano Babic #ifndef __CONFIG_H
24649a33e4SStefano Babic #define __CONFIG_H
25649a33e4SStefano Babic 
26649a33e4SStefano Babic /*
27649a33e4SStefano Babic  * Board
28649a33e4SStefano Babic  */
29649a33e4SStefano Babic #define CONFIG_DRIVER_TI_EMAC
30649a33e4SStefano Babic #define CONFIG_USE_SPIFLASH
31*17a8904bSStefano Babic #define	CONFIG_SYS_USE_NAND
32649a33e4SStefano Babic #define CONFIG_DRIVER_TI_EMAC_USE_RMII
33649a33e4SStefano Babic 
34649a33e4SStefano Babic /*
35649a33e4SStefano Babic  * SoC Configuration
36649a33e4SStefano Babic  */
37649a33e4SStefano Babic #define CONFIG_MACH_DAVINCI_DA850_EVM
38649a33e4SStefano Babic #define CONFIG_ARM926EJS		/* arm926ejs CPU core */
39649a33e4SStefano Babic #define CONFIG_SOC_DA8XX		/* TI DA8xx SoC */
40649a33e4SStefano Babic #define CONFIG_SYS_CLK_FREQ		clk_get(DAVINCI_ARM_CLKID)
41649a33e4SStefano Babic #define CONFIG_SYS_OSCIN_FREQ		24000000
42649a33e4SStefano Babic #define CONFIG_SYS_TIMERBASE		DAVINCI_TIMER0_BASE
43649a33e4SStefano Babic #define CONFIG_SYS_HZ_CLOCK		clk_get(DAVINCI_AUXCLK_CLKID)
44649a33e4SStefano Babic #define CONFIG_SYS_HZ			1000
45649a33e4SStefano Babic #define CONFIG_SKIP_LOWLEVEL_INIT
46649a33e4SStefano Babic #define CONFIG_SYS_TEXT_BASE		0xc1080000
47649a33e4SStefano Babic 
48649a33e4SStefano Babic /*
49649a33e4SStefano Babic  * Memory Info
50649a33e4SStefano Babic  */
51649a33e4SStefano Babic #define CONFIG_SYS_MALLOC_LEN	(0x10000 + 1*1024*1024) /* malloc() len */
52649a33e4SStefano Babic #define PHYS_SDRAM_1		DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */
53649a33e4SStefano Babic #define PHYS_SDRAM_1_SIZE	(64 << 20) /* SDRAM size 64MB */
54649a33e4SStefano Babic #define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* max size from SPRS586*/
55649a33e4SStefano Babic 
56649a33e4SStefano Babic /* memtest start addr */
57649a33e4SStefano Babic #define CONFIG_SYS_MEMTEST_START	(PHYS_SDRAM_1 + 0x2000000)
58649a33e4SStefano Babic 
59649a33e4SStefano Babic /* memtest will be run on 16MB */
60649a33e4SStefano Babic #define CONFIG_SYS_MEMTEST_END	(PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)
61649a33e4SStefano Babic 
62649a33e4SStefano Babic #define CONFIG_NR_DRAM_BANKS	1 /* we have 1 bank of DRAM */
63649a33e4SStefano Babic #define CONFIG_STACKSIZE	(256*1024) /* regular stack */
64649a33e4SStefano Babic 
65649a33e4SStefano Babic /*
66649a33e4SStefano Babic  * Serial Driver info
67649a33e4SStefano Babic  */
68649a33e4SStefano Babic #define CONFIG_SYS_NS16550
69649a33e4SStefano Babic #define CONFIG_SYS_NS16550_SERIAL
70649a33e4SStefano Babic #define CONFIG_SYS_NS16550_REG_SIZE	-4	/* NS16550 register size */
71f9fc237fSBastian Ruppert #define CONFIG_SYS_NS16550_COM1	DAVINCI_UART0_BASE /* Base address of UART0 */
72649a33e4SStefano Babic #define CONFIG_SYS_NS16550_CLK	clk_get(DAVINCI_UART2_CLKID)
73649a33e4SStefano Babic #define CONFIG_CONS_INDEX	1		/* use UART0 for console */
74649a33e4SStefano Babic #define CONFIG_BAUDRATE		115200		/* Default baud rate */
75649a33e4SStefano Babic #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
76649a33e4SStefano Babic 
77649a33e4SStefano Babic #define CONFIG_SPI
78649a33e4SStefano Babic #define CONFIG_SPI_FLASH
79649a33e4SStefano Babic #define CONFIG_SPI_FLASH_STMICRO
80649a33e4SStefano Babic #define CONFIG_DAVINCI_SPI
81649a33e4SStefano Babic #define CONFIG_SYS_SPI_BASE		DAVINCI_SPI1_BASE
82649a33e4SStefano Babic #define CONFIG_SYS_SPI_CLK		clk_get(DAVINCI_SPI1_CLKID)
83649a33e4SStefano Babic #define CONFIG_SF_DEFAULT_SPEED		30000000
84649a33e4SStefano Babic #define CONFIG_ENV_SPI_MAX_HZ	CONFIG_SF_DEFAULT_SPEED
85649a33e4SStefano Babic 
86649a33e4SStefano Babic /*
87649a33e4SStefano Babic  * Network & Ethernet Configuration
88649a33e4SStefano Babic  */
89649a33e4SStefano Babic #ifdef CONFIG_DRIVER_TI_EMAC
90649a33e4SStefano Babic #define CONFIG_MII
91649a33e4SStefano Babic #define CONFIG_BOOTP_DEFAULT
92649a33e4SStefano Babic #define CONFIG_BOOTP_DNS
93649a33e4SStefano Babic #define CONFIG_BOOTP_DNS2
94649a33e4SStefano Babic #define CONFIG_BOOTP_SEND_HOSTNAME
95649a33e4SStefano Babic #define CONFIG_NET_RETRY_COUNT	10
96649a33e4SStefano Babic #endif
97649a33e4SStefano Babic 
98649a33e4SStefano Babic #ifdef CONFIG_USE_SPIFLASH
99649a33e4SStefano Babic #undef CONFIG_ENV_IS_IN_FLASH
100649a33e4SStefano Babic #undef CONFIG_ENV_IS_IN_NAND
101649a33e4SStefano Babic #define CONFIG_ENV_IS_IN_SPI_FLASH
102649a33e4SStefano Babic #define CONFIG_ENV_SIZE			(8 << 10)
103*17a8904bSStefano Babic #define CONFIG_ENV_OFFSET		0x80000
104649a33e4SStefano Babic #define CONFIG_ENV_SECT_SIZE		(64 << 10)
105649a33e4SStefano Babic #define CONFIG_SYS_NO_FLASH
106649a33e4SStefano Babic #endif
107649a33e4SStefano Babic 
108649a33e4SStefano Babic /*
109649a33e4SStefano Babic  * U-Boot general configuration
110649a33e4SStefano Babic  */
111649a33e4SStefano Babic #define CONFIG_BOOTFILE		"uImage" /* Boot file name */
112649a33e4SStefano Babic #define CONFIG_SYS_PROMPT	"ea20 > " /* Command Prompt */
113649a33e4SStefano Babic #define CONFIG_SYS_CBSIZE	1024 /* Console I/O Buffer Size	*/
114649a33e4SStefano Babic #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
115649a33e4SStefano Babic #define CONFIG_SYS_MAXARGS	16 /* max number of command args */
116649a33e4SStefano Babic #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
117649a33e4SStefano Babic #define CONFIG_SYS_LOAD_ADDR	(PHYS_SDRAM_1 + 0x700000)
118649a33e4SStefano Babic #define CONFIG_VERSION_VARIABLE
119649a33e4SStefano Babic #define CONFIG_AUTO_COMPLETE
120649a33e4SStefano Babic #define CONFIG_SYS_HUSH_PARSER
121649a33e4SStefano Babic #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
122649a33e4SStefano Babic #define CONFIG_CMDLINE_EDITING
123649a33e4SStefano Babic #define CONFIG_SYS_LONGHELP
124649a33e4SStefano Babic #define CONFIG_CRC32_VERIFY
125649a33e4SStefano Babic #define CONFIG_MX_CYCLIC
126649a33e4SStefano Babic 
127649a33e4SStefano Babic /*
128649a33e4SStefano Babic  * Linux Information
129649a33e4SStefano Babic  */
130649a33e4SStefano Babic #define LINUX_BOOT_PARAM_ADDR	(PHYS_SDRAM_1 + 0x100)
131649a33e4SStefano Babic #define CONFIG_CMDLINE_TAG
132649a33e4SStefano Babic #define CONFIG_SETUP_MEMORY_TAGS
133649a33e4SStefano Babic #define CONFIG_BOOTDELAY	3
134649a33e4SStefano Babic 
135649a33e4SStefano Babic /*
136649a33e4SStefano Babic  * U-Boot commands
137649a33e4SStefano Babic  */
138649a33e4SStefano Babic #include <config_cmd_default.h>
139649a33e4SStefano Babic #define CONFIG_CMD_ENV
140649a33e4SStefano Babic #define CONFIG_CMD_ASKENV
141649a33e4SStefano Babic #define CONFIG_CMD_DHCP
142649a33e4SStefano Babic #define CONFIG_CMD_DIAG
143649a33e4SStefano Babic #define CONFIG_CMD_MII
144649a33e4SStefano Babic #define CONFIG_CMD_PING
145649a33e4SStefano Babic #define CONFIG_CMD_SAVES
146649a33e4SStefano Babic #define CONFIG_CMD_MEMORY
147649a33e4SStefano Babic 
148649a33e4SStefano Babic #ifndef CONFIG_DRIVER_TI_EMAC
149649a33e4SStefano Babic #undef CONFIG_CMD_NET
150649a33e4SStefano Babic #undef CONFIG_CMD_DHCP
151649a33e4SStefano Babic #undef CONFIG_CMD_MII
152649a33e4SStefano Babic #undef CONFIG_CMD_PING
153649a33e4SStefano Babic #endif
154649a33e4SStefano Babic 
155*17a8904bSStefano Babic /* NAND Setup */
156*17a8904bSStefano Babic #ifdef CONFIG_SYS_USE_NAND
157649a33e4SStefano Babic #undef CONFIG_CMD_FLASH
158649a33e4SStefano Babic #undef CONFIG_CMD_IMLS
159649a33e4SStefano Babic #define CONFIG_CMD_NAND
160649a33e4SStefano Babic 
161649a33e4SStefano Babic #define CONFIG_CMD_MTDPARTS
162649a33e4SStefano Babic #define CONFIG_MTD_DEVICE
163649a33e4SStefano Babic #define CONFIG_MTD_PARTITIONS
164649a33e4SStefano Babic #define CONFIG_LZO
165649a33e4SStefano Babic #define CONFIG_RBTREE
166649a33e4SStefano Babic #define CONFIG_CMD_UBI
167649a33e4SStefano Babic #define CONFIG_CMD_UBIFS
168*17a8904bSStefano Babic 
169*17a8904bSStefano Babic #define CONFIG_NAND_DAVINCI
170*17a8904bSStefano Babic #define	CONFIG_SYS_NAND_PAGE_2K
171*17a8904bSStefano Babic #define CONFIG_SYS_NAND_CS		2
172*17a8904bSStefano Babic #define CONFIG_SYS_NAND_BASE		DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
173*17a8904bSStefano Babic #undef CONFIG_SYS_NAND_HW_ECC
174*17a8904bSStefano Babic #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
175*17a8904bSStefano Babic #define	CONFIG_SYS_NAND_USE_FLASH_BBT
176*17a8904bSStefano Babic #define CONFIG_SYS_MAX_NAND_DEVICE	1 /* Max number of NAND devices */
177*17a8904bSStefano Babic #define NAND_MAX_CHIPS			1
178*17a8904bSStefano Babic #define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */
179649a33e4SStefano Babic #endif
180649a33e4SStefano Babic 
181*17a8904bSStefano Babic /* SPI Flash */
182649a33e4SStefano Babic #ifdef CONFIG_USE_SPIFLASH
183649a33e4SStefano Babic #undef CONFIG_CMD_IMLS
184649a33e4SStefano Babic #undef CONFIG_CMD_FLASH
185649a33e4SStefano Babic #define CONFIG_CMD_SPI
186649a33e4SStefano Babic #define CONFIG_CMD_SF
187649a33e4SStefano Babic #define CONFIG_CMD_SAVEENV
188649a33e4SStefano Babic #endif
189649a33e4SStefano Babic 
190*17a8904bSStefano Babic #if !defined(CONFIG_SYS_USE_NAND) && \
191649a33e4SStefano Babic 	!defined(CONFIG_USE_NOR) && \
192649a33e4SStefano Babic 	!defined(CONFIG_USE_SPIFLASH)
193649a33e4SStefano Babic #define CONFIG_ENV_IS_NOWHERE
194649a33e4SStefano Babic #define CONFIG_SYS_NO_FLASH
195649a33e4SStefano Babic #define CONFIG_ENV_SIZE		(16 << 10)
196649a33e4SStefano Babic #undef CONFIG_CMD_IMLS
197649a33e4SStefano Babic #undef CONFIG_CMD_ENV
198649a33e4SStefano Babic #endif
199649a33e4SStefano Babic 
200649a33e4SStefano Babic /* additions for new relocation code, must added to all boards */
201649a33e4SStefano Babic #define CONFIG_SYS_SDRAM_BASE		0xc0000000
202649a33e4SStefano Babic #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000 - \
203649a33e4SStefano Babic 					GENERATED_GBL_DATA_SIZE)
204649a33e4SStefano Babic #endif /* __CONFIG_H */
205