xref: /rk3399_rockchip-uboot/include/configs/zmx25.h (revision 26750c8aee2383a026e0cf89e9310628d3a5a6a0)
1 /*
2  * (c) 2011 Graf-Syteco, Matthias Weisser
3  * <weisserm@arcor.de>
4  *
5  * Configuation settings for the zmx25 board
6  *
7  * See file CREDITS for list of people who contributed to this
8  * project.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License as
12  * published by the Free Software Foundation; either version 2 of
13  * the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23  * MA 02111-1307 USA
24  */
25 
26 #ifndef __CONFIG_H
27 #define __CONFIG_H
28 
29 #define CONFIG_ARM926EJS			/* arm926ejs CPU core */
30 #define CONFIG_MX25
31 #define CONFIG_MX25_CLK32		32768	/* OSC32K frequency */
32 #define CONFIG_SYS_HZ			1000
33 #define CONFIG_SYS_TEXT_BASE		0xA0000000
34 
35 #define CONFIG_MACH_TYPE	MACH_TYPE_ZMX25
36 /*
37  * Environment settings
38  */
39 #define CONFIG_EXTRA_ENV_SETTINGS \
40 	"gs_fast_boot=setenv bootdelay 5\0" \
41 	"gs_slow_boot=setenv bootdelay 10\0" \
42 	"bootcmd=dcache off; mw.l 0x81000000 0 1024; usb start;" \
43 		"fatls usb 0; fatload usb 0 0x81000000 zmx25-init.bin;" \
44 		"bootm 0x81000000; bootelf 0x81000000\0"
45 
46 #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs	*/
47 #define CONFIG_SETUP_MEMORY_TAGS
48 #define CONFIG_INITRD_TAG
49 #define CONFIG_BOARD_LATE_INIT
50 
51 /*
52  * Compressions
53  */
54 #define CONFIG_LZO
55 
56 /*
57  * Hardware drivers
58  */
59 
60 /*
61  * GPIO
62  */
63 #define CONFIG_MXC_GPIO
64 
65 /*
66  * Serial
67  */
68 #define CONFIG_MXC_UART
69 #define CONFIG_MXC_UART_BASE	UART2_BASE
70 #define CONFIG_CONS_INDEX	1	/* use UART2 for console */
71 #define CONFIG_BAUDRATE		115200	/* Default baud rate */
72 
73 /*
74  * Ethernet
75  */
76 #define CONFIG_FEC_MXC
77 #define CONFIG_FEC_MXC_PHYADDR		0x00
78 #define CONFIG_MII
79 
80 /*
81  * BOOTP options
82  */
83 #define CONFIG_BOOTP_BOOTFILESIZE
84 #define CONFIG_BOOTP_BOOTPATH
85 #define CONFIG_BOOTP_GATEWAY
86 #define CONFIG_BOOTP_HOSTNAME
87 
88 /*
89  * Command line configuration.
90  */
91 #include <config_cmd_default.h>
92 #define CONFIG_CMD_NET
93 #define CONFIG_CMD_CACHE
94 
95 /*
96  * Additional command
97  */
98 #define CONFIG_CMD_DHCP
99 #define CONFIG_CMD_PING
100 #define CONFIG_CMD_ELF
101 #define CONFIG_CMD_FAT
102 #define CONFIG_CMD_USB
103 
104 #define CONFIG_SYS_HUSH_PARSER
105 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
106 
107 /*
108  * USB
109  */
110 #ifdef CONFIG_CMD_USB
111 #define CONFIG_USB_EHCI			/* Enable EHCI USB support */
112 #define CONFIG_USB_EHCI_MXC
113 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
114 #define CONFIG_MXC_USB_PORT	2
115 #define CONFIG_MXC_USB_PORTSC	0xC0000000
116 #define CONFIG_MXC_USB_FLAGS	0
117 #define CONFIG_EHCI_IS_TDI
118 #define CONFIG_USB_STORAGE
119 #define CONFIG_DOS_PARTITION
120 #define CONFIG_SUPPORT_VFAT
121 #endif /* CONFIG_CMD_USB */
122 
123 /* SDRAM */
124 #define CONFIG_NR_DRAM_BANKS	1
125 #define PHYS_SDRAM		0x80000000	/* start address of LPDDRRAM */
126 #define PHYS_SDRAM_SIZE		0x04000000	/* 64 megs */
127 
128 #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM
129 #define CONFIG_SYS_INIT_SP_ADDR	0x78020000	/* end of internal SRAM */
130 
131 /*
132  * FLASH and environment organization
133  */
134 #define CONFIG_SYS_FLASH_BASE		0xA0000000
135 #define CONFIG_SYS_MAX_FLASH_BANKS	1
136 #define CONFIG_SYS_MAX_FLASH_SECT	256
137 
138 #define CONFIG_ENV_ADDR			(CONFIG_SYS_FLASH_BASE + 0x00040000)
139 #define CONFIG_ENV_IS_IN_FLASH		1
140 #define CONFIG_ENV_SECT_SIZE		(128 * 1024)
141 #define CONFIG_ENV_SIZE			(128 * 1024)
142 
143 /*
144  * CFI FLASH driver setup
145  */
146 #define CONFIG_SYS_FLASH_CFI
147 #define CONFIG_FLASH_CFI_DRIVER
148 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE	/* ~10x faster */
149 
150 #define CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_SDRAM_BASE
151 
152 #define CONFIG_SYS_MEMTEST_START	(PHYS_SDRAM + (512*1024))
153 #define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM + PHYS_SDRAM_SIZE)
154 
155 #define CONFIG_SYS_PROMPT	"zmx25> "
156 #define CONFIG_SYS_CBSIZE	256
157 #define CONFIG_SYS_MAXARGS	16
158 #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + \
159 				sizeof(CONFIG_SYS_PROMPT) + 16)
160 #define CONFIG_SYS_LONGHELP
161 #define CONFIG_CMDLINE_EDITING
162 
163 #define CONFIG_PREBOOT  ""
164 
165 #define CONFIG_BOOTDELAY	5
166 #define CONFIG_AUTOBOOT_KEYED
167 #define CONFIG_AUTOBOOT_PROMPT "boot in %d s\n", bootdelay
168 #define CONFIG_AUTOBOOT_DELAY_STR	"delaygs"
169 #define CONFIG_AUTOBOOT_STOP_STR	"stopgs"
170 
171 /*
172  * Size of malloc() pool
173  */
174 #define CONFIG_SYS_MALLOC_LEN		(0x400000 - 0x8000)
175 #define CONFIG_STACKSIZE		(32*1024)	/* regular stack */
176 
177 #endif	/* __CONFIG_H */
178