blob: 04f1f240808124f78181b062f8b4fe2dbbf0e1a3 [file] [log] [blame]
Wolfgang Denk756bfd72005-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
31/* ARM asynchronous clock */
32#define AT91C_MAIN_CLOCK 179712000 /* from 18.432 MHz crystal (18432000 / 4 * 45) */
33#define AT91C_MASTER_CLOCK (AT91C_MAIN_CLOCK/3) /* peripheral clock */
34
35#define AT91_SLOW_CLOCK 32768 /* slow clock */
36
37#define CONFIG_ARM920T 1 /* This is an ARM920T Core */
38#define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */
39#define CONFIG_AT91RM9200DK 1 /* on an AT91RM9200DK Board */
40#define CONFIG_MP2USB 1 /* on an MP2USB Board */
41#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
42#define USE_920T_MMU 1
43
44#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
45#define CONFIG_SETUP_MEMORY_TAGS 1
46#define CONFIG_INITRD_TAG 1
47
48#define CFG_ATMEL_PLL_INIT_BUG 1
49#ifndef CONFIG_SKIP_LOWLEVEL_INIT
50#define CFG_USE_MAIN_OSCILLATOR 1
51/* flash */
52#define MC_PUIA_VAL 0x00000000
53#define MC_PUP_VAL 0x00000000
54#define MC_PUER_VAL 0x00000000
55#define MC_ASR_VAL 0x00000000
56#define MC_AASR_VAL 0x00000000
57#define EBI_CFGR_VAL 0x00000000
58#define SMC2_CSR_VAL 0x00003084 /* 16bit, 2 TDF, 4 WS */
59
60/* clocks */
61#define PLLAR_VAL 0x20263E04 /* 180 MHz for PCK */
Wolfgang Denk8a6820a2005-09-26 01:26:56 +020062#define PLLBR_VAL 0x1048bE0E /* 48 MHz (divider by 2 for USB) */
Wolfgang Denk756bfd72005-09-26 01:14:38 +020063#define MCKR_VAL 0x00000202 /* PCK/3 = MCK Master Clock = 60MHz from PLLA */
64
65/* sdram */
66#define PIOC_ASR_VAL 0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */
67#define PIOC_BSR_VAL 0x00000000
68#define PIOC_PDR_VAL 0xFFFF0000
69#define EBI_CSA_VAL 0x00000002 /* CS1=SDRAM */
70#define SDRC_CR_VAL 0x3211295A /* set up the SDRAM */
71#define SDRAM 0x20000000 /* address of the SDRAM */
72#define SDRAM1 0x20000020 /* address of the SDRAM */
73#define SDRAM_VAL 0x00000000 /* value written to SDRAM */
74#define SDRC_MR_VAL 0x00000002 /* Precharge All */
75#define SDRC_MR_VAL1 0x00000004 /* refresh */
76#define SDRC_MR_VAL2 0x00000003 /* Load Mode Register */
77#define SDRC_MR_VAL3 0x00000000 /* Normal Mode */
78#define SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
79#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
80
81/*
82 * Size of malloc() pool
83 */
84#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
85#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
86
87#define CONFIG_BAUDRATE 115200
88
89#define CFG_AT91C_BRGR_DIVISOR 33 /* hardcode so no __divsi3 : AT91C_MASTER_CLOCK /(baudrate * 16) */
90
91/*
92 * Hardware drivers
93 */
94
95/* define one of these to choose the DBGU, USART0 or USART1 as console */
96#define CONFIG_DBGU
97#undef CONFIG_USART0
98#undef CONFIG_USART1
99
100#undef CONFIG_HWFLOW /* don't include RTS/CTS flow control support */
101
102#undef CONFIG_MODEM_SUPPORT /* disable modem initialization stuff */
103
Wolfgang Denk8a6820a2005-09-26 01:26:56 +0200104#define CONFIG_USB_OHCI 1
105#define CONFIG_USB_KEYBOARD 1
106#define CONFIG_USB_STORAGE 1
107#define CONFIG_DOS_PARTITION 1
108#define CONFIG_AT91C_PQFP_UHPBUG 1
109
Wolfgang Denk756bfd72005-09-26 01:14:38 +0200110#undef CONFIG_HARD_I2C
111
112#ifdef CONFIG_HARD_I2C
113#define CFG_I2C_SPEED 0 /* not used */
114#define CFG_I2C_SLAVE 0 /* not used */
115#define CONFIG_RTC_RS5C372A /* RICOH I2C RTC */
116#define CFG_I2C_RTC_ADDR 0x32
117#define CFG_I2C_EEPROM_ADDR 0x50
118#define CFG_I2C_EEPROM_ADDR_LEN 1
119#define CFG_I2C_EEPROM_ADDR_OVERFLOW
120#endif
121/* still about 20 kB free with this defined */
122#define CFG_LONGHELP
123
124#define CONFIG_BOOTDELAY 3
125
126#ifdef CONFIG_HARD_I2C
127#define CONFIG_COMMANDS \
128 ((CONFIG_CMD_DFL | \
129 CFG_CMD_DATE | \
130 CFG_CMD_DHCP | \
131 CFG_CMD_EEPROM | \
132 CFG_CMD_I2C | \
133 CFG_CMD_NFS | \
134 CFG_CMD_SNTP | \
135 CFG_CMD_MISC))
136#else
137#define CONFIG_COMMANDS \
138 ((CONFIG_CMD_DFL | \
139 CFG_CMD_DHCP | \
140 CFG_CMD_NFS | \
141 CFG_CMD_SNTP | \
Wolfgang Denk8a6820a2005-09-26 01:26:56 +0200142 CFG_CMD_USB | \
Wolfgang Denk756bfd72005-09-26 01:14:38 +0200143 CFG_CMD_CACHE) & \
144 ~(CFG_CMD_BDI | \
145 CFG_CMD_IMI | \
146 CFG_CMD_AUTOSCRIPT | \
147 CFG_CMD_FPGA | \
148 CFG_CMD_MISC | \
149 CFG_CMD_LOADS ))
150#define CONFIG_TIMESTAMP
151#endif
152#define CFG_LONGHELP
153
154/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
155#include <cmd_confdefs.h>
156
157#define CONFIG_NR_DRAM_BANKS 1
158#define PHYS_SDRAM 0x20000000
159#define PHYS_SDRAM_SIZE 0x08000000 /* 128 megs */
160
161#define CFG_MEMTEST_START PHYS_SDRAM
162#define CFG_MEMTEST_END CFG_MEMTEST_START + PHYS_SDRAM_SIZE - 262144
163
164#define CONFIG_DRIVER_ETHER
165#define CONFIG_NET_RETRY_COUNT 20
166#undef CONFIG_AT91C_USE_RMII
167
168#define PHYS_FLASH_1 0x10000000
169#define PHYS_FLASH_SIZE 0x1000000 /* 16 megs main flash */
170#define CFG_FLASH_BASE PHYS_FLASH_1
171#define CFG_MONITOR_BASE CFG_FLASH_BASE
172#define CFG_MAX_FLASH_BANKS 1
173#define CFG_MAX_FLASH_SECT 256
174#define CFG_FLASH_ERASE_TOUT (2 * CFG_HZ) /* Timeout for Flash Erase */
175#define CFG_FLASH_WRITE_TOUT (2 * CFG_HZ) /* Timeout for Flash Write */
176#define CFG_FLASH_LOCK_TOUT (10*CFG_HZ) /* Timeout for Flash Set Lock Bit */
177#define CFG_FLASH_UNLOCK_TOUT (10*CFG_HZ) /* Timeout for Flash Clear Lock Bits */
178#define CFG_FLASH_PROTECTION /* "Real" (hardware) sectors protection */
179
180#define CFG_ENV_IS_IN_FLASH 1
181#define CFG_ENV_OFFSET 0x20000 /* after u-boot.bin */
182#define CFG_ENV_ADDR (CFG_FLASH_BASE+CFG_ENV_OFFSET)
183#define CFG_ENV_SIZE 0x20000
184
185#define CFG_LOAD_ADDR 0x21000000 /* default load address */
186
187#define CFG_BAUDRATE_TABLE { 115200, 57600, 38400, 19200, 9600 }
188
189#define CFG_PROMPT "=> " /* Monitor Command Prompt */
190#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
191#define CFG_MAXARGS 32 /* max number of command args */
192#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
193
Wolfgang Denk8a6820a2005-09-26 01:26:56 +0200194#define CFG_DEVICE_DEREGISTER /* needs device_deregister */
195#define LITTLEENDIAN 1 /* used by usb_ohci.c */
196
Wolfgang Denk756bfd72005-09-26 01:14:38 +0200197#ifndef __ASSEMBLY__
198/*-----------------------------------------------------------------------
199 * Board specific extension for bd_info
200 *
201 * This structure is embedded in the global bd_info (bd_t) structure
202 * and can be used by the board specific code (eg board/...)
203 */
204
205struct bd_info_ext {
206 /* helper variable for board environment handling
207 *
208 * env_crc_valid == 0 => uninitialised
209 * env_crc_valid > 0 => environment crc in flash is valid
210 * env_crc_valid < 0 => environment crc in flash is invalid
211 */
212 int env_crc_valid;
213};
214#endif /* __ASSEMBLY__ */
215
216#define CFG_HZ 1000
217#define CFG_HZ_CLOCK (AT91C_MASTER_CLOCK/2) /* AT91C_TC0_CMR is implicitly set to */
218 /* AT91C_TC_TIMER_DIV1_CLOCK */
219
220#define CONFIG_STACKSIZE (32*1024) /* regular stack */
221
222#ifdef CONFIG_USE_IRQ
223#error CONFIG_USE_IRQ not supported
224#endif
225
226#define CFG_DEVICE_NULLDEV 1 /* enble null device */
227#undef CONFIG_SILENT_CONSOLE /* enable silent startup */
228
229#define CONFIG_AUTOBOOT_KEYED
230#define CONFIG_AUTOBOOT_PROMPT "Press SPACE to abort autoboot in %d seconds\n"
231#define CONFIG_AUTOBOOT_STOP_STR " "
232#define CONFIG_AUTOBOOT_DELAY_STR "d"
233
234#define CONFIG_VERSION_VARIABLE 1 /* include version env variable */
235
236#endif /* __CONFIG_H */