1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38#ifndef __CONFIG_H
39#define __CONFIG_H
40
41
42#define CONFIG_AT91SAM9XE
43#include <asm/hardware.h>
44
45
46
47
48
49#define CONFIG_SYS_TEXT_BASE 0x20000000
50
51
52#include <config_cmd_default.h>
53#undef CONFIG_CMD_FPGA
54#undef CONFIG_CMD_SETGETDCR
55#undef CONFIG_CMD_XIMG
56#define CONFIG_CMD_ASKENV
57#define CONFIG_SYS_CBSIZE 256
58#define CONFIG_SYS_MAXARGS 16
59#define CONFIG_SYS_PBSIZE \
60 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
61#define CONFIG_SYS_PROMPT "TOP9000> "
62#define CONFIG_SYS_LONGHELP
63#define CONFIG_CMDLINE_EDITING
64#define CONFIG_CMD_BDI
65#define CONFIG_CMD_CACHE
66
67
68#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
69#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000
70#define CONFIG_SYS_HZ 1000
71
72
73#define CONFIG_ARCH_CPU_INIT
74#undef CONFIG_USE_IRQ
75#define CONFIG_CMDLINE_TAG
76#define CONFIG_SETUP_MEMORY_TAGS
77#define CONFIG_INITRD_TAG
78#define CONFIG_SKIP_LOWLEVEL_INIT
79#define CONFIG_BOARD_EARLY_INIT_F
80#define CONFIG_DISPLAY_CPUINFO
81#define CONFIG_AT91RESET_EXTRST
82
83
84#define CONFIG_ATMEL_LEGACY
85#define CONFIG_AT91_GPIO
86#define CONFIG_AT91_GPIO_PULLUP 1
87
88
89#define CONFIG_ATMEL_USART
90#define CONFIG_USART_BASE ATMEL_BASE_DBGU
91#define CONFIG_USART_ID ATMEL_ID_SYS
92#define CONFIG_BAUDRATE 115200
93#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
94
95
96#define CONFIG_MMC
97#define CONFIG_GENERIC_MMC
98#define CONFIG_GENERIC_ATMEL_MCI
99#define CONFIG_SYS_MMC_CD_PIN AT91_PIN_PC9
100#define CONFIG_CMD_MMC
101
102
103#define CONFIG_MACB
104#define CONFIG_SYS_PHY_ID 1
105#define CONFIG_RMII
106#define CONFIG_NET_RETRY_COUNT 20
107
108
109#define CONFIG_RTC_AT91SAM9_RTT
110#define CONFIG_CMD_DATE
111
112#if defined(CONFIG_AT91SAM9XE)
113
114
115
116
117
118
119
120
121
122
123
124# define CONFIG_AT91_EFLASH
125# define CONFIG_SYS_FLASH_BASE ATMEL_BASE_FLASH
126# define CONFIG_SYS_MAX_FLASH_SECT 32
127# define CONFIG_SYS_MAX_FLASH_BANKS 1
128# define CONFIG_SYS_FLASH_PROTECTION
129# define CONFIG_EFLASH_PROTSECTORS 1
130#endif
131
132
133#define CONFIG_ATMEL_SPI
134#define CONFIG_CMD_SPI
135
136
137#define CONFIG_CMD_SF
138#define CONFIG_ATMEL_SPI0
139#define FRAM_SPI_BUS 0
140#define FRAM_CS_NUM 0
141#define CONFIG_SPI_FLASH
142#define CONFIG_SPI_FRAM_RAMTRON
143#define CONFIG_SF_DEFAULT_SPEED 1000000
144#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
145#define CONFIG_SPI_FRAM_RAMTRON_NON_JEDEC "FM25H20"
146
147
148#if defined(CONFIG_EVAL9000)
149# define CONFIG_ENC28J60
150# define CONFIG_ATMEL_SPI1
151# define ENC_SPI_BUS 1
152# define ENC_CS_NUM 0
153# define ENC_SPI_CLOCK 1000000
154#endif
155
156
157
158
159
160#define CONFIG_NR_DRAM_BANKS 1
161#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
162#define CONFIG_SYS_SDRAM_SIZE 0x08000000
163#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
164#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x01e00000)
165#define CONFIG_SYS_LOAD_ADDR \
166 (CONFIG_SYS_SDRAM_BASE + 0x01000000)
167
168
169
170
171
172#define CONFIG_SYS_INIT_SP_ADDR \
173 (ATMEL_BASE_SRAM + 0x4000 - GENERATED_GBL_DATA_SIZE)
174
175
176
177
178
179
180
181
182
183
184#define CONFIG_NAND_ATMEL
185#define CONFIG_SYS_MAX_NAND_DEVICE 1
186#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
187#define CONFIG_SYS_NAND_DBW_8
188#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
189#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
190#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14
191#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC13
192#define CONFIG_CMD_NAND
193
194
195#define CONFIG_USB_ATMEL
196#define CONFIG_USB_OHCI_NEW
197#define CONFIG_DOS_PARTITION
198#define CONFIG_SYS_USB_OHCI_CPU_INIT
199#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_UHP_BASE
200#define CONFIG_SYS_USB_OHCI_SLOT_NAME "top9000"
201#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
202#define CONFIG_USB_STORAGE
203#define CONFIG_CMD_USB
204
205
206#define CONFIG_SOFT_I2C
207#define CONFIG_CMD_I2C
208#define CONFIG_SYS_I2C_SPEED 400000
209#define CONFIG_SYS_I2C_SLAVE 0x7F
210#define CONFIG_I2C_MULTI_BUS
211#define I2C0_PORT AT91_PIO_PORTA
212#define SDA0_PIN 23
213#define SCL0_PIN 24
214#define I2C1_PORT AT91_PIO_PORTB
215#define SDA1_PIN 12
216#define SCL1_PIN 13
217#define I2C_SOFT_DECLARATIONS void iic_init(void);\
218 int iic_read(void);\
219 void iic_sda(int);\
220 void iic_scl(int);
221#define I2C_ACTIVE
222#define I2C_TRISTATE
223#define I2C_INIT iic_init()
224#define I2C_READ iic_read()
225#define I2C_SDA(bit) iic_sda(bit)
226#define I2C_SCL(bit) iic_scl(bit)
227#define I2C_DELAY udelay(3)
228
229#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5
230#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
231#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
232#define CONFIG_SYS_EEPROM_SIZE 0x2000
233#define CONFIG_SYS_I2C_EEPROM_ADDR 0x57
234
235
236#define CONFIG_ENV_IS_IN_EEPROM
237#define CONFIG_ENV_OFFSET 0x1000
238#define CONFIG_ENV_SIZE 0x0f00
239
240#define CONFIG_SYS_I2C_FACT_ADDR 0x57
241#define CONFIG_SYS_FACT_OFFSET 0x1F00
242#define CONFIG_SYS_FACT_SIZE 0x0100
243
244
245#define CONFIG_SYS_FACT_ENTRY
246#ifndef __ASSEMBLY__
247extern void read_factory_r(void);
248#endif
249
250
251
252
253
254#define CONFIG_BOOTDELAY 1
255#define CONFIG_AUTOBOOT
256#define CONFIG_AUTOBOOT_KEYED
257#define CONFIG_AUTOBOOT_PROMPT \
258 "Press SPACE to abort autoboot in %d seconds\n", bootdelay
259#define CONFIG_AUTOBOOT_DELAY_STR "d"
260#define CONFIG_AUTOBOOT_STOP_STR " "
261
262
263
264
265
266#if defined(CONFIG_NAND_ATMEL) \
267 || defined(CONFIG_USB_ATMEL) \
268 || defined(CONFIG_MMC)
269# define CONFIG_DOS_PARTITION
270# define CONFIG_CMD_FAT
271# define CONFIG_CMD_EXT2
272
273#endif
274
275
276#if defined(CONFIG_MACB) || defined(CONFIG_ENC28J60)
277# define CONFIG_CMD_PING
278# define CONFIG_CMD_DHCP
279# define CONFIG_CMD_MII
280
281# define CONFIG_RESET_PHY_R
282
283# define CONFIG_BOOTP_BOOTFILESIZE
284# define CONFIG_BOOTP_BOOTPATH
285# define CONFIG_BOOTP_GATEWAY
286# define CONFIG_BOOTP_HOSTNAME
287#endif
288
289
290#define CONFIG_BOOTCOUNT_LIMIT 1
291#define CONFIG_BOOTCOMMAND \
292 "nand read 0x21000000 0xA0000 0x200000; bootm"
293#define CONFIG_BOOTARGS \
294 "console=ttyS0,115200 " \
295 "root=/dev/mtdblock2 " \
296 "mtdparts=atmel_nand:" \
297 "640k(uboot)ro," \
298 "2M(linux)," \
299 "16M(root)," \
300 "-(rest) " \
301 "rw "\
302 "rootfstype=jffs2"
303
304
305#define CONFIG_SYS_MALLOC_LEN \
306 ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
307#define CONFIG_STACKSIZE (32*1024)
308#ifdef CONFIG_USE_IRQ
309#error CONFIG_USE_IRQ not supported
310#endif
311
312#endif
313