]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/mx25_3stack_mfg.h
applied patches from Freescale and Ka-Ro
[karo-tx-uboot.git] / include / configs / mx25_3stack_mfg.h
1 /*
2  * (C) Copyright 2009-2010 Freescale Semiconductor
3  *
4  * (C) Copyright 2004
5  * Texas Instruments.
6  * Richard Woodruff <r-woodruff2@ti.com>
7  * Kshitij Gupta <kshitij@ti.com>
8  *
9  * Configuration settings for the Freescale i.MX31 PDK board.
10  *
11  * See file CREDITS for list of people who contributed to this
12  * project.
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License as
16  * published by the Free Software Foundation; either version 2 of
17  * the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27  * MA 02111-1307 USA
28  */
29
30 #ifndef __CONFIG_H
31 #define __CONFIG_H
32
33 #include <asm/arch/mx25.h>
34 #include <asm/arch/mx25-regs.h>
35
36 /* High Level Configuration Options */
37 #define CONFIG_ARM926EJS        1       /* This is an arm1136 CPU core */
38 #define CONFIG_MX25             1       /* in a mx31 */
39 #define CONFIG_MX25_HCLK_FREQ   24000000
40 #define CONFIG_MX25_CLK32       32768
41
42 #define CONFIG_MFG              1
43 #define CONFIG_IMX_CSPI         1
44 #define IMX_CSPI_VER_0_7        1
45 #define CONFIG_IMX_SPI_CPLD
46
47 /* IF iMX25 3DS V-1.0 define it */
48 /* #define CONFIG_MX25_3DS_V10 */
49
50 #ifdef CONFIG_MX25_3DS_V10
51 #define MXC_MEMORY_MDDR
52 #endif
53
54 #define CONFIG_DISPLAY_CPUINFO
55 #define CONFIG_DISPLAY_BOARDINFO
56
57 #define CONFIG_SYS_64BIT_VSPRINTF
58 #define BOARD_LATE_INIT
59
60 #define CONFIG_CMDLINE_TAG              1       /* enable passing of ATAGs */
61 #define CONFIG_SETUP_MEMORY_TAGS        1
62 #define CONFIG_INITRD_TAG               1
63 #define CONFIG_REVISION_TAG             1
64
65 /* No support for NAND boot for i.MX31 PDK yet, so we rely on some other
66  * program to initialize the SDRAM.
67  */
68 #define CONFIG_SKIP_RELOCATE_UBOOT
69
70 /*
71  * Size of malloc() pool
72  */
73 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 512 * 1024)
74 #define CONFIG_SYS_GBL_DATA_SIZE        128 /* bytes reserved initial data */
75
76 /*
77  * Hardware drivers
78  */
79 #define CONFIG_HARD_I2C         1
80 #define CONFIG_I2C_MXC          1
81 #define CONFIG_SYS_I2C_PORT             I2C1_BASE
82 #define CONFIG_SYS_I2C_SPEED            40000
83 #define CONFIG_SYS_I2C_SLAVE            0xfe
84
85 #define CONFIG_MX25_UART        1
86 #define CONFIG_MX25_UART1               1
87
88 /* allow to overwrite serial and ethaddr */
89 #define CONFIG_ENV_OVERWRITE
90 #define CONFIG_CONS_INDEX       1
91 #define CONFIG_BAUDRATE         115200
92 #define CONFIG_SYS_BAUDRATE_TABLE       {9600, 19200, 38400, 57600, 115200}
93
94 /***********************************************************
95  * Command definition
96  ***********************************************************/
97
98 #include <config_cmd_default.h>
99
100 #define CONFIG_CMD_I2C
101 #define CONFIG_CMD_MII
102 #define CONFIG_CMD_PING
103 /* #define CONFIG_CMD_SPI */
104 /* #define CONFIG_CMD_DATE */
105 #define CONFIG_CMD_NAND
106 #define CONFIG_CMD_MMC
107 #define CONFIG_MXC_NAND
108
109 /*
110  * MMC Configs
111  * */
112 #ifdef CONFIG_CMD_MMC
113         #define CONFIG_MMC                              1
114         #define CONFIG_GENERIC_MMC
115         #define CONFIG_IMX_MMC
116         #define CONFIG_SYS_FSL_ESDHC_NUM        2
117         #define CONFIG_SYS_FSL_ESDHC_ADDR       0
118         #define CONFIG_SYS_MMC_ENV_DEV  0
119         #define CONFIG_IMX_ESDHC_V1
120         #define CONFIG_DOS_PARTITION    1
121         #define CONFIG_CMD_FAT          1
122 #endif
123
124 /* Disabled due to compilation errors in cmd_bootm.c (IMLS seems to require
125  * that CONFIG_NO_FLASH is undefined).
126  */
127 #undef CONFIG_CMD_IMLS
128
129 #define CONFIG_BOOTDELAY        0
130
131 #define CONFIG_LOADADDR         0x80100000      /* loadaddr env var */
132
133 #define CONFIG_BOOTAGS         "console=ttymxc0,115200 "\
134                                 "rdinit=/linuxrc"
135 #define CONFIG_BOOTCOMMAND      "bootm ${loadaddr} 0x80800000"
136 #define CONFIG_ENV_IS_EMBEDDED
137
138 /*
139 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
140         "netdev=eth0\0"                                                 \
141         "ethprime=smc911x-0\0"                                          \
142         "uboot=u-boot.bin\0"                                            \
143         "uboot_addr=0xa0000000\0"                                       \
144         "kernel=uImage\0"                                               \
145         "bootargs_base=setenv bootargs console=ttymxc0,115200\0"        \
146         "bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs "       \
147                 "ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0"     \
148         "bootcmd=run bootcmd_net\0"                                     \
149         "bootcmd_net=run bootargs_base bootargs_nfs; "                  \
150                 "tftpboot ${loadaddr} ${kernel}; bootm\0"               \
151         "load_uboot=tftpboot ${loadaddr} ${uboot}\0"
152 */
153
154 /*Support LAN9217*/
155 #define CONFIG_SMC911X
156 #define CONFIG_SMC911X_CPLD
157 #define CONFIG_SMC911X_BASE     0
158
159 #define CONFIG_HAS_ETH1
160 #define CONFIG_CMD_NET
161 #define CONFIG_NET_RETRY_COUNT  100
162 #define CONFIG_CMD_DHCP
163 #define CONFIG_BOOTP_SUBNETMASK
164 #define CONFIG_BOOTP_GATEWAY
165 #define CONFIG_BOOTP_DNS
166 #define CONFIG_NET_MULTI
167 #define CONFIG_ETHPRIME
168
169 #define CONFIG_MXC_FEC
170 #define CONFIG_MII
171 #define CONFIG_MII_GASKET
172 #define CONFIG_DISCOVER_PHY
173
174 #define CONFIG_FEC0_IOBASE FEC_BASE
175 #define CONFIG_FEC0_PINMUX -1
176 #define CONFIG_FEC0_PHY_ADDR 0x1F
177 #define CONFIG_FEC0_MIIBASE -1
178
179 /*
180  * Miscellaneous configurable options
181  */
182 #define CONFIG_SYS_LONGHELP     /* undef to save memory */
183 #define CONFIG_SYS_PROMPT       "MX25 U-Boot > "
184 #define CONFIG_AUTO_COMPLETE
185 #define CONFIG_SYS_CBSIZE       256  /* Console I/O Buffer Size */
186 /* Print Buffer Size */
187 #define CONFIG_SYS_PBSIZE       (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
188 #define CONFIG_SYS_MAXARGS      16      /* max number of command args */
189 #define CONFIG_SYS_BARGSIZE     CONFIG_SYS_CBSIZE /* Boot Argument Buf Size */
190
191 #define CONFIG_SYS_MEMTEST_START        PHYS_SDRAM_1    /* memtest works on */
192 #define CONFIG_SYS_MEMTEST_END  0x10000
193
194 #define CONFIG_SYS_LOAD_ADDR    CONFIG_LOADADDR /* default load address */
195
196 #define CONFIG_SYS_HZ                   1000
197
198 #define UBOOT_IMAGE_SIZE        0x40000
199
200 #define CONFIG_CMDLINE_EDITING  1
201
202 /*-----------------------------------------------------------------------
203  * Stack sizes
204  *
205  * The stack sizes are set up in start.S using the settings below
206  */
207 #define CONFIG_STACKSIZE        (128 * 1024) /* regular stack */
208
209 /*-----------------------------------------------------------------------
210  * Physical Memory Map
211  */
212 #define CONFIG_NR_DRAM_BANKS    1
213 #define PHYS_SDRAM_1            CSD0_BASE
214
215 /* iMX25 V-1.0 has 128MB but V-1.1 has only 64MB */
216 #ifdef CONFIG_MX25_3DS_V10
217 #define PHYS_SDRAM_1_SIZE       (128 * 1024 * 1024)
218 #else
219 #define PHYS_SDRAM_1_SIZE       (64 * 1024 * 1024)
220 #endif
221
222 /* Monitor at beginning of flash */
223 /* #define CONFIG_FSL_ENV_IN_MMC */
224 /*#define CONFIG_FSL_ENV_IN_NAND*/
225
226 /*-----------------------------------------------------------------------
227  * FLASH and environment organization
228  */
229 /*
230 #if defined(CONFIG_FSL_ENV_IN_NAND)
231         #define CONFIG_ENV_IS_IN_NAND 1
232         #define CONFIG_ENV_OFFSET       0x80000
233 #elif defined(CONFIG_FSL_ENV_IN_MMC)
234         #define CONFIG_ENV_IS_IN_MMC    1
235         #define CONFIG_ENV_OFFSET       (768 * 1024)
236 #else
237         #define CONFIG_ENV_IS_NOWHERE   1
238 #endif
239 */
240
241 #define CONFIG_ENV_IS_NOWHERE
242
243 #define CONFIG_ENV_SECT_SIZE    (256 * 1024)
244 #define CONFIG_ENV_SIZE         CONFIG_ENV_SECT_SIZE
245
246 /*-----------------------------------------------------------------------
247  * NAND FLASH driver setup
248  */
249 #define CONFIG_SYS_NO_FLASH
250 #define NAND_MAX_CHIPS          1
251 #define CONFIG_SYS_MAX_NAND_DEVICE      1
252 #define CONFIG_SYS_NAND_BASE            0x40000000
253
254 /*
255  * JFFS2 partitions TODO:
256  */
257 /*
258 #undef CONFIG_JFFS2_CMDLINE
259 #define CONFIG_JFFS2_DEV        "nand0"
260 */
261 #endif /* __CONFIG_H */
262