blob: 22aec4f1762c063083b7c896726ec909dd2cbc2e [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 *
Wolfgang Denk3765b3e2013-10-07 13:07:26 +02008 * SPDX-License-Identifier: GPL-2.0+
Marek Vasutd5914012011-01-19 04:40:37 +00009 */
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
Marek Vasutd5914012011-01-19 04:40:37 +000014/*
15 * High Level Board Configuration Options
16 */
17/* An i.MX51 CPU */
18#define CONFIG_MX51
Marek Vasutaf708cb2011-09-25 09:55:43 +000019
20#define machine_is_efikamx() (CONFIG_MACH_TYPE == MACH_TYPE_MX51_EFIKAMX)
21#define machine_is_efikasb() (CONFIG_MACH_TYPE == MACH_TYPE_MX51_EFIKASB)
22
Marek Vasutd5914012011-01-19 04:40:37 +000023#include <asm/arch/imx-regs.h>
24
Marek Vasutd5914012011-01-19 04:40:37 +000025#define CONFIG_DISPLAY_CPUINFO
26#define CONFIG_DISPLAY_BOARDINFO
27
Jana Rapava745525f2011-07-11 14:16:44 +000028#define CONFIG_SYS_TEXT_BASE 0x97800000
29
Marek Vasutd98d8bc2011-06-24 21:46:07 +020030#define CONFIG_SYS_ICACHE_OFF
31#define CONFIG_SYS_DCACHE_OFF
32
Marek Vasutd5914012011-01-19 04:40:37 +000033/*
34 * Bootloader Components Configuration
35 */
36#define CONFIG_CMD_SPI
37#define CONFIG_CMD_SF
38#define CONFIG_CMD_MMC
39#define CONFIG_CMD_FAT
Marek Vasut4e0499e2011-07-11 14:16:45 +000040#define CONFIG_CMD_EXT2
Marek Vasutd5914012011-01-19 04:40:37 +000041#define CONFIG_CMD_IDE
Marek Vasutd98d8bc2011-06-24 21:46:07 +020042#define CONFIG_CMD_DATE
Marek Vasutd5914012011-01-19 04:40:37 +000043
44/*
45 * Environmental settings
46 */
47
48#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
49#define CONFIG_ENV_SECT_SIZE (1 * 64 * 1024)
50#define CONFIG_ENV_SIZE (4 * 1024)
51
52/*
53 * ATAG setup
54 */
55#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
56#define CONFIG_REVISION_TAG
57#define CONFIG_SETUP_MEMORY_TAGS
58#define CONFIG_INITRD_TAG
59
Grant Likely2fa8ca92011-03-28 09:59:07 +000060#define CONFIG_OF_LIBFDT 1
61
Marek Vasutd5914012011-01-19 04:40:37 +000062/*
63 * Size of malloc() pool
64 */
65#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
66
67#define CONFIG_BOARD_EARLY_INIT_F
Helmut Raiger9660e442011-10-20 04:19:47 +000068#define CONFIG_BOARD_LATE_INIT
Marek Vasutd5914012011-01-19 04:40:37 +000069
70/*
71 * Hardware drivers
72 */
73#define CONFIG_MXC_UART
Stefano Babic40f6fff2011-11-22 15:22:39 +010074#define CONFIG_MXC_UART_BASE UART1_BASE
Marek Vasutd5914012011-01-19 04:40:37 +000075#define CONFIG_CONS_INDEX 1
76#define CONFIG_BAUDRATE 115200
Marek Vasutd5914012011-01-19 04:40:37 +000077
78#define CONFIG_MXC_GPIO
79
80/*
81 * SPI Interface
82 */
83#ifdef CONFIG_CMD_SPI
84
85#define CONFIG_HARD_SPI
86#define CONFIG_MXC_SPI
87#define CONFIG_DEFAULT_SPI_BUS 1
88#define CONFIG_DEFAULT_SPI_MODE (SPI_MODE_0 | SPI_CS_HIGH)
89
90/* SPI FLASH */
91#ifdef CONFIG_CMD_SF
92
Marek Vasutd5914012011-01-19 04:40:37 +000093#define CONFIG_SPI_FLASH_SST
Nikita Kiryanov155fa9a2014-08-20 15:08:50 +030094#define CONFIG_SF_DEFAULT_CS 1
Marek Vasutd5914012011-01-19 04:40:37 +000095#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
96#define CONFIG_SF_DEFAULT_SPEED 25000000
97
Nikita Kiryanov155fa9a2014-08-20 15:08:50 +030098#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
Marek Vasutd5914012011-01-19 04:40:37 +000099#define CONFIG_ENV_SPI_BUS 0
100#define CONFIG_ENV_SPI_MAX_HZ 25000000
101#define CONFIG_ENV_SPI_MODE (SPI_MODE_0)
102#define CONFIG_FSL_ENV_IN_SF
103#define CONFIG_ENV_IS_IN_SPI_FLASH
104#define CONFIG_SYS_NO_FLASH
105
106#else
107#define CONFIG_ENV_IS_NOWHERE
108#endif
109
110/* SPI PMIC */
Łukasz Majewskibe3b51a2012-11-13 03:22:14 +0000111#define CONFIG_POWER
112#define CONFIG_POWER_SPI
113#define CONFIG_POWER_FSL
Marek Vasutd5914012011-01-19 04:40:37 +0000114#define CONFIG_FSL_PMIC_BUS 0
115#define CONFIG_FSL_PMIC_CS (0 | 120 << 8)
116#define CONFIG_FSL_PMIC_CLK 25000000
117#define CONFIG_FSL_PMIC_MODE (SPI_MODE_0 | SPI_CS_HIGH)
Stefano Babic9c38f7d2011-10-06 11:44:26 +0200118#define CONFIG_FSL_PMIC_BITLEN 32
Fabio Estevam4e8b7542011-10-24 06:44:15 +0000119#define CONFIG_RTC_MC13XXX
Marek Vasutd5914012011-01-19 04:40:37 +0000120#endif
121
122/*
123 * MMC Configs
124 */
125#ifdef CONFIG_CMD_MMC
126#define CONFIG_MMC
127#define CONFIG_GENERIC_MMC
128#define CONFIG_FSL_ESDHC
129#define CONFIG_SYS_FSL_ESDHC_ADDR 0
130#define CONFIG_SYS_FSL_ESDHC_NUM 2
131#endif
132
133/*
134 * ATA/IDE
135 */
136#ifdef CONFIG_CMD_IDE
137#define CONFIG_LBA48
138#undef CONFIG_IDE_LED
139#undef CONFIG_IDE_RESET
140
141#define CONFIG_MX51_PATA
142
143#define __io
144
145#define CONFIG_SYS_IDE_MAXBUS 1
146#define CONFIG_SYS_IDE_MAXDEVICE 1
147
148#define CONFIG_SYS_ATA_BASE_ADDR 0x83fe0000
149#define CONFIG_SYS_ATA_IDE0_OFFSET 0x0
150
151#define CONFIG_SYS_ATA_DATA_OFFSET 0xa0
152#define CONFIG_SYS_ATA_REG_OFFSET 0xa0
153#define CONFIG_SYS_ATA_ALT_OFFSET 0xd8
154
155#define CONFIG_SYS_ATA_STRIDE 4
156
157#define CONFIG_IDE_PREINIT
158#define CONFIG_MXC_ATA_PIO_MODE 4
159#endif
160
161/*
Marek Vasutd98d8bc2011-06-24 21:46:07 +0200162 * USB
163 */
164#define CONFIG_CMD_USB
165#ifdef CONFIG_CMD_USB
166#define CONFIG_USB_EHCI /* Enable EHCI USB support */
167#define CONFIG_USB_EHCI_MX5
168#define CONFIG_USB_ULPI
169#define CONFIG_USB_ULPI_VIEWPORT
170#define CONFIG_MXC_USB_PORT 1
171#if (CONFIG_MXC_USB_PORT == 0)
172#define CONFIG_MXC_USB_PORTSC (1 << 28)
173#define CONFIG_MXC_USB_FLAGS MXC_EHCI_INTERNAL_PHY
174#else
175#define CONFIG_MXC_USB_PORTSC (2 << 30)
176#define CONFIG_MXC_USB_FLAGS 0
177#endif
178#define CONFIG_EHCI_IS_TDI
179#define CONFIG_USB_STORAGE
180#define CONFIG_USB_HOST_ETHER
181#define CONFIG_USB_KEYBOARD
182#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
183#define CONFIG_PREBOOT
184/* USB NET */
185#ifdef CONFIG_CMD_NET
186#define CONFIG_USB_ETHER_ASIX
Marek Vasutd98d8bc2011-06-24 21:46:07 +0200187#define CONFIG_CMD_PING
188#define CONFIG_CMD_DHCP
189#endif
190#endif /* CONFIG_CMD_USB */
191
192/*
Marek Vasutd5914012011-01-19 04:40:37 +0000193 * Filesystems
194 */
195#ifdef CONFIG_CMD_FAT
196#define CONFIG_DOS_PARTITION
Marek Vasutd98d8bc2011-06-24 21:46:07 +0200197#endif
Marek Vasutd5914012011-01-19 04:40:37 +0000198
199/*
200 * Miscellaneous configurable options
201 */
202#define CONFIG_ENV_OVERWRITE
203#define CONFIG_BOOTDELAY 3
204#define CONFIG_LOADADDR 0x90800000
205
206#define CONFIG_SYS_LONGHELP /* undef to save memory */
207#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
Marek Vasutd5914012011-01-19 04:40:37 +0000208#define CONFIG_SYS_PROMPT "Efika> "
209#define CONFIG_AUTO_COMPLETE
210#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
211/* Print Buffer Size */
212#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
213#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
214#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
215
216#define CONFIG_SYS_MEMTEST_START 0x90000000
Fabio Estevamf361a5c2012-02-09 14:25:11 +0000217#define CONFIG_SYS_MEMTEST_END 0x90010000
Marek Vasutd5914012011-01-19 04:40:37 +0000218
219#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
220
Marek Vasutd5914012011-01-19 04:40:37 +0000221#define CONFIG_CMDLINE_EDITING
222
223/*-----------------------------------------------------------------------
Marek Vasutd5914012011-01-19 04:40:37 +0000224 * Physical Memory Map
225 */
226#define CONFIG_NR_DRAM_BANKS 1
227#define PHYS_SDRAM_1 CSD0_BASE_ADDR
228#define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024)
229
230#define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1)
231#define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR)
232#define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE)
233
234#define CONFIG_SYS_INIT_SP_OFFSET \
235 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
236#define CONFIG_SYS_INIT_SP_ADDR \
237 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
238
239#define CONFIG_SYS_DDR_CLKSEL 0
Marek Vasutb7171d92011-09-14 18:16:57 +0000240#define CONFIG_SYS_CLKTL_CBCDR 0x59E35145
Benoît Thébaudeau39e85762012-11-05 10:07:04 +0000241#define CONFIG_SYS_MAIN_PWR_ON
Marek Vasutd5914012011-01-19 04:40:37 +0000242
243#endif