blob: 2badadbc3bad5e3af7c8cb8a9d0e86180d962f5a [file] [log] [blame]
Matthias Weisser18a056a2010-08-09 13:31:51 +02001/*
2 * (C) Copyright 2010
3 * Matthias Weisser <weisserm@arcor.de>
4 *
5 * Configuation settings for the jadecpu 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_MB86R0x
30#define CONFIG_MB86R0x_IOCLK get_bus_freq(0)
31#define CONFIG_SYS_HZ 1000
Matthias Weissera91916f2011-06-29 02:08:07 +000032#define CONFIG_SYS_TEXT_BASE 0x10000000
Matthias Weisser18a056a2010-08-09 13:31:51 +020033
34#define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
35#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
36
Matthias Weissera91916f2011-06-29 02:08:07 +000037#define CONFIG_USE_ARCH_MEMCPY
38#define CONFIG_USE_ARCH_MEMSET
39
Matthias Weisserb2a7bad2011-11-05 02:15:44 +000040#define MACH_TYPE_JADECPU 2636
41
42#define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
43
Matthias Weisser18a056a2010-08-09 13:31:51 +020044/*
45 * Environment settings
46 */
47#define CONFIG_EXTRA_ENV_SETTINGS \
48 "gs_fast_boot=setenv bootdelay 5\0" \
49 "gs_slow_boot=setenv bootdelay 10\0" \
Matthias Weissera91916f2011-06-29 02:08:07 +000050 "bootcmd=dcache off; mw.l 0x40000000 0 1024; usb start;" \
Matthias Weisser18a056a2010-08-09 13:31:51 +020051 "fatls usb 0; fatload usb 0 0x40000000 jadecpu-init.bin;" \
52 "bootelf 0x40000000\0" \
53 ""
54
55#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
56#define CONFIG_SETUP_MEMORY_TAGS 1
57#define CONFIG_INITRD_TAG 1
Helmut Raiger9660e442011-10-20 04:19:47 +000058#define CONFIG_BOARD_LATE_INIT
Matthias Weisser18a056a2010-08-09 13:31:51 +020059
60/*
61 * Compressions
62 */
63#define CONFIG_LZO
64
65/*
66 * Hardware drivers
67 */
68
69/*
70 * Serial
71 */
72#define CONFIG_SERIAL_MULTI
73#define CONFIG_SYS_NS16550
74#define CONFIG_SYS_NS16550_SERIAL
75#define CONFIG_SYS_NS16550_REG_SIZE (-4)
76#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
77#define CONFIG_SYS_NS16550_COM1 0xfffe1000 /* UART 0 */
78#define CONFIG_SYS_NS16550_COM2 0xfff50000 /* UART 2 */
79#define CONFIG_SYS_NS16550_COM3 0xfff51000 /* UART 3 */
80#define CONFIG_SYS_NS16550_COM4 0xfff43000 /* UART 4 */
81
82#define CONFIG_CONS_INDEX 4
83
84/*
85 * Ethernet
86 */
Matthias Weisser18a056a2010-08-09 13:31:51 +020087#define CONFIG_SMC911X
88#define CONFIG_SMC911X_BASE 0x02000000
89#define CONFIG_SMC911X_16_BIT
90
91/*
92 * Video
93 */
94#define CONFIG_VIDEO
95#define CONFIG_VIDEO_MB86R0xGDC
96#define CONFIG_SYS_WHITE_ON_BLACK
97#define CONFIG_CFB_CONSOLE
98#define CONFIG_SYS_CONSOLE_IS_IN_ENV
99#define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
100#define CONFIG_VIDEO_LOGO
101#define CONFIG_SPLASH_SCREEN
102#define CONFIG_SPLASH_SCREEN_ALIGN
103#define CONFIG_VIDEO_BMP_LOGO
104#define CONFIG_VIDEO_BMP_GZIP
105#define CONFIG_VIDEO_BMP_RLE8
106#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (800*480 + 256*4 + 10*1024)
107#define VIDEO_FB_16BPP_WORD_SWAP
108#define VIDEO_KBD_INIT_FCT 0
109#define VIDEO_TSTC_FCT serial_tstc
110#define VIDEO_GETC_FCT serial_getc
111
112/*
113 * BOOTP options
114 */
115#define CONFIG_BOOTP_BOOTFILESIZE 1
116#define CONFIG_BOOTP_BOOTPATH 1
117#define CONFIG_BOOTP_GATEWAY 1
118#define CONFIG_BOOTP_HOSTNAME 1
119
120/*
121 * Command line configuration.
122 */
123#include <config_cmd_default.h>
124#undef CONFIG_CMD_BDI
125#undef CONFIG_CMD_FPGA
126#undef CONFIG_CMD_IMLS
127#undef CONFIG_CMD_LOADS
128#undef CONFIG_CMD_SOURCE
129#undef CONFIG_CMD_NFS
130#undef CONFIG_CMD_XIMG
131
Matthias Weissera91916f2011-06-29 02:08:07 +0000132#define CONFIG_CMD_BMP
Matthias Weissera91916f2011-06-29 02:08:07 +0000133#define CONFIG_CMD_DHCP
134#define CONFIG_CMD_ELF
135#define CONFIG_CMD_FAT
136#define CONFIG_CMD_PING
137#define CONFIG_CMD_USB
138#define CONFIG_CMD_CACHE
Matthias Weisser18a056a2010-08-09 13:31:51 +0200139
140#define CONFIG_SYS_HUSH_PARSER
Matthias Weisser18a056a2010-08-09 13:31:51 +0200141
142/* USB */
143#define CONFIG_USB_OHCI_NEW
144#define CONFIG_SYS_USB_OHCI_REGS_BASE 0xFFF81000
145#define CONFIG_SYS_USB_OHCI_SLOT_NAME "mb86r0x"
146#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
147#define CONFIG_USB_STORAGE
148#define CONFIG_DOS_PARTITION
149
150/* SDRAM */
151#define CONFIG_NR_DRAM_BANKS 1
152#define PHYS_SDRAM 0x40000000 /* Start address of DDRRAM */
153#define PHYS_SDRAM_SIZE 0x08000000 /* 128 megs */
154
Matthias Weisserb9d74b42010-09-21 15:37:44 +0200155#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
156#define CONFIG_SYS_INIT_SP_ADDR 0x01008000
157
Matthias Weisser18a056a2010-08-09 13:31:51 +0200158/*
159 * FLASH and environment organization
160 */
161#define CONFIG_SYS_FLASH_BASE 0x10000000
162#define CONFIG_SYS_MAX_FLASH_BANKS 1
163#define CONFIG_SYS_MAX_FLASH_SECT 256
164#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
165
166#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x00040000)
167#define CONFIG_ENV_IS_IN_FLASH 1
168#define CONFIG_ENV_SECT_SIZE (128 * 1024)
169#define CONFIG_ENV_SIZE (128 * 1024)
170
171/*
172 * CFI FLASH driver setup
173 */
174#define CONFIG_SYS_FLASH_CFI 1
175#define CONFIG_FLASH_CFI_DRIVER 1
176#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* ~10x faster */
177
178#define CONFIG_SYS_LOAD_ADDR 0x40000000 /* load address */
179
180#define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM + (512*1024))
181#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM + PHYS_SDRAM_SIZE)
182
183#define CONFIG_BAUDRATE 115200
Matthias Weisser18a056a2010-08-09 13:31:51 +0200184
185#define CONFIG_SYS_PROMPT "jade> "
186#define CONFIG_SYS_CBSIZE 256
187#define CONFIG_SYS_MAXARGS 16
188#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
189 sizeof(CONFIG_SYS_PROMPT) + 16)
190#define CONFIG_SYS_LONGHELP 1
191#define CONFIG_CMDLINE_EDITING 1
192
193#define CONFIG_PREBOOT ""
194
195#define CONFIG_BOOTDELAY 5
196#define CONFIG_AUTOBOOT_KEYED
197#define CONFIG_AUTOBOOT_PROMPT "boot in %d s\n", bootdelay
198#define CONFIG_AUTOBOOT_DELAY_STR "delaygs"
199#define CONFIG_AUTOBOOT_STOP_STR "stopgs"
200
201/*
202 * Size of malloc() pool
203 */
Matthias Weissera91916f2011-06-29 02:08:07 +0000204#define CONFIG_SYS_MALLOC_LEN (10 << 20)
205#define CONFIG_SYS_MEM_TOP_HIDE (4 << 20)
Matthias Weisser18a056a2010-08-09 13:31:51 +0200206
207#define CONFIG_STACKSIZE (32*1024) /* regular stack */
208
209/*
210 * Clock reset generator init
211 */
212#define CONFIG_SYS_CRG_CRHA_INIT 0xffff
213#define CONFIG_SYS_CRG_CRPA_INIT 0xffff
214#define CONFIG_SYS_CRG_CRPB_INIT 0xfffe
215#define CONFIG_SYS_CRG_CRHB_INIT 0xffff
216#define CONFIG_SYS_CRG_CRAM_INIT 0xffef
217
218/*
219 * Memory controller settings
220 */
221#define CONFIG_SYS_MEMC_MCFMODE0_INIT 0x00000001 /* 16bit */
222#define CONFIG_SYS_MEMC_MCFMODE2_INIT 0x00000001 /* 16bit */
223#define CONFIG_SYS_MEMC_MCFMODE4_INIT 0x00000021 /* 16bit, Page*/
224#define CONFIG_SYS_MEMC_MCFTIM0_INIT 0x16191008
225#define CONFIG_SYS_MEMC_MCFTIM2_INIT 0x03061008
226#define CONFIG_SYS_MEMC_MCFTIM4_INIT 0x03061804
227#define CONFIG_SYS_MEMC_MCFAREA0_INIT 0x000000c0 /* 0x0c000000 1MB */
228#define CONFIG_SYS_MEMC_MCFAREA2_INIT 0x00000020 /* 0x02000000 1MB */
229#define CONFIG_SYS_MEMC_MCFAREA4_INIT 0x001f0000 /* 0x10000000 32 MB */
230
231/*
232 * DDR2 controller init settings
233 */
234#define CONFIG_SYS_DDR2_DRIMS_INIT 0x5555
235#define CONFIG_SYS_CCNT_CDCRC_INIT_1 0x00000002
236#define CONFIG_SYS_CCNT_CDCRC_INIT_2 0x00000003
237#define CONFIG_SYS_DDR2_DRIC1_INIT 0x003f
238#define CONFIG_SYS_DDR2_DRIC2_INIT 0x0000
239#define CONFIG_SYS_DDR2_DRCA_INIT 0xc124 /* 512Mbit DDR2SDRAM x 2 */
240#define CONFIG_SYS_DDR2_DRCM_INIT 0x0032
241#define CONFIG_SYS_DDR2_DRCST1_INIT 0x3418
242#define CONFIG_SYS_DDR2_DRCST2_INIT 0x6e32
243#define CONFIG_SYS_DDR2_DRCR_INIT 0x0141
244#define CONFIG_SYS_DDR2_DRCF_INIT 0x0002
245#define CONFIG_SYS_DDR2_DRASR_INIT 0x0001
246#define CONFIG_SYS_DDR2_DROBS_INIT 0x0001
247#define CONFIG_SYS_DDR2_DROABA_INIT 0x0103
248#define CONFIG_SYS_DDR2_DRIBSODT1_INIT 0x003F
249#define CONFIG_SYS_DDR2_DROS_INIT 0x0001
250
251/*
252 * DRAM init sequence
253 */
254
255/* PALL Command */
256#define CONFIG_SYS_DDR2_INIT_DRIC1_1 0x0017
257#define CONFIG_SYS_DDR2_INIT_DRIC2_1 0x0400
258
259/* EMR(2) command */
260#define CONFIG_SYS_DDR2_INIT_DRIC1_2 0x0006
261#define CONFIG_SYS_DDR2_INIT_DRIC2_2 0x0000
262
263/* EMR(3) command */
264#define CONFIG_SYS_DDR2_INIT_DRIC1_3 0x0007
265#define CONFIG_SYS_DDR2_INIT_DRIC2_3 0x0000
266
267/* EMR(1) command */
268#define CONFIG_SYS_DDR2_INIT_DRIC1_4 0x0005
269#define CONFIG_SYS_DDR2_INIT_DRIC2_4 0x0000
270
271/* MRS command */
272#define CONFIG_SYS_DDR2_INIT_DRIC1_5 0x0004
273#define CONFIG_SYS_DDR2_INIT_DRIC2_5 0x0532
274
275/* PALL command */
276#define CONFIG_SYS_DDR2_INIT_DRIC1_6 0x0017
277#define CONFIG_SYS_DDR2_INIT_DRIC2_6 0x0400
278
279/* REF command 1 */
280#define CONFIG_SYS_DDR2_INIT_DRIC1_7 0x000f
281#define CONFIG_SYS_DDR2_INIT_DRIC2_7 0x0000
282
283/* MRS command */
284#define CONFIG_SYS_DDR2_INIT_DRIC1_8 0x0004
285#define CONFIG_SYS_DDR2_INIT_DRIC2_8 0x0432
286
287/* EMR(1) command */
288#define CONFIG_SYS_DDR2_INIT_DRIC1_9 0x0005
289#define CONFIG_SYS_DDR2_INIT_DRIC2_9 0x0380
290
291/* EMR(1) command */
292#define CONFIG_SYS_DDR2_INIT_DRIC1_10 0x0005
293#define CONFIG_SYS_DDR2_INIT_DRIC2_10 0x0002
294
295#ifdef CONFIG_USE_IRQ
296#error CONFIG_USE_IRQ not supported
297#endif
298
299#endif /* __CONFIG_H */