]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/jadecpu.h
ARM: kirkwood: move SoC headers to mach-kirkwood/include/mach
[people/ms/u-boot.git] / include / configs / jadecpu.h
1 /*
2 * (C) Copyright 2010
3 * Matthias Weisser <weisserm@arcor.de>
4 *
5 * Configuation settings for the jadecpu board
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10 #ifndef __CONFIG_H
11 #define __CONFIG_H
12
13 #define CONFIG_MB86R0x
14 #define CONFIG_MB86R0x_IOCLK get_bus_freq(0)
15 #define CONFIG_SYS_TEXT_BASE 0x10000000
16
17
18 #define CONFIG_USE_ARCH_MEMCPY
19 #define CONFIG_USE_ARCH_MEMSET
20
21 #define MACH_TYPE_JADECPU 2636
22
23 #define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
24
25 /*
26 * Environment settings
27 */
28 #define CONFIG_EXTRA_ENV_SETTINGS \
29 "gs_fast_boot=setenv bootdelay 5\0" \
30 "gs_slow_boot=setenv bootdelay 10\0" \
31 "bootcmd=dcache off; mw.l 0x40000000 0 1024; usb start;" \
32 "fatls usb 0; fatload usb 0 0x40000000 jadecpu-init.bin;" \
33 "bootelf 0x40000000\0" \
34 ""
35
36 #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
37 #define CONFIG_SETUP_MEMORY_TAGS 1
38 #define CONFIG_INITRD_TAG 1
39 #define CONFIG_BOARD_LATE_INIT
40
41 /*
42 * Compressions
43 */
44 #define CONFIG_LZO
45
46 /*
47 * Hardware drivers
48 */
49
50 /*
51 * Serial
52 */
53 #define CONFIG_SYS_NS16550
54 #define CONFIG_SYS_NS16550_SERIAL
55 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
56 #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
57 #define CONFIG_SYS_NS16550_COM1 0xfffe1000 /* UART 0 */
58 #define CONFIG_SYS_NS16550_COM2 0xfff50000 /* UART 2 */
59 #define CONFIG_SYS_NS16550_COM3 0xfff51000 /* UART 3 */
60 #define CONFIG_SYS_NS16550_COM4 0xfff43000 /* UART 4 */
61
62 #define CONFIG_CONS_INDEX 4
63
64 /*
65 * Ethernet
66 */
67 #define CONFIG_SMC911X
68 #define CONFIG_SMC911X_BASE 0x02000000
69 #define CONFIG_SMC911X_16_BIT
70
71 /*
72 * Video
73 */
74 #define CONFIG_VIDEO
75 #define CONFIG_VIDEO_MB86R0xGDC
76 #define CONFIG_SYS_WHITE_ON_BLACK
77 #define CONFIG_CFB_CONSOLE
78 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
79 #define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
80 #define CONFIG_VIDEO_LOGO
81 #define CONFIG_SPLASH_SCREEN
82 #define CONFIG_SPLASH_SCREEN_ALIGN
83 #define CONFIG_VIDEO_BMP_LOGO
84 #define CONFIG_VIDEO_BMP_GZIP
85 #define CONFIG_VIDEO_BMP_RLE8
86 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (800*480 + 256*4 + 10*1024)
87 #define VIDEO_FB_16BPP_WORD_SWAP
88 #define VIDEO_KBD_INIT_FCT 0
89 #define VIDEO_TSTC_FCT serial_stub_tstc
90 #define VIDEO_GETC_FCT serial_stub_getc
91
92 /*
93 * BOOTP options
94 */
95 #define CONFIG_BOOTP_BOOTFILESIZE 1
96 #define CONFIG_BOOTP_BOOTPATH 1
97 #define CONFIG_BOOTP_GATEWAY 1
98 #define CONFIG_BOOTP_HOSTNAME 1
99
100 /*
101 * Command line configuration.
102 */
103 #include <config_cmd_default.h>
104 #undef CONFIG_CMD_BDI
105 #undef CONFIG_CMD_FPGA
106 #undef CONFIG_CMD_IMLS
107 #undef CONFIG_CMD_LOADS
108 #undef CONFIG_CMD_SOURCE
109 #undef CONFIG_CMD_NFS
110 #undef CONFIG_CMD_XIMG
111
112 #define CONFIG_CMD_BMP
113 #define CONFIG_CMD_DHCP
114 #define CONFIG_CMD_ELF
115 #define CONFIG_CMD_FAT
116 #define CONFIG_CMD_PING
117 #define CONFIG_CMD_USB
118 #define CONFIG_CMD_CACHE
119
120 #define CONFIG_SYS_HUSH_PARSER
121
122 /* USB */
123 #define CONFIG_USB_OHCI_NEW
124 #define CONFIG_SYS_USB_OHCI_REGS_BASE 0xFFF81000
125 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "mb86r0x"
126 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
127 #define CONFIG_USB_STORAGE
128 #define CONFIG_DOS_PARTITION
129
130 /* SDRAM */
131 #define CONFIG_NR_DRAM_BANKS 1
132 #define PHYS_SDRAM 0x40000000 /* Start address of DDRRAM */
133 #define PHYS_SDRAM_SIZE 0x08000000 /* 128 megs */
134
135 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
136 #define CONFIG_SYS_INIT_SP_ADDR 0x01008000
137
138 /*
139 * FLASH and environment organization
140 */
141 #define CONFIG_SYS_FLASH_BASE 0x10000000
142 #define CONFIG_SYS_MAX_FLASH_BANKS 1
143 #define CONFIG_SYS_MAX_FLASH_SECT 256
144 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
145
146 #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x00040000)
147 #define CONFIG_ENV_IS_IN_FLASH 1
148 #define CONFIG_ENV_SECT_SIZE (128 * 1024)
149 #define CONFIG_ENV_SIZE (128 * 1024)
150
151 /*
152 * CFI FLASH driver setup
153 */
154 #define CONFIG_SYS_FLASH_CFI 1
155 #define CONFIG_FLASH_CFI_DRIVER 1
156 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* ~10x faster */
157
158 #define CONFIG_SYS_LOAD_ADDR 0x40000000 /* load address */
159
160 #define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM + (512*1024))
161 #define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM + PHYS_SDRAM_SIZE)
162
163 #define CONFIG_BAUDRATE 115200
164
165 #define CONFIG_SYS_PROMPT "jade> "
166 #define CONFIG_SYS_CBSIZE 256
167 #define CONFIG_SYS_MAXARGS 16
168 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
169 sizeof(CONFIG_SYS_PROMPT) + 16)
170 #define CONFIG_SYS_LONGHELP 1
171 #define CONFIG_CMDLINE_EDITING 1
172
173 #define CONFIG_PREBOOT ""
174
175 #define CONFIG_BOOTDELAY 5
176 #define CONFIG_AUTOBOOT_KEYED
177 #define CONFIG_AUTOBOOT_PROMPT "boot in %d s\n", bootdelay
178 #define CONFIG_AUTOBOOT_DELAY_STR "delaygs"
179 #define CONFIG_AUTOBOOT_STOP_STR "stopgs"
180
181 /*
182 * Size of malloc() pool
183 */
184 #define CONFIG_SYS_MALLOC_LEN (10 << 20)
185 #define CONFIG_SYS_MEM_TOP_HIDE (4 << 20)
186
187 /*
188 * Clock reset generator init
189 */
190 #define CONFIG_SYS_CRG_CRHA_INIT 0xffff
191 #define CONFIG_SYS_CRG_CRPA_INIT 0xffff
192 #define CONFIG_SYS_CRG_CRPB_INIT 0xfffe
193 #define CONFIG_SYS_CRG_CRHB_INIT 0xffff
194 #define CONFIG_SYS_CRG_CRAM_INIT 0xffef
195
196 /*
197 * Memory controller settings
198 */
199 #define CONFIG_SYS_MEMC_MCFMODE0_INIT 0x00000001 /* 16bit */
200 #define CONFIG_SYS_MEMC_MCFMODE2_INIT 0x00000001 /* 16bit */
201 #define CONFIG_SYS_MEMC_MCFMODE4_INIT 0x00000021 /* 16bit, Page*/
202 #define CONFIG_SYS_MEMC_MCFTIM0_INIT 0x16191008
203 #define CONFIG_SYS_MEMC_MCFTIM2_INIT 0x03061008
204 #define CONFIG_SYS_MEMC_MCFTIM4_INIT 0x03061804
205 #define CONFIG_SYS_MEMC_MCFAREA0_INIT 0x000000c0 /* 0x0c000000 1MB */
206 #define CONFIG_SYS_MEMC_MCFAREA2_INIT 0x00000020 /* 0x02000000 1MB */
207 #define CONFIG_SYS_MEMC_MCFAREA4_INIT 0x001f0000 /* 0x10000000 32 MB */
208
209 /*
210 * DDR2 controller init settings
211 */
212 #define CONFIG_SYS_DDR2_DRIMS_INIT 0x5555
213 #define CONFIG_SYS_CCNT_CDCRC_INIT_1 0x00000002
214 #define CONFIG_SYS_CCNT_CDCRC_INIT_2 0x00000003
215 #define CONFIG_SYS_DDR2_DRIC1_INIT 0x003f
216 #define CONFIG_SYS_DDR2_DRIC2_INIT 0x0000
217 #define CONFIG_SYS_DDR2_DRCA_INIT 0xc124 /* 512Mbit DDR2SDRAM x 2 */
218 #define CONFIG_SYS_DDR2_DRCM_INIT 0x0032
219 #define CONFIG_SYS_DDR2_DRCST1_INIT 0x3418
220 #define CONFIG_SYS_DDR2_DRCST2_INIT 0x6e32
221 #define CONFIG_SYS_DDR2_DRCR_INIT 0x0141
222 #define CONFIG_SYS_DDR2_DRCF_INIT 0x0002
223 #define CONFIG_SYS_DDR2_DRASR_INIT 0x0001
224 #define CONFIG_SYS_DDR2_DROBS_INIT 0x0001
225 #define CONFIG_SYS_DDR2_DROABA_INIT 0x0103
226 #define CONFIG_SYS_DDR2_DRIBSODT1_INIT 0x003F
227 #define CONFIG_SYS_DDR2_DROS_INIT 0x0001
228
229 /*
230 * DRAM init sequence
231 */
232
233 /* PALL Command */
234 #define CONFIG_SYS_DDR2_INIT_DRIC1_1 0x0017
235 #define CONFIG_SYS_DDR2_INIT_DRIC2_1 0x0400
236
237 /* EMR(2) command */
238 #define CONFIG_SYS_DDR2_INIT_DRIC1_2 0x0006
239 #define CONFIG_SYS_DDR2_INIT_DRIC2_2 0x0000
240
241 /* EMR(3) command */
242 #define CONFIG_SYS_DDR2_INIT_DRIC1_3 0x0007
243 #define CONFIG_SYS_DDR2_INIT_DRIC2_3 0x0000
244
245 /* EMR(1) command */
246 #define CONFIG_SYS_DDR2_INIT_DRIC1_4 0x0005
247 #define CONFIG_SYS_DDR2_INIT_DRIC2_4 0x0000
248
249 /* MRS command */
250 #define CONFIG_SYS_DDR2_INIT_DRIC1_5 0x0004
251 #define CONFIG_SYS_DDR2_INIT_DRIC2_5 0x0532
252
253 /* PALL command */
254 #define CONFIG_SYS_DDR2_INIT_DRIC1_6 0x0017
255 #define CONFIG_SYS_DDR2_INIT_DRIC2_6 0x0400
256
257 /* REF command 1 */
258 #define CONFIG_SYS_DDR2_INIT_DRIC1_7 0x000f
259 #define CONFIG_SYS_DDR2_INIT_DRIC2_7 0x0000
260
261 /* MRS command */
262 #define CONFIG_SYS_DDR2_INIT_DRIC1_8 0x0004
263 #define CONFIG_SYS_DDR2_INIT_DRIC2_8 0x0432
264
265 /* EMR(1) command */
266 #define CONFIG_SYS_DDR2_INIT_DRIC1_9 0x0005
267 #define CONFIG_SYS_DDR2_INIT_DRIC2_9 0x0380
268
269 /* EMR(1) command */
270 #define CONFIG_SYS_DDR2_INIT_DRIC1_10 0x0005
271 #define CONFIG_SYS_DDR2_INIT_DRIC2_10 0x0002
272
273 #endif /* __CONFIG_H */