blob: ced4d6c84a1058378360dc344072dd4e512c47b0 [file] [log] [blame]
SARTRE Leo9b75bad2013-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 *
Wolfgang Denk1a459662013-07-08 09:37:19 +020010 * SPDX-License-Identifier: GPL-2.0+
SARTRE Leo9b75bad2013-06-03 23:30:36 +000011 */
12
13#ifndef __CONFIG_CGTQMX6EVAL_H
14#define __CONFIG_CGTQMX6EVAL_H
15
SARTRE Leo9b75bad2013-06-03 23:30:36 +000016#include "mx6_common.h"
17
SARTRE Leo9b75bad2013-06-03 23:30:36 +000018#define CONFIG_MACH_TYPE 4122
19
SARTRE Leo9b75bad2013-06-03 23:30:36 +000020/* Size of malloc() pool */
21#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
22
23#define CONFIG_BOARD_EARLY_INIT_F
24#define CONFIG_MISC_INIT_R
SARTRE Leo9b75bad2013-06-03 23:30:36 +000025
26#define CONFIG_MXC_UART
27#define CONFIG_MXC_UART_BASE UART2_BASE
28
29/* MMC Configs */
30#define CONFIG_FSL_ESDHC
31#define CONFIG_FSL_USDHC
32#define CONFIG_SYS_FSL_ESDHC_ADDR 0
33
34#define CONFIG_MMC
35#define CONFIG_CMD_MMC
36#define CONFIG_GENERIC_MMC
37#define CONFIG_BOUNCE_BUFFER
38#define CONFIG_CMD_EXT2
39#define CONFIG_CMD_FAT
40#define CONFIG_DOS_PARTITION
41
42/* Miscellaneous commands */
43#define CONFIG_CMD_BMODE
44
45/* allow to overwrite serial and ethaddr */
46#define CONFIG_ENV_OVERWRITE
47#define CONFIG_CONS_INDEX 1
48#define CONFIG_BAUDRATE 115200
49
50/* Command definition */
SARTRE Leo9b75bad2013-06-03 23:30:36 +000051
52#define CONFIG_BOOTDELAY 3
53
54#define CONFIG_LOADADDR 0x12000000
55#define CONFIG_SYS_TEXT_BASE 0x17800000
56
57#define CONFIG_DEFAULT_FDT_FILE "imx6q-congatec.dtb"
58
59#define CONFIG_EXTRA_ENV_SETTINGS \
60 "script=boot.scr\0" \
Otavio Salvador4ac0c2b2014-01-16 19:57:56 -020061 "image=zImage\0" \
SARTRE Leo9b75bad2013-06-03 23:30:36 +000062 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
63 "boot_dir=/boot\0" \
64 "console=ttymxc1\0" \
65 "fdt_high=0xffffffff\0" \
66 "initrd_high=0xffffffff\0" \
Otavio Salvador6584a1b2013-12-16 20:44:04 -020067 "fdt_addr=0x18000000\0" \
SARTRE Leo9b75bad2013-06-03 23:30:36 +000068 "boot_fdt=try\0" \
69 "mmcdev=1\0" \
70 "mmcpart=1\0" \
71 "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
72 "mmcargs=setenv bootargs console=${console},${baudrate} " \
73 "root=${mmcroot}\0" \
74 "loadbootscript=" \
75 "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
76 "bootscript=echo Running bootscript from mmc ...; " \
77 "source\0" \
Otavio Salvador4ac0c2b2014-01-16 19:57:56 -020078 "loadimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
79 "${boot_dir}/${image}\0" \
SARTRE Leo9b75bad2013-06-03 23:30:36 +000080 "loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} " \
81 "${boot_dir}/${fdt_file}\0" \
82 "mmcboot=echo Booting from mmc ...; " \
83 "run mmcargs; " \
84 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
85 "if run loadfdt; then " \
Otavio Salvador4ac0c2b2014-01-16 19:57:56 -020086 "bootz ${loadaddr} - ${fdt_addr}; " \
SARTRE Leo9b75bad2013-06-03 23:30:36 +000087 "else " \
88 "if test ${boot_fdt} = try; then " \
Otavio Salvador4ac0c2b2014-01-16 19:57:56 -020089 "bootz; " \
SARTRE Leo9b75bad2013-06-03 23:30:36 +000090 "else " \
91 "echo WARN: Cannot load the DT; " \
92 "fi; " \
93 "fi; " \
94 "else " \
Otavio Salvador4ac0c2b2014-01-16 19:57:56 -020095 "bootz; " \
SARTRE Leo9b75bad2013-06-03 23:30:36 +000096 "fi;\0"
97
98#define CONFIG_BOOTCOMMAND \
99 "mmc dev ${mmcdev};" \
100 "mmc dev ${mmcdev}; if mmc rescan; then " \
101 "if run loadbootscript; then " \
102 "run bootscript; " \
103 "else " \
Otavio Salvador4ac0c2b2014-01-16 19:57:56 -0200104 "if run loadimage; then " \
SARTRE Leo9b75bad2013-06-03 23:30:36 +0000105 "run mmcboot; " \
106 "else "\
107 "echo ERR: Fail to boot from mmc; " \
108 "fi; " \
109 "fi; " \
110 "else echo ERR: Fail to boot from mmc; fi"
111
112/* Miscellaneous configurable options */
113#define CONFIG_SYS_LONGHELP
114#define CONFIG_SYS_HUSH_PARSER
115#define CONFIG_SYS_PROMPT "CGT-QMX6-Quad U-Boot > "
116#define CONFIG_AUTO_COMPLETE
117#define CONFIG_SYS_CBSIZE 256
118
119/* Print Buffer Size */
120#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
121#define CONFIG_SYS_MAXARGS 16
122#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
123
124#define CONFIG_SYS_MEMTEST_START 0x10000000
125#define CONFIG_SYS_MEMTEST_END 0x10010000
126#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
127
128#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
SARTRE Leo9b75bad2013-06-03 23:30:36 +0000129
130#define CONFIG_CMDLINE_EDITING
131
132/* Physical Memory Map */
133#define CONFIG_NR_DRAM_BANKS 1
134#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
135#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
136
137#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
138#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
139#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
140
141#define CONFIG_SYS_INIT_SP_OFFSET \
142 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
143#define CONFIG_SYS_INIT_SP_ADDR \
144 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
145
Peter Robinson056845c2015-05-22 17:30:45 +0100146/* Environment organization */
SARTRE Leo9b75bad2013-06-03 23:30:36 +0000147#define CONFIG_ENV_SIZE (8 * 1024)
148
149#define CONFIG_ENV_IS_IN_MMC
150
151#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
152#define CONFIG_SYS_MMC_ENV_DEV 0
153
154#define CONFIG_OF_LIBFDT
155#define CONFIG_CMD_BOOTZ
156
157#ifndef CONFIG_SYS_DCACHE_OFF
158#define CONFIG_CMD_CACHE
159#endif
160
161#endif /* __CONFIG_CGTQMX6EVAL_H */