]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/mx53_evk.h
applied patches from Freescale and Ka-Ro
[karo-tx-uboot.git] / include / configs / mx53_evk.h
1 /*
2  * Copyright (C) 2010 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the MX53-EVK Freescale board.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19  * MA 02111-1307 USA
20  */
21
22 #ifndef __CONFIG_H
23 #define __CONFIG_H
24
25 #include <asm/arch/mx53.h>
26
27  /* High Level Configuration Options */
28 #define CONFIG_ARMV7            /* This is armv7 Cortex-A8 CPU core */
29 #define CONFIG_MXC
30 #define CONFIG_MX53
31 #define CONFIG_MX53_EVK
32 #define CONFIG_FLASH_HEADER
33 #define CONFIG_FLASH_HEADER_OFFSET 0x400
34
35 #define CONFIG_SKIP_RELOCATE_UBOOT
36
37 #define CONFIG_ARCH_CPU_INIT
38 #define CONFIG_ARCH_MMU
39
40 #define CONFIG_MX53_HCLK_FREQ   24000000
41 #define CONFIG_SYS_PLL2_FREQ    600
42 #define CONFIG_SYS_AHB_PODF     4
43 #define CONFIG_SYS_AXIA_PODF    1
44 #define CONFIG_SYS_AXIB_PODF    2
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_MX53_UART        1
73 #define CONFIG_MX53_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_CMD_MII
90 #define CONFIG_CMD_NET
91 #define CONFIG_NET_RETRY_COUNT  100
92 #define CONFIG_NET_MULTI 1
93 #define CONFIG_BOOTP_SUBNETMASK
94 #define CONFIG_BOOTP_GATEWAY
95 #define CONFIG_BOOTP_DNS
96 #define CONFIG_CMD_IIM
97 #define CONFIG_CMD_MMC
98 #define CONFIG_CMD_ENV
99
100 #define CONFIG_CMD_CLOCK
101 #define CONFIG_REF_CLK_FREQ CONFIG_MX53_HCLK_FREQ
102
103 #define CONFIG_CMD_SATA
104 #undef CONFIG_CMD_IMLS
105
106 #define CONFIG_BOOTDELAY        3
107
108 #define CONFIG_PRIME    "FEC0"
109
110 #define CONFIG_LOADADDR         0x70800000      /* loadaddr env var */
111 #define CONFIG_RD_LOADADDR      (CONFIG_LOADADDR + 0x300000)
112
113 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
114                 "netdev=eth0\0"                                         \
115                 "ethprime=FEC0\0"                                       \
116                 "uboot=u-boot.bin\0"                    \
117                 "kernel=uImage\0"                               \
118                 "nfsroot=/opt/eldk/arm\0"                               \
119                 "bootargs_base=setenv bootargs console=ttymxc0,115200\0"\
120                 "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs "\
121                         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0"\
122                 "bootcmd_net=run bootargs_base bootargs_nfs; "          \
123                         "tftpboot ${loadaddr} ${kernel}; bootm\0"       \
124                 "bootargs_mmc=setenv bootargs ${bootargs} ip=dhcp "     \
125                         "root=/dev/mmcblk0p2 rootwait\0"                \
126                 "bootcmd_mmc=run bootargs_base bootargs_mmc; bootm\0"   \
127                 "bootcmd=run bootcmd_net\0"                             \
128
129
130 #define CONFIG_ARP_TIMEOUT      200UL
131
132 /*
133  * Miscellaneous configurable options
134  */
135 #define CONFIG_SYS_LONGHELP             /* undef to save memory */
136 #define CONFIG_SYS_PROMPT               "EVK U-Boot > "
137 #define CONFIG_AUTO_COMPLETE
138 #define CONFIG_SYS_CBSIZE               256     /* Console I/O Buffer Size */
139 /* Print Buffer Size */
140 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
141 #define CONFIG_SYS_MAXARGS      16      /* max number of command args */
142 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
143
144 #define CONFIG_SYS_MEMTEST_START        0       /* memtest works on */
145 #define CONFIG_SYS_MEMTEST_END          0x10000
146
147 #undef  CONFIG_SYS_CLKS_IN_HZ           /* everything, incl board info, in Hz */
148
149 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
150
151 #define CONFIG_SYS_HZ                           1000
152
153 #define CONFIG_CMDLINE_EDITING  1
154
155 #define CONFIG_FEC0_IOBASE      FEC_BASE_ADDR
156 #define CONFIG_FEC0_PINMUX      -1
157 #define CONFIG_FEC0_PHY_ADDR    -1
158 #define CONFIG_FEC0_MIIBASE     -1
159
160 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
161 #define CONFIG_IIM_MAC_ADDR_OFFSET      0x24
162
163 #define CONFIG_MXC_FEC
164 #define CONFIG_MII
165 #define CONFIG_MII_GASKET
166 #define CONFIG_DISCOVER_PHY
167
168 /*
169  * FUSE Configs
170  * */
171 #ifdef CONFIG_CMD_MMC
172         #define CONFIG_IMX_IIM
173         #define IMX_IIM_BASE    IIM_BASE_ADDR
174         #define CONFIG_IIM_MAC_BANK     1
175         #define CONFIG_IIM_MAC_ROW      9
176 #endif
177
178 /*
179  * I2C Configs
180  */
181 #define CONFIG_CMD_I2C          1
182 #define CONFIG_HARD_I2C         1
183 #define CONFIG_I2C_MXC          1
184 #define CONFIG_SYS_I2C_PORT             I2C2_BASE_ADDR
185 #define CONFIG_SYS_I2C_SPEED            100000
186 #define CONFIG_SYS_I2C_SLAVE            0xfe
187
188
189 /*
190  * SPI Configs
191  */
192 #define CONFIG_FSL_SF           1
193 #define CONFIG_CMD_SPI
194 #define CONFIG_CMD_SF
195 #define CONFIG_SPI_FLASH_IMX_ATMEL      1
196 #define CONFIG_SPI_FLASH_CS     1
197 #define CONFIG_IMX_ECSPI
198 #define IMX_CSPI_VER_2_3        1
199 #define MAX_SPI_BYTES           (64 * 4)
200
201 /*
202  * MMC Configs
203  */
204 #ifdef CONFIG_CMD_MMC
205         #define CONFIG_MMC                              1
206         #define CONFIG_GENERIC_MMC
207         #define CONFIG_IMX_MMC
208         #define CONFIG_SYS_FSL_ESDHC_NUM        2
209         #define CONFIG_SYS_FSL_ESDHC_ADDR       0
210         #define CONFIG_SYS_MMC_ENV_DEV  0
211         #define CONFIG_DOS_PARTITION    1
212         #define CONFIG_CMD_FAT          1
213         #define CONFIG_CMD_EXT2         1
214
215         /* detect whether ESDHC1 or ESDHC3 is boot device */
216         #define CONFIG_DYNAMIC_MMC_DEVNO
217
218         #define CONFIG_BOOT_PARTITION_ACCESS
219 #endif
220
221 /*
222  * SATA Configs
223  */
224 #ifdef CONFIG_CMD_SATA
225         #define CONFIG_DWC_AHSATA
226         #define CONFIG_SYS_SATA_MAX_DEVICE      1
227         #define CONFIG_DWC_AHSATA_PORT_ID       0
228         #define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_BASE_ADDR
229         #define CONFIG_LBA48
230         #define CONFIG_LIBATA
231 #endif
232
233 /*-----------------------------------------------------------------------
234  * Stack sizes
235  *
236  * The stack sizes are set up in start.S using the settings below
237  */
238 #define CONFIG_STACKSIZE        (128 * 1024)    /* regular stack */
239
240 /*-----------------------------------------------------------------------
241  * Physical Memory Map
242  */
243 #define CONFIG_NR_DRAM_BANKS    1
244 #define PHYS_SDRAM_1            CSD0_BASE_ADDR
245 #define PHYS_SDRAM_1_SIZE       (1024 * 1024 * 1024)
246 #define iomem_valid_addr(addr, size) \
247         (addr >= PHYS_SDRAM_1 && addr <= (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE))
248
249 /*-----------------------------------------------------------------------
250  * FLASH and environment organization
251  */
252 #define CONFIG_SYS_NO_FLASH
253
254 /* Monitor at beginning of flash */
255 #define CONFIG_FSL_ENV_IN_MMC
256
257 #define CONFIG_ENV_SECT_SIZE    (128 * 1024)
258 #define CONFIG_ENV_SIZE         CONFIG_ENV_SECT_SIZE
259
260 #if defined(CONFIG_FSL_ENV_IN_NAND)
261         #define CONFIG_ENV_IS_IN_NAND 1
262         #define CONFIG_ENV_OFFSET       0x100000
263 #elif defined(CONFIG_FSL_ENV_IN_MMC)
264         #define CONFIG_ENV_IS_IN_MMC    1
265         #define CONFIG_ENV_OFFSET       (768 * 1024)
266 #elif defined(CONFIG_FSL_ENV_IN_SF)
267         #define CONFIG_ENV_IS_IN_SPI_FLASH      1
268         #define CONFIG_ENV_SPI_CS               1
269         #define CONFIG_ENV_OFFSET       (768 * 1024)
270 #else
271         #define CONFIG_ENV_IS_NOWHERE   1
272 #endif
273 #endif                          /* __CONFIG_H */