blob: 99266334636683355e2e92e340edb55d675c03c8 [file] [log] [blame]
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +01001/*
2 * Configuration settings for the iDMR board
3 *
4 * Based on MC5272C3, r5200 and M5271EVB board configs
5 * (C) Copyright 2006 Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 * (C) Copyright 2006 Lab X Technologies <zachary.landau@labxtechnologies.com>
7 * (C) Copyright 2003 Josef Baumgartner <josef.baumgartner@telex.de>
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 _IDMR_H
29#define _IDMR_H
30
31
32/*
33 * High Level Configuration Options (easy to change)
34 */
35
36#define CONFIG_MCF52x2 /* define processor family */
37#define CONFIG_M5271 /* define processor type */
38#define CONFIG_IDMR /* define board type */
39
40#undef CONFIG_WATCHDOG /* disable watchdog */
41
42/*
43 * Default environment settings
44 */
45#define CONFIG_BOOTCOMMAND "run net_nfs"
46#define CONFIG_BOOTDELAY 5
47#define CONFIG_BAUDRATE 19200
48#define CFG_BAUDRATE_TABLE { 9600 , 19200 , 38400 , 57600, 115200 }
49#define CONFIG_ETHADDR 00:06:3b:01:41:55
50#define CONFIG_ETHPRIME
51#define CONFIG_IPADDR 192.168.30.1
52#define CONFIG_SERVERIP 192.168.1.1
53#define CONFIG_ROOTPATH
54#define CONFIG_GATEWAYIP 192.168.1.1
55#define CONFIG_NETMASK 255.255.0.0
56#define CONFIG_HOSTNAME idmr
57#define CONFIG_BOOTFILE /tftpboot/idmr/uImage
58#define CONFIG_PREBOOT "echo;echo Type \"run flash_nfs\" to mount root " \
59 "filesystem over NFS; echo"
60
61#define CONFIG_EXTRA_ENV_SETTINGS \
62 "netdev=eth0\0" \
63 "ramargs=setenv bootargs root=/dev/ram rw\0" \
64 "addip=setenv bootargs $(bootargs) " \
65 "ip=$(ipaddr):$(serverip):$(gatewayip):" \
66 "$(netmask):$(hostname):$(netdev):off panic=1\0" \
67 "flash_nfs=run nfsargs addip;bootm $(kernel_addr)\0" \
68 "flash_self=run ramargs addip;bootm $(kernel_addr) " \
69 "$(ramdisk_addr)\0" \
70 "net_nfs=tftp 200000 $(bootfile);run nfsargs addip;bootm\0" \
71 "nfsargs=setenv bootargs root=/dev/nfs rw " \
72 "nfsroot=$(serverip):$(rootpath)\0" \
73 "ethact=FEC ETHERNET\0" \
74 "update=prot off ff800000 ff81ffff; era ff800000 ff81ffff; " \
75 "cp.b 200000 ff800000 $(filesize);" \
76 "prot on ff800000 ff81ffff\0" \
77 "load=tftp 200000 $(u-boot)\0" \
78 "u-boot=/tftpboot/idmr/u-boot.bin\0" \
79 ""
80
Jon Loeliger860435b2007-07-04 22:32:32 -050081
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +010082/*
Jon Loeliger860435b2007-07-04 22:32:32 -050083 * Command line configuration.
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +010084 */
Jon Loeliger860435b2007-07-04 22:32:32 -050085#include <config_cmd_default.h>
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +010086
Jon Loeliger860435b2007-07-04 22:32:32 -050087#define CONFIG_CMD_PING
88#define CONFIG_CMD_JFFS2
89#define CONFIG_CMD_NET
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +010090
Jon Loeliger860435b2007-07-04 22:32:32 -050091#undef CONFIG_CMD_LOADS
92#undef CONFIG_CMD_LOADB
93
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +010094
95/*
96 * Low Level Configuration Settings
97 * (address mappings, register initial values, etc.)
98 * You should know what you are doing if you make changes here.
99 */
100
101/*
102 * Configuration for environment, which occupies third sector in flash.
103 */
104#ifndef CONFIG_MONITOR_IS_IN_RAM
105#define CFG_ENV_ADDR 0xff820000
106#define CFG_ENV_SECT_SIZE 0x10000
107#define CFG_ENV_SIZE 0x2000
108#define CFG_ENV_IS_IN_FLASH
109#else /* CONFIG_MONITOR_IS_IN_RAM */
110#define CFG_ENV_OFFSET 0x4000
111#define CFG_ENV_SECT_SIZE 0x2000
112#define CFG_ENV_IS_IN_FLASH
113#endif /* !CONFIG_MONITOR_IS_IN_RAM */
114
115#define CFG_PROMPT "=> "
116#define CFG_LONGHELP /* undef to save memory */
117
Jon Loeliger860435b2007-07-04 22:32:32 -0500118#if defined(CONFIG_CMD_KGDB)
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +0100119#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
Jon Loeliger860435b2007-07-04 22:32:32 -0500120#else
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +0100121#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
Jon Loeliger860435b2007-07-04 22:32:32 -0500122#endif
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +0100123
124#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
125#define CFG_MAXARGS 16 /* max number of command args */
126#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
127
128#define CFG_LOAD_ADDR 0x00100000
129
130#define CFG_MEMTEST_START 0x400
131#define CFG_MEMTEST_END 0x380000
132
133#define CFG_HZ (50000000 / 64)
134#define CFG_CLK 100000000
135
136#define CFG_MBAR 0x40000000 /* Register Base Addrs */
137
138/*
139 * Ethernet
140 */
141#define FEC_ENET
142#define CONFIG_NET_RETRY_COUNT 5
143#define CFG_ENET_BD_BASE 0x480000
144#define CFG_DISCOVER_PHY 1
145#define CONFIG_MII 1
146
147/*
148 * Definitions for initial stack pointer and data area (in DPRAM)
149 */
150#define CFG_INIT_RAM_ADDR 0x20000000
151#define CFG_INIT_RAM_END 0x1000 /* End of used area in internal SRAM */
152#define CFG_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
153#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
154#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
155
156/*
157 * Start addresses for the final memory configuration
158 * (Set up by the startup code)
159 * Please note that CFG_SDRAM_BASE _must_ start at 0
160 */
161#define CFG_SDRAM_BASE 0x00000000
162#define CFG_SDRAM_SIZE 16 /* SDRAM size in MB */
163#define CFG_FLASH_BASE 0xff800000
164
165#ifdef CONFIG_MONITOR_IS_IN_RAM
166#define CFG_MONITOR_BASE 0x20000
167#else /* !CONFIG_MONITOR_IS_IN_RAM */
168#define CFG_MONITOR_BASE (CFG_FLASH_BASE + 0x400)
169#endif /* CONFIG_MONITOR_IS_IN_RAM */
170
171#define CFG_MONITOR_LEN 0x20000
172#define CFG_MALLOC_LEN (256 << 10)
173#define CFG_BOOTPARAMS_LEN (64*1024)
174
175/*
176 * For booting Linux, the board info and command line data
177 * have to be in the first 8 MB of memory, since this is
178 * the maximum mapped by the Linux kernel during initialization ??
179 */
180#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
181
182/* FLASH organization */
183#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
184#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
185#define CFG_FLASH_ERASE_TOUT 1000
186
187#define CFG_FLASH_SIZE 0x800000
188/*
189 * #define CFG_FLASH_USE_BUFFER_WRITE 1
190 */
191
192/* Cache Configuration */
193#define CFG_CACHELINE_SIZE 16
194
195/* Port configuration */
196#define CFG_FECI2C 0xF0
Bartlomiej Siekad612c9f2007-01-23 14:11:22 +0100197
Bartlomiej Siekad5344182007-01-23 17:22:06 +0100198
199/* Dynamic MTD partition support */
200#define CONFIG_JFFS2_CMDLINE
201#define MTDIDS_DEFAULT "nor0=idmr-0"
202
203#define MTDPARTS_DEFAULT "mtdparts=idmr-0:128k(u-boot)," \
204 "64k(env)," \
205 "640k(kernel)," \
206 "2m(rootfs)," \
207 "-(user)";
208
Jon Loeliger860435b2007-07-04 22:32:32 -0500209#if defined(CONFIG_CMD_MII)
Bartlomiej Siekad612c9f2007-01-23 14:11:22 +0100210#error MII commands don't work on iDMR board and sholud not be enabled.
Jon Loeliger860435b2007-07-04 22:32:32 -0500211#endif
Bartlomiej Siekad612c9f2007-01-23 14:11:22 +0100212
Bartlomiej Sieka8ff81c62006-12-20 00:27:32 +0100213#endif /* _IDMR_H */