blob: 8105876e4ead49843dbf095548c1d60f48958bc8 [file] [log] [blame]
Bartlomiej Siekadaa6e412006-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
TsiChungLiew6cfd3c72007-08-15 19:43:20 -050047#define CONFIG_MCFUART
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020048#define CONFIG_SYS_UART_PORT (0)
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +010049#define CONFIG_BAUDRATE 19200
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020050#define CONFIG_SYS_BAUDRATE_TABLE { 9600 , 19200 , 38400 , 57600, 115200 }
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +010051#define CONFIG_ETHADDR 00:06:3b:01:41:55
52#define CONFIG_ETHPRIME
53#define CONFIG_IPADDR 192.168.30.1
54#define CONFIG_SERVERIP 192.168.1.1
55#define CONFIG_ROOTPATH
56#define CONFIG_GATEWAYIP 192.168.1.1
57#define CONFIG_NETMASK 255.255.0.0
58#define CONFIG_HOSTNAME idmr
59#define CONFIG_BOOTFILE /tftpboot/idmr/uImage
Wolfgang Denk32bf3d12008-03-03 12:16:44 +010060#define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root " \
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +010061 "filesystem over NFS; echo"
62
TsiChungLiew6cfd3c72007-08-15 19:43:20 -050063#define CONFIG_MCFTMR
64
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +010065#define CONFIG_EXTRA_ENV_SETTINGS \
66 "netdev=eth0\0" \
67 "ramargs=setenv bootargs root=/dev/ram rw\0" \
68 "addip=setenv bootargs $(bootargs) " \
69 "ip=$(ipaddr):$(serverip):$(gatewayip):" \
70 "$(netmask):$(hostname):$(netdev):off panic=1\0" \
71 "flash_nfs=run nfsargs addip;bootm $(kernel_addr)\0" \
72 "flash_self=run ramargs addip;bootm $(kernel_addr) " \
73 "$(ramdisk_addr)\0" \
74 "net_nfs=tftp 200000 $(bootfile);run nfsargs addip;bootm\0" \
75 "nfsargs=setenv bootargs root=/dev/nfs rw " \
76 "nfsroot=$(serverip):$(rootpath)\0" \
Heiko Schocher48690d82010-07-20 17:45:02 +020077 "ethact=FEC\0 " \
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +010078 "update=prot off ff800000 ff81ffff; era ff800000 ff81ffff; " \
79 "cp.b 200000 ff800000 $(filesize);" \
80 "prot on ff800000 ff81ffff\0" \
81 "load=tftp 200000 $(u-boot)\0" \
82 "u-boot=/tftpboot/idmr/u-boot.bin\0" \
83 ""
84
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +010085
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -050086/*
Jon Loeliger7f5c0152007-07-10 09:38:02 -050087 * BOOTP options
88 */
89#define CONFIG_BOOTP_BOOTFILESIZE
90#define CONFIG_BOOTP_BOOTPATH
91#define CONFIG_BOOTP_GATEWAY
92#define CONFIG_BOOTP_HOSTNAME
93
94
95/*
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -050096 * Command line configuration.
97 */
98#include <config_cmd_default.h>
99
100#define CONFIG_CMD_PING
101#define CONFIG_CMD_JFFS2
102#define CONFIG_CMD_NET
103
104#undef CONFIG_CMD_LOADS
105#undef CONFIG_CMD_LOADB
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100106
107
108/*
109 * Low Level Configuration Settings
110 * (address mappings, register initial values, etc.)
111 * You should know what you are doing if you make changes here.
112 */
113
114/*
115 * Configuration for environment, which occupies third sector in flash.
116 */
117#ifndef CONFIG_MONITOR_IS_IN_RAM
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200118#define CONFIG_ENV_ADDR 0xff820000
119#define CONFIG_ENV_SECT_SIZE 0x10000
120#define CONFIG_ENV_SIZE 0x2000
Jean-Christophe PLAGNIOL-VILLARD5a1aceb2008-09-10 22:48:04 +0200121#define CONFIG_ENV_IS_IN_FLASH
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100122#else /* CONFIG_MONITOR_IS_IN_RAM */
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200123#define CONFIG_ENV_OFFSET 0x4000
124#define CONFIG_ENV_SECT_SIZE 0x2000
Jean-Christophe PLAGNIOL-VILLARD5a1aceb2008-09-10 22:48:04 +0200125#define CONFIG_ENV_IS_IN_FLASH
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100126#endif /* !CONFIG_MONITOR_IS_IN_RAM */
127
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200128#define CONFIG_SYS_USE_PPCENV /* Environment embedded in sect .ppcenv */
Wolfgang Denk67c31032007-09-16 17:10:04 +0200129
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200130#define CONFIG_SYS_PROMPT "=> "
131#define CONFIG_SYS_LONGHELP /* undef to save memory */
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100132
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -0500133#if defined(CONFIG_CMD_KGDB)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200134#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -0500135#else
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200136#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -0500137#endif
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100138
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200139#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
140#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
141#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100142
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200143#define CONFIG_SYS_LOAD_ADDR 0x00100000
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100144
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200145#define CONFIG_SYS_MEMTEST_START 0x400
146#define CONFIG_SYS_MEMTEST_END 0x380000
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100147
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200148#define CONFIG_SYS_HZ (50000000 / 64)
149#define CONFIG_SYS_CLK 100000000
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100150
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200151#define CONFIG_SYS_MBAR 0x40000000 /* Register Base Addrs */
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100152
153/*
154 * Ethernet
155 */
TsiChungLiew6cfd3c72007-08-15 19:43:20 -0500156#define CONFIG_MCFFEC
157#ifdef CONFIG_MCFFEC
158# define CONFIG_NET_MULTI 1
TsiChung Liew0f3ba7e2008-03-30 01:22:13 -0500159# define CONFIG_MII 1
160# define CONFIG_MII_INIT 1
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200161# define CONFIG_SYS_DISCOVER_PHY
162# define CONFIG_SYS_RX_ETH_BUFFER 8
163# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
TsiChungLiew6cfd3c72007-08-15 19:43:20 -0500164
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200165# define CONFIG_SYS_FEC0_PINMUX 0
166# define CONFIG_SYS_FEC0_MIIBASE CONFIG_SYS_FEC0_IOBASE
Wolfgang Denk53677ef2008-05-20 16:00:29 +0200167# define MCFFEC_TOUT_LOOP 50000
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200168/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
169# ifndef CONFIG_SYS_DISCOVER_PHY
TsiChungLiew6cfd3c72007-08-15 19:43:20 -0500170# define FECDUPLEX FULL
171# define FECSPEED _100BASET
172# else
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200173# ifndef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
174# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
TsiChungLiew6cfd3c72007-08-15 19:43:20 -0500175# endif
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200176# endif /* CONFIG_SYS_DISCOVER_PHY */
TsiChungLiew6cfd3c72007-08-15 19:43:20 -0500177#endif
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100178
179/*
180 * Definitions for initial stack pointer and data area (in DPRAM)
181 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200182#define CONFIG_SYS_INIT_RAM_ADDR 0x20000000
183#define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in internal SRAM */
184#define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
185#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
186#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100187
188/*
189 * Start addresses for the final memory configuration
190 * (Set up by the startup code)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200191 * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100192 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200193#define CONFIG_SYS_SDRAM_BASE 0x00000000
194#define CONFIG_SYS_SDRAM_SIZE 16 /* SDRAM size in MB */
195#define CONFIG_SYS_FLASH_BASE 0xff800000
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100196
197#ifdef CONFIG_MONITOR_IS_IN_RAM
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200198#define CONFIG_SYS_MONITOR_BASE 0x20000
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100199#else /* !CONFIG_MONITOR_IS_IN_RAM */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200200#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE + 0x400)
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100201#endif /* CONFIG_MONITOR_IS_IN_RAM */
202
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200203#define CONFIG_SYS_MONITOR_LEN 0x20000
204#define CONFIG_SYS_MALLOC_LEN (256 << 10)
205#define CONFIG_SYS_BOOTPARAMS_LEN (64*1024)
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100206
207/*
208 * For booting Linux, the board info and command line data
209 * have to be in the first 8 MB of memory, since this is
210 * the maximum mapped by the Linux kernel during initialization ??
211 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200212#define CONFIG_SYS_BOOTMAPSZ (CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20))
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100213
214/* FLASH organization */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200215#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
216#define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
217#define CONFIG_SYS_FLASH_ERASE_TOUT 1000
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100218
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200219#define CONFIG_SYS_FLASH_SIZE 0x800000
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100220/*
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200221 * #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100222 */
223
224/* Cache Configuration */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200225#define CONFIG_SYS_CACHELINE_SIZE 16
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100226
TsiChung Liewdd9f0542010-03-11 22:12:53 -0600227#define ICACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \
228 CONFIG_SYS_INIT_RAM_END - 8)
229#define DCACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \
230 CONFIG_SYS_INIT_RAM_END - 4)
231#define CONFIG_SYS_ICACHE_INV (CF_CACR_CINV | CF_CACR_INVI)
232#define CONFIG_SYS_CACHE_ACR0 (CONFIG_SYS_SDRAM_BASE | \
233 CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
234 CF_ACR_EN | CF_ACR_SM_ALL)
235#define CONFIG_SYS_CACHE_ICACR (CF_CACR_CENB | CF_CACR_CINV | \
236 CF_CACR_DISD | CF_CACR_INVI | \
237 CF_CACR_CEIB | CF_CACR_DCM | \
238 CF_CACR_EUSP)
239
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100240/* Port configuration */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200241#define CONFIG_SYS_FECI2C 0xF0
Bartlomiej Sieka0ed47bb2007-01-23 14:11:22 +0100242
Bartlomiej Sieka2daf0462007-01-23 17:22:06 +0100243
244/* Dynamic MTD partition support */
Stefan Roese68d7d652009-03-19 13:30:36 +0100245#define CONFIG_CMD_MTDPARTS
Stefan Roese942556a2009-05-12 14:32:58 +0200246#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
247#define CONFIG_FLASH_CFI_MTD
Bartlomiej Sieka2daf0462007-01-23 17:22:06 +0100248#define MTDIDS_DEFAULT "nor0=idmr-0"
249
250#define MTDPARTS_DEFAULT "mtdparts=idmr-0:128k(u-boot)," \
251 "64k(env)," \
252 "640k(kernel)," \
253 "2m(rootfs)," \
254 "-(user)";
255
Stefan Roese26667b72007-08-18 14:37:52 +0200256#if defined(CONFIG_CMD_MII)
257#error "MII commands don't work on iDMR board and should not be enabled."
258#endif
Bartlomiej Sieka0ed47bb2007-01-23 14:11:22 +0100259
Bartlomiej Siekadaa6e412006-12-20 00:27:32 +0100260#endif /* _IDMR_H */