blob: 03325e6c3a7a41040eae9703c1c2f85d66fea96c [file] [log] [blame]
Adam Ford14879032020-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
Tom Rini6a5dccc2022-11-16 13:10:41 -050012#define CFG_SYS_UBOOT_BASE \
Adam Ford14879032020-05-03 08:11:33 -050013 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
14
15#ifdef CONFIG_SPL_BUILD
Adam Ford14879032020-05-03 08:11:33 -050016/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
17#define CONFIG_MALLOC_F_ADDR 0x930000
18/* For RAW image gives a error info not panic */
Adam Ford14879032020-05-03 08:11:33 -050019
20#endif
21
22/* Initial environment variables */
23#define CONFIG_EXTRA_ENV_SETTINGS \
24 "script=boot.scr\0" \
25 "image=Image\0" \
26 "console=ttymxc1,115200\0" \
27 "fdt_addr=0x43000000\0" \
Adam Ford14879032020-05-03 08:11:33 -050028 "boot_fit=try\0" \
29 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
30 "initrd_addr=0x43800000\0" \
Adam Ford14879032020-05-03 08:11:33 -050031 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050032 "mmcpart=1\0" \
Adam Ford14879032020-05-03 08:11:33 -050033 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
34 "mmcautodetect=yes\0" \
35 "mmcargs=setenv bootargs console=${console},${baudrate}" \
36 " root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
37 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
38 " ${script};\0" \
39 "bootscript=echo Running bootscript from mmc ...; " \
40 "source\0" \
41 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
42 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
43 "mmcboot=echo Booting from mmc ...; " \
44 "run finduuid; " \
45 "run mmcargs; " \
46 "if run loadfdt; then " \
47 "booti ${loadaddr} - ${fdt_addr}; " \
48 "else " \
49 "echo WARN: Cannot load the DT; " \
50 "fi; " \
51 "netargs=setenv bootargs console=${console} " \
52 "root=/dev/nfs " \
53 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
54 "netboot=echo Booting from net ...; " \
55 "run netargs; " \
56 "if test ${ip_dyn} = yes; then " \
57 "setenv get_cmd dhcp; " \
58 "else " \
59 "setenv get_cmd tftp; " \
60 "fi; " \
61 "${get_cmd} ${loadaddr} ${image}; " \
62 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
63 "bootm ${loadaddr}; " \
64 "else " \
65 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
66 "booti ${loadaddr} - ${fdt_addr}; " \
67 "else " \
68 "echo WARN: Cannot load the DT; " \
69 "fi; " \
70 "fi;\0"
71
Adam Ford14879032020-05-03 08:11:33 -050072/* Link Definitions */
Adam Ford14879032020-05-03 08:11:33 -050073
Tom Rini6a5dccc2022-11-16 13:10:41 -050074#define CFG_SYS_INIT_RAM_ADDR 0x40000000
75#define CFG_SYS_INIT_RAM_SIZE 0x200000
Adam Ford14879032020-05-03 08:11:33 -050076
Tom Rinibb4dd962022-11-16 13:10:37 -050077#define CFG_SYS_SDRAM_BASE 0x40000000
Adam Ford14879032020-05-03 08:11:33 -050078#define PHYS_SDRAM 0x40000000
79#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
80
Adam Ford14879032020-05-03 08:11:33 -050081#endif