1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2020 Compass Electronics Group, LLC
6 #ifndef __IMX8MN_BEACON_H
7 #define __IMX8MN_BEACON_H
9 #include <linux/sizes.h>
10 #include <asm/arch/imx-regs.h>
12 #define CFG_SYS_UBOOT_BASE \
13 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
15 /* Initial environment variables */
16 #define CFG_EXTRA_ENV_SETTINGS \
19 "ramdiskimage=rootfs.cpio.uboot\0" \
20 "console=ttymxc1,115200\0" \
21 "fdt_addr=0x43000000\0" \
22 "ramdisk_addr=0x44000000\0" \
24 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
25 "initrd_addr=0x43800000\0" \
26 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
28 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
29 "mmcautodetect=yes\0" \
30 "mmcargs=setenv bootargs console=${console} " \
31 " root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
32 "ramargs=setenv bootargs console=${console} root=/dev/ram rw " \
34 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
35 "bootscript=echo Running bootscript from mmc ...; " \
37 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
38 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
39 "loadramdisk=load mmc ${mmcdev} ${ramdisk_addr} ${ramdiskimage}\0"\
40 "mmcboot=echo Booting from mmc ...; " \
41 "run finduuid; run mmcargs; " \
42 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
43 "if run loadfdt; then " \
44 "booti ${loadaddr} - ${fdt_addr}; " \
46 "echo WARN: Cannot load the DT; " \
49 "echo wait for boot; " \
51 "netargs=setenv bootargs console=${console} " \
53 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
54 "netboot=echo Booting from net ...; " \
56 "if test ${ip_dyn} = yes; then " \
57 "setenv get_cmd dhcp; " \
59 "setenv get_cmd tftp; " \
61 "${get_cmd} ${loadaddr} ${image}; " \
62 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
63 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
64 "booti ${loadaddr} - ${fdt_addr}; " \
66 "echo WARN: Cannot load the DT; " \
71 "ramboot=echo Booting from RAMdisk...; "\
72 "run loadimage; run loadfdt; fdt addr $fdt_addr; "\
73 "run loadramdisk; run ramargs; " \
74 "booti ${loadaddr} ${ramdisk_addr} ${fdt_addr} ${optargs}\0"
76 /* Link Definitions */
78 #define CFG_SYS_INIT_RAM_ADDR 0x40000000
79 #define CFG_SYS_INIT_RAM_SIZE 0x200000
81 #define CFG_SYS_SDRAM_BASE 0x40000000
82 #define PHYS_SDRAM 0x40000000
83 #if CONFIG_IS_ENABLED(IMX8MN_BEACON_2GB_LPDDR)
84 #define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
86 #define PHYS_SDRAM_SIZE 0x40000000 /* 1GB DDR */