Convert CONFIG_SPL_STACK to Kconfig
[platform/kernel/u-boot.git] / include / configs / imx8mm_beacon.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2020 Compass Electronics Group, LLC
4  */
5
6 #ifndef __IMX8MM_BEACON_H
7 #define __IMX8MM_BEACON_H
8
9 #include <linux/sizes.h>
10 #include <asm/arch/imx-regs.h>
11
12 #define CONFIG_SYS_MONITOR_LEN  SZ_512K
13 #define CONFIG_SYS_UBOOT_BASE   \
14         (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
15
16 #ifdef CONFIG_SPL_BUILD
17 #define CONFIG_SPL_BSS_START_ADDR       0x910000
18 #define CONFIG_SYS_SPL_MALLOC_START     0x42200000
19 #define CONFIG_SYS_SPL_MALLOC_SIZE      SZ_512K /* 512 KB */
20
21 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
22 #define CONFIG_MALLOC_F_ADDR            0x930000
23 /* For RAW image gives a error info not panic */
24 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
25
26 #endif
27
28 /* Initial environment variables */
29 #define CONFIG_EXTRA_ENV_SETTINGS               \
30         "script=boot.scr\0" \
31         "image=Image\0" \
32         "console=ttymxc1,115200\0" \
33         "fdt_addr=0x43000000\0"                 \
34         "boot_fit=try\0" \
35         "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
36         "initrd_addr=0x43800000\0"              \
37         "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
38         "mmcpart=1\0" \
39         "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
40         "mmcautodetect=yes\0" \
41         "mmcargs=setenv bootargs console=${console},${baudrate}" \
42         " root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
43         "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
44         " ${script};\0" \
45         "bootscript=echo Running bootscript from mmc ...; " \
46                 "source\0" \
47         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
48         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
49         "mmcboot=echo Booting from mmc ...; " \
50                 "run finduuid; " \
51                 "run mmcargs; " \
52                 "if run loadfdt; then " \
53                         "booti ${loadaddr} - ${fdt_addr}; " \
54                 "else " \
55                         "echo WARN: Cannot load the DT; " \
56                 "fi; " \
57         "netargs=setenv bootargs console=${console} " \
58                 "root=/dev/nfs " \
59                 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
60         "netboot=echo Booting from net ...; " \
61                 "run netargs;  " \
62                 "if test ${ip_dyn} = yes; then " \
63                         "setenv get_cmd dhcp; " \
64                 "else " \
65                         "setenv get_cmd tftp; " \
66                 "fi; " \
67                 "${get_cmd} ${loadaddr} ${image}; " \
68                 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
69                         "bootm ${loadaddr}; " \
70                 "else " \
71                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
72                                 "booti ${loadaddr} - ${fdt_addr}; " \
73                         "else " \
74                                 "echo WARN: Cannot load the DT; " \
75                         "fi; " \
76                 "fi;\0"
77
78 /* Link Definitions */
79
80 #define CONFIG_SYS_INIT_RAM_ADDR        0x40000000
81 #define CONFIG_SYS_INIT_RAM_SIZE        0x200000
82
83 #define CONFIG_SYS_SDRAM_BASE           0x40000000
84 #define PHYS_SDRAM                      0x40000000
85 #define PHYS_SDRAM_SIZE         0x80000000 /* 2GB DDR */
86
87 #define CONFIG_MXC_UART_BASE            UART_BASE_ADDR(2)
88
89 #endif