]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/mx51_3stack.h
TX6 Release 2013-04-22
[karo-tx-uboot.git] / include / configs / mx51_3stack.h
1 /*
2  * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
3  *
4  * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
5  *
6  * Configuration settings for the MX51-3Stack Freescale board.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  * MA 02111-1307 USA
22  */
23
24 #ifndef __CONFIG_H
25 #define __CONFIG_H
26
27 #include <asm/arch/mx51.h>
28
29  /* High Level Configuration Options */
30 #define CONFIG_ARMV7            1       /* This is armv7 Cortex-A8 CPU core */
31 #define CONFIG_SYS_APCS_GNU
32
33 #define CONFIG_MXC              1
34 #define CONFIG_MX51_3DS         1       /* in a mx51 */
35 #define CONFIG_FLASH_HEADER     1
36 #define CONFIG_FLASH_HEADER_OFFSET 0x400
37 #define CONFIG_FLASH_HEADER_BARKER 0xB1
38
39 #define CONFIG_SKIP_RELOCATE_UBOOT
40
41 #define CONFIG_MX51_HCLK_FREQ   24000000        /* RedBoot says 26MHz */
42
43 #define CONFIG_ARCH_CPU_INIT
44 #define CONFIG_ARCH_MMU
45
46 #define CONFIG_DISPLAY_CPUINFO
47 #define CONFIG_DISPLAY_BOARDINFO
48
49 #define CONFIG_SYS_64BIT_VSPRINTF
50
51 #define BOARD_LATE_INIT
52 /*
53  * Disabled for now due to build problems under Debian and a significant
54  * increase in the final file size: 144260 vs. 109536 Bytes.
55  */
56
57 #define CONFIG_CMDLINE_TAG              1       /* enable passing of ATAGs */
58 #define CONFIG_REVISION_TAG             1
59 #define CONFIG_SETUP_MEMORY_TAGS        1
60 #define CONFIG_INITRD_TAG               1
61
62 /*
63  * Size of malloc() pool
64  */
65 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
66 /* size in bytes reserved for initial data */
67 #define CONFIG_SYS_GBL_DATA_SIZE        128
68
69 /*
70  * Hardware drivers
71  */
72 #define CONFIG_MX51_UART        1
73 #define CONFIG_MX51_UART1       1
74
75 /* allow to overwrite serial and ethaddr */
76 #define CONFIG_ENV_OVERWRITE
77 #define CONFIG_CONS_INDEX       1
78 #define CONFIG_BAUDRATE         115200
79 #define CONFIG_SYS_BAUDRATE_TABLE       {9600, 19200, 38400, 57600, 115200}
80
81 /***********************************************************
82  * Command definition
83  ***********************************************************/
84
85 #include <config_cmd_default.h>
86
87 #define CONFIG_CMD_PING
88 #define CONFIG_CMD_DHCP
89 #define CONFIG_BOOTP_SUBNETMASK
90 #define CONFIG_BOOTP_GATEWAY
91 #define CONFIG_BOOTP_DNS
92 /* Enable below configure when supporting nand */
93 #define CONFIG_CMD_NAND
94 #define CONFIG_MXC_NAND
95 #define CONFIG_CMD_ENV
96 #define CMD_SAVEENV
97 #undef CONFIG_CMD_IMLS
98 #define CONFIG_CMD_MII
99 #define CONFIG_CMD_NET
100 #define CONFIG_CMD_MMC
101 #define CONFIG_CMD_IIM
102
103 /*
104  * FUSE Configs
105  * */
106 #ifdef CONFIG_CMD_IIM
107         #define CONFIG_IMX_IIM
108         #define IMX_IIM_BASE    IIM_BASE_ADDR
109         #define CONFIG_IIM_MAC_BANK     1
110         #define CONFIG_IIM_MAC_ROW      9
111 #endif
112
113 /*
114  * MMC Configs
115  */
116 #ifdef CONFIG_CMD_MMC
117         #define CONFIG_MMC                              1
118         #define CONFIG_GENERIC_MMC
119         #define CONFIG_IMX_MMC
120         #define CONFIG_SYS_FSL_ESDHC_ADDR       0
121         #define CONFIG_SYS_MMC_ENV_DEV  0
122         #define CONFIG_DOS_PARTITION    1
123         #define CONFIG_CMD_FAT          1
124         #define CONFIG_SYS_FSL_ESDHC_NUM 1
125 #endif
126
127 /*
128  * I2C Configs
129  */
130 #define CONFIG_CMD_I2C          1
131 #define CONFIG_HARD_I2C         1
132 #define CONFIG_I2C_MXC          1
133 #define CONFIG_SYS_I2C_PORT             I2C2_BASE_ADDR
134 #define CONFIG_SYS_I2C_SPEED            400000
135 #define CONFIG_SYS_I2C_SLAVE            0xfe
136
137 /*
138  * Eth Configs
139  */
140 #define CONFIG_HAS_ETH1
141 #define CONFIG_ETHPRIME
142 #define CONFIG_NET_RETRY_COUNT  100
143 #define CONFIG_NET_MULTI
144 #define CONFIG_MXC_FEC
145 #define CONFIG_MII
146 #define CONFIG_DISCOVER_PHY
147
148 #define CONFIG_FEC0_IOBASE      FEC_BASE_ADDR
149 #define CONFIG_FEC0_PINMUX      -1
150 #define CONFIG_FEC0_PHY_ADDR    0x1F
151 #define CONFIG_FEC0_MIIBASE     -1
152
153
154 #define CONFIG_BOOTDELAY        3
155
156 #define CONFIG_LOADADDR         0x90800000      /* loadaddr env var */
157
158 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
159                 "netdev=eth0\0"                                         \
160                 "ethprime=smc911x\0"                                    \
161                 "uboot_addr=0xa0000000\0"                               \
162                 "uboot=u-boot.bin\0"                    \
163                 "kernel=uImage\0"                               \
164                 "nfsroot=/opt/eldk/arm\0"                               \
165                 "bootargs_base=setenv bootargs console=ttymxc0,115200\0"\
166                 "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs "\
167                         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0"\
168                 "bootcmd=run bootcmd_net\0"                             \
169                 "bootcmd_net=run bootargs_base bootargs_nfs; "          \
170                         "tftpboot ${loadaddr} ${kernel}; bootm\0"       \
171                 "prg_uboot=tftpboot ${loadaddr} ${uboot}; "             \
172                         "protect off ${uboot_addr} 0xa003ffff; "        \
173                         "erase ${uboot_addr} 0xa003ffff; "              \
174                         "cp.b ${loadaddr} ${uboot_addr} ${filesize}; "  \
175                         "setenv filesize; saveenv\0"
176
177 /*Support LAN9217*/
178 #define CONFIG_SMC911X  1
179 #define CONFIG_SMC911X_16_BIT 1
180 #define CONFIG_SMC911X_BASE mx51_io_base_addr
181
182 /*
183  * The MX51 3stack board seems to have a hardware "peculiarity" confirmed under
184  * U-Boot, RedBoot and Linux: the ethernet Rx signal is reaching the CS8900A
185  * controller inverted. The controller is capable of detecting and correcting
186  * this, but it needs 4 network packets for that. Which means, at startup, you
187  * will not receive answers to the first 4 packest, unless there have been some
188  * broadcasts on the network, or your board is on a hub. Reducing the ARP
189  * timeout from default 5 seconds to 200ms we speed up the initial TFTP
190  * transfer, should the user wish one, significantly.
191  */
192 #define CONFIG_ARP_TIMEOUT      200UL
193
194 /*
195  * Miscellaneous configurable options
196  */
197 #define CONFIG_SYS_LONGHELP             /* undef to save memory */
198 #define CONFIG_SYS_PROMPT               "MX51 U-Boot > "
199 #define CONFIG_AUTO_COMPLETE
200 #define CONFIG_SYS_CBSIZE               256     /* Console I/O Buffer Size */
201 /* Print Buffer Size */
202 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
203 #define CONFIG_SYS_MAXARGS      16      /* max number of command args */
204 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
205
206 #define CONFIG_SYS_MEMTEST_START        0       /* memtest works on */
207 #define CONFIG_SYS_MEMTEST_END          0x10000
208
209 #undef  CONFIG_SYS_CLKS_IN_HZ           /* everything, incl board info, in Hz */
210
211 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
212
213 #define CONFIG_SYS_HZ                           1000
214
215 #define CONFIG_CMDLINE_EDITING  1
216
217 /*-----------------------------------------------------------------------
218  * Stack sizes
219  *
220  * The stack sizes are set up in start.S using the settings below
221  */
222 #define CONFIG_STACKSIZE        (128 * 1024)    /* regular stack */
223
224 /*-----------------------------------------------------------------------
225  * Physical Memory Map
226  */
227 #define CONFIG_NR_DRAM_BANKS    1
228 #define PHYS_SDRAM_1            CSD0_BASE_ADDR
229 #define PHYS_SDRAM_1_SIZE       (512 * 1024 * 1024)
230 #define iomem_valid_addr(addr, size) \
231         (addr >= PHYS_SDRAM_1 && addr <= (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE))
232
233 /*-----------------------------------------------------------------------
234  * FLASH and environment organization
235  */
236 #define CONFIG_SYS_NO_FLASH
237
238 /*-----------------------------------------------------------------------
239  * NAND FLASH driver setup
240  */
241 #define NAND_MAX_CHIPS         8
242 #define CONFIG_SYS_MAX_NAND_DEVICE    1
243 #define CONFIG_SYS_NAND_BASE          0x40000000
244 #define CONFIG_NAND_FW_16BIT    0 /* 1: 16bit 0: 8bit */
245
246 /* Monitor at beginning of flash */
247 #define CONFIG_FSL_ENV_IN_NAND
248 /* #define CONFIG_FSL_ENV_IN_NAND */
249
250 #define CONFIG_ENV_SECT_SIZE    (128 * 1024)
251 #define CONFIG_ENV_SIZE         CONFIG_ENV_SECT_SIZE
252 #if defined(CONFIG_FSL_ENV_IN_NAND)
253         #define CONFIG_ENV_IS_IN_NAND 1
254         #define CONFIG_ENV_OFFSET       0x100000
255 #elif defined(CONFIG_FSL_ENV_IN_MMC)
256         #define CONFIG_ENV_IS_IN_MMC    1
257         #define CONFIG_ENV_OFFSET       (768 * 1024)
258 #else
259         #define CONFIG_ENV_IS_NOWHERE   1
260 #endif
261 /*
262  * JFFS2 partitions
263  */
264 #undef CONFIG_JFFS2_CMDLINE
265 #define CONFIG_JFFS2_DEV        "nand0"
266
267 #endif                          /* __CONFIG_H */