blob: 13638587f19af527562d0c96a4f565b0358de339 [file] [log] [blame]
SARTRE Leodce71762013-06-03 23:30:36 +00001/*
2 *
3 * Congatec Conga-QEVAl board configuration file.
4 *
5 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
6 * Based on Freescale i.MX6Q Sabre Lite board configuration file.
7 * Copyright (C) 2013, Adeneo Embedded <www.adeneo-embedded.com>
8 * Leo Sartre, <lsartre@adeneo-embedded.com>
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
24 */
25
26#ifndef __CONFIG_CGTQMX6EVAL_H
27#define __CONFIG_CGTQMX6EVAL_H
28
29#define CONFIG_MX6
30
31#include "mx6_common.h"
32
33#define CONFIG_DISPLAY_CPUINFO
34#define CONFIG_DISPLAY_BOARDINFO
35
36#define CONFIG_MACH_TYPE 4122
37
38#include <asm/arch/imx-regs.h>
39#include <asm/imx-common/gpio.h>
40
41#define CONFIG_CMDLINE_TAG
42#define CONFIG_SETUP_MEMORY_TAGS
43#define CONFIG_INITRD_TAG
44#define CONFIG_REVISION_TAG
45
46/* Size of malloc() pool */
47#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
48
49#define CONFIG_BOARD_EARLY_INIT_F
50#define CONFIG_MISC_INIT_R
51#define CONFIG_MXC_GPIO
52
53#define CONFIG_MXC_UART
54#define CONFIG_MXC_UART_BASE UART2_BASE
55
56/* MMC Configs */
57#define CONFIG_FSL_ESDHC
58#define CONFIG_FSL_USDHC
59#define CONFIG_SYS_FSL_ESDHC_ADDR 0
60
61#define CONFIG_MMC
62#define CONFIG_CMD_MMC
63#define CONFIG_GENERIC_MMC
64#define CONFIG_BOUNCE_BUFFER
65#define CONFIG_CMD_EXT2
66#define CONFIG_CMD_FAT
67#define CONFIG_DOS_PARTITION
68
69/* Miscellaneous commands */
70#define CONFIG_CMD_BMODE
71
72/* allow to overwrite serial and ethaddr */
73#define CONFIG_ENV_OVERWRITE
74#define CONFIG_CONS_INDEX 1
75#define CONFIG_BAUDRATE 115200
76
77/* Command definition */
78#include <config_cmd_default.h>
79
80#undef CONFIG_CMD_IMLS
81
82#define CONFIG_BOOTDELAY 3
83
84#define CONFIG_LOADADDR 0x12000000
85#define CONFIG_SYS_TEXT_BASE 0x17800000
86
87#define CONFIG_DEFAULT_FDT_FILE "imx6q-congatec.dtb"
88
89#define CONFIG_EXTRA_ENV_SETTINGS \
90 "script=boot.scr\0" \
91 "uimage=uImage\0" \
92 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
93 "boot_dir=/boot\0" \
94 "console=ttymxc1\0" \
95 "fdt_high=0xffffffff\0" \
96 "initrd_high=0xffffffff\0" \
97 "fdt_addr=0x11000000\0" \
98 "boot_fdt=try\0" \
99 "mmcdev=1\0" \
100 "mmcpart=1\0" \
101 "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
102 "mmcargs=setenv bootargs console=${console},${baudrate} " \
103 "root=${mmcroot}\0" \
104 "loadbootscript=" \
105 "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
106 "bootscript=echo Running bootscript from mmc ...; " \
107 "source\0" \
108 "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
109 "${boot_dir}/${uimage}\0" \
110 "loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} " \
111 "${boot_dir}/${fdt_file}\0" \
112 "mmcboot=echo Booting from mmc ...; " \
113 "run mmcargs; " \
114 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
115 "if run loadfdt; then " \
116 "bootm ${loadaddr} - ${fdt_addr}; " \
117 "else " \
118 "if test ${boot_fdt} = try; then " \
119 "bootm; " \
120 "else " \
121 "echo WARN: Cannot load the DT; " \
122 "fi; " \
123 "fi; " \
124 "else " \
125 "bootm; " \
126 "fi;\0"
127
128#define CONFIG_BOOTCOMMAND \
129 "mmc dev ${mmcdev};" \
130 "mmc dev ${mmcdev}; if mmc rescan; then " \
131 "if run loadbootscript; then " \
132 "run bootscript; " \
133 "else " \
134 "if run loaduimage; then " \
135 "run mmcboot; " \
136 "else "\
137 "echo ERR: Fail to boot from mmc; " \
138 "fi; " \
139 "fi; " \
140 "else echo ERR: Fail to boot from mmc; fi"
141
142/* Miscellaneous configurable options */
143#define CONFIG_SYS_LONGHELP
144#define CONFIG_SYS_HUSH_PARSER
145#define CONFIG_SYS_PROMPT "CGT-QMX6-Quad U-Boot > "
146#define CONFIG_AUTO_COMPLETE
147#define CONFIG_SYS_CBSIZE 256
148
149/* Print Buffer Size */
150#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
151#define CONFIG_SYS_MAXARGS 16
152#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
153
154#define CONFIG_SYS_MEMTEST_START 0x10000000
155#define CONFIG_SYS_MEMTEST_END 0x10010000
156#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
157
158#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
159#define CONFIG_SYS_HZ 1000
160
161#define CONFIG_CMDLINE_EDITING
162
163/* Physical Memory Map */
164#define CONFIG_NR_DRAM_BANKS 1
165#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
166#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
167
168#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
169#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
170#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
171
172#define CONFIG_SYS_INIT_SP_OFFSET \
173 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
174#define CONFIG_SYS_INIT_SP_ADDR \
175 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
176
177/* FLASH and environment organization */
178#define CONFIG_SYS_NO_FLASH
179
180#define CONFIG_ENV_SIZE (8 * 1024)
181
182#define CONFIG_ENV_IS_IN_MMC
183
184#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
185#define CONFIG_SYS_MMC_ENV_DEV 0
186
187#define CONFIG_OF_LIBFDT
188#define CONFIG_CMD_BOOTZ
189
190#ifndef CONFIG_SYS_DCACHE_OFF
191#define CONFIG_CMD_CACHE
192#endif
193
194#endif /* __CONFIG_CGTQMX6EVAL_H */