blob: 79ed397122502eac2a62625e02e7a3daba4426da [file] [log] [blame]
Adam Fordf36f8bc2020-05-03 08:11:33 -05001/* 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
Adam Fordf36f8bc2020-05-03 08:11:33 -050012#define CONFIG_SYS_MONITOR_LEN SZ_512K
Adam Fordf36f8bc2020-05-03 08:11:33 -050013#define CONFIG_SYS_UBOOT_BASE \
14 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
15
16#ifdef CONFIG_SPL_BUILD
Adam Fordf36f8bc2020-05-03 08:11:33 -050017/* 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 */
Adam Fordf36f8bc2020-05-03 08:11:33 -050020
21#endif
22
23/* Initial environment variables */
24#define CONFIG_EXTRA_ENV_SETTINGS \
25 "script=boot.scr\0" \
26 "image=Image\0" \
27 "console=ttymxc1,115200\0" \
28 "fdt_addr=0x43000000\0" \
Adam Fordf36f8bc2020-05-03 08:11:33 -050029 "boot_fit=try\0" \
30 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
31 "initrd_addr=0x43800000\0" \
Adam Fordf36f8bc2020-05-03 08:11:33 -050032 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Tom Rinide35b8f2021-12-11 14:55:52 -050033 "mmcpart=1\0" \
Adam Fordf36f8bc2020-05-03 08:11:33 -050034 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
35 "mmcautodetect=yes\0" \
36 "mmcargs=setenv bootargs console=${console},${baudrate}" \
37 " root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
38 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
39 " ${script};\0" \
40 "bootscript=echo Running bootscript from mmc ...; " \
41 "source\0" \
42 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
43 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
44 "mmcboot=echo Booting from mmc ...; " \
45 "run finduuid; " \
46 "run mmcargs; " \
47 "if run loadfdt; then " \
48 "booti ${loadaddr} - ${fdt_addr}; " \
49 "else " \
50 "echo WARN: Cannot load the DT; " \
51 "fi; " \
52 "netargs=setenv bootargs console=${console} " \
53 "root=/dev/nfs " \
54 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
55 "netboot=echo Booting from net ...; " \
56 "run netargs; " \
57 "if test ${ip_dyn} = yes; then " \
58 "setenv get_cmd dhcp; " \
59 "else " \
60 "setenv get_cmd tftp; " \
61 "fi; " \
62 "${get_cmd} ${loadaddr} ${image}; " \
63 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
64 "bootm ${loadaddr}; " \
65 "else " \
66 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
67 "booti ${loadaddr} - ${fdt_addr}; " \
68 "else " \
69 "echo WARN: Cannot load the DT; " \
70 "fi; " \
71 "fi;\0"
72
Adam Fordf36f8bc2020-05-03 08:11:33 -050073/* Link Definitions */
Adam Fordf36f8bc2020-05-03 08:11:33 -050074
75#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000
76#define CONFIG_SYS_INIT_RAM_SIZE 0x200000
Adam Fordf36f8bc2020-05-03 08:11:33 -050077
Adam Fordf36f8bc2020-05-03 08:11:33 -050078#define CONFIG_SYS_SDRAM_BASE 0x40000000
79#define PHYS_SDRAM 0x40000000
80#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
81
Adam Fordf36f8bc2020-05-03 08:11:33 -050082#endif