1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2016 NXP Semiconductors
5 * Configuration settings for the i.MX7S Warp board.
8 #ifndef __WARP7_CONFIG_H
9 #define __WARP7_CONFIG_H
11 #include "mx7_common.h"
14 #define PHYS_SDRAM_SIZE SZ_512M
17 #define CFG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR
19 #define CFG_DFU_ENV_SETTINGS \
20 "dfu_alt_info=boot raw 0x2 0x1000 mmcpart 1\0" \
22 /* When booting with FIT specify the node entry containing boot.scr */
23 #if defined(CONFIG_FIT)
24 #define BOOT_SCR_STRING "source ${bootscriptaddr}:${bootscr_fitimage_name}\0"
26 #define BOOT_SCR_STRING "source ${bootscriptaddr}\0"
29 #define CFG_EXTRA_ENV_SETTINGS \
30 CFG_DFU_ENV_SETTINGS \
32 "bootscr_fitimage_name=bootscr\0" \
33 "script_signed=boot.scr.imx-signed\0" \
34 "bootscriptaddr=0x83200000\0" \
37 "ethact=usb_ether\0" \
38 "fdt_high=0xffffffff\0" \
39 "initrd_high=0xffffffff\0" \
40 "fdt_file=imx7s-warp.dtb\0" \
41 "fdt_addr=0x83000000\0" \
42 "fdtovaddr=0x83100000\0" \
45 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
47 "rootpart=" __stringify(CONFIG_WARP7_ROOT_PART) "\0" \
48 "finduuid=part uuid mmc 0:${rootpart} uuid\0" \
49 "mmcargs=setenv bootargs console=${console},${baudrate} " \
50 "root=PARTUUID=${uuid} rootwait rw\0" \
51 "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\
52 "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \
53 "do_bootscript_hab=" \
54 "if test ${hab_enabled} -eq 1; then " \
55 "setexpr hab_ivt_addr ${bootscriptaddr} - ${ivt_offset}; " \
56 "setenv script ${script_signed}; " \
57 "load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; " \
58 "run warp7_auth_or_fail; " \
62 "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
63 "bootscript=echo Running bootscript from mmc ...; " \
65 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
66 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
67 "mmcboot=echo Booting from mmc ...; " \
70 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
71 "if run loadfdt; then " \
72 "bootz ${loadaddr} - ${fdt_addr}; " \
74 "if test ${boot_fdt} = try; then " \
77 "echo WARN: Cannot load the DT; " \
84 /* Physical Memory Map */
85 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
87 #define CFG_SYS_SDRAM_BASE PHYS_SDRAM
88 #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
89 #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
91 /* environment organization */
93 #define CFG_SYS_FSL_USDHC_NUM 1
96 #define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
98 /* USB Device Firmware Update support */
99 #define DFU_DEFAULT_POLL_TIMEOUT 300
101 /* Environment variable name to represent HAB enable state */
102 #define HAB_ENABLED_ENVNAME "hab_enabled"