2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2016-02-29 12:33:22 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 NXP Semiconductors
|
|
|
|
*
|
|
|
|
* Configuration settings for the i.MX7S Warp board.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WARP7_CONFIG_H
|
|
|
|
#define __WARP7_CONFIG_H
|
|
|
|
|
|
|
|
#include "mx7_common.h"
|
2018-04-24 17:46:45 +00:00
|
|
|
#include <imximage.h>
|
2016-02-29 12:33:22 +00:00
|
|
|
|
|
|
|
#define PHYS_SDRAM_SIZE SZ_512M
|
|
|
|
|
|
|
|
/* MMC Config*/
|
|
|
|
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR
|
|
|
|
|
|
|
|
#define CONFIG_DFU_ENV_SETTINGS \
|
2019-04-12 20:36:36 +00:00
|
|
|
"dfu_alt_info=boot raw 0x2 0x1000 mmcpart 1\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
|
2019-05-08 18:14:43 +00:00
|
|
|
/* When booting with FIT specify the node entry containing boot.scr */
|
|
|
|
#if defined(CONFIG_FIT)
|
|
|
|
#define BOOT_SCR_STRING "source ${bootscriptaddr}:${bootscr_fitimage_name}\0"
|
|
|
|
#else
|
|
|
|
#define BOOT_SCR_STRING "source ${bootscriptaddr}\0"
|
|
|
|
#endif
|
|
|
|
|
2016-02-29 12:33:22 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
CONFIG_DFU_ENV_SETTINGS \
|
|
|
|
"script=boot.scr\0" \
|
2019-05-08 18:14:43 +00:00
|
|
|
"bootscr_fitimage_name=bootscr\0" \
|
2018-04-24 17:46:43 +00:00
|
|
|
"script_signed=boot.scr.imx-signed\0" \
|
2019-05-08 18:14:44 +00:00
|
|
|
"bootscriptaddr=0x83200000\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
"image=zImage\0" \
|
|
|
|
"console=ttymxc0\0" \
|
2016-12-16 21:08:10 +00:00
|
|
|
"ethact=usb_ether\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
"fdt_high=0xffffffff\0" \
|
|
|
|
"initrd_high=0xffffffff\0" \
|
2016-08-08 12:57:38 +00:00
|
|
|
"fdt_file=imx7s-warp.dtb\0" \
|
2021-12-13 03:12:33 +00:00
|
|
|
"fdt_addr=0x83000000\0" \
|
2019-05-08 18:14:47 +00:00
|
|
|
"fdtovaddr=0x83100000\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
"boot_fdt=try\0" \
|
|
|
|
"ip_dyn=yes\0" \
|
|
|
|
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
|
2021-12-11 19:55:52 +00:00
|
|
|
"mmcpart=1\0" \
|
2018-04-24 17:46:42 +00:00
|
|
|
"rootpart=" __stringify(CONFIG_WARP7_ROOT_PART) "\0" \
|
|
|
|
"finduuid=part uuid mmc 0:${rootpart} uuid\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
2016-08-26 00:07:19 +00:00
|
|
|
"root=PARTUUID=${uuid} rootwait rw\0" \
|
2018-04-24 17:46:45 +00:00
|
|
|
"ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\
|
2018-04-24 17:46:44 +00:00
|
|
|
"warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \
|
2018-04-24 17:46:47 +00:00
|
|
|
"do_bootscript_hab=" \
|
|
|
|
"if test ${hab_enabled} -eq 1; then " \
|
2019-05-08 18:14:44 +00:00
|
|
|
"setexpr hab_ivt_addr ${bootscriptaddr} - ${ivt_offset}; " \
|
2018-04-24 17:46:47 +00:00
|
|
|
"setenv script ${script_signed}; " \
|
|
|
|
"load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; " \
|
|
|
|
"run warp7_auth_or_fail; " \
|
|
|
|
"run bootscript; "\
|
|
|
|
"fi;\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
"loadbootscript=" \
|
2019-05-08 18:14:44 +00:00
|
|
|
"load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
"bootscript=echo Running bootscript from mmc ...; " \
|
2019-05-08 18:14:44 +00:00
|
|
|
BOOT_SCR_STRING \
|
2018-03-31 22:49:04 +00:00
|
|
|
"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
|
|
|
"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
2016-02-29 12:33:22 +00:00
|
|
|
"mmcboot=echo Booting from mmc ...; " \
|
2016-08-26 00:07:19 +00:00
|
|
|
"run finduuid; " \
|
2016-02-29 12:33:22 +00:00
|
|
|
"run mmcargs; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if run loadfdt; then " \
|
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
|
|
|
"bootz; " \
|
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
|
|
|
"bootz; " \
|
|
|
|
"fi;\0" \
|
|
|
|
|
|
|
|
/* Physical Memory Map */
|
|
|
|
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
|
|
|
|
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
|
|
|
|
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
|
|
|
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
|
|
|
|
2017-02-11 13:43:54 +00:00
|
|
|
/* environment organization */
|
2016-02-29 12:33:22 +00:00
|
|
|
|
|
|
|
#define CONFIG_SYS_FSL_USDHC_NUM 1
|
|
|
|
|
|
|
|
|
|
|
|
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
|
|
|
|
|
|
|
|
#define CONFIG_USBD_HS
|
|
|
|
|
|
|
|
/* USB Device Firmware Update support */
|
|
|
|
#define DFU_DEFAULT_POLL_TIMEOUT 300
|
|
|
|
|
2016-12-16 21:08:10 +00:00
|
|
|
#define CONFIG_USBNET_DEV_ADDR "de:ad:be:af:00:01"
|
|
|
|
|
2018-04-24 17:46:33 +00:00
|
|
|
/* Environment variable name to represent HAB enable state */
|
|
|
|
#define HAB_ENABLED_ENVNAME "hab_enabled"
|
|
|
|
|
2016-02-29 12:33:22 +00:00
|
|
|
#endif
|