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 CONFIG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR
18 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
20 #define CONFIG_DFU_ENV_SETTINGS \
21 "dfu_alt_info=boot raw 0x2 0x1000 mmcpart 1\0" \
23 /* When booting with FIT specify the node entry containing boot.scr */
24 #if defined(CONFIG_FIT)
25 #define BOOT_SCR_STRING "source ${bootscriptaddr}:${bootscr_fitimage_name}\0"
27 #define BOOT_SCR_STRING "source ${bootscriptaddr}\0"
30 #define CONFIG_EXTRA_ENV_SETTINGS \
31 CONFIG_DFU_ENV_SETTINGS \
33 "bootscr_fitimage_name=bootscr\0" \
34 "script_signed=boot.scr.imx-signed\0" \
35 "bootscriptaddr=0x83200000\0" \
38 "ethact=usb_ether\0" \
39 "fdt_high=0xffffffff\0" \
40 "initrd_high=0xffffffff\0" \
41 "fdt_file=imx7s-warp.dtb\0" \
42 "fdt_addr=0x83000000\0" \
43 "fdtovaddr=0x83100000\0" \
46 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
48 "rootpart=" __stringify(CONFIG_WARP7_ROOT_PART) "\0" \
49 "finduuid=part uuid mmc 0:${rootpart} uuid\0" \
50 "mmcargs=setenv bootargs console=${console},${baudrate} " \
51 "root=PARTUUID=${uuid} rootwait rw\0" \
52 "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\
53 "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \
54 "do_bootscript_hab=" \
55 "if test ${hab_enabled} -eq 1; then " \
56 "setexpr hab_ivt_addr ${bootscriptaddr} - ${ivt_offset}; " \
57 "setenv script ${script_signed}; " \
58 "load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; " \
59 "run warp7_auth_or_fail; " \
63 "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
64 "bootscript=echo Running bootscript from mmc ...; " \
66 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
67 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
68 "mmcboot=echo Booting from mmc ...; " \
71 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
72 "if run loadfdt; then " \
73 "bootz ${loadaddr} - ${fdt_addr}; " \
75 "if test ${boot_fdt} = try; then " \
78 "echo WARN: Cannot load the DT; " \
85 /* Physical Memory Map */
86 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
88 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
89 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
90 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
92 /* environment organization */
94 #define CONFIG_SYS_FSL_USDHC_NUM 1
97 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
99 #define CONFIG_USBD_HS
101 /* USB Device Firmware Update support */
102 #define DFU_DEFAULT_POLL_TIMEOUT 300
104 #define CONFIG_USBNET_DEV_ADDR "de:ad:be:af:00:01"
106 /* Environment variable name to represent HAB enable state */
107 #define HAB_ENABLED_ENVNAME "hab_enabled"