blob: 1424347aad84cbcd3d419c54773a7871564f22af [file] [log] [blame]
Marek Vasutd5914012011-01-19 04:40:37 +00001/*
2 * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
3 *
4 * (C) Copyright 2009 Freescale Semiconductor, Inc.
5 *
6 * Configuration settings for the MX51EVK 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 <config_cmd_default.h>
28
29/*
30 * High Level Board Configuration Options
31 */
32/* An i.MX51 CPU */
33#define CONFIG_MX51
34#include <asm/arch/imx-regs.h>
35
36#define CONFIG_SYS_MX5_HCLK 24000000
37#define CONFIG_SYS_MX5_CLK32 32768
38#define CONFIG_DISPLAY_CPUINFO
39#define CONFIG_DISPLAY_BOARDINFO
40
41#define CONFIG_L2_OFF
42
43/*
44 * Bootloader Components Configuration
45 */
46#define CONFIG_CMD_SPI
47#define CONFIG_CMD_SF
48#define CONFIG_CMD_MMC
49#define CONFIG_CMD_FAT
50#define CONFIG_CMD_IDE
51#undef CONFIG_CMD_IMLS
52
53/*
54 * Environmental settings
55 */
56
57#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
58#define CONFIG_ENV_SECT_SIZE (1 * 64 * 1024)
59#define CONFIG_ENV_SIZE (4 * 1024)
60
61/*
62 * ATAG setup
63 */
64#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
65#define CONFIG_REVISION_TAG
66#define CONFIG_SETUP_MEMORY_TAGS
67#define CONFIG_INITRD_TAG
68
69/*
70 * Size of malloc() pool
71 */
72#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
73
74#define CONFIG_BOARD_EARLY_INIT_F
75#define BOARD_LATE_INIT
76
77/*
78 * Hardware drivers
79 */
80#define CONFIG_MXC_UART
81#define CONFIG_SYS_MX51_UART1
82#define CONFIG_CONS_INDEX 1
83#define CONFIG_BAUDRATE 115200
84#define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200}
85
86#define CONFIG_MXC_GPIO
87
88/*
89 * SPI Interface
90 */
91#ifdef CONFIG_CMD_SPI
92
93#define CONFIG_HARD_SPI
94#define CONFIG_MXC_SPI
95#define CONFIG_DEFAULT_SPI_BUS 1
96#define CONFIG_DEFAULT_SPI_MODE (SPI_MODE_0 | SPI_CS_HIGH)
97
98/* SPI FLASH */
99#ifdef CONFIG_CMD_SF
100
101#define CONFIG_SPI_FLASH
102#define CONFIG_SPI_FLASH_SST
103#define CONFIG_SPI_FLASH_CS (1 | 121 << 8)
104#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
105#define CONFIG_SF_DEFAULT_SPEED 25000000
106
107#define CONFIG_ENV_SPI_CS (1 | 121 << 8)
108#define CONFIG_ENV_SPI_BUS 0
109#define CONFIG_ENV_SPI_MAX_HZ 25000000
110#define CONFIG_ENV_SPI_MODE (SPI_MODE_0)
111#define CONFIG_FSL_ENV_IN_SF
112#define CONFIG_ENV_IS_IN_SPI_FLASH
113#define CONFIG_SYS_NO_FLASH
114
115#else
116#define CONFIG_ENV_IS_NOWHERE
117#endif
118
119/* SPI PMIC */
120#define CONFIG_FSL_PMIC
121#define CONFIG_FSL_PMIC_BUS 0
122#define CONFIG_FSL_PMIC_CS (0 | 120 << 8)
123#define CONFIG_FSL_PMIC_CLK 25000000
124#define CONFIG_FSL_PMIC_MODE (SPI_MODE_0 | SPI_CS_HIGH)
125#define CONFIG_RTC_MC13783
126#endif
127
128/*
129 * MMC Configs
130 */
131#ifdef CONFIG_CMD_MMC
132#define CONFIG_MMC
133#define CONFIG_GENERIC_MMC
134#define CONFIG_FSL_ESDHC
135#define CONFIG_SYS_FSL_ESDHC_ADDR 0
136#define CONFIG_SYS_FSL_ESDHC_NUM 2
137#endif
138
139/*
140 * ATA/IDE
141 */
142#ifdef CONFIG_CMD_IDE
143#define CONFIG_LBA48
144#undef CONFIG_IDE_LED
145#undef CONFIG_IDE_RESET
146
147#define CONFIG_MX51_PATA
148
149#define __io
150
151#define CONFIG_SYS_IDE_MAXBUS 1
152#define CONFIG_SYS_IDE_MAXDEVICE 1
153
154#define CONFIG_SYS_ATA_BASE_ADDR 0x83fe0000
155#define CONFIG_SYS_ATA_IDE0_OFFSET 0x0
156
157#define CONFIG_SYS_ATA_DATA_OFFSET 0xa0
158#define CONFIG_SYS_ATA_REG_OFFSET 0xa0
159#define CONFIG_SYS_ATA_ALT_OFFSET 0xd8
160
161#define CONFIG_SYS_ATA_STRIDE 4
162
163#define CONFIG_IDE_PREINIT
164#define CONFIG_MXC_ATA_PIO_MODE 4
165#endif
166
167/*
168 * Filesystems
169 */
170#ifdef CONFIG_CMD_FAT
171#define CONFIG_DOS_PARTITION
172#endif
173
174#undef CONFIG_CMD_PING
175#undef CONFIG_CMD_DHCP
176#undef CONFIG_CMD_NET
177#undef CONFIG_CMD_NFS
178#define CONFIG_CMD_DATE
179
180/*
181 * Miscellaneous configurable options
182 */
183#define CONFIG_ENV_OVERWRITE
184#define CONFIG_BOOTDELAY 3
185#define CONFIG_LOADADDR 0x90800000
186
187#define CONFIG_SYS_LONGHELP /* undef to save memory */
188#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
189#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
190#define CONFIG_SYS_PROMPT "Efika> "
191#define CONFIG_AUTO_COMPLETE
192#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
193/* Print Buffer Size */
194#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
195#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
196#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
197
198#define CONFIG_SYS_MEMTEST_START 0x90000000
199#define CONFIG_SYS_MEMTEST_END 0x10000
200
201#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
202
203#define CONFIG_SYS_HZ 1000
204#define CONFIG_CMDLINE_EDITING
205
206/*-----------------------------------------------------------------------
207 * Stack sizes
208 *
209 * The stack sizes are set up in start.S using the settings below
210 */
211#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
212
213/*-----------------------------------------------------------------------
214 * Physical Memory Map
215 */
216#define CONFIG_NR_DRAM_BANKS 1
217#define PHYS_SDRAM_1 CSD0_BASE_ADDR
218#define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024)
219
220#define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1)
221#define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR)
222#define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE)
223
224#define CONFIG_SYS_INIT_SP_OFFSET \
225 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
226#define CONFIG_SYS_INIT_SP_ADDR \
227 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
228
229#define CONFIG_SYS_DDR_CLKSEL 0
230#define CONFIG_SYS_CLKTL_CBCDR 0x59E35100
231
232#endif