blob: 3d05a647d94df151c7e203a69d5a52b5c56861d1 [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
29/* Size of malloc() pool */
30#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
31
32#define CONFIG_BOARD_EARLY_INIT_F
33#define CONFIG_MXC_GPIO
34
35#define CONFIG_MXC_UART
36#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
37
38/* MMC Configs */
39#define CONFIG_FSL_ESDHC
40#define CONFIG_FSL_USDHC
41#define CONFIG_SYS_FSL_ESDHC_ADDR 0
42
43#define CONFIG_MMC
44#define CONFIG_CMD_MMC
45#define CONFIG_GENERIC_MMC
46#define CONFIG_CMD_FAT
47#define CONFIG_DOS_PARTITION
48
Fabio Estevam67b8b9d2013-09-13 00:36:28 -030049#define CONFIG_CMD_PING
50#define CONFIG_CMD_DHCP
51#define CONFIG_CMD_MII
52#define CONFIG_CMD_NET
53#define CONFIG_FEC_MXC
54#define CONFIG_MII
55#define IMX_FEC_BASE ENET_BASE_ADDR
56#define CONFIG_FEC_XCV_TYPE RMII
57#define CONFIG_ETHPRIME "FEC"
58#define CONFIG_FEC_MXC_PHYADDR 0
59
60#define CONFIG_PHYLIB
61#define CONFIG_PHY_SMSC
62
Fabio Estevam26e9c972013-04-10 09:32:58 +000063/* allow to overwrite serial and ethaddr */
64#define CONFIG_ENV_OVERWRITE
65#define CONFIG_CONS_INDEX 1
66#define CONFIG_BAUDRATE 115200
67
68/* Command definition */
69#include <config_cmd_default.h>
70
71#undef CONFIG_CMD_IMLS
72
73#define CONFIG_BOOTDELAY 3
74
Fabio Estevama0c2b8a2013-05-23 13:57:18 +000075#define CONFIG_LOADADDR 0x82000000
Fabio Estevam26e9c972013-04-10 09:32:58 +000076#define CONFIG_SYS_TEXT_BASE 0x87800000
77
78#define CONFIG_EXTRA_ENV_SETTINGS \
79 "script=boot.scr\0" \
Otavio Salvador01064b12014-01-16 19:58:04 -020080 "image=zImage\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000081 "console=ttymxc0\0" \
82 "fdt_high=0xffffffff\0" \
83 "initrd_high=0xffffffff\0" \
84 "fdt_file=imx6sl-evk.dtb\0" \
Fabio Estevama5c5b6e2014-01-22 12:23:32 -020085 "fdt_addr=0x88000000\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000086 "boot_fdt=try\0" \
87 "ip_dyn=yes\0" \
88 "mmcdev=0\0" \
Otavio Salvadorc36bd3f2013-06-28 18:52:41 -030089 "mmcpart=1\0" \
90 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000091 "mmcargs=setenv bootargs console=${console},${baudrate} " \
92 "root=${mmcroot}\0" \
93 "loadbootscript=" \
94 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
95 "bootscript=echo Running bootscript from mmc ...; " \
96 "source\0" \
Otavio Salvador01064b12014-01-16 19:58:04 -020097 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Fabio Estevam26e9c972013-04-10 09:32:58 +000098 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
99 "mmcboot=echo Booting from mmc ...; " \
100 "run mmcargs; " \
101 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
102 "if run loadfdt; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200103 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000104 "else " \
105 "if test ${boot_fdt} = try; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200106 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000107 "else " \
108 "echo WARN: Cannot load the DT; " \
109 "fi; " \
110 "fi; " \
111 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200112 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000113 "fi;\0" \
114 "netargs=setenv bootargs console=${console},${baudrate} " \
115 "root=/dev/nfs " \
116 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
117 "netboot=echo Booting from net ...; " \
118 "run netargs; " \
119 "if test ${ip_dyn} = yes; then " \
120 "setenv get_cmd dhcp; " \
121 "else " \
122 "setenv get_cmd tftp; " \
123 "fi; " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200124 "${get_cmd} ${image}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000125 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
126 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200127 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000128 "else " \
129 "if test ${boot_fdt} = try; then " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200130 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000131 "else " \
132 "echo WARN: Cannot load the DT; " \
133 "fi; " \
134 "fi; " \
135 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200136 "bootz; " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000137 "fi;\0"
138
139#define CONFIG_BOOTCOMMAND \
140 "mmc dev ${mmcdev};" \
141 "mmc dev ${mmcdev}; if mmc rescan; then " \
142 "if run loadbootscript; then " \
143 "run bootscript; " \
144 "else " \
Otavio Salvador01064b12014-01-16 19:58:04 -0200145 "if run loadimage; then " \
Fabio Estevam26e9c972013-04-10 09:32:58 +0000146 "run mmcboot; " \
147 "else run netboot; " \
148 "fi; " \
149 "fi; " \
150 "else run netboot; fi"
151
152/* Miscellaneous configurable options */
153#define CONFIG_SYS_LONGHELP
154#define CONFIG_SYS_HUSH_PARSER
Fabio Estevam26e9c972013-04-10 09:32:58 +0000155#define CONFIG_AUTO_COMPLETE
156#define CONFIG_SYS_CBSIZE 256
157
158/* Print Buffer Size */
159#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
160#define CONFIG_SYS_MAXARGS 16
161#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
162
163#define CONFIG_SYS_MEMTEST_START 0x80000000
164#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M)
165
166#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Fabio Estevam26e9c972013-04-10 09:32:58 +0000167
168#define CONFIG_CMDLINE_EDITING
169#define CONFIG_STACKSIZE SZ_128K
170
171/* Physical Memory Map */
172#define CONFIG_NR_DRAM_BANKS 1
173#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
174#define PHYS_SDRAM_SIZE SZ_1G
175
176#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
177#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
178#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
179
180#define CONFIG_SYS_INIT_SP_OFFSET \
181 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
182#define CONFIG_SYS_INIT_SP_ADDR \
183 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
184
185/* FLASH and environment organization */
186#define CONFIG_SYS_NO_FLASH
187
188#define CONFIG_ENV_OFFSET (6 * SZ_64K)
189#define CONFIG_ENV_SIZE SZ_8K
190#define CONFIG_ENV_IS_IN_MMC
191#define CONFIG_SYS_MMC_ENV_DEV 0
192
193#define CONFIG_OF_LIBFDT
194#define CONFIG_CMD_BOOTZ
195
196#ifndef CONFIG_SYS_DCACHE_OFF
197#define CONFIG_CMD_CACHE
198#endif
199
Fabio Estevamf6db5ac2014-04-11 08:39:43 -0300200#define CONFIG_CMD_SF
201#ifdef CONFIG_CMD_SF
202#define CONFIG_SPI_FLASH
203#define CONFIG_SPI_FLASH_STMICRO
204#define CONFIG_MXC_SPI
205#define CONFIG_SF_DEFAULT_BUS 0
206#define CONFIG_SF_DEFAULT_CS (0 | (IMX_GPIO_NR(4, 11) << 8))
207#define CONFIG_SF_DEFAULT_SPEED 20000000
208#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
209#endif
210
Fabio Estevam26e9c972013-04-10 09:32:58 +0000211#endif /* __CONFIG_H */