xref: /openbmc/u-boot/include/configs/edb93xx.h (revision 68e7999b)
1 /*
2  * U-Boot - Configuration file for Cirrus Logic EDB93xx boards
3  */
4 
5 #ifndef __CONFIG_H
6 #define __CONFIG_H
7 
8 #ifdef CONFIG_MK_edb9301
9 #define CONFIG_EDB9301
10 #elif defined(CONFIG_MK_edb9302)
11 #define CONFIG_EDB9302
12 #elif defined(CONFIG_MK_edb9302a)
13 #define CONFIG_EDB9302A
14 #elif defined(CONFIG_MK_edb9307)
15 #define CONFIG_EDB9307
16 #elif defined(CONFIG_MK_edb9307a)
17 #define CONFIG_EDB9307A
18 #elif defined(CONFIG_MK_edb9312)
19 #define CONFIG_EDB9312
20 #elif defined(CONFIG_MK_edb9315)
21 #define CONFIG_EDB9315
22 #elif defined(CONFIG_MK_edb9315a)
23 #define CONFIG_EDB9315A
24 #else
25 #error "no board defined"
26 #endif
27 
28 /* Initial environment and monitor configuration options. */
29 #define CONFIG_CMDLINE_TAG		1
30 #define CONFIG_INITRD_TAG		1
31 #define CONFIG_SETUP_MEMORY_TAGS	1
32 #define CONFIG_BOOTARGS		"root=/dev/nfs console=ttyAM0,115200 ip=dhcp"
33 #define CONFIG_BOOTFILE		"edb93xx.img"
34 
35 #define CONFIG_SYS_LDSCRIPT	"board/cirrus/edb93xx/u-boot.lds"
36 
37 #ifdef CONFIG_EDB9301
38 #define CONFIG_EP9301
39 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9301
40 #define CONFIG_ENV_SECT_SIZE		0x00020000
41 #elif defined(CONFIG_EDB9302)
42 #define CONFIG_EP9302
43 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9302
44 #define CONFIG_ENV_SECT_SIZE		0x00020000
45 #elif defined(CONFIG_EDB9302A)
46 #define CONFIG_EP9302
47 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9302A
48 #define CONFIG_ENV_SECT_SIZE		0x00020000
49 #elif defined(CONFIG_EDB9307)
50 #define CONFIG_EP9307
51 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9307
52 #define CONFIG_ENV_SECT_SIZE		0x00040000
53 #elif defined(CONFIG_EDB9307A)
54 #define CONFIG_EP9307
55 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9307A
56 #define CONFIG_ENV_SECT_SIZE		0x00020000
57 #elif defined(CONFIG_EDB9312)
58 #define CONFIG_EP9312
59 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9312
60 #define CONFIG_ENV_SECT_SIZE		0x00040000
61 #elif defined(CONFIG_EDB9315)
62 #define CONFIG_EP9315
63 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9315
64 #define CONFIG_ENV_SECT_SIZE		0x00040000
65 #elif defined(CONFIG_EDB9315A)
66 #define CONFIG_EP9315
67 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9315A
68 #define CONFIG_ENV_SECT_SIZE		0x00020000
69 #else
70 #error "no board defined"
71 #endif
72 
73 /* High-level configuration options */
74 #define CONFIG_EP93XX		1		/* This is a Cirrus Logic 93xx SoC */
75 
76 #define CONFIG_SYS_CLK_FREQ	14745600	/* EP93xx has a 14.7456 clock */
77 #undef CONFIG_USE_IRQ				/* Don't need IRQ/FIQ */
78 
79 /* Monitor configuration */
80 #undef CONFIG_CMD_DATE
81 #define CONFIG_CMD_JFFS2
82 
83 #define CONFIG_SYS_LONGHELP			/* Enable "long" help in mon */
84 #define CONFIG_SYS_CBSIZE		1024	/* Console I/O buffer size */
85 /* Print buffer size */
86 #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
87 /* Boot argument buffer size */
88 #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
89 #define CONFIG_SYS_MAXARGS	16		/* Max number of command args */
90 
91 /* Serial port hardware configuration */
92 #define CONFIG_PL010_SERIAL
93 #define CONFIG_CONS_INDEX		0
94 #define CONFIG_BAUDRATE			115200
95 #define CONFIG_SYS_BAUDRATE_TABLE	{9600, 19200, 38400, 57600, \
96                         115200, 230400}
97 #define CONFIG_SYS_SERIAL0		0x808C0000
98 #define CONFIG_SYS_SERIAL1		0x808D0000
99 /*#define CONFIG_PL01x_PORTS	{(void *)CONFIG_SYS_SERIAL0, \
100             (void *)CONFIG_SYS_SERIAL1} */
101 
102 #define CONFIG_PL01x_PORTS	{(void *)CONFIG_SYS_SERIAL0}
103 
104 /* Status LED */
105 #define CONFIG_STATUS_LED		1 /* Status LED enabled	*/
106 #define CONFIG_BOARD_SPECIFIC_LED	1
107 #define STATUS_LED_GREEN		0
108 #define STATUS_LED_RED			1
109 /* Green */
110 #define STATUS_LED_BIT			STATUS_LED_GREEN
111 #define STATUS_LED_STATE		STATUS_LED_ON
112 #define STATUS_LED_PERIOD		(CONFIG_SYS_HZ / 2)
113 /* Red */
114 #define STATUS_LED_BIT1			STATUS_LED_RED
115 #define STATUS_LED_STATE1		STATUS_LED_OFF
116 #define STATUS_LED_PERIOD1		(CONFIG_SYS_HZ / 2)
117 /* Optional value */
118 #define STATUS_LED_BOOT			STATUS_LED_BIT
119 
120 /* Network hardware configuration */
121 #define CONFIG_DRIVER_EP93XX_MAC
122 #define CONFIG_MII_SUPPRESS_PREAMBLE
123 #define CONFIG_MII
124 #define CONFIG_PHY_ADDR		1
125 #undef CONFIG_NETCONSOLE
126 
127 /* SDRAM configuration */
128 #if defined(CONFIG_EDB9301) || defined(CONFIG_EDB9302) || \
129     defined(CONFIG_EDB9307) || defined CONFIG_EDB9312 || \
130     defined(CONFIG_EDB9315)
131 /*
132  * EDB9301/2 has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
133  * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
134  * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
135  *
136  * The EDB9307, EDB9312, and EDB9315 have 2 banks of SDRAM consisting of
137  * 2x Samsung K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of
138  * 64 MB of SDRAM.
139  */
140 
141 #define CONFIG_EDB93XX_SDCS3
142 
143 #elif defined(CONFIG_EDB9302A) || \
144     defined(CONFIG_EDB9307A) || defined(CONFIG_EDB9315A)
145 /*
146  * EDB9302a has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
147  * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
148  * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
149  *
150  * The EDB9307A and EDB9315A have 2 banks of SDRAM consisting of 2x Samsung
151  * K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of 64 MB of SDRAM.
152  */
153 #define CONFIG_EDB93XX_SDCS0
154 
155 #else
156 #error "no SDCS configuration for this board"
157 #endif
158 
159 #if defined(CONFIG_EDB93XX_SDCS3)
160 #define CONFIG_SYS_LOAD_ADDR	0x01000000	/* Default load address	*/
161 #define PHYS_SDRAM_1		0x00000000
162 #elif defined(CONFIG_EDB93XX_SDCS0)
163 #define CONFIG_SYS_LOAD_ADDR	0xc1000000	/* Default load address	*/
164 #define PHYS_SDRAM_1		0xc0000000
165 #endif
166 
167 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
168 #define CONFIG_NR_DRAM_BANKS		8
169 
170 #define CONFIG_SYS_INIT_SP_ADDR \
171     (CONFIG_SYS_SDRAM_BASE + 32*1024 - GENERATED_GBL_DATA_SIZE)
172 
173 /* Must match kernel config */
174 #define LINUX_BOOT_PARAM_ADDR	(PHYS_SDRAM_1 + 0x100)
175 
176 /* Run-time memory allocatons */
177 #define CONFIG_SYS_GBL_DATA_SIZE	128
178 #define CONFIG_STACKSIZE		(128 * 1024)
179 
180 #if defined(CONFIG_USE_IRQ)
181 #define CONFIG_STACKSIZE_IRQ	(4 * 1024)
182 #define CONFIG_STACKSIZE_FIQ	(4 * 1024)
183 #endif
184 
185 #define CONFIG_SYS_MALLOC_LEN		(512 * 1024)
186 
187 /* -----------------------------------------------------------------------------
188  * FLASH and environment organization
189  *
190  * The EDB9301, EDB9302(a), EDB9307a, EDB9315a have 1 bank of flash memory at
191  * 0x60000000 consisting of 1x Intel TE28F128J3C-150 128 Mbit flash on a 16-bit
192  * data bus, for a total of 16 MB of CFI-compatible flash.
193  *
194  * The EDB9307, EDB9312, and EDB9315 have 1 bank of flash memory at
195  * 0x60000000 consisting of 2x Micron MT28F128J3-12 128 Mbit flash on a 32-bit
196  * data bus, for a total of 32 MB of CFI-compatible flash.
197  *
198  *
199  *                            EDB9301/02(a)7a/15a    EDB9307/12/15
200  * 0x60000000 - 0x0003FFFF    u-boot                 u-boot
201  * 0x60040000 - 0x0005FFFF    environment #1         environment #1
202  * 0x60060000 - 0x0007FFFF    environment #2         environment #1 (continued)
203  * 0x60080000 - 0x0009FFFF    unused                 environment #2
204  * 0x600A0000 - 0x000BFFFF    unused                 environment #2 (continued)
205  * 0x600C0000 - 0x00FFFFFF    unused                 unused
206  * 0x61000000 - 0x01FFFFFF    not present            unused
207  */
208 #define CONFIG_SYS_FLASH_CFI
209 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
210 
211 #define CONFIG_SYS_FLASH_PROTECTION
212 #define CONFIG_FLASH_CFI_DRIVER
213 #define CONFIG_SYS_MAX_FLASH_BANKS	1
214 #define CONFIG_SYS_MAX_FLASH_SECT	(256+8)
215 
216 #define CONFIG_SYS_TEXT_BASE		0x60000000
217 #define PHYS_FLASH_1			CONFIG_SYS_TEXT_BASE
218 #define CONFIG_SYS_FLASH_BASE		CONFIG_SYS_TEXT_BASE
219 
220 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
221 #define CONFIG_SYS_MONITOR_LEN		(256 * 1024)
222 
223 #define CONFIG_ENV_OVERWRITE		/* Vendor params unprotected */
224 #define CONFIG_ENV_IS_IN_FLASH
225 
226 #define CONFIG_ENV_ADDR			0x60040000
227 #define CONFIG_ENV_ADDR_REDUND		(CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
228 
229 #define CONFIG_ENV_SIZE			CONFIG_ENV_SECT_SIZE
230 #define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE
231 
232 #define CONFIG_USB_OHCI_NEW
233 #define CONFIG_USB_OHCI_EP93XX
234 #define CONFIG_SYS_USB_OHCI_CPU_INIT
235 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	3
236 #define CONFIG_SYS_USB_OHCI_SLOT_NAME		"ep93xx-ohci"
237 #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x80020000
238 
239 #define CONFIG_BOARD_EARLY_INIT_F
240 
241 /* Define to disable flash configuration*/
242 /* #define CONFIG_EP93XX_NO_FLASH_CFG */
243 
244 /* Define this for indusrial rated chips */
245 /* #define CONFIG_EDB93XX_INDUSTRIAL */
246 
247 #endif /* !defined (__CONFIG_H) */
248