blob: 8e398d7205d6dce67abbdf2c8e9fc97791461d56 [file] [log] [blame]
Wolfgang Denk0e4018d2005-09-26 01:14:38 +02001/*
2 * 2004-2005 Gary Jennejohn <garyj@denx.de>
3 *
4 * Modified for the MP2USB by (C) Copyright 2005 Eric Benard
5 * ebenard@eukrea.com
6 *
7 * Configuration settings for the MP2USB board.
8 *
9 * See file CREDITS for list of people who contributed to this
10 * project.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * MA 02111-1307 USA
26 */
27
28#ifndef __CONFIG_H
29#define __CONFIG_H
30
Jens Scharsig425de622010-02-03 22:45:42 +010031#define CONFIG_AT91_LEGACY
32
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020033/* ARM asynchronous clock */
34#define AT91C_MAIN_CLOCK 179712000 /* from 18.432 MHz crystal (18432000 / 4 * 45) */
35#define AT91C_MASTER_CLOCK (AT91C_MAIN_CLOCK/3) /* peripheral clock */
36
37#define AT91_SLOW_CLOCK 32768 /* slow clock */
38
39#define CONFIG_ARM920T 1 /* This is an ARM920T Core */
40#define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */
41#define CONFIG_AT91RM9200DK 1 /* on an AT91RM9200DK Board */
42#define CONFIG_MP2USB 1 /* on an MP2USB Board */
43#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
44#define USE_920T_MMU 1
45
46#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
47#define CONFIG_SETUP_MEMORY_TAGS 1
48#define CONFIG_INITRD_TAG 1
49
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020050#define CONFIG_SYS_ATMEL_PLL_INIT_BUG 1
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020051#ifndef CONFIG_SKIP_LOWLEVEL_INIT
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020052#define CONFIG_SYS_USE_MAIN_OSCILLATOR 1
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020053/* flash */
Jean-Christophe PLAGNIOL-VILLARDd481c802009-01-03 17:22:25 +010054#define CONFIG_SYS_EBI_CFGR_VAL 0x00000000
55#define CONFIG_SYS_SMC_CSR0_VAL 0x00003084 /* 16bit, 2 TDF, 4 WS */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020056
57/* clocks */
Jean-Christophe PLAGNIOL-VILLARDd481c802009-01-03 17:22:25 +010058#define CONFIG_SYS_PLLAR_VAL 0x20263E04 /* 180 MHz for PCK */
59#define CONFIG_SYS_PLLBR_VAL 0x1048bE0E /* 48 MHz (divider by 2 for USB) */
60#define CONFIG_SYS_MCKR_VAL 0x00000202 /* PCK/3 = MCK Master Clock = 60MHz from PLLA */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020061
62/* sdram */
Jean-Christophe PLAGNIOL-VILLARDd481c802009-01-03 17:22:25 +010063#define CONFIG_SYS_PIOC_ASR_VAL 0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */
64#define CONFIG_SYS_PIOC_BSR_VAL 0x00000000
65#define CONFIG_SYS_PIOC_PDR_VAL 0xFFFF0000
66#define CONFIG_SYS_EBI_CSA_VAL 0x00000002 /* CS1=CONFIG_SYS_SDRAM */
67#define CONFIG_SYS_SDRC_CR_VAL 0x3211295A /* set up the CONFIG_SYS_SDRAM */
68#define CONFIG_SYS_SDRAM 0x20000000 /* address of the CONFIG_SYS_SDRAM */
69#define CONFIG_SYS_SDRAM1 0x20000020 /* address of the CONFIG_SYS_SDRAM */
70#define CONFIG_SYS_SDRAM_VAL 0x00000000 /* value written to CONFIG_SYS_SDRAM */
71#define CONFIG_SYS_SDRC_MR_VAL 0x00000002 /* Precharge All */
72#define CONFIG_SYS_SDRC_MR_VAL1 0x00000004 /* refresh */
73#define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */
74#define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */
75#define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020076#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
77
78/*
79 * Size of malloc() pool
80 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020081#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020082
83#define CONFIG_BAUDRATE 115200
84
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020085#define CONFIG_SYS_AT91C_BRGR_DIVISOR 33 /* hardcode so no __divsi3 : AT91C_MASTER_CLOCK /(baudrate * 16) */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020086
87/*
88 * Hardware drivers
89 */
90
91/* define one of these to choose the DBGU, USART0 or USART1 as console */
Jean-Christophe PLAGNIOL-VILLARDbeebd852009-03-27 23:26:43 +010092#define CONFIG_AT91RM9200_USART
Wolfgang Denk0e4018d2005-09-26 01:14:38 +020093#define CONFIG_DBGU
94#undef CONFIG_USART0
95#undef CONFIG_USART1
96
97#undef CONFIG_HWFLOW /* don't include RTS/CTS flow control support */
98
99#undef CONFIG_MODEM_SUPPORT /* disable modem initialization stuff */
100
Markus Klotzbuecher7b59b3c2006-11-27 11:44:58 +0100101#define CONFIG_USB_OHCI_NEW 1
Wolfgang Denkd8e7e0f2005-09-26 01:26:56 +0200102#define CONFIG_USB_KEYBOARD 1
103#define CONFIG_USB_STORAGE 1
104#define CONFIG_DOS_PARTITION 1
105#define CONFIG_AT91C_PQFP_UHPBUG 1
106
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200107#undef CONFIG_SYS_USB_OHCI_BOARD_INIT
108#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
109#define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE
110#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200"
111#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
Markus Klotzbuecher301f1aa2006-05-23 13:38:35 +0200112
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200113#undef CONFIG_HARD_I2C
114
115#ifdef CONFIG_HARD_I2C
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200116#define CONFIG_SYS_I2C_SPEED 0 /* not used */
117#define CONFIG_SYS_I2C_SLAVE 0 /* not used */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200118#define CONFIG_RTC_RS5C372A /* RICOH I2C RTC */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200119#define CONFIG_SYS_I2C_RTC_ADDR 0x32
120#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
121#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
122#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200123#endif
124/* still about 20 kB free with this defined */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200125#define CONFIG_SYS_LONGHELP
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200126
127#define CONFIG_BOOTDELAY 3
128
Jon Loeliger5dc11a52007-07-04 22:33:01 -0500129#if !defined(CONFIG_HARD_I2C)
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200130#define CONFIG_TIMESTAMP
131#endif
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200132
Jon Loeliger5dc11a52007-07-04 22:33:01 -0500133
134/*
Jon Loeliger7f5c0152007-07-10 09:38:02 -0500135 * BOOTP options
136 */
137#define CONFIG_BOOTP_BOOTFILESIZE
138#define CONFIG_BOOTP_BOOTPATH
139#define CONFIG_BOOTP_GATEWAY
140#define CONFIG_BOOTP_HOSTNAME
141
142
143/*
Jon Loeliger5dc11a52007-07-04 22:33:01 -0500144 * Command line configuration.
145 */
146#include <config_cmd_default.h>
147
148#define CONFIG_CMD_DHCP
149#define CONFIG_CMD_NFS
150#define CONFIG_CMD_SNTP
151
152#if defined(CONFIG_HARD_I2C)
153
154 #define CONFIG_CMD_DATE
155 #define CONFIG_CMD_EEPROM
156 #define CONFIG_CMD_I2C
157 #define CONFIG_CMD_MISC
158
159#else
160
Jon Loeliger5dc11a52007-07-04 22:33:01 -0500161 #define CONFIG_CMD_CACHE
Wolfgang Denk74de7ae2009-04-01 23:34:12 +0200162 #define CONFIG_CMD_USB
Jon Loeliger5dc11a52007-07-04 22:33:01 -0500163
Jon Loeliger5dc11a52007-07-04 22:33:01 -0500164 #undef CONFIG_CMD_BDI
165 #undef CONFIG_CMD_FPGA
166 #undef CONFIG_CMD_IMI
167 #undef CONFIG_CMD_LOADS
168 #undef CONFIG_CMD_MISC
Wolfgang Denk74de7ae2009-04-01 23:34:12 +0200169 #undef CONFIG_CMD_SOURCE
Jon Loeliger5dc11a52007-07-04 22:33:01 -0500170
171#endif
172
173
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200174#define CONFIG_SYS_LONGHELP
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200175
176#define CONFIG_NR_DRAM_BANKS 1
177#define PHYS_SDRAM 0x20000000
Markus Klotzbuecher301f1aa2006-05-23 13:38:35 +0200178#define PHYS_SDRAM_SIZE 0x08000000 /* 128 megs */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200179
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200180#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
181#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200182
Jens Scharsigc041e9d2010-01-23 12:03:45 +0100183#define CONFIG_NET_MULTI 1
184#ifdef CONFIG_NET_MULTI
185#define CONFIG_DRIVER_AT91EMAC 1
186#define CONFIG_SYS_RX_ETH_BUFFER 8
187#else
188#define CONFIG_DRIVER_ETHER 1
189#endif
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200190#define CONFIG_NET_RETRY_COUNT 20
191#undef CONFIG_AT91C_USE_RMII
192
193#define PHYS_FLASH_1 0x10000000
194#define PHYS_FLASH_SIZE 0x1000000 /* 16 megs main flash */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200195#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
196#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
197#define CONFIG_SYS_MAX_FLASH_BANKS 1
198#define CONFIG_SYS_MAX_FLASH_SECT 256
199#define CONFIG_SYS_FLASH_ERASE_TOUT (2 * CONFIG_SYS_HZ) /* Timeout for Flash Erase */
200#define CONFIG_SYS_FLASH_WRITE_TOUT (2 * CONFIG_SYS_HZ) /* Timeout for Flash Write */
201#define CONFIG_SYS_FLASH_LOCK_TOUT (10*CONFIG_SYS_HZ) /* Timeout for Flash Set Lock Bit */
202#define CONFIG_SYS_FLASH_UNLOCK_TOUT (10*CONFIG_SYS_HZ) /* Timeout for Flash Clear Lock Bits */
203#define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200204
Jean-Christophe PLAGNIOL-VILLARD5a1aceb2008-09-10 22:48:04 +0200205#define CONFIG_ENV_IS_IN_FLASH 1
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200206#define CONFIG_ENV_OFFSET 0x20000 /* after u-boot.bin */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200207#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE+CONFIG_ENV_OFFSET)
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200208#define CONFIG_ENV_SIZE 0x20000
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200209
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200210#define CONFIG_SYS_LOAD_ADDR 0x21000000 /* default load address */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200211
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200212#define CONFIG_SYS_BAUDRATE_TABLE { 115200, 57600, 38400, 19200, 9600 }
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200213
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200214#define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
215#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
216#define CONFIG_SYS_MAXARGS 32 /* max number of command args */
217#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200218
Jean-Christophe PLAGNIOL-VILLARD52cb4d42009-05-16 12:14:54 +0200219#define CONFIG_SYS_STDIO_DEREGISTER /* needs stdio_deregister */
Wolfgang Denkd8e7e0f2005-09-26 01:26:56 +0200220
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200221#define CONFIG_SYS_HZ 1000
222#define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK/2) /* AT91C_TC0_CMR is implicitly set to */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200223 /* AT91C_TC_TIMER_DIV1_CLOCK */
224
225#define CONFIG_STACKSIZE (32*1024) /* regular stack */
226
227#ifdef CONFIG_USE_IRQ
228#error CONFIG_USE_IRQ not supported
229#endif
230
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200231#define CONFIG_SYS_DEVICE_NULLDEV 1 /* enble null device */
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200232#undef CONFIG_SILENT_CONSOLE /* enable silent startup */
233
234#define CONFIG_AUTOBOOT_KEYED
Stefan Roesef2302d42008-08-06 14:05:38 +0200235#define CONFIG_AUTOBOOT_PROMPT \
236 "Press SPACE to abort autoboot in %d seconds\n", bootdelay
Wolfgang Denk0e4018d2005-09-26 01:14:38 +0200237#define CONFIG_AUTOBOOT_STOP_STR " "
238#define CONFIG_AUTOBOOT_DELAY_STR "d"
239
240#define CONFIG_VERSION_VARIABLE 1 /* include version env variable */
241
242#endif /* __CONFIG_H */