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 <linux/stringify.h>
13 #include "mx6_common.h"
15 #define CONFIG_IMX_THERMAL
17 /* Size of malloc() pool */
18 #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
20 #define CONFIG_MXC_UART
23 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
25 #ifdef CONFIG_SUPPORT_EMMC_BOOT
28 "update_emmc_firmware=" \
29 "if test ${ip_dyn} = yes; then " \
30 "setenv get_cmd dhcp; " \
32 "setenv get_cmd tftp; " \
34 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
35 "if mmc dev ${emmcdev} 1; then " \
36 "setexpr fw_sz ${filesize} / 0x200; " \
37 "setexpr fw_sz ${fw_sz} + 1; " \
38 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
45 #define CONFIG_EXTRA_ENV_SETTINGS \
48 "fdtfile=undefined\0" \
49 "fdt_addr=0x18000000\0" \
52 "console=" CONSOLE_DEV "\0" \
53 "dfuspi=dfu 0 sf 0:0:10000000:0\0" \
54 "dfu_alt_info_spl=spl raw 0x400\0" \
55 "dfu_alt_info_img=u-boot raw 0x10000\0" \
56 "dfu_alt_info=spl raw 0x400\0" \
57 "fdt_high=0xffffffff\0" \
58 "initrd_high=0xffffffff\0" \
59 "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \
60 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
62 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
63 "update_sd_firmware=" \
64 "if test ${ip_dyn} = yes; then " \
65 "setenv get_cmd dhcp; " \
67 "setenv get_cmd tftp; " \
69 "if mmc dev ${mmcdev}; then " \
70 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
71 "setexpr fw_sz ${filesize} / 0x200; " \
72 "setexpr fw_sz ${fw_sz} + 1; " \
73 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
77 "mmcargs=setenv bootargs console=${console},${baudrate} " \
78 "root=PARTUUID=${uuid} rootwait rw\0" \
80 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
81 "bootscript=echo Running bootscript from mmc ...; " \
83 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
84 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
85 "mmcboot=echo Booting from mmc ...; " \
88 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
89 "if run loadfdt; then " \
90 "bootz ${loadaddr} - ${fdt_addr}; " \
92 "if test ${boot_fdt} = try; then " \
95 "echo WARN: Cannot load the DT; " \
101 "netargs=setenv bootargs console=${console},${baudrate} " \
103 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
104 "netboot=echo Booting from net ...; " \
106 "if test ${ip_dyn} = yes; then " \
107 "setenv get_cmd dhcp; " \
109 "setenv get_cmd tftp; " \
111 "${get_cmd} ${image}; " \
112 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
113 "if ${get_cmd} ${fdt_addr} ${fdtfile}; then " \
114 "bootz ${loadaddr} - ${fdt_addr}; " \
116 "if test ${boot_fdt} = try; then " \
119 "echo WARN: Cannot load the DT; " \
126 "if test $fdtfile = undefined; then " \
127 "if test $board_name = SABREAUTO && test $board_rev = MX6QP; then " \
128 "setenv fdtfile imx6qp-sabreauto.dtb; fi; " \
129 "if test $board_name = SABREAUTO && test $board_rev = MX6Q; then " \
130 "setenv fdtfile imx6q-sabreauto.dtb; fi; " \
131 "if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \
132 "setenv fdtfile imx6dl-sabreauto.dtb; fi; " \
133 "if test $board_name = SABRESD && test $board_rev = MX6QP; then " \
134 "setenv fdtfile imx6qp-sabresd.dtb; fi; " \
135 "if test $board_name = SABRESD && test $board_rev = MX6Q; then " \
136 "setenv fdtfile imx6q-sabresd.dtb; fi; " \
137 "if test $board_name = SABRESD && test $board_rev = MX6DL; then " \
138 "setenv fdtfile imx6dl-sabresd.dtb; fi; " \
139 "if test $fdtfile = undefined; then " \
140 "echo WARNING: Could not determine dtb to use; fi; " \
143 #define CONFIG_BOOTCOMMAND \
145 "mmc dev ${mmcdev};" \
146 "if mmc rescan; then " \
147 "if run loadbootscript; then " \
150 "if run loadimage; then " \
152 "else run netboot; " \
155 "else run netboot; fi"
157 #define CONFIG_ARP_TIMEOUT 200UL
159 /* Physical Memory Map */
160 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
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
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)
171 /* Environment organization */
174 #define CONFIG_VIDEO_BMP_RLE8
175 #define CONFIG_SPLASH_SCREEN
176 #define CONFIG_SPLASH_SCREEN_ALIGN
177 #define CONFIG_BMP_16BPP
178 #define CONFIG_VIDEO_LOGO
179 #define CONFIG_VIDEO_BMP_LOGO
180 #define CONFIG_IMX_HDMI
181 #define CONFIG_IMX_VIDEO_SKIP
183 #define CONFIG_USBD_HS
185 #endif /* __MX6QSABRE_COMMON_CONFIG_H */