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