xref: /rk3399_rockchip-uboot/include/configs/integratorcp.h (revision 9b880bd4d86dc568221107516e6d4728c5f93a4e)
13d3befa7Swdenk /*
23d3befa7Swdenk  * (C) Copyright 2003
33d3befa7Swdenk  * Texas Instruments.
43d3befa7Swdenk  * Kshitij Gupta <kshitij@ti.com>
53d3befa7Swdenk  * Configuation settings for the TI OMAP Innovator board.
63d3befa7Swdenk  *
73d3befa7Swdenk  * (C) Copyright 2004
83d3befa7Swdenk  * ARM Ltd.
93d3befa7Swdenk  * Philippe Robin, <philippe.robin@arm.com>
103d3befa7Swdenk  * Configuration for Compact Integrator board.
113d3befa7Swdenk  *
123d3befa7Swdenk  * See file CREDITS for list of people who contributed to this
133d3befa7Swdenk  * project.
143d3befa7Swdenk  *
153d3befa7Swdenk  * This program is free software; you can redistribute it and/or
163d3befa7Swdenk  * modify it under the terms of the GNU General Public License as
173d3befa7Swdenk  * published by the Free Software Foundation; either version 2 of
183d3befa7Swdenk  * the License, or (at your option) any later version.
193d3befa7Swdenk  *
203d3befa7Swdenk  * This program is distributed in the hope that it will be useful,
213d3befa7Swdenk  * but WITHOUT ANY WARRANTY; without even the implied warranty of
223d3befa7Swdenk  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
233d3befa7Swdenk  * GNU General Public License for more details.
243d3befa7Swdenk  *
253d3befa7Swdenk  * You should have received a copy of the GNU General Public License
263d3befa7Swdenk  * along with this program; if not, write to the Free Software
273d3befa7Swdenk  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
283d3befa7Swdenk  * MA 02111-1307 USA
293d3befa7Swdenk  */
303d3befa7Swdenk 
313d3befa7Swdenk #ifndef __CONFIG_H
323d3befa7Swdenk #define __CONFIG_H
333d3befa7Swdenk 
343d3befa7Swdenk /*
353d3befa7Swdenk  * High Level Configuration Options
363d3befa7Swdenk  * (easy to change)
373d3befa7Swdenk  */
383d3befa7Swdenk #define CFG_MEMTEST_START	0x100000
393d3befa7Swdenk #define CFG_MEMTEST_END		0x10000000
4074f4304eSWolfgang Denk #define CFG_HZ			1000
4174f4304eSWolfgang Denk #define CFG_HZ_CLOCK		1000000	/* Timer 1 is clocked at 1Mhz */
423d3befa7Swdenk #define CFG_TIMERBASE		0x13000100
433d3befa7Swdenk 
443d3befa7Swdenk #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs  */
453d3befa7Swdenk #define CONFIG_SETUP_MEMORY_TAGS	1
463d3befa7Swdenk #define CONFIG_MISC_INIT_R		1	/* call misc_init_r during start up */
473d3befa7Swdenk /*
483d3befa7Swdenk  * Size of malloc() pool
493d3befa7Swdenk  */
503d3befa7Swdenk #define CFG_MALLOC_LEN		(CFG_ENV_SIZE + 128*1024)
5142dfe7a1Swdenk #define CFG_GBL_DATA_SIZE	128	/* size in bytes reserved for initial data */
523d3befa7Swdenk 
533d3befa7Swdenk /*
543d3befa7Swdenk  * Hardware drivers
553d3befa7Swdenk  */
563d3befa7Swdenk #define CONFIG_DRIVER_SMC91111
573d3befa7Swdenk #define CONFIG_SMC_USE_32_BIT
583d3befa7Swdenk #define CONFIG_SMC91111_BASE    0xC8000000
593d3befa7Swdenk #undef CONFIG_SMC91111_EXT_PHY
603d3befa7Swdenk 
613d3befa7Swdenk /*
623d3befa7Swdenk  * NS16550 Configuration
633d3befa7Swdenk  */
643d3befa7Swdenk #define CFG_PL011_SERIAL
656705d81eSwdenk #define CONFIG_PL011_CLOCK	14745600
666705d81eSwdenk #define CONFIG_PL01x_PORTS	{ (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
673d3befa7Swdenk #define CONFIG_CONS_INDEX	0
683d3befa7Swdenk #define CONFIG_BAUDRATE		38400
693d3befa7Swdenk #define CFG_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
703d3befa7Swdenk #define CFG_SERIAL0		0x16000000
713d3befa7Swdenk #define CFG_SERIAL1		0x17000000
723d3befa7Swdenk 
735a95f6fbSwdenk /*
745a95f6fbSwdenk #define CONFIG_COMMANDS		(CFG_CMD_DFL | CFG_CMD_PCI)
755a95f6fbSwdenk */
765a95f6fbSwdenk #define CONFIG_COMMANDS		(CFG_CMD_DHCP | CFG_CMD_IMI | CFG_CMD_NET | CFG_CMD_PING | \
775a95f6fbSwdenk 				 CFG_CMD_BDI | CFG_CMD_MEMORY | CFG_CMD_FLASH | CFG_CMD_ENV \
785a95f6fbSwdenk 				)
795a95f6fbSwdenk 
805a95f6fbSwdenk /* #define CONFIG_BOOTP_MASK	CONFIG_BOOTP_DEFAULT */
813d3befa7Swdenk 
823d3befa7Swdenk /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
833d3befa7Swdenk #include <cmd_confdefs.h>
843d3befa7Swdenk 
855a95f6fbSwdenk #if 0
863d3befa7Swdenk #define CONFIG_BOOTDELAY	2
87*9b880bd4SWolfgang Denk #define CONFIG_BOOTARGS	"root=/dev/nfs nfsroot=<IP address>:/<exported rootfs>  mem=128M ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0 video=clcdfb:0"
883d3befa7Swdenk #define CONFIG_BOOTCOMMAND "bootp ; bootm"
895a95f6fbSwdenk #endif
90*9b880bd4SWolfgang Denk /* The kernel command line & boot command below are for a platform flashed with afu.axf
913d3befa7Swdenk 
92*9b880bd4SWolfgang Denk Image 666 Block  0 End Block  0 address 0x24000000 exec 0x24000000- name u-boot
93*9b880bd4SWolfgang Denk Image 667 Block  1 End Block 13 address 0x24040000 exec 0x24040000- name u-linux
94*9b880bd4SWolfgang Denk Image 668 Block 14 End Block 33 address 0x24380000 exec 0x24380000- name rootfs
95*9b880bd4SWolfgang Denk SIB at Block62 End Block62 address 0x24f80000
96*9b880bd4SWolfgang Denk 
9774f4304eSWolfgang Denk */
9874f4304eSWolfgang Denk #define CONFIG_BOOTDELAY	2
99*9b880bd4SWolfgang Denk #define CONFIG_BOOTARGS	"root=/dev/mtdblock2 mem=128M ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0 video=clcdfb:0 console=ttyAMA0"
100*9b880bd4SWolfgang Denk #define CONFIG_BOOTCOMMAND "cp 0x24080000 0x7fc0 0x100000; bootm"
10174f4304eSWolfgang Denk 
1023d3befa7Swdenk /*
1033d3befa7Swdenk  * Miscellaneous configurable options
1043d3befa7Swdenk  */
1053d3befa7Swdenk #define CFG_LONGHELP				/* undef to save memory */
1063d3befa7Swdenk #define CFG_PROMPT	"Integrator-CP # "	/* Monitor Command Prompt */
1073d3befa7Swdenk #define CFG_CBSIZE	256			/* Console I/O Buffer Size*/
1083d3befa7Swdenk /* Print Buffer Size */
1093d3befa7Swdenk #define CFG_PBSIZE	(CFG_CBSIZE+sizeof(CFG_PROMPT)+16)
1103d3befa7Swdenk #define CFG_MAXARGS	16			/* max number of command args */
1113d3befa7Swdenk #define CFG_BARGSIZE	CFG_CBSIZE		/* Boot Argument Buffer Size*/
1123d3befa7Swdenk 
1133d3befa7Swdenk #undef	CFG_CLKS_IN_HZ		/* everything, incl board info, in Hz */
1143d3befa7Swdenk #define CFG_LOAD_ADDR	0x7fc0	/* default load address */
1153d3befa7Swdenk 
1163d3befa7Swdenk /*-----------------------------------------------------------------------
1173d3befa7Swdenk  * Stack sizes
1183d3befa7Swdenk  *
1193d3befa7Swdenk  * The stack sizes are set up in start.S using the settings below
1203d3befa7Swdenk  */
1213d3befa7Swdenk #define CONFIG_STACKSIZE	(128*1024)	/* regular stack */
1223d3befa7Swdenk #ifdef CONFIG_USE_IRQ
1233d3befa7Swdenk #define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */
1243d3befa7Swdenk #define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */
1253d3befa7Swdenk #endif
1263d3befa7Swdenk 
1273d3befa7Swdenk /*-----------------------------------------------------------------------
1283d3befa7Swdenk  * Physical Memory Map
1293d3befa7Swdenk  */
1303d3befa7Swdenk #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */
1313d3befa7Swdenk #define PHYS_SDRAM_1		0x00000000	/* SDRAM Bank #1 */
1325a95f6fbSwdenk #define PHYS_SDRAM_1_SIZE 	0x08000000	/* 128 MB */
1333d3befa7Swdenk 
1343d3befa7Swdenk /*-----------------------------------------------------------------------
1353d3befa7Swdenk  * FLASH and environment organization
136*9b880bd4SWolfgang Denk 
137*9b880bd4SWolfgang Denk  * Top varies according to amount fitted
138*9b880bd4SWolfgang Denk  * Reserve top 4 blocks of flash
139*9b880bd4SWolfgang Denk  * - ARM Boot Monitor
140*9b880bd4SWolfgang Denk  * - Unused
141*9b880bd4SWolfgang Denk  * - SIB block
142*9b880bd4SWolfgang Denk  * - U-Boot environment
143*9b880bd4SWolfgang Denk  *
144*9b880bd4SWolfgang Denk  * Base is always 0x24000000
145*9b880bd4SWolfgang Denk 
1463d3befa7Swdenk  */
1475a95f6fbSwdenk #define CFG_FLASH_BASE		0x24000000
1485a95f6fbSwdenk #define CFG_MAX_FLASH_SECT 	64
1493d3befa7Swdenk #define CFG_MAX_FLASH_BANKS	1		/* max number of memory banks */
1503d3befa7Swdenk #define PHYS_FLASH_SIZE 	0x01000000	/* 16MB */
15174f4304eSWolfgang Denk #define CFG_FLASH_ERASE_TOUT	(2*CFG_HZ)	/* Timeout for Flash Erase */
15274f4304eSWolfgang Denk #define CFG_FLASH_WRITE_TOUT	(2*CFG_HZ)	/* Timeout for Flash Write */
1535a95f6fbSwdenk 
154*9b880bd4SWolfgang Denk #define CFG_MONITOR_LEN		0x00100000
155*9b880bd4SWolfgang Denk #define CFG_ENV_IS_IN_FLASH	(1)
156*9b880bd4SWolfgang Denk 
157*9b880bd4SWolfgang Denk /*
158*9b880bd4SWolfgang Denk  * Move up the U-Boot & monitor area if more flash is fitted.
159*9b880bd4SWolfgang Denk  * If this U-Boot is to be run on Integrators with varying flash sizes,
160*9b880bd4SWolfgang Denk  * drivers/cfi_flash.c::flash_init() can read the Integrator CP_FLASHPROG
161*9b880bd4SWolfgang Denk  * register and dynamically assign CFG_ENV_ADDR & CFG_MONITOR_BASE
162*9b880bd4SWolfgang Denk  * - CFG_MONITOR_BASE is set to indicate that the environment is not
163*9b880bd4SWolfgang Denk  * embedded in the boot monitor(s) area
164*9b880bd4SWolfgang Denk  */
165*9b880bd4SWolfgang Denk #if ( PHYS_FLASH_SIZE == 0x04000000 )
166*9b880bd4SWolfgang Denk 
167*9b880bd4SWolfgang Denk #define CFG_ENV_ADDR		0x27F00000
168*9b880bd4SWolfgang Denk #define CFG_MONITOR_BASE	0x27F40000
169*9b880bd4SWolfgang Denk 
170*9b880bd4SWolfgang Denk #elif (PHYS_FLASH_SIZE == 0x02000000 )
171*9b880bd4SWolfgang Denk 
172*9b880bd4SWolfgang Denk #define CFG_ENV_ADDR		0x25F00000
173*9b880bd4SWolfgang Denk #define CFG_MONITOR_BASE	0x25F40000
174*9b880bd4SWolfgang Denk 
175*9b880bd4SWolfgang Denk #else
176*9b880bd4SWolfgang Denk 
1775a95f6fbSwdenk #define CFG_ENV_ADDR		0x24F00000
178*9b880bd4SWolfgang Denk #define CFG_MONITOR_BASE	0x27F40000
179*9b880bd4SWolfgang Denk 
180*9b880bd4SWolfgang Denk #endif
181*9b880bd4SWolfgang Denk 
1825a95f6fbSwdenk #define CFG_ENV_SECT_SIZE	0x40000		/* 256KB */
1835a95f6fbSwdenk #define CFG_ENV_SIZE		8192		/* 8KB */
184*9b880bd4SWolfgang Denk /*-----------------------------------------------------------------------
185*9b880bd4SWolfgang Denk  * CP control registers
186*9b880bd4SWolfgang Denk  */
187*9b880bd4SWolfgang Denk #define CPCR_BASE		0xCB000000	/* CP Registers*/
188*9b880bd4SWolfgang Denk #define OS_FLASHPROG		0x00000004	/* Flash register*/
189*9b880bd4SWolfgang Denk #define CPMASK_EXTRABANK	0x8
190*9b880bd4SWolfgang Denk #define CPMASK_FLASHSIZE	0x4
191*9b880bd4SWolfgang Denk #define CPMASK_FLWREN		0x2
192*9b880bd4SWolfgang Denk #define CPMASK_FLVPPEN		0x1
1933d3befa7Swdenk 
194*9b880bd4SWolfgang Denk /*
195*9b880bd4SWolfgang Denk  * The ARM boot monitor initializes the board.
196*9b880bd4SWolfgang Denk  * However, the default U-Boot code also performs the initialization.
197*9b880bd4SWolfgang Denk  * If desired, this can be prevented by defining SKIP_LOWLEVEL_INIT
198*9b880bd4SWolfgang Denk  * - see documentation supplied with board for details of how to choose the
199*9b880bd4SWolfgang Denk  * image to run at reset/power up
200*9b880bd4SWolfgang Denk  * e.g. whether the ARM Boot Monitor runs before U-Boot
201*9b880bd4SWolfgang Denk 
202*9b880bd4SWolfgang Denk #define CONFIG_SKIP_LOWLEVEL_INIT
203*9b880bd4SWolfgang Denk 
204*9b880bd4SWolfgang Denk  */
205*9b880bd4SWolfgang Denk 
206*9b880bd4SWolfgang Denk /*
207*9b880bd4SWolfgang Denk  * The ARM boot monitor does not relocate U-Boot.
208*9b880bd4SWolfgang Denk  * However, the default U-Boot code performs the relocation check,
209*9b880bd4SWolfgang Denk  * and may relocate the code if the memory map is changed.
210*9b880bd4SWolfgang Denk  * If necessary this can be prevented by defining SKIP_RELOCATE_UBOOT
211*9b880bd4SWolfgang Denk 
212*9b880bd4SWolfgang Denk #define SKIP_CONFIG_RELOCATE_UBOOT
213*9b880bd4SWolfgang Denk 
214*9b880bd4SWolfgang Denk  */
21574f4304eSWolfgang Denk /*-----------------------------------------------------------------------
21674f4304eSWolfgang Denk  * There are various dependencies on the core module (CM) fitted
21774f4304eSWolfgang Denk  * Users should refer to their CM user guide
21874f4304eSWolfgang Denk  * - when porting adjust u-boot/Makefile accordingly
21974f4304eSWolfgang Denk  * to define the necessary CONFIG_ s for the CM involved
220*9b880bd4SWolfgang Denk  * see e.g. cp_926ejs_config
22174f4304eSWolfgang Denk  */
22274f4304eSWolfgang Denk 
223*9b880bd4SWolfgang Denk #include "armcoremodule.h"
22474f4304eSWolfgang Denk 
225*9b880bd4SWolfgang Denk /*
226*9b880bd4SWolfgang Denk  * If CONFIG_SKIP_LOWLEVEL_INIT is not defined &
227*9b880bd4SWolfgang Denk  * the core module has a CM_INIT register
228*9b880bd4SWolfgang Denk  * then the U-Boot initialisation code will
229*9b880bd4SWolfgang Denk  * e.g. ARM Boot Monitor or pre-loader is repeated once
230*9b880bd4SWolfgang Denk  * (to re-initialise any existing CM_INIT settings to safe values).
231*9b880bd4SWolfgang Denk  *
232*9b880bd4SWolfgang Denk  * This is usually not the desired behaviour since the platform
233*9b880bd4SWolfgang Denk  * will either reboot into the ARM monitor (or pre-loader)
234*9b880bd4SWolfgang Denk  * or continuously cycle thru it without U-Boot running,
235*9b880bd4SWolfgang Denk  * depending upon the setting of Integrator/CP switch S2-4.
236*9b880bd4SWolfgang Denk  *
237*9b880bd4SWolfgang Denk  * However it may be needed if Integrator/CP switch S2-1
238*9b880bd4SWolfgang Denk  * is set OFF to boot direct into U-Boot.
239*9b880bd4SWolfgang Denk  * In that case comment out the line below.
24074f4304eSWolfgang Denk #undef	CONFIG_CM_INIT
241*9b880bd4SWolfgang Denk  */
24274f4304eSWolfgang Denk 
2433d3befa7Swdenk #endif /* __CONFIG_H */
244