1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2012 Freescale Semiconductor, Inc.
5 * Configuration settings for the Freescale i.MX6Q SabreSD board.
8 #ifndef __MX6QSABRE_COMMON_CONFIG_H
9 #define __MX6QSABRE_COMMON_CONFIG_H
11 #include "mx6_common.h"
13 #define CONFIG_IMX_THERMAL
15 /* Size of malloc() pool */
16 #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
18 #define CONFIG_MXC_UART
21 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
23 #ifdef CONFIG_SUPPORT_EMMC_BOOT
26 "update_emmc_firmware=" \
27 "if test ${ip_dyn} = yes; then " \
28 "setenv get_cmd dhcp; " \
30 "setenv get_cmd tftp; " \
32 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
33 "if mmc dev ${emmcdev} 1; then " \
34 "setexpr fw_sz ${filesize} / 0x200; " \
35 "setexpr fw_sz ${fw_sz} + 1; " \
36 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
43 #define CONFIG_EXTRA_ENV_SETTINGS \
46 "fdtfile=undefined\0" \
47 "fdt_addr=0x18000000\0" \
50 "console=" CONSOLE_DEV "\0" \
51 "dfuspi=dfu 0 sf 0:0:10000000:0\0" \
52 "dfu_alt_info_spl=spl raw 0x400\0" \
53 "dfu_alt_info_img=u-boot raw 0x10000\0" \
54 "dfu_alt_info=spl raw 0x400\0" \
55 "fdt_high=0xffffffff\0" \
56 "initrd_high=0xffffffff\0" \
57 "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \
58 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
60 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
61 "update_sd_firmware=" \
62 "if test ${ip_dyn} = yes; then " \
63 "setenv get_cmd dhcp; " \
65 "setenv get_cmd tftp; " \
67 "if mmc dev ${mmcdev}; then " \
68 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
69 "setexpr fw_sz ${filesize} / 0x200; " \
70 "setexpr fw_sz ${fw_sz} + 1; " \
71 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
75 "mmcargs=setenv bootargs console=${console},${baudrate} " \
76 "root=PARTUUID=${uuid} rootwait rw\0" \
78 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
79 "bootscript=echo Running bootscript from mmc ...; " \
81 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
82 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
83 "mmcboot=echo Booting from mmc ...; " \
86 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
87 "if run loadfdt; then " \
88 "bootz ${loadaddr} - ${fdt_addr}; " \
90 "if test ${boot_fdt} = try; then " \
93 "echo WARN: Cannot load the DT; " \
99 "netargs=setenv bootargs console=${console},${baudrate} " \
101 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
102 "netboot=echo Booting from net ...; " \
104 "if test ${ip_dyn} = yes; then " \
105 "setenv get_cmd dhcp; " \
107 "setenv get_cmd tftp; " \
109 "${get_cmd} ${image}; " \
110 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
111 "if ${get_cmd} ${fdt_addr} ${fdtfile}; then " \
112 "bootz ${loadaddr} - ${fdt_addr}; " \
114 "if test ${boot_fdt} = try; then " \
117 "echo WARN: Cannot load the DT; " \
124 "if test $fdtfile = undefined; then " \
125 "if test $board_name = SABREAUTO && test $board_rev = MX6QP; then " \
126 "setenv fdtfile imx6qp-sabreauto.dtb; fi; " \
127 "if test $board_name = SABREAUTO && test $board_rev = MX6Q; then " \
128 "setenv fdtfile imx6q-sabreauto.dtb; fi; " \
129 "if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \
130 "setenv fdtfile imx6dl-sabreauto.dtb; fi; " \
131 "if test $board_name = SABRESD && test $board_rev = MX6QP; then " \
132 "setenv fdtfile imx6qp-sabresd.dtb; fi; " \
133 "if test $board_name = SABRESD && test $board_rev = MX6Q; then " \
134 "setenv fdtfile imx6q-sabresd.dtb; fi; " \
135 "if test $board_name = SABRESD && test $board_rev = MX6DL; then " \
136 "setenv fdtfile imx6dl-sabresd.dtb; fi; " \
137 "if test $fdtfile = undefined; then " \
138 "echo WARNING: Could not determine dtb to use; fi; " \
141 #define CONFIG_BOOTCOMMAND \
143 "mmc dev ${mmcdev};" \
144 "if mmc rescan; then " \
145 "if run loadbootscript; then " \
148 "if run loadimage; then " \
150 "else run netboot; " \
153 "else run netboot; fi"
155 #define CONFIG_ARP_TIMEOUT 200UL
157 #define CONFIG_SYS_MEMTEST_START 0x10000000
158 #define CONFIG_SYS_MEMTEST_END 0x10010000
159 #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
161 /* Physical Memory Map */
162 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
164 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
165 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
166 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
168 #define CONFIG_SYS_INIT_SP_OFFSET \
169 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
170 #define CONFIG_SYS_INIT_SP_ADDR \
171 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
173 /* Environment organization */
176 #define CONFIG_VIDEO_BMP_RLE8
177 #define CONFIG_SPLASH_SCREEN
178 #define CONFIG_SPLASH_SCREEN_ALIGN
179 #define CONFIG_BMP_16BPP
180 #define CONFIG_VIDEO_LOGO
181 #define CONFIG_VIDEO_BMP_LOGO
182 #define CONFIG_IMX_HDMI
183 #define CONFIG_IMX_VIDEO_SKIP
185 #define CONFIG_USBD_HS
187 #endif /* __MX6QSABRE_COMMON_CONFIG_H */