1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2020 Compass Electronics Group, LLC
6 #ifndef __IMX8MM_BEACON_H
7 #define __IMX8MM_BEACON_H
9 #include <linux/sizes.h>
10 #include <asm/arch/imx-regs.h>
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)
16 #ifdef CONFIG_SPL_BUILD
17 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
18 #define CONFIG_MALLOC_F_ADDR 0x930000
19 /* For RAW image gives a error info not panic */
20 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
24 /* Initial environment variables */
25 #define CONFIG_EXTRA_ENV_SETTINGS \
28 "console=ttymxc1,115200\0" \
29 "fdt_addr=0x43000000\0" \
31 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
32 "initrd_addr=0x43800000\0" \
33 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
35 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
36 "mmcautodetect=yes\0" \
37 "mmcargs=setenv bootargs console=${console},${baudrate}" \
38 " root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
39 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
41 "bootscript=echo Running bootscript from mmc ...; " \
43 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
44 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
45 "mmcboot=echo Booting from mmc ...; " \
48 "if run loadfdt; then " \
49 "booti ${loadaddr} - ${fdt_addr}; " \
51 "echo WARN: Cannot load the DT; " \
53 "netargs=setenv bootargs console=${console} " \
55 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
56 "netboot=echo Booting from net ...; " \
58 "if test ${ip_dyn} = yes; then " \
59 "setenv get_cmd dhcp; " \
61 "setenv get_cmd tftp; " \
63 "${get_cmd} ${loadaddr} ${image}; " \
64 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
65 "bootm ${loadaddr}; " \
67 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
68 "booti ${loadaddr} - ${fdt_addr}; " \
70 "echo WARN: Cannot load the DT; " \
74 /* Link Definitions */
76 #define CONFIG_SYS_INIT_RAM_ADDR 0x40000000
77 #define CONFIG_SYS_INIT_RAM_SIZE 0x200000
79 #define CONFIG_SYS_SDRAM_BASE 0x40000000
80 #define PHYS_SDRAM 0x40000000
81 #define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
83 #define CONFIG_MXC_UART_BASE UART_BASE_ADDR(2)