blob: 0151e81630f576b9092b6c0d16cd88c1a8c38e23 [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
17#define CONFIG_SPL_STACK 0x920000
18#define CONFIG_SPL_BSS_START_ADDR 0x910000
Adam Fordf36f8bc2020-05-03 08:11:33 -050019#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
20#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K /* 512 KB */
21
22/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
23#define CONFIG_MALLOC_F_ADDR 0x930000
24/* For RAW image gives a error info not panic */
25#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
26
27#endif
28
29/* Initial environment variables */
30#define CONFIG_EXTRA_ENV_SETTINGS \
31 "script=boot.scr\0" \
32 "image=Image\0" \
33 "console=ttymxc1,115200\0" \
34 "fdt_addr=0x43000000\0" \
Adam Fordf36f8bc2020-05-03 08:11:33 -050035 "boot_fit=try\0" \
36 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
37 "initrd_addr=0x43800000\0" \
Adam Fordf36f8bc2020-05-03 08:11:33 -050038 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Tom Rinide35b8f2021-12-11 14:55:52 -050039 "mmcpart=1\0" \
Adam Fordf36f8bc2020-05-03 08:11:33 -050040 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
41 "mmcautodetect=yes\0" \
42 "mmcargs=setenv bootargs console=${console},${baudrate}" \
43 " root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
44 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
45 " ${script};\0" \
46 "bootscript=echo Running bootscript from mmc ...; " \
47 "source\0" \
48 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
49 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
50 "mmcboot=echo Booting from mmc ...; " \
51 "run finduuid; " \
52 "run mmcargs; " \
53 "if run loadfdt; then " \
54 "booti ${loadaddr} - ${fdt_addr}; " \
55 "else " \
56 "echo WARN: Cannot load the DT; " \
57 "fi; " \
58 "netargs=setenv bootargs console=${console} " \
59 "root=/dev/nfs " \
60 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
61 "netboot=echo Booting from net ...; " \
62 "run netargs; " \
63 "if test ${ip_dyn} = yes; then " \
64 "setenv get_cmd dhcp; " \
65 "else " \
66 "setenv get_cmd tftp; " \
67 "fi; " \
68 "${get_cmd} ${loadaddr} ${image}; " \
69 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
70 "bootm ${loadaddr}; " \
71 "else " \
72 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
73 "booti ${loadaddr} - ${fdt_addr}; " \
74 "else " \
75 "echo WARN: Cannot load the DT; " \
76 "fi; " \
77 "fi;\0"
78
Adam Fordf36f8bc2020-05-03 08:11:33 -050079/* Link Definitions */
Adam Fordf36f8bc2020-05-03 08:11:33 -050080
81#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000
82#define CONFIG_SYS_INIT_RAM_SIZE 0x200000
Adam Fordf36f8bc2020-05-03 08:11:33 -050083
Adam Fordf36f8bc2020-05-03 08:11:33 -050084#define CONFIG_SYS_SDRAM_BASE 0x40000000
85#define PHYS_SDRAM 0x40000000
86#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
87
Marek Vasut52b6b482022-04-24 23:44:03 +020088#define CONFIG_MXC_UART_BASE UART_BASE_ADDR(2)
Adam Fordf36f8bc2020-05-03 08:11:33 -050089
Adam Fordf36f8bc2020-05-03 08:11:33 -050090#endif