Convert CONFIG_SPL_TARGET to Kconfig
[platform/kernel/u-boot.git] / include / configs / warp7.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2016 NXP Semiconductors
4  *
5  * Configuration settings for the i.MX7S Warp board.
6  */
7
8 #ifndef __WARP7_CONFIG_H
9 #define __WARP7_CONFIG_H
10
11 #include "mx7_common.h"
12 #include <imximage.h>
13
14 #define PHYS_SDRAM_SIZE                 SZ_512M
15
16 /* MMC Config*/
17 #define CONFIG_SYS_FSL_ESDHC_ADDR       USDHC3_BASE_ADDR
18 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
19
20 #define CONFIG_DFU_ENV_SETTINGS \
21         "dfu_alt_info=boot raw 0x2 0x1000 mmcpart 1\0" \
22
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"
26 #else
27 #define BOOT_SCR_STRING "source ${bootscriptaddr}\0"
28 #endif
29
30 #define CONFIG_EXTRA_ENV_SETTINGS \
31         CONFIG_DFU_ENV_SETTINGS \
32         "script=boot.scr\0" \
33         "bootscr_fitimage_name=bootscr\0" \
34         "script_signed=boot.scr.imx-signed\0" \
35         "bootscriptaddr=0x83200000\0" \
36         "image=zImage\0" \
37         "console=ttymxc0\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" \
44         "boot_fdt=try\0" \
45         "ip_dyn=yes\0" \
46         "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
47         "mmcpart=1\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; " \
60                         "run bootscript; "\
61                 "fi;\0" \
62         "loadbootscript=" \
63                 "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
64         "bootscript=echo Running bootscript from mmc ...; " \
65                 BOOT_SCR_STRING \
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 ...; " \
69                 "run finduuid; " \
70                 "run mmcargs; " \
71                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
72                         "if run loadfdt; then " \
73                                 "bootz ${loadaddr} - ${fdt_addr}; " \
74                         "else " \
75                                 "if test ${boot_fdt} = try; then " \
76                                         "bootz; " \
77                                 "else " \
78                                         "echo WARN: Cannot load the DT; " \
79                                 "fi; " \
80                         "fi; " \
81                 "else " \
82                         "bootz; " \
83                 "fi;\0" \
84
85 /* Physical Memory Map */
86 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
87
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
91
92 /* environment organization */
93
94 #define CONFIG_SYS_FSL_USDHC_NUM        1
95
96
97 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
98
99 #define CONFIG_USBD_HS
100
101 /* USB Device Firmware Update support */
102 #define DFU_DEFAULT_POLL_TIMEOUT        300
103
104 #define CONFIG_USBNET_DEV_ADDR          "de:ad:be:af:00:01"
105
106 /* Environment variable name to represent HAB enable state */
107 #define HAB_ENABLED_ENVNAME             "hab_enabled"
108
109 #endif