xref: /rk3399_rockchip-uboot/include/configs/integrator-common.h (revision 5e7ffaa4a31df369adeb9387b22a1981e93ea6b1)
1e62b008fSLinus Walleij /*
2e62b008fSLinus Walleij  * (C) Copyright 2012
3e62b008fSLinus Walleij  * Linaro
4e62b008fSLinus Walleij  * Linus Walleij <linus.walleij@linaro.org>
5e62b008fSLinus Walleij  * Common ARM Integrator configuration settings
6e62b008fSLinus Walleij  *
7e62b008fSLinus Walleij  * See file CREDITS for list of people who contributed to this
8e62b008fSLinus Walleij  * project.
9e62b008fSLinus Walleij  *
10e62b008fSLinus Walleij  * This program is free software; you can redistribute it and/or
11e62b008fSLinus Walleij  * modify it under the terms of the GNU General Public License as
12e62b008fSLinus Walleij  * published by the Free Software Foundation; either version 2 of
13e62b008fSLinus Walleij  * the License, or (at your option) any later version.
14e62b008fSLinus Walleij  *
15e62b008fSLinus Walleij  * This program is distributed in the hope that it will be useful,
16e62b008fSLinus Walleij  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17e62b008fSLinus Walleij  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
18e62b008fSLinus Walleij  * GNU General Public License for more details.
19e62b008fSLinus Walleij  *
20e62b008fSLinus Walleij  * You should have received a copy of the GNU General Public License
21e62b008fSLinus Walleij  * along with this program; if not, write to the Free Software
22e62b008fSLinus Walleij  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23e62b008fSLinus Walleij  * MA 02111-1307 USA
24e62b008fSLinus Walleij  */
25e62b008fSLinus Walleij 
26e62b008fSLinus Walleij #define CONFIG_INTEGRATOR
27e62b008fSLinus Walleij 
28e62b008fSLinus Walleij #define CONFIG_SYS_TEXT_BASE		0x01000000
29e62b008fSLinus Walleij #define CONFIG_SYS_MEMTEST_START	0x100000
30e62b008fSLinus Walleij #define CONFIG_SYS_MEMTEST_END		0x10000000
31e62b008fSLinus Walleij #define CONFIG_SYS_HZ			1000
32e62b008fSLinus Walleij #define CONFIG_SYS_TIMERBASE		0x13000100	/* Timer1 */
33e62b008fSLinus Walleij #define CONFIG_SYS_LOAD_ADDR		0x7fc0	/* default load address */
34e62b008fSLinus Walleij #define CONFIG_SYS_LONGHELP
35e62b008fSLinus Walleij #define CONFIG_SYS_HUSH_PARSER
36e62b008fSLinus Walleij #define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size*/
37e62b008fSLinus Walleij #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
38e62b008fSLinus Walleij #define CONFIG_SYS_MAXARGS		16	/* max number of command args */
39e62b008fSLinus Walleij #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/
40e62b008fSLinus Walleij #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */
41e62b008fSLinus Walleij 
42e62b008fSLinus Walleij #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
43e62b008fSLinus Walleij #define CONFIG_SETUP_MEMORY_TAGS
44*5e7ffaa4SLinus Walleij #define CONFIG_OF_LIBFDT		/* enable passing a Device Tree */
45e62b008fSLinus Walleij #define CONFIG_MISC_INIT_R		/* call misc_init_r during start up */
46e62b008fSLinus Walleij 
47e62b008fSLinus Walleij /*
48e62b008fSLinus Walleij  * There are various dependencies on the core module (CM) fitted
49e62b008fSLinus Walleij  * Users should refer to their CM user guide
50e62b008fSLinus Walleij  */
51e62b008fSLinus Walleij #include "armcoremodule.h"
52e62b008fSLinus Walleij 
53e62b008fSLinus Walleij /*
54e62b008fSLinus Walleij  * Initialize and remap the core module, use SPD to detect memory size
55e62b008fSLinus Walleij  * If CONFIG_SKIP_LOWLEVEL_INIT is not defined &
56e62b008fSLinus Walleij  * the core module has a CM_INIT register
57e62b008fSLinus Walleij  * then the U-Boot initialisation code will
58e62b008fSLinus Walleij  * e.g. ARM Boot Monitor or pre-loader is repeated once
59e62b008fSLinus Walleij  * (to re-initialise any existing CM_INIT settings to safe values).
60e62b008fSLinus Walleij  *
61e62b008fSLinus Walleij  * This is usually not the desired behaviour since the platform
62e62b008fSLinus Walleij  * will either reboot into the ARM monitor (or pre-loader)
63e62b008fSLinus Walleij  * or continuously cycle thru it without U-Boot running,
64e62b008fSLinus Walleij  * depending upon the setting of Integrator/CP switch S2-4.
65e62b008fSLinus Walleij  *
66e62b008fSLinus Walleij  * However it may be needed if Integrator/CP switch S2-1
67e62b008fSLinus Walleij  * is set OFF to boot direct into U-Boot.
68e62b008fSLinus Walleij  * In that case comment out the line below.
69e62b008fSLinus Walleij  */
70e62b008fSLinus Walleij #define CONFIG_CM_INIT
71e62b008fSLinus Walleij #define CONFIG_CM_REMAP
72e62b008fSLinus Walleij #define CONFIG_CM_SPD_DETECT
73e62b008fSLinus Walleij 
74e62b008fSLinus Walleij /*
75e62b008fSLinus Walleij  * The ARM boot monitor initializes the board.
76e62b008fSLinus Walleij  * However, the default U-Boot code also performs the initialization.
77e62b008fSLinus Walleij  * If desired, this can be prevented by defining SKIP_LOWLEVEL_INIT
78e62b008fSLinus Walleij  * - see documentation supplied with board for details of how to choose the
79e62b008fSLinus Walleij  * image to run at reset/power up
80e62b008fSLinus Walleij  * e.g. whether the ARM Boot Monitor runs before U-Boot
81e62b008fSLinus Walleij  */
82e62b008fSLinus Walleij /* #define CONFIG_SKIP_LOWLEVEL_INIT */
83e62b008fSLinus Walleij 
84e62b008fSLinus Walleij /*
85e62b008fSLinus Walleij  * The ARM boot monitor does not relocate U-Boot.
86e62b008fSLinus Walleij  * However, the default U-Boot code performs the relocation check,
87e62b008fSLinus Walleij  * and may relocate the code if the memory map is changed.
88e62b008fSLinus Walleij  * If necessary this can be prevented by defining SKIP_RELOCATE_UBOOT
89e62b008fSLinus Walleij  */
90e62b008fSLinus Walleij /* #define SKIP_CONFIG_RELOCATE_UBOOT */
91e62b008fSLinus Walleij 
92e62b008fSLinus Walleij 
93e62b008fSLinus Walleij /*
94e62b008fSLinus Walleij  * Physical Memory Map
95e62b008fSLinus Walleij  */
96e62b008fSLinus Walleij #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */
97e62b008fSLinus Walleij #define PHYS_SDRAM_1		0x00000000	/* SDRAM Bank #1 */
98e62b008fSLinus Walleij #define PHYS_SDRAM_1_SIZE	0x08000000	/* 128 MB */
99e62b008fSLinus Walleij #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1
100e62b008fSLinus Walleij #define CONFIG_SYS_INIT_RAM_SIZE PHYS_SDRAM_1_SIZE
101e62b008fSLinus Walleij #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \
102e62b008fSLinus Walleij 				    CONFIG_SYS_INIT_RAM_SIZE - \
103e62b008fSLinus Walleij 				    GENERATED_GBL_DATA_SIZE)
104e62b008fSLinus Walleij #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
105