blob: 11a17be7fe1de20dee88228c23efcae104d33831 [file] [log] [blame]
Teresa Remmet30fb74d2021-01-13 16:28:09 +01001/* SPDX-License-Identifier: GPL-2.0-or-later
2 *
3 * Copyright (C) 2020 PHYTEC Messtechnik GmbH
4 * Author: Teresa Remmet <t.remmet@phytec.de>
5 */
6
7#ifndef __PHYCORE_IMX8MP_H
8#define __PHYCORE_IMX8MP_H
9
10#include <linux/sizes.h>
11#include <asm/arch/imx-regs.h>
12
Tom Rini6a5dccc2022-11-16 13:10:41 -050013#define CFG_SYS_UBOOT_BASE \
Teresa Remmet30fb74d2021-01-13 16:28:09 +010014 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
15
Tom Rinic9edebe2022-12-04 10:03:50 -050016#define CFG_EXTRA_ENV_SETTINGS \
Teresa Remmet30fb74d2021-01-13 16:28:09 +010017 "image=Image\0" \
Teresa Remmet5fc6abf2021-07-07 12:57:59 +000018 "console=ttymxc0,115200\0" \
Teresa Remmet30fb74d2021-01-13 16:28:09 +010019 "fdt_addr=0x48000000\0" \
20 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
Teresa Remmet7de60a62021-07-07 12:58:00 +000021 "ip_dyn=yes\0" \
Benjamin Hahn46eab9c2024-02-08 13:03:11 +010022 "dofastboot=0\0" \
23 "fastboot_raw_partition_bootloader=64 8128\0" \
24 "fastboot_raw_partition_all=0 4194304\0" \
25 "emmc_dev=2\0" \
26 "sd_dev=1\0" \
Teresa Remmet30fb74d2021-01-13 16:28:09 +010027 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050028 "mmcpart=1\0" \
Teresa Remmet30fb74d2021-01-13 16:28:09 +010029 "mmcroot=2\0" \
30 "mmcautodetect=yes\0" \
31 "mmcargs=setenv bootargs console=${console} " \
32 "root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw\0" \
33 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
34 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
35 "mmcboot=echo Booting from mmc ...; " \
36 "run mmcargs; " \
37 "if run loadfdt; then " \
38 "booti ${loadaddr} - ${fdt_addr}; " \
39 "else " \
40 "echo WARN: Cannot load the DT; " \
41 "fi;\0 " \
Teresa Remmet7de60a62021-07-07 12:58:00 +000042 "nfsroot=/nfs\0" \
43 "netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp " \
44 "nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
45 "netboot=echo Booting from net ...; " \
46 "run netargs; " \
47 "if test ${ip_dyn} = yes; then " \
48 "setenv get_cmd dhcp; " \
49 "else " \
50 "setenv get_cmd tftp; " \
51 "fi; " \
52 "${get_cmd} ${loadaddr} ${image}; " \
53 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
54 "booti ${loadaddr} - ${fdt_addr}; " \
55 "else " \
56 "echo WARN: Cannot load the DT; " \
57 "fi;\0" \
Teresa Remmet30fb74d2021-01-13 16:28:09 +010058
Teresa Remmet30fb74d2021-01-13 16:28:09 +010059/* Link Definitions */
Teresa Remmet30fb74d2021-01-13 16:28:09 +010060
Tom Rini6a5dccc2022-11-16 13:10:41 -050061#define CFG_SYS_INIT_RAM_ADDR 0x40000000
62#define CFG_SYS_INIT_RAM_SIZE SZ_512K
Teresa Remmet30fb74d2021-01-13 16:28:09 +010063
Teresa Remmet30fb74d2021-01-13 16:28:09 +010064
Tom Rinibb4dd962022-11-16 13:10:37 -050065#define CFG_SYS_SDRAM_BASE 0x40000000
Teresa Remmet30fb74d2021-01-13 16:28:09 +010066
67#define PHYS_SDRAM 0x40000000
68#define PHYS_SDRAM_SIZE 0x80000000
69
Teresa Remmet30fb74d2021-01-13 16:28:09 +010070#endif /* __PHYCORE_IMX8MP_H */