xref: /rk3399_rockchip-uboot/include/configs/ea20.h (revision f9fc237f1f07d4e5ff7c9c2da39cabc8d3d7b339)
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
31649a33e4SStefano Babic #define CONFIG_DRIVER_TI_EMAC_USE_RMII
32649a33e4SStefano Babic 
33649a33e4SStefano Babic /*
34649a33e4SStefano Babic  * SoC Configuration
35649a33e4SStefano Babic  */
36649a33e4SStefano Babic #define CONFIG_MACH_DAVINCI_DA850_EVM
37649a33e4SStefano Babic #define CONFIG_ARM926EJS		/* arm926ejs CPU core */
38649a33e4SStefano Babic #define CONFIG_SOC_DA8XX		/* TI DA8xx SoC */
39649a33e4SStefano Babic #define CONFIG_SYS_CLK_FREQ		clk_get(DAVINCI_ARM_CLKID)
40649a33e4SStefano Babic #define CONFIG_SYS_OSCIN_FREQ		24000000
41649a33e4SStefano Babic #define CONFIG_SYS_TIMERBASE		DAVINCI_TIMER0_BASE
42649a33e4SStefano Babic #define CONFIG_SYS_HZ_CLOCK		clk_get(DAVINCI_AUXCLK_CLKID)
43649a33e4SStefano Babic #define CONFIG_SYS_HZ			1000
44649a33e4SStefano Babic #define CONFIG_SKIP_LOWLEVEL_INIT
45649a33e4SStefano Babic #define CONFIG_SYS_TEXT_BASE		0xc1080000
46649a33e4SStefano Babic 
47649a33e4SStefano Babic /*
48649a33e4SStefano Babic  * Memory Info
49649a33e4SStefano Babic  */
50649a33e4SStefano Babic #define CONFIG_SYS_MALLOC_LEN	(0x10000 + 1*1024*1024) /* malloc() len */
51649a33e4SStefano Babic #define PHYS_SDRAM_1		DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */
52649a33e4SStefano Babic #define PHYS_SDRAM_1_SIZE	(64 << 20) /* SDRAM size 64MB */
53649a33e4SStefano Babic #define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* max size from SPRS586*/
54649a33e4SStefano Babic 
55649a33e4SStefano Babic /* memtest start addr */
56649a33e4SStefano Babic #define CONFIG_SYS_MEMTEST_START	(PHYS_SDRAM_1 + 0x2000000)
57649a33e4SStefano Babic 
58649a33e4SStefano Babic /* memtest will be run on 16MB */
59649a33e4SStefano Babic #define CONFIG_SYS_MEMTEST_END	(PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)
60649a33e4SStefano Babic 
61649a33e4SStefano Babic #define CONFIG_NR_DRAM_BANKS	1 /* we have 1 bank of DRAM */
62649a33e4SStefano Babic #define CONFIG_STACKSIZE	(256*1024) /* regular stack */
63649a33e4SStefano Babic 
64649a33e4SStefano Babic /*
65649a33e4SStefano Babic  * Serial Driver info
66649a33e4SStefano Babic  */
67649a33e4SStefano Babic #define CONFIG_SYS_NS16550
68649a33e4SStefano Babic #define CONFIG_SYS_NS16550_SERIAL
69649a33e4SStefano Babic #define CONFIG_SYS_NS16550_REG_SIZE	-4	/* NS16550 register size */
70*f9fc237fSBastian Ruppert #define CONFIG_SYS_NS16550_COM1	DAVINCI_UART0_BASE /* Base address of UART0 */
71649a33e4SStefano Babic #define CONFIG_SYS_NS16550_CLK	clk_get(DAVINCI_UART2_CLKID)
72649a33e4SStefano Babic #define CONFIG_CONS_INDEX	1		/* use UART0 for console */
73649a33e4SStefano Babic #define CONFIG_BAUDRATE		115200		/* Default baud rate */
74649a33e4SStefano Babic #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
75649a33e4SStefano Babic 
76649a33e4SStefano Babic #define CONFIG_SPI
77649a33e4SStefano Babic #define CONFIG_SPI_FLASH
78649a33e4SStefano Babic #define CONFIG_SPI_FLASH_STMICRO
79649a33e4SStefano Babic #define CONFIG_DAVINCI_SPI
80649a33e4SStefano Babic #define CONFIG_SYS_SPI_BASE		DAVINCI_SPI1_BASE
81649a33e4SStefano Babic #define CONFIG_SYS_SPI_CLK		clk_get(DAVINCI_SPI1_CLKID)
82649a33e4SStefano Babic #define CONFIG_SF_DEFAULT_SPEED		30000000
83649a33e4SStefano Babic #define CONFIG_ENV_SPI_MAX_HZ	CONFIG_SF_DEFAULT_SPEED
84649a33e4SStefano Babic 
85649a33e4SStefano Babic /*
86649a33e4SStefano Babic  * Network & Ethernet Configuration
87649a33e4SStefano Babic  */
88649a33e4SStefano Babic #ifdef CONFIG_DRIVER_TI_EMAC
89649a33e4SStefano Babic #define CONFIG_MII
90649a33e4SStefano Babic #define CONFIG_BOOTP_DEFAULT
91649a33e4SStefano Babic #define CONFIG_BOOTP_DNS
92649a33e4SStefano Babic #define CONFIG_BOOTP_DNS2
93649a33e4SStefano Babic #define CONFIG_BOOTP_SEND_HOSTNAME
94649a33e4SStefano Babic #define CONFIG_NET_RETRY_COUNT	10
95649a33e4SStefano Babic #endif
96649a33e4SStefano Babic 
97649a33e4SStefano Babic #ifdef CONFIG_USE_SPIFLASH
98649a33e4SStefano Babic #undef CONFIG_ENV_IS_IN_FLASH
99649a33e4SStefano Babic #undef CONFIG_ENV_IS_IN_NAND
100649a33e4SStefano Babic #define CONFIG_ENV_IS_IN_SPI_FLASH
101649a33e4SStefano Babic #define CONFIG_ENV_SIZE			(8 << 10)
102649a33e4SStefano Babic #define CONFIG_ENV_OFFSET		(256 << 10)
103649a33e4SStefano Babic #define CONFIG_ENV_SECT_SIZE		(64 << 10)
104649a33e4SStefano Babic #define CONFIG_SYS_NO_FLASH
105649a33e4SStefano Babic #endif
106649a33e4SStefano Babic 
107649a33e4SStefano Babic /*
108649a33e4SStefano Babic  * U-Boot general configuration
109649a33e4SStefano Babic  */
110649a33e4SStefano Babic #define CONFIG_BOOTFILE		"uImage" /* Boot file name */
111649a33e4SStefano Babic #define CONFIG_SYS_PROMPT	"ea20 > " /* Command Prompt */
112649a33e4SStefano Babic #define CONFIG_SYS_CBSIZE	1024 /* Console I/O Buffer Size	*/
113649a33e4SStefano Babic #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
114649a33e4SStefano Babic #define CONFIG_SYS_MAXARGS	16 /* max number of command args */
115649a33e4SStefano Babic #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
116649a33e4SStefano Babic #define CONFIG_SYS_LOAD_ADDR	(PHYS_SDRAM_1 + 0x700000)
117649a33e4SStefano Babic #define CONFIG_VERSION_VARIABLE
118649a33e4SStefano Babic #define CONFIG_AUTO_COMPLETE
119649a33e4SStefano Babic #define CONFIG_SYS_HUSH_PARSER
120649a33e4SStefano Babic #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
121649a33e4SStefano Babic #define CONFIG_CMDLINE_EDITING
122649a33e4SStefano Babic #define CONFIG_SYS_LONGHELP
123649a33e4SStefano Babic #define CONFIG_CRC32_VERIFY
124649a33e4SStefano Babic #define CONFIG_MX_CYCLIC
125649a33e4SStefano Babic 
126649a33e4SStefano Babic /*
127649a33e4SStefano Babic  * Linux Information
128649a33e4SStefano Babic  */
129649a33e4SStefano Babic #define LINUX_BOOT_PARAM_ADDR	(PHYS_SDRAM_1 + 0x100)
130649a33e4SStefano Babic #define CONFIG_CMDLINE_TAG
131649a33e4SStefano Babic #define CONFIG_SETUP_MEMORY_TAGS
132649a33e4SStefano Babic #define CONFIG_BOOTDELAY	3
133649a33e4SStefano Babic 
134649a33e4SStefano Babic /*
135649a33e4SStefano Babic  * U-Boot commands
136649a33e4SStefano Babic  */
137649a33e4SStefano Babic #include <config_cmd_default.h>
138649a33e4SStefano Babic #define CONFIG_CMD_ENV
139649a33e4SStefano Babic #define CONFIG_CMD_ASKENV
140649a33e4SStefano Babic #define CONFIG_CMD_DHCP
141649a33e4SStefano Babic #define CONFIG_CMD_DIAG
142649a33e4SStefano Babic #define CONFIG_CMD_MII
143649a33e4SStefano Babic #define CONFIG_CMD_PING
144649a33e4SStefano Babic #define CONFIG_CMD_SAVES
145649a33e4SStefano Babic #define CONFIG_CMD_MEMORY
146649a33e4SStefano Babic 
147649a33e4SStefano Babic #ifndef CONFIG_DRIVER_TI_EMAC
148649a33e4SStefano Babic #undef CONFIG_CMD_NET
149649a33e4SStefano Babic #undef CONFIG_CMD_DHCP
150649a33e4SStefano Babic #undef CONFIG_CMD_MII
151649a33e4SStefano Babic #undef CONFIG_CMD_PING
152649a33e4SStefano Babic #endif
153649a33e4SStefano Babic 
154649a33e4SStefano Babic #ifdef CONFIG_USE_NAND
155649a33e4SStefano Babic #undef CONFIG_CMD_FLASH
156649a33e4SStefano Babic #undef CONFIG_CMD_IMLS
157649a33e4SStefano Babic #define CONFIG_CMD_NAND
158649a33e4SStefano Babic 
159649a33e4SStefano Babic #define CONFIG_CMD_MTDPARTS
160649a33e4SStefano Babic #define CONFIG_MTD_DEVICE
161649a33e4SStefano Babic #define CONFIG_MTD_PARTITIONS
162649a33e4SStefano Babic #define CONFIG_LZO
163649a33e4SStefano Babic #define CONFIG_RBTREE
164649a33e4SStefano Babic #define CONFIG_CMD_UBI
165649a33e4SStefano Babic #define CONFIG_CMD_UBIFS
166649a33e4SStefano Babic #endif
167649a33e4SStefano Babic 
168649a33e4SStefano Babic #ifdef CONFIG_USE_SPIFLASH
169649a33e4SStefano Babic #undef CONFIG_CMD_IMLS
170649a33e4SStefano Babic #undef CONFIG_CMD_FLASH
171649a33e4SStefano Babic #define CONFIG_CMD_SPI
172649a33e4SStefano Babic #define CONFIG_CMD_SF
173649a33e4SStefano Babic #define CONFIG_CMD_SAVEENV
174649a33e4SStefano Babic #endif
175649a33e4SStefano Babic 
176649a33e4SStefano Babic #if !defined(CONFIG_USE_NAND) && \
177649a33e4SStefano Babic 	!defined(CONFIG_USE_NOR) && \
178649a33e4SStefano Babic 	!defined(CONFIG_USE_SPIFLASH)
179649a33e4SStefano Babic #define CONFIG_ENV_IS_NOWHERE
180649a33e4SStefano Babic #define CONFIG_SYS_NO_FLASH
181649a33e4SStefano Babic #define CONFIG_ENV_SIZE		(16 << 10)
182649a33e4SStefano Babic #undef CONFIG_CMD_IMLS
183649a33e4SStefano Babic #undef CONFIG_CMD_ENV
184649a33e4SStefano Babic #endif
185649a33e4SStefano Babic 
186649a33e4SStefano Babic /* additions for new relocation code, must added to all boards */
187649a33e4SStefano Babic #define CONFIG_SYS_SDRAM_BASE		0xc0000000
188649a33e4SStefano Babic #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000 - \
189649a33e4SStefano Babic 					GENERATED_GBL_DATA_SIZE)
190649a33e4SStefano Babic #endif /* __CONFIG_H */
191