blob: bd57159a87cffc3d688e26e0631ad9dc30c97947 [file] [log] [blame]
Fabio Estevam26e9c972013-04-10 09:32:58 +00001/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX6SL EVK board.
5 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Fabio Estevam26e9c972013-04-10 09:32:58 +00007 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12#include <asm/arch/imx-regs.h>
Fabio Estevamf6db5ac2014-04-11 08:39:43 -030013#include <asm/imx-common/gpio.h>
Alexey Brodkin267d8e22014-02-26 17:47:58 +040014#include <linux/sizes.h>
Fabio Estevam881c2712014-01-09 08:57:12 -020015#include "mx6_common.h"
Fabio Estevam26e9c972013-04-10 09:32:58 +000016
17#define CONFIG_MX6
18#define CONFIG_DISPLAY_CPUINFO
19#define CONFIG_DISPLAY_BOARDINFO
20
21#define MACH_TYPE_MX6SLEVK 4307
22#define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK
23
24#define CONFIG_CMDLINE_TAG
25#define CONFIG_SETUP_MEMORY_TAGS
26#define CONFIG_INITRD_TAG
27#define CONFIG_REVISION_TAG
28
Ye.Li3abe3b82014-09-09 14:51:58 +080029#define CONFIG_SYS_GENERIC_BOARD
30
Fabio Estevam26e9c972013-04-10 09:32:58 +000031/* Size of malloc() pool */
32#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
33
34#define CONFIG_BOARD_EARLY_INIT_F
35#define CONFIG_MXC_GPIO
36
37#define CONFIG_MXC_UART
38#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
39
40/* MMC Configs */
41#define CONFIG_FSL_ESDHC
42#define CONFIG_FSL_USDHC
Peng Fanc7c35972014-09-15 14:59:18 +080043#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
Fabio Estevam26e9c972013-04-10 09:32:58 +000044
45#define CONFIG_MMC
46#define CONFIG_CMD_MMC
47#define CONFIG_GENERIC_MMC
48#define CONFIG_CMD_FAT
49#define CONFIG_DOS_PARTITION
50
Fabio Estevam67b8b9d2013-09-13 00:36:28 -030051#define CONFIG_CMD_PING
52#define CONFIG_CMD_DHCP
53#define CONFIG_CMD_MII
54#define CONFIG_CMD_NET
55#define CONFIG_FEC_MXC
56#define CONFIG_MII
57#define IMX_FEC_BASE ENET_BASE_ADDR
58#define CONFIG_FEC_XCV_TYPE RMII
59#define CONFIG_ETHPRIME "FEC"
60#define CONFIG_FEC_MXC_PHYADDR 0
61
62#define CONFIG_PHYLIB
63#define CONFIG_PHY_SMSC
64
Fabio Estevam26e9c972013-04-10 09:32:58 +000065/* allow to overwrite serial and ethaddr */
66#define CONFIG_ENV_OVERWRITE
67#define CONFIG_CONS_INDEX 1
68#define CONFIG_BAUDRATE 115200
69
70/* Command definition */
71#include <config_cmd_default.h>
72
73#undef CONFIG_CMD_IMLS
74
75#define CONFIG_BOOTDELAY 3
76
Fabio Estevama0c2b8a2013-05-23 13:57:18 +000077#define CONFIG_LOADADDR 0x82000000
Fabio Estevam26e9c972013-04-10 09:32:58 +000078#define CONFIG_SYS_TEXT_BASE 0x87800000
79
80#define CONFIG_EXTRA_ENV_SETTINGS \
81 "script=boot.scr\0" \
Otavio Salvador01064b12014-01-16 19:58:04 -020082 "image=zImage\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000083 "console=ttymxc0\0" \
84 "fdt_high=0xffffffff\0" \
85 "initrd_high=0xffffffff\0" \
86 "fdt_file=imx6sl-evk.dtb\0" \
Fabio Estevama5c5b6e2014-01-22 12:23:32 -020087 "fdt_addr=0x88000000\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000088 "boot_fdt=try\0" \
89 "ip_dyn=yes\0" \
90 "mmcdev=0\0" \
Otavio Salvadorc36bd3f2013-06-28 18:52:41 -030091 "mmcpart=1\0" \
92 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000093 "mmcargs=setenv bootargs console=${console},${baudrate} " \
94 "root=${mmcroot}\0" \
95 "loadbootscript=" \
96 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
97 "bootscript=echo Running bootscript from mmc ...; " \
98 "source\0" \
Otavio Salvador01064b12014-01-16 19:58:04 -020099 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000100 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
101 "mmcboot=echo Booting from mmc ...; " \
102 "run mmcargs; " \
103 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
104 "if run loadfdt; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200105 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000106 "else " \
107 "if test ${boot_fdt} = try; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200108 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000109 "else " \
110 "echo WARN: Cannot load the DT; " \
111 "fi; " \
112 "fi; " \
113 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200114 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000115 "fi;\0" \
116 "netargs=setenv bootargs console=${console},${baudrate} " \
117 "root=/dev/nfs " \
118 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
119 "netboot=echo Booting from net ...; " \
120 "run netargs; " \
121 "if test ${ip_dyn} = yes; then " \
122 "setenv get_cmd dhcp; " \
123 "else " \
124 "setenv get_cmd tftp; " \
125 "fi; " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200126 "${get_cmd} ${image}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000127 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
128 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200129 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000130 "else " \
131 "if test ${boot_fdt} = try; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200132 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000133 "else " \
134 "echo WARN: Cannot load the DT; " \
135 "fi; " \
136 "fi; " \
137 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200138 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000139 "fi;\0"
140
141#define CONFIG_BOOTCOMMAND \
142 "mmc dev ${mmcdev};" \
143 "mmc dev ${mmcdev}; if mmc rescan; then " \
144 "if run loadbootscript; then " \
145 "run bootscript; " \
146 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200147 "if run loadimage; then " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000148 "run mmcboot; " \
149 "else run netboot; " \
150 "fi; " \
151 "fi; " \
152 "else run netboot; fi"
153
154/* Miscellaneous configurable options */
155#define CONFIG_SYS_LONGHELP
156#define CONFIG_SYS_HUSH_PARSER
Fabio Estevam26e9c972013-04-10 09:32:58 +0000157#define CONFIG_AUTO_COMPLETE
158#define CONFIG_SYS_CBSIZE 256
159
160/* Print Buffer Size */
161#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
162#define CONFIG_SYS_MAXARGS 16
163#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
164
165#define CONFIG_SYS_MEMTEST_START 0x80000000
166#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M)
167
168#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Fabio Estevam26e9c972013-04-10 09:32:58 +0000169
170#define CONFIG_CMDLINE_EDITING
171#define CONFIG_STACKSIZE SZ_128K
172
173/* Physical Memory Map */
174#define CONFIG_NR_DRAM_BANKS 1
175#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
176#define PHYS_SDRAM_SIZE SZ_1G
177
178#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
179#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
180#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
181
182#define CONFIG_SYS_INIT_SP_OFFSET \
183 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
184#define CONFIG_SYS_INIT_SP_ADDR \
185 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
186
187/* FLASH and environment organization */
188#define CONFIG_SYS_NO_FLASH
189
190#define CONFIG_ENV_OFFSET (6 * SZ_64K)
191#define CONFIG_ENV_SIZE SZ_8K
192#define CONFIG_ENV_IS_IN_MMC
Fabio Estevam26e9c972013-04-10 09:32:58 +0000193
194#define CONFIG_OF_LIBFDT
195#define CONFIG_CMD_BOOTZ
196
197#ifndef CONFIG_SYS_DCACHE_OFF
198#define CONFIG_CMD_CACHE
199#endif
200
Fabio Estevamf6db5ac2014-04-11 08:39:43 -0300201#define CONFIG_CMD_SF
202#ifdef CONFIG_CMD_SF
203#define CONFIG_SPI_FLASH
204#define CONFIG_SPI_FLASH_STMICRO
205#define CONFIG_MXC_SPI
206#define CONFIG_SF_DEFAULT_BUS 0
Nikita Kiryanov00cd7382014-08-20 15:08:50 +0300207#define CONFIG_SF_DEFAULT_CS 0
Fabio Estevamf6db5ac2014-04-11 08:39:43 -0300208#define CONFIG_SF_DEFAULT_SPEED 20000000
209#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
210#endif
211
Peng Fandd6624a2014-11-10 08:50:41 +0800212/* USB Configs */
213#define CONFIG_CMD_USB
214#ifdef CONFIG_CMD_USB
215#define CONFIG_USB_EHCI
216#define CONFIG_USB_EHCI_MX6
217#define CONFIG_USB_STORAGE
218#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
219#define CONFIG_USB_HOST_ETHER
220#define CONFIG_USB_ETHER_ASIX
221#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
222#define CONFIG_MXC_USB_FLAGS 0
223#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
224#endif
225
Ye.Lia056ba52014-10-30 18:30:54 +0800226#define CONFIG_SYS_FSL_USDHC_NUM 3
227#if defined(CONFIG_ENV_IS_IN_MMC)
228#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC2*/
229#endif
230
Fabio Estevam26e9c972013-04-10 09:32:58 +0000231#endif /* __CONFIG_H */