blob: ff69947f7880eaf7510af923c082da82405f620a [file] [log] [blame]
Per Forlinc7ce1632011-08-26 12:25:53 +02001/*
2 * Copyright (C) ST-Ericsson SA 2009
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23#ifndef __CONFIG_H
24#define __CONFIG_H
25
Mathieu J. Poirierfe77c822012-05-04 10:43:11 -060026#define CONFIG_SKIP_LOWLEVEL_INIT 1
Per Forlinc7ce1632011-08-26 12:25:53 +020027#define CONFIG_SNOWBALL 1
Mathieu J. Poirierfe77c822012-05-04 10:43:11 -060028#define CONFIG_SYS_ICACHE_OFF 1
29#define CONFIG_SYS_DCACHE_OFF 1
Per Forlinc7ce1632011-08-26 12:25:53 +020030//#define DEBUG 100
31
32/*
33 * High Level Configuration Options
34 * (easy to change)
35 */
36#define CONFIG_U8500
37#define CONFIG_L2_OFF
38
39#define CONFIG_SYS_MEMTEST_START 0x00000000
40#define CONFIG_SYS_MEMTEST_END 0x1FFFFFFF
41#define CONFIG_SYS_HZ 1000 /* must be 1000 */
42
43//#define CONFIG_BOARD_EARLY_INIT_F
44#define CONFIG_ARCH_CPU_INIT 1
45
46#define CONFIG_DISPLAY_CPUINFO 1
47#define CONFIG_BOARD_LATE_INIT 1
48
49
50/*-----------------------------------------------------------------------
51 * Size of environment and malloc() pool
52 */
53/*
54 * If you use U-Boot as crash kernel, make sure that it does not overwrite
55 * information saved by kexec during panic. Kexec expects the start
56 * address of the executable 32K above "crashkernel" address.
57 */
58/*
59 * Size of malloc() pool
60 */
61#ifdef CONFIG_BOOT_SRAM
62#define CONFIG_ENV_SIZE (32*1024)
63#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 64*1024)
64#else
65#define CONFIG_ENV_SIZE (128*1024)
66#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 256*1024)
67#endif
Mathieu J. Poiriereef0f122012-05-17 14:14:28 -060068
Per Forlinc7ce1632011-08-26 12:25:53 +020069#define CONFIG_SYS_GBL_DATA_SIZE 128 /* for initial data */
70
Mathieu J. Poiriereef0f122012-05-17 14:14:28 -060071#define CONFIG_ENV_IS_IN_MMC
Per Forlinc7ce1632011-08-26 12:25:53 +020072#define CONFIG_CMD_ENV
Mathieu J. Poiriereef0f122012-05-17 14:14:28 -060073#define CONFIG_CMD_SAVEENV
74#define CONFIG_ENV_OFFSET 0x0118000
Per Forlinc7ce1632011-08-26 12:25:53 +020075#define CONFIG_SYS_MMC_ENV_DEV 0 /* SLOT2: eMMC */
76
77/*
78 * PL011 Configuration
79 */
80#define CONFIG_PL011_SERIAL
81#define CONFIG_PL011_SERIAL_RLCR
82#define CONFIG_PL011_SERIAL_FLUSH_ON_INIT
83
84/*
85 * U8500 UART registers base for 3 serial devices
86 */
87#define CFG_UART0_BASE 0x80120000
88#define CFG_UART1_BASE 0x80121000
89#define CFG_UART2_BASE 0x80007000
90#define CFG_SERIAL0 CFG_UART0_BASE
91#define CFG_SERIAL1 CFG_UART1_BASE
92#define CFG_SERIAL2 CFG_UART2_BASE
93#define CONFIG_PL011_CLOCK 38400000
94#define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1, \
95 (void *)CFG_SERIAL2 }
96#define CONFIG_CONS_INDEX 2
97#define CONFIG_BAUDRATE 115200
98#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
99
100/*
101 * Devices and file systems
102 */
103#define CONFIG_MMC
104#define CONFIG_GENERIC_MMC
105#define CONFIG_DOS_PARTITION
106
107/*
108 * Commands
109 */
110#define CONFIG_CMD_MEMORY
111#define CONFIG_CMD_BOOTD
112#define CONFIG_CMD_BDI
113#define CONFIG_CMD_IMI
114#define CONFIG_CMD_MISC
115#define CONFIG_CMD_RUN
116#define CONFIG_CMD_ECHO
117#define CONFIG_CMD_CONSOLE
118#define CONFIG_CMD_LOADS
119#define CONFIG_CMD_LOADB
120#define CONFIG_CMD_MMC
121#define CONFIG_CMD_FAT
122#define CONFIG_CMD_EXT2
123//#define CONFIG_CMD_EMMC
124#define CONFIG_CMD_SOURCE
125//#define CONFIG_CMD_I2C
126
127#ifndef CONFIG_BOOTDELAY
128#define CONFIG_BOOTDELAY 1
129#endif
130#define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */
131
132#undef CONFIG_BOOTARGS
133#define CONFIG_BOOTCOMMAND \
Mathieu J. Poirierf3337ed2012-05-11 14:21:49 -0600134 "mmc dev 1; " \
135 "if run loadbootscript; " \
136 "then run bootscript; " \
137 "else " \
138 "if run mmcload; " \
139 "then run mmcboot; " \
140 "else " \
141 "mmc dev 0; " \
142 "if run emmcloadbootscript; " \
143 "then run bootscript; " \
144 "else " \
145 "if run emmcload; " \
146 "then run emmcboot; " \
147 "else " \
148 "echo No media to boot from; " \
149 "fi; " \
150 "fi; " \
151 "fi; " \
Per Forlinc7ce1632011-08-26 12:25:53 +0200152 "fi; "
153
154#define CONFIG_EXTRA_ENV_SETTINGS \
155 "verify=n\0" \
156 "loadaddr=0x00100000\0" \
157 "console=ttyAMA2,115200n8\0" \
Mathieu J. Poirierf3337ed2012-05-11 14:21:49 -0600158 "loadbootscript=fatload mmc 1:1 ${loadaddr} boot.scr\0" \
159 "emmcloadbootscript=fatload mmc 0:2 ${loadaddr} boot.scr\0" \
Per Forlinc7ce1632011-08-26 12:25:53 +0200160 "bootscript=echo Running bootscript " \
161 "from mmc ...; source ${loadaddr}\0" \
162 "memargs256=mem=96M@0 mem_modem=32M@96M mem=32M@128M " \
163 "hwmem=22M@160M pmem_hwb=42M@182M mem_mali=32@224M\0" \
164 "memargs512=mem=96M@0 mem_modem=32M@96M hwmem=32M@128M " \
165 "mem=64M@160M mem_mali=32M@224M " \
166 "pmem_hwb=128M@256M mem=128M@384M\0" \
167 "memargs1024=mem=128M@0 mali.mali_mem=32M@128M " \
168 "hwmem=168M@M160M mem=48M@328M " \
169 "mem_issw=1M@383M mem=640M@384M\0" \
170 "memargs=setenv bootargs ${bootargs} ${memargs1024}\0" \
Mathieu J. Poirierf3337ed2012-05-11 14:21:49 -0600171 "emmcload=fatload mmc 0:2 ${loadaddr} uImage\0" \
172 "mmcload=fatload mmc 1:1 ${loadaddr} uImage\0" \
Per Forlinc7ce1632011-08-26 12:25:53 +0200173 "commonargs=setenv bootargs console=${console} " \
Mathieu J. Poirierf3337ed2012-05-11 14:21:49 -0600174 "vmalloc=300M\0" \
Per Forlinc7ce1632011-08-26 12:25:53 +0200175 "emmcargs=setenv bootargs ${bootargs} " \
176 "root=/dev/mmcblk0p3 " \
177 "rootwait\0" \
178 "addcons=setenv bootargs ${bootargs} " \
179 "console=${console}\0" \
180 "emmcboot=echo Booting from eMMC ...; " \
181 "run commonargs emmcargs memargs; " \
182 "bootm ${loadaddr}\0" \
183 "mmcargs=setenv bootargs ${bootargs} " \
184 "root=/dev/mmcblk1p2 " \
185 "rootwait earlyprintk\0" \
186 "mmcboot=echo Booting from external MMC ...; " \
187 "run commonargs mmcargs memargs; " \
188 "bootm ${loadaddr}\0" \
Mathieu J. Poirierf9e40ea2012-05-17 14:18:09 -0600189 "fdt_high=0x2BC00000\0" \
Per Forlinc7ce1632011-08-26 12:25:53 +0200190 "stdout=serial,usbtty\0" \
191 "stdin=serial,usbtty\0" \
192 "stderr=serial,usbtty\0"
193
194/*-----------------------------------------------------------------------
195 * Miscellaneous configurable options
196 */
197
198#define CONFIG_SYS_LONGHELP /* undef to save memory */
199#define CONFIG_SYS_PROMPT "U8500 $ " /* Monitor Command Prompt */
200#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
201
202/* Print Buffer Size */
203#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
204 + sizeof(CONFIG_SYS_PROMPT) + 16)
205#define CONFIG_SYS_MAXARGS 32 /* max number of command args */
206#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */
207
208#undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */
209#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */
210#define CONFIG_SYS_LOADS_BAUD_CHANGE 1
211
212#define CONFIG_SYS_HUSH_PARSER 1
213#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
214#define CONFIG_CMDLINE_EDITING
215
216#define CONFIG_SETUP_MEMORY_TAGS 2
217#define CONFIG_INITRD_TAG 1
218#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
219
220/*
221 * Stack sizes
222 *
223 * The stack sizes are set up in start.S using the settings below
224 */
225
226#ifdef CONFIG_USE_IRQ
227#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
228#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
229#endif
230
231/*
232 * Physical Memory Map
233 */
234#define CONFIG_NR_DRAM_BANKS 1
235#define PHYS_SDRAM_1 0x00000000 /* DDR-SDRAM Bank #1 */
236#define PHYS_SDRAM_SIZE_1 0x10000000 /* 256 MB */
237
238/*
239 * additions for new relocation code
240 */
241#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
242#define CONFIG_SYS_INIT_RAM_SIZE 0x100000
243#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \
244 CONFIG_SYS_INIT_RAM_SIZE - \
245 GENERATED_GBL_DATA_SIZE)
246#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
247
248/* landing address before relocation */
249#ifndef CONFIG_SYS_TEXT_BASE
250#define CONFIG_SYS_TEXT_BASE 0x0
251#endif
252
253/*-----------------------------------------------------------------------
254 * MMC related configs
255 */
256#define CONFIG_ARM_PL180_MMCI
257#define MMC_BLOCK_SIZE 512
258#define CFG_EMMC_BASE 0x80114000
259#define CFG_MMC_BASE 0x80126000
260
261/*-----------------------------------------------------------------------
262 * USB related configs
263 */
264#define CONFIG_USB_BASE 0xA03E0000
265#define UDC_BASE 0xA03E0000
266#ifdef CONFIG_USB_TTY
267/* Allow console in serial and USB at the same time */
268#define CONFIG_CONSOLE_MUX 1
269//#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
270//#define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
271#endif
272
273
274/*
275 * FLASH and environment organization
276 */
277#define CONFIG_SYS_NO_FLASH
278
279/*
280 * base register values for U8500
281 */
282#define CFG_PRCMU_BASE 0x80157000 /* Power, reset and clock */
283
284
285/*
286 * U8500 GPIO register base for 9 banks
287 */
288#define CONFIG_DB8500_GPIO
289#define CFG_GPIO_0_BASE 0x8012E000
290#define CFG_GPIO_1_BASE 0x8012E080
291#define CFG_GPIO_2_BASE 0x8000E000
292#define CFG_GPIO_3_BASE 0x8000E080
293#define CFG_GPIO_4_BASE 0x8000E100
294#define CFG_GPIO_5_BASE 0x8000E180
295#define CFG_GPIO_6_BASE 0x8011E000
296#define CFG_GPIO_7_BASE 0x8011E080
297#define CFG_GPIO_8_BASE 0xA03FE000
298
299#define CFG_FSMC_BASE 0x80000000 /* FSMC Controller */
300
301#endif /* __CONFIG_H */