blob: ca8f2f607d9af4631b9c8b31b5ae49d317dcc308 [file] [log] [blame]
Fabio Estevam57ca4322013-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 Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Fabio Estevam57ca4322013-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>
14
15#define CONFIG_MX6
16#define CONFIG_DISPLAY_CPUINFO
17#define CONFIG_DISPLAY_BOARDINFO
18
19#define MACH_TYPE_MX6SLEVK 4307
20#define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK
21
22#define CONFIG_CMDLINE_TAG
23#define CONFIG_SETUP_MEMORY_TAGS
24#define CONFIG_INITRD_TAG
25#define CONFIG_REVISION_TAG
26
27/* Size of malloc() pool */
28#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
29
30#define CONFIG_BOARD_EARLY_INIT_F
31#define CONFIG_MXC_GPIO
32
33#define CONFIG_MXC_UART
34#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
35
36/* MMC Configs */
37#define CONFIG_FSL_ESDHC
38#define CONFIG_FSL_USDHC
39#define CONFIG_SYS_FSL_ESDHC_ADDR 0
40
41#define CONFIG_MMC
42#define CONFIG_CMD_MMC
43#define CONFIG_GENERIC_MMC
44#define CONFIG_CMD_FAT
45#define CONFIG_DOS_PARTITION
46
47/* allow to overwrite serial and ethaddr */
48#define CONFIG_ENV_OVERWRITE
49#define CONFIG_CONS_INDEX 1
50#define CONFIG_BAUDRATE 115200
51
52/* Command definition */
53#include <config_cmd_default.h>
54
55#undef CONFIG_CMD_IMLS
56
57#define CONFIG_BOOTDELAY 3
58
Fabio Estevamaf0a37f2013-05-23 13:57:18 +000059#define CONFIG_LOADADDR 0x82000000
Fabio Estevam57ca4322013-04-10 09:32:58 +000060#define CONFIG_SYS_TEXT_BASE 0x87800000
61
62#define CONFIG_EXTRA_ENV_SETTINGS \
63 "script=boot.scr\0" \
64 "uimage=uImage\0" \
65 "console=ttymxc0\0" \
66 "fdt_high=0xffffffff\0" \
67 "initrd_high=0xffffffff\0" \
68 "fdt_file=imx6sl-evk.dtb\0" \
69 "fdt_addr=0x81000000\0" \
70 "boot_fdt=try\0" \
71 "ip_dyn=yes\0" \
72 "mmcdev=0\0" \
Otavio Salvador94aeb8a2013-06-28 18:52:41 -030073 "mmcpart=1\0" \
74 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Fabio Estevam57ca4322013-04-10 09:32:58 +000075 "mmcargs=setenv bootargs console=${console},${baudrate} " \
76 "root=${mmcroot}\0" \
77 "loadbootscript=" \
78 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
79 "bootscript=echo Running bootscript from mmc ...; " \
80 "source\0" \
81 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
82 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
83 "mmcboot=echo Booting from mmc ...; " \
84 "run mmcargs; " \
85 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
86 "if run loadfdt; then " \
87 "bootm ${loadaddr} - ${fdt_addr}; " \
88 "else " \
89 "if test ${boot_fdt} = try; then " \
90 "bootm; " \
91 "else " \
92 "echo WARN: Cannot load the DT; " \
93 "fi; " \
94 "fi; " \
95 "else " \
96 "bootm; " \
97 "fi;\0" \
98 "netargs=setenv bootargs console=${console},${baudrate} " \
99 "root=/dev/nfs " \
100 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
101 "netboot=echo Booting from net ...; " \
102 "run netargs; " \
103 "if test ${ip_dyn} = yes; then " \
104 "setenv get_cmd dhcp; " \
105 "else " \
106 "setenv get_cmd tftp; " \
107 "fi; " \
108 "${get_cmd} ${uimage}; " \
109 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
110 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
111 "bootm ${loadaddr} - ${fdt_addr}; " \
112 "else " \
113 "if test ${boot_fdt} = try; then " \
114 "bootm; " \
115 "else " \
116 "echo WARN: Cannot load the DT; " \
117 "fi; " \
118 "fi; " \
119 "else " \
120 "bootm; " \
121 "fi;\0"
122
123#define CONFIG_BOOTCOMMAND \
124 "mmc dev ${mmcdev};" \
125 "mmc dev ${mmcdev}; if mmc rescan; then " \
126 "if run loadbootscript; then " \
127 "run bootscript; " \
128 "else " \
129 "if run loaduimage; then " \
130 "run mmcboot; " \
131 "else run netboot; " \
132 "fi; " \
133 "fi; " \
134 "else run netboot; fi"
135
136/* Miscellaneous configurable options */
137#define CONFIG_SYS_LONGHELP
138#define CONFIG_SYS_HUSH_PARSER
139#define CONFIG_SYS_PROMPT "=> "
140#define CONFIG_AUTO_COMPLETE
141#define CONFIG_SYS_CBSIZE 256
142
143/* Print Buffer Size */
144#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
145#define CONFIG_SYS_MAXARGS 16
146#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
147
148#define CONFIG_SYS_MEMTEST_START 0x80000000
149#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M)
150
151#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
152#define CONFIG_SYS_HZ 1000
153
154#define CONFIG_CMDLINE_EDITING
155#define CONFIG_STACKSIZE SZ_128K
156
157/* Physical Memory Map */
158#define CONFIG_NR_DRAM_BANKS 1
159#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
160#define PHYS_SDRAM_SIZE SZ_1G
161
162#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
163#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
164#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
165
166#define CONFIG_SYS_INIT_SP_OFFSET \
167 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
168#define CONFIG_SYS_INIT_SP_ADDR \
169 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
170
171/* FLASH and environment organization */
172#define CONFIG_SYS_NO_FLASH
173
174#define CONFIG_ENV_OFFSET (6 * SZ_64K)
175#define CONFIG_ENV_SIZE SZ_8K
176#define CONFIG_ENV_IS_IN_MMC
177#define CONFIG_SYS_MMC_ENV_DEV 0
178
179#define CONFIG_OF_LIBFDT
180#define CONFIG_CMD_BOOTZ
181
182#ifndef CONFIG_SYS_DCACHE_OFF
183#define CONFIG_CMD_CACHE
184#endif
185
186#endif /* __CONFIG_H */