blob: e5bdcc2c0d7d8e1dbc7db32e4e32cedc0a9e1807 [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>
13#include <asm/sizes.h>
Fabio Estevam881c2712014-01-09 08:57:12 -020014#include "mx6_common.h"
Fabio Estevam26e9c972013-04-10 09:32:58 +000015
16#define CONFIG_MX6
17#define CONFIG_DISPLAY_CPUINFO
18#define CONFIG_DISPLAY_BOARDINFO
19
20#define MACH_TYPE_MX6SLEVK 4307
21#define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK
22
23#define CONFIG_CMDLINE_TAG
24#define CONFIG_SETUP_MEMORY_TAGS
25#define CONFIG_INITRD_TAG
26#define CONFIG_REVISION_TAG
27
28/* Size of malloc() pool */
29#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
30
31#define CONFIG_BOARD_EARLY_INIT_F
32#define CONFIG_MXC_GPIO
33
34#define CONFIG_MXC_UART
35#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
36
37/* MMC Configs */
38#define CONFIG_FSL_ESDHC
39#define CONFIG_FSL_USDHC
40#define CONFIG_SYS_FSL_ESDHC_ADDR 0
41
42#define CONFIG_MMC
43#define CONFIG_CMD_MMC
44#define CONFIG_GENERIC_MMC
45#define CONFIG_CMD_FAT
46#define CONFIG_DOS_PARTITION
47
Fabio Estevam67b8b9d2013-09-13 00:36:28 -030048#define CONFIG_CMD_PING
49#define CONFIG_CMD_DHCP
50#define CONFIG_CMD_MII
51#define CONFIG_CMD_NET
52#define CONFIG_FEC_MXC
53#define CONFIG_MII
54#define IMX_FEC_BASE ENET_BASE_ADDR
55#define CONFIG_FEC_XCV_TYPE RMII
56#define CONFIG_ETHPRIME "FEC"
57#define CONFIG_FEC_MXC_PHYADDR 0
58
59#define CONFIG_PHYLIB
60#define CONFIG_PHY_SMSC
61
Fabio Estevam26e9c972013-04-10 09:32:58 +000062/* allow to overwrite serial and ethaddr */
63#define CONFIG_ENV_OVERWRITE
64#define CONFIG_CONS_INDEX 1
65#define CONFIG_BAUDRATE 115200
66
67/* Command definition */
68#include <config_cmd_default.h>
69
70#undef CONFIG_CMD_IMLS
71
72#define CONFIG_BOOTDELAY 3
73
Fabio Estevama0c2b8a2013-05-23 13:57:18 +000074#define CONFIG_LOADADDR 0x82000000
Fabio Estevam26e9c972013-04-10 09:32:58 +000075#define CONFIG_SYS_TEXT_BASE 0x87800000
76
77#define CONFIG_EXTRA_ENV_SETTINGS \
78 "script=boot.scr\0" \
Otavio Salvador01064b12014-01-16 19:58:04 -020079 "image=zImage\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000080 "console=ttymxc0\0" \
81 "fdt_high=0xffffffff\0" \
82 "initrd_high=0xffffffff\0" \
83 "fdt_file=imx6sl-evk.dtb\0" \
Fabio Estevama5c5b6e2014-01-22 12:23:32 -020084 "fdt_addr=0x88000000\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000085 "boot_fdt=try\0" \
86 "ip_dyn=yes\0" \
87 "mmcdev=0\0" \
Otavio Salvadorc36bd3f2013-06-28 18:52:41 -030088 "mmcpart=1\0" \
89 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000090 "mmcargs=setenv bootargs console=${console},${baudrate} " \
91 "root=${mmcroot}\0" \
92 "loadbootscript=" \
93 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
94 "bootscript=echo Running bootscript from mmc ...; " \
95 "source\0" \
Otavio Salvador01064b12014-01-16 19:58:04 -020096 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000097 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
98 "mmcboot=echo Booting from mmc ...; " \
99 "run mmcargs; " \
100 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
101 "if run loadfdt; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200102 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000103 "else " \
104 "if test ${boot_fdt} = try; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200105 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000106 "else " \
107 "echo WARN: Cannot load the DT; " \
108 "fi; " \
109 "fi; " \
110 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200111 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000112 "fi;\0" \
113 "netargs=setenv bootargs console=${console},${baudrate} " \
114 "root=/dev/nfs " \
115 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
116 "netboot=echo Booting from net ...; " \
117 "run netargs; " \
118 "if test ${ip_dyn} = yes; then " \
119 "setenv get_cmd dhcp; " \
120 "else " \
121 "setenv get_cmd tftp; " \
122 "fi; " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200123 "${get_cmd} ${image}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000124 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
125 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200126 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000127 "else " \
128 "if test ${boot_fdt} = try; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200129 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000130 "else " \
131 "echo WARN: Cannot load the DT; " \
132 "fi; " \
133 "fi; " \
134 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200135 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000136 "fi;\0"
137
138#define CONFIG_BOOTCOMMAND \
139 "mmc dev ${mmcdev};" \
140 "mmc dev ${mmcdev}; if mmc rescan; then " \
141 "if run loadbootscript; then " \
142 "run bootscript; " \
143 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200144 "if run loadimage; then " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000145 "run mmcboot; " \
146 "else run netboot; " \
147 "fi; " \
148 "fi; " \
149 "else run netboot; fi"
150
151/* Miscellaneous configurable options */
152#define CONFIG_SYS_LONGHELP
153#define CONFIG_SYS_HUSH_PARSER
Fabio Estevam26e9c972013-04-10 09:32:58 +0000154#define CONFIG_AUTO_COMPLETE
155#define CONFIG_SYS_CBSIZE 256
156
157/* Print Buffer Size */
158#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
159#define CONFIG_SYS_MAXARGS 16
160#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
161
162#define CONFIG_SYS_MEMTEST_START 0x80000000
163#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M)
164
165#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Fabio Estevam26e9c972013-04-10 09:32:58 +0000166
167#define CONFIG_CMDLINE_EDITING
168#define CONFIG_STACKSIZE SZ_128K
169
170/* Physical Memory Map */
171#define CONFIG_NR_DRAM_BANKS 1
172#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
173#define PHYS_SDRAM_SIZE SZ_1G
174
175#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
176#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
177#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
178
179#define CONFIG_SYS_INIT_SP_OFFSET \
180 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
181#define CONFIG_SYS_INIT_SP_ADDR \
182 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
183
184/* FLASH and environment organization */
185#define CONFIG_SYS_NO_FLASH
186
187#define CONFIG_ENV_OFFSET (6 * SZ_64K)
188#define CONFIG_ENV_SIZE SZ_8K
189#define CONFIG_ENV_IS_IN_MMC
190#define CONFIG_SYS_MMC_ENV_DEV 0
191
192#define CONFIG_OF_LIBFDT
193#define CONFIG_CMD_BOOTZ
194
195#ifndef CONFIG_SYS_DCACHE_OFF
196#define CONFIG_CMD_CACHE
197#endif
198
199#endif /* __CONFIG_H */