]> Git Repo - J-u-boot.git/blame - include/configs/imx6qdl_icore.h
engicam: Add fdt_addr env value based on cpu_type
[J-u-boot.git] / include / configs / imx6qdl_icore.h
CommitLineData
f4b7532f
JT
1/*
2 * Copyright (C) 2016 Amarula Solutions B.V.
3 * Copyright (C) 2016 Engicam S.r.l.
4 *
5 * Configuration settings for the Engicam i.CoreM6 QDL Starter Kits.
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10#ifndef __IMX6QLD_ICORE_CONFIG_H
11#define __IMX6QLD_ICORE_CONFIG_H
12
13#include <linux/sizes.h>
14#include "mx6_common.h"
15
16/* Size of malloc() pool */
17#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
18
19/* Total Size of Environment Sector */
20#define CONFIG_ENV_SIZE SZ_128K
21
22/* Allow to overwrite serial and ethaddr */
23#define CONFIG_ENV_OVERWRITE
24
25/* Environment */
26#ifndef CONFIG_ENV_IS_NOWHERE
27/* Environment in MMC */
28# if defined(CONFIG_ENV_IS_IN_MMC)
29# define CONFIG_ENV_OFFSET 0x100000
023ff2f7
JT
30/* Environment in NAND */
31# elif defined(CONFIG_ENV_IS_IN_NAND)
32# define CONFIG_ENV_OFFSET 0x400000
33# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
f4b7532f
JT
34# endif
35#endif
36
37/* Default environment */
38#define CONFIG_EXTRA_ENV_SETTINGS \
39 "script=boot.scr\0" \
3713571c 40 "splashpos=m,m\0" \
bfd96402 41 "image=uImage\0" \
66d1d687 42 "fit_image=fit.itb\0" \
f4b7532f 43 "fdt_high=0xffffffff\0" \
5ed7d31a 44 "fdt_addr=" FDT_ADDR "\0" \
f4b7532f 45 "boot_fdt=try\0" \
f4b7532f 46 "mmcpart=1\0" \
ddd90660 47 "nandroot=ubi0:rootfs rootfstype=ubifs\0" \
f4b7532f
JT
48 "mmcautodetect=yes\0" \
49 "mmcargs=setenv bootargs console=${console},${baudrate} " \
50 "root=${mmcroot}\0" \
ddd90660
JT
51 "ubiargs=setenv bootargs console=${console},${baudrate} " \
52 "ubi.mtd=5 root=${nandroot} ${mtdparts}\0" \
f4b7532f
JT
53 "loadbootscript=" \
54 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
55 "bootscript=echo Running bootscript from mmc ...; " \
56 "source\0" \
57 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
58 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
66d1d687
JT
59 "loadfit=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${fit_image}\0" \
60 "fitboot=echo Booting FIT image from mmc ...; " \
61 "run mmcargs; " \
62 "bootm ${loadaddr}\0" \
98f56610 63 "_mmcboot=run mmcargs; " \
f4b7532f
JT
64 "run mmcargs; " \
65 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
66 "if run loadfdt; then " \
bfd96402 67 "bootm ${loadaddr} - ${fdt_addr}; " \
f4b7532f
JT
68 "else " \
69 "if test ${boot_fdt} = try; then " \
bfd96402 70 "bootm; " \
f4b7532f
JT
71 "else " \
72 "echo WARN: Cannot load the DT; " \
73 "fi; " \
74 "fi; " \
75 "else " \
bfd96402 76 "bootm; " \
ddd90660 77 "fi\0" \
98f56610
JT
78 "mmcboot=echo Booting from mmc ...; " \
79 "if mmc rescan; then " \
80 "if run loadbootscript; then " \
81 "run bootscript; " \
82 "else " \
83 "if run loadfit; then " \
84 "run fitboot; " \
85 "else " \
86 "if run loadimage; then " \
87 "run _mmcboot; " \
88 "fi; " \
89 "fi; " \
90 "fi; " \
91 "fi\0" \
ddd90660
JT
92 "nandboot=echo Booting from nand ...; " \
93 "if mtdparts; then " \
94 "echo Starting nand boot ...; " \
95 "else " \
96 "mtdparts default; " \
97 "fi; " \
98 "run ubiargs; " \
99 "nand read ${loadaddr} kernel 0x800000; " \
100 "nand read ${fdt_addr} dtb 0x100000; " \
101 "bootm ${loadaddr} - ${fdt_addr}\0"
f4b7532f 102
98f56610 103#define CONFIG_BOOTCOMMAND "run $modeboot"
f4b7532f
JT
104
105/* Miscellaneous configurable options */
106#define CONFIG_SYS_MEMTEST_START 0x80000000
107#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000)
108
109#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
110#define CONFIG_SYS_HZ 1000
111
5ed7d31a
JT
112#define DRAM_OFFSET(x) 0x1##x
113#define FDT_ADDR __stringify(DRAM_OFFSET(8000000))
114
f4b7532f
JT
115/* Physical Memory Map */
116#define CONFIG_NR_DRAM_BANKS 1
117#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
118
119#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
120#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
121#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
122
123#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
124 GENERATED_GBL_DATA_SIZE)
125#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
126 CONFIG_SYS_INIT_SP_OFFSET)
127
ada832f8
JT
128/* FIT */
129#ifdef CONFIG_FIT
130# define CONFIG_HASH_VERIFY
8098b8cb 131# define CONFIG_IMAGE_FORMAT_LEGACY
ada832f8
JT
132#endif
133
f4b7532f
JT
134/* UART */
135#ifdef CONFIG_MXC_UART
136# define CONFIG_MXC_UART_BASE UART4_BASE
137#endif
138
139/* MMC */
140#ifdef CONFIG_FSL_USDHC
141# define CONFIG_SYS_MMC_ENV_DEV 0
f4b7532f
JT
142#endif
143
023ff2f7
JT
144/* NAND */
145#ifdef CONFIG_NAND_MXS
146# define CONFIG_SYS_MAX_NAND_DEVICE 1
147# define CONFIG_SYS_NAND_BASE 0x40000000
148# define CONFIG_SYS_NAND_5_ADDR_CYCLE
149# define CONFIG_SYS_NAND_ONFI_DETECTION
150# define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
151# define CONFIG_SYS_NAND_U_BOOT_OFFS 0x200000
152
310db71d
JT
153/* MTD device */
154# define CONFIG_MTD_DEVICE
155# define CONFIG_CMD_MTDPARTS
156# define CONFIG_MTD_PARTITIONS
83425771
JT
157# define MTDIDS_DEFAULT "nand0=gpmi-nand"
158# define MTDPARTS_DEFAULT "mtdparts=gpmi-nand:2m(spl),2m(uboot)," \
08d7985b 159 "1m(env),8m(kernel),1m(dtb),-(rootfs)"
310db71d 160
8a9c775a
JT
161/* UBI */
162# define CONFIG_CMD_UBIFS
163# define CONFIG_RBTREE
164# define CONFIG_LZO
165
023ff2f7
JT
166# define CONFIG_APBH_DMA
167# define CONFIG_APBH_DMA_BURST
168# define CONFIG_APBH_DMA_BURST8
169#endif
170
58413366
JT
171/* Ethernet */
172#ifdef CONFIG_FEC_MXC
58413366
JT
173# define CONFIG_FEC_MXC_PHYADDR 0
174# define CONFIG_FEC_XCV_TYPE RMII
58413366
JT
175
176# define CONFIG_MII
58413366
JT
177#endif
178
ca7463c9
JT
179/* Framebuffer */
180#ifdef CONFIG_VIDEO_IPUV3
181# define CONFIG_IPUV3_CLK 260000000
182# define CONFIG_IMX_VIDEO_SKIP
183
184# define CONFIG_SPLASH_SCREEN
3713571c 185# define CONFIG_SPLASH_SCREEN_ALIGN
ca7463c9
JT
186# define CONFIG_BMP_16BPP
187# define CONFIG_VIDEO_BMP_RLE8
188# define CONFIG_VIDEO_LOGO
189# define CONFIG_VIDEO_BMP_LOGO
190#endif
191
f4b7532f
JT
192/* SPL */
193#ifdef CONFIG_SPL
023ff2f7
JT
194# ifdef CONFIG_NAND_MXS
195# define CONFIG_SPL_NAND_SUPPORT
196# else
197# define CONFIG_SPL_MMC_SUPPORT
198# endif
199
f4b7532f 200# include "imx6_spl.h"
f160c5c8 201# ifdef CONFIG_SPL_BUILD
6d931fd5
JT
202# define CONFIG_SYS_FSL_USDHC_NUM 1
203# define CONFIG_SYS_FSL_ESDHC_ADDR 0
f160c5c8
JT
204# undef CONFIG_DM_GPIO
205# undef CONFIG_DM_MMC
206# endif
f4b7532f
JT
207#endif
208
209#endif /* __IMX6QLD_ICORE_CONFIG_H */
This page took 0.115705 seconds and 4 git commands to generate.