xref: /rk3399_rockchip-uboot/include/configs/meesc.h (revision 0cb77bfa7a828f7d62eb92e03861d4fcb4d8226d)
133b1d3f4SDaniel Gorsulowski /*
233b1d3f4SDaniel Gorsulowski  * (C) Copyright 2007-2008
333b1d3f4SDaniel Gorsulowski  * Stelian Pop <stelian.pop@leadtechdesign.com>
433b1d3f4SDaniel Gorsulowski  * Lead Tech Design <www.leadtechdesign.com>
533b1d3f4SDaniel Gorsulowski  *
6*0cb77bfaSMatthias Fuchs  * (C) Copyright 2009-2011
733b1d3f4SDaniel Gorsulowski  * Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
833b1d3f4SDaniel Gorsulowski  * esd electronic system design gmbh <www.esd.eu>
933b1d3f4SDaniel Gorsulowski  *
1033b1d3f4SDaniel Gorsulowski  * Configuation settings for the esd MEESC board.
1133b1d3f4SDaniel Gorsulowski  *
1233b1d3f4SDaniel Gorsulowski  * See file CREDITS for list of people who contributed to this
1333b1d3f4SDaniel Gorsulowski  * project.
1433b1d3f4SDaniel Gorsulowski  *
1533b1d3f4SDaniel Gorsulowski  * This program is free software; you can redistribute it and/or
1633b1d3f4SDaniel Gorsulowski  * modify it under the terms of the GNU General Public License as
1733b1d3f4SDaniel Gorsulowski  * published by the Free Software Foundation; either version 2 of
1833b1d3f4SDaniel Gorsulowski  * the License, or (at your option) any later version.
1933b1d3f4SDaniel Gorsulowski  *
2033b1d3f4SDaniel Gorsulowski  * This program is distributed in the hope that it will be useful,
2133b1d3f4SDaniel Gorsulowski  * but WITHOUT ANY WARRANTY; without even the implied warranty of
2233b1d3f4SDaniel Gorsulowski  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2333b1d3f4SDaniel Gorsulowski  * GNU General Public License for more details.
2433b1d3f4SDaniel Gorsulowski  *
2533b1d3f4SDaniel Gorsulowski  * You should have received a copy of the GNU General Public License
2633b1d3f4SDaniel Gorsulowski  * along with this program; if not, write to the Free Software
2733b1d3f4SDaniel Gorsulowski  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2833b1d3f4SDaniel Gorsulowski  * MA 02111-1307 USA
2933b1d3f4SDaniel Gorsulowski  */
3033b1d3f4SDaniel Gorsulowski 
3133b1d3f4SDaniel Gorsulowski #ifndef __CONFIG_H
3233b1d3f4SDaniel Gorsulowski #define __CONFIG_H
3333b1d3f4SDaniel Gorsulowski 
34*0cb77bfaSMatthias Fuchs /*
35*0cb77bfaSMatthias Fuchs  * SoC must be defined first, before hardware.h is included.
36*0cb77bfaSMatthias Fuchs  * In this case SoC is defined in boards.cfg.
37*0cb77bfaSMatthias Fuchs  */
38*0cb77bfaSMatthias Fuchs #include <asm/hardware.h>
39*0cb77bfaSMatthias Fuchs 
40*0cb77bfaSMatthias Fuchs /*
41*0cb77bfaSMatthias Fuchs  * Warning: changing CONFIG_SYS_TEXT_BASE requires
42*0cb77bfaSMatthias Fuchs  * adapting the initial boot program.
43*0cb77bfaSMatthias Fuchs  * Since the linker has to swallow that define, we must use a pure
44*0cb77bfaSMatthias Fuchs  * hex number here!
45*0cb77bfaSMatthias Fuchs  */
46*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_TEXT_BASE		0x20002000
47*0cb77bfaSMatthias Fuchs 
48*0cb77bfaSMatthias Fuchs /* ARM asynchronous clock */
49*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_AT91_SLOW_CLOCK	32768	/* 32.768 kHz crystal */
509f07dedeSDaniel Gorsulowski #define CONFIG_SYS_AT91_MAIN_CLOCK	16000000/* 16.0 MHz crystal */
51d4562e09SDaniel Gorsulowski #define CONFIG_SYS_HZ			1000	/* decrementer freq */
52*0cb77bfaSMatthias Fuchs 
53*0cb77bfaSMatthias Fuchs /* Misc CPU related */
54*0cb77bfaSMatthias Fuchs #define CONFIG_SKIP_LOWLEVEL_INIT
55*0cb77bfaSMatthias Fuchs #define CONFIG_ARCH_CPU_INIT
56*0cb77bfaSMatthias Fuchs #define CONFIG_BOARD_EARLY_INIT_F		/* call board_early_init_f() */
57*0cb77bfaSMatthias Fuchs #define CONFIG_SETUP_MEMORY_TAGS
58*0cb77bfaSMatthias Fuchs #define CONFIG_INITRD_TAG
59*0cb77bfaSMatthias Fuchs #define CONFIG_SERIAL_TAG
60*0cb77bfaSMatthias Fuchs #define CONFIG_REVISION_TAG
61*0cb77bfaSMatthias Fuchs #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */
62*0cb77bfaSMatthias Fuchs #define CONFIG_MISC_INIT_R			/* Call misc_init_r */
6333b1d3f4SDaniel Gorsulowski #undef CONFIG_USE_IRQ				/* don't need IRQ/FIQ stuff */
6433b1d3f4SDaniel Gorsulowski 
65*0cb77bfaSMatthias Fuchs #define CONFIG_DISPLAY_BOARDINFO		/* call checkboard() */
66*0cb77bfaSMatthias Fuchs #define CONFIG_DISPLAY_CPUINFO			/* display cpu info and speed */
67*0cb77bfaSMatthias Fuchs #define CONFIG_PREBOOT				/* enable preboot variable */
6833b1d3f4SDaniel Gorsulowski 
6933b1d3f4SDaniel Gorsulowski /*
7033b1d3f4SDaniel Gorsulowski  * Hardware drivers
7133b1d3f4SDaniel Gorsulowski  */
7233b1d3f4SDaniel Gorsulowski 
73*0cb77bfaSMatthias Fuchs /* required until arch/arm/include/asm/arch-at91/at91sam9263.h is reworked */
74*0cb77bfaSMatthias Fuchs #define ATMEL_PMC_UHP			AT91SAM926x_PMC_UHP
75*0cb77bfaSMatthias Fuchs 
76*0cb77bfaSMatthias Fuchs /* general purpose I/O */
77*0cb77bfaSMatthias Fuchs #define CONFIG_AT91_GPIO
78*0cb77bfaSMatthias Fuchs 
7933b1d3f4SDaniel Gorsulowski /* Console output */
80*0cb77bfaSMatthias Fuchs #define CONFIG_ATMEL_USART
81*0cb77bfaSMatthias Fuchs #define CONFIG_USART_BASE		ATMEL_BASE_DBGU
82*0cb77bfaSMatthias Fuchs #define CONFIG_USART_ID			ATMEL_ID_SYS
83*0cb77bfaSMatthias Fuchs #define CONFIG_BAUDRATE			115200
84*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_BAUDRATE_TABLE	{115200, 19200, 38400, 57600, 9600}
8533b1d3f4SDaniel Gorsulowski 
8633b1d3f4SDaniel Gorsulowski #define CONFIG_BOOTDELAY		3
87*0cb77bfaSMatthias Fuchs #define CONFIG_ZERO_BOOTDELAY_CHECK
8833b1d3f4SDaniel Gorsulowski 
8933b1d3f4SDaniel Gorsulowski /*
9033b1d3f4SDaniel Gorsulowski  * BOOTP options
9133b1d3f4SDaniel Gorsulowski  */
92*0cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_BOOTFILESIZE
93*0cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_BOOTPATH
94*0cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_GATEWAY
95*0cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_HOSTNAME
9633b1d3f4SDaniel Gorsulowski 
9733b1d3f4SDaniel Gorsulowski /*
9833b1d3f4SDaniel Gorsulowski  * Command line configuration.
9933b1d3f4SDaniel Gorsulowski  */
10033b1d3f4SDaniel Gorsulowski #include <config_cmd_default.h>
10133b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_BDI
10233b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_FPGA
10333b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_LOADS
10433b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_IMLS
10533b1d3f4SDaniel Gorsulowski 
106*0cb77bfaSMatthias Fuchs #define CONFIG_CMD_PING
107*0cb77bfaSMatthias Fuchs #define CONFIG_CMD_DHCP
108*0cb77bfaSMatthias Fuchs #define CONFIG_CMD_NAND
109*0cb77bfaSMatthias Fuchs #define CONFIG_CMD_USB
11033b1d3f4SDaniel Gorsulowski 
11133b1d3f4SDaniel Gorsulowski /* LED */
112*0cb77bfaSMatthias Fuchs #define CONFIG_AT91_LED
11333b1d3f4SDaniel Gorsulowski 
114*0cb77bfaSMatthias Fuchs /*
115*0cb77bfaSMatthias Fuchs  * SDRAM: 1 bank, min 32, max 128 MB
116*0cb77bfaSMatthias Fuchs  * Initialized before u-boot gets started.
117*0cb77bfaSMatthias Fuchs  */
11833b1d3f4SDaniel Gorsulowski #define CONFIG_NR_DRAM_BANKS		1
119*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_SDRAM_BASE		0x20000000 /* ATMEL_BASE_CS1 */
120*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_SDRAM_SIZE		0x02000000
121*0cb77bfaSMatthias Fuchs 
122*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE + 0x00100000)
123*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x01E00000)
124*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x00100000)
125*0cb77bfaSMatthias Fuchs 
126*0cb77bfaSMatthias Fuchs /*
127*0cb77bfaSMatthias Fuchs  * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM,
128*0cb77bfaSMatthias Fuchs  * leaving the correct space for initial global data structure above
129*0cb77bfaSMatthias Fuchs  * that address while providing maximum stack area below.
130*0cb77bfaSMatthias Fuchs  */
131*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_INIT_SP_ADDR \
132*0cb77bfaSMatthias Fuchs 	(ATMEL_BASE_SRAM0 + 0x1000 - GENERATED_GBL_DATA_SIZE)
13333b1d3f4SDaniel Gorsulowski 
13433b1d3f4SDaniel Gorsulowski /* DataFlash */
135*0cb77bfaSMatthias Fuchs #ifdef CONFIG_SYS_USE_DATAFLASH
13633b1d3f4SDaniel Gorsulowski # define CONFIG_ATMEL_DATAFLASH_SPI
137*0cb77bfaSMatthias Fuchs # define CONFIG_HAS_DATAFLASH
13833b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_SPI_WRITE_TOUT		(5 * CONFIG_SYS_HZ)
13933b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MAX_DATAFLASH_BANKS		1
14033b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0	0xC0000000	/* CS0 */
14133b1d3f4SDaniel Gorsulowski # define AT91_SPI_CLK				15000000
14233b1d3f4SDaniel Gorsulowski # define DATAFLASH_TCSS				(0x1a << 16)
14333b1d3f4SDaniel Gorsulowski # define DATAFLASH_TCHS				(0x1 << 24)
144*0cb77bfaSMatthias Fuchs #endif
14533b1d3f4SDaniel Gorsulowski 
14633b1d3f4SDaniel Gorsulowski /* NOR flash is not populated, disable it */
147*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_NO_FLASH
14833b1d3f4SDaniel Gorsulowski 
14933b1d3f4SDaniel Gorsulowski /* NAND flash */
15033b1d3f4SDaniel Gorsulowski #ifdef CONFIG_CMD_NAND
15133b1d3f4SDaniel Gorsulowski # define CONFIG_NAND_ATMEL
15233b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MAX_NAND_DEVICE		1
153*0cb77bfaSMatthias Fuchs # define CONFIG_SYS_NAND_BASE			0x40000000 /* ATMEL_BASE_CS3 */
154*0cb77bfaSMatthias Fuchs # define CONFIG_SYS_NAND_DBW_8
15533b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_ALE		(1 << 21)
15633b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_CLE		(1 << 22)
157d4562e09SDaniel Gorsulowski # define CONFIG_SYS_NAND_ENABLE_PIN		AT91_PIO_PORTD, 15
158d4562e09SDaniel Gorsulowski # define CONFIG_SYS_NAND_READY_PIN		AT91_PIO_PORTA, 22
159d4562e09SDaniel Gorsulowski # define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */
16033b1d3f4SDaniel Gorsulowski #endif
16133b1d3f4SDaniel Gorsulowski 
16233b1d3f4SDaniel Gorsulowski /* Ethernet */
163*0cb77bfaSMatthias Fuchs #define CONFIG_MACB
164*0cb77bfaSMatthias Fuchs #define CONFIG_RMII
165*0cb77bfaSMatthias Fuchs #define CONFIG_NET_MULTI
166*0cb77bfaSMatthias Fuchs #define CONFIG_FIT
16733b1d3f4SDaniel Gorsulowski #define CONFIG_NET_RETRY_COUNT			20
16833b1d3f4SDaniel Gorsulowski #undef CONFIG_RESET_PHY_R
16933b1d3f4SDaniel Gorsulowski 
17064037fb4SDaniel Gorsulowski /* USB */
17164037fb4SDaniel Gorsulowski #define CONFIG_USB_ATMEL
172*0cb77bfaSMatthias Fuchs #define CONFIG_USB_OHCI_NEW
173*0cb77bfaSMatthias Fuchs #define CONFIG_DOS_PARTITION
174*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_USB_OHCI_CPU_INIT
17564037fb4SDaniel Gorsulowski #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00a00000
17664037fb4SDaniel Gorsulowski #define CONFIG_SYS_USB_OHCI_SLOT_NAME		"at91sam9263"
17764037fb4SDaniel Gorsulowski #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2
17833b1d3f4SDaniel Gorsulowski 
17933b1d3f4SDaniel Gorsulowski /* CAN */
180*0cb77bfaSMatthias Fuchs #define CONFIG_AT91_CAN
18133b1d3f4SDaniel Gorsulowski 
182a380279bSDaniel Gorsulowski /* hw-controller addresses */
183a380279bSDaniel Gorsulowski #define CONFIG_ET1100_BASE		0x70000000
184a380279bSDaniel Gorsulowski 
185*0cb77bfaSMatthias Fuchs #ifdef CONFIG_SYS_USE_DATAFLASH
186*0cb77bfaSMatthias Fuchs 
187a380279bSDaniel Gorsulowski /* bootstrap + u-boot + env in dataflash on CS0 */
188*0cb77bfaSMatthias Fuchs # define CONFIG_ENV_IS_IN_DATAFLASH
18933b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + \
19033b1d3f4SDaniel Gorsulowski 					0x8400)
19133b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_OFFSET		0x4200
19233b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + \
19333b1d3f4SDaniel Gorsulowski 					CONFIG_ENV_OFFSET)
19433b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_SIZE		0x4200
19533b1d3f4SDaniel Gorsulowski 
196*0cb77bfaSMatthias Fuchs #elif CONFIG_SYS_USE_NANDFLASH
197*0cb77bfaSMatthias Fuchs 
198*0cb77bfaSMatthias Fuchs /* bootstrap + u-boot + env + linux in nandflash */
199*0cb77bfaSMatthias Fuchs # define CONFIG_ENV_IS_IN_NAND		1
200*0cb77bfaSMatthias Fuchs # define CONFIG_ENV_OFFSET		0xC0000
201*0cb77bfaSMatthias Fuchs # define CONFIG_ENV_SIZE		0x20000
202*0cb77bfaSMatthias Fuchs 
203*0cb77bfaSMatthias Fuchs #endif
20433b1d3f4SDaniel Gorsulowski 
20533b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_PROMPT		"=> "
206*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_CBSIZE		512
20733b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_MAXARGS		16
20833b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
20933b1d3f4SDaniel Gorsulowski 					sizeof(CONFIG_SYS_PROMPT) + 16)
210*0cb77bfaSMatthias Fuchs #define CONFIG_SYS_LONGHELP
211*0cb77bfaSMatthias Fuchs #define CONFIG_CMDLINE_EDITING
21233b1d3f4SDaniel Gorsulowski 
21333b1d3f4SDaniel Gorsulowski /*
21433b1d3f4SDaniel Gorsulowski  * Size of malloc() pool
21533b1d3f4SDaniel Gorsulowski  */
216a380279bSDaniel Gorsulowski #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + \
217a380279bSDaniel Gorsulowski 					128*1024, 0x1000)
21833b1d3f4SDaniel Gorsulowski 
21933b1d3f4SDaniel Gorsulowski #define CONFIG_STACKSIZE		(32 * 1024)	/* regular stack */
22033b1d3f4SDaniel Gorsulowski 
22133b1d3f4SDaniel Gorsulowski #ifdef CONFIG_USE_IRQ
22233b1d3f4SDaniel Gorsulowski # error CONFIG_USE_IRQ not supported
22333b1d3f4SDaniel Gorsulowski #endif
22433b1d3f4SDaniel Gorsulowski 
22533b1d3f4SDaniel Gorsulowski #endif
226