Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 1 | /* 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 | |
| 13 | #define CONFIG_SYS_BOOTM_LEN SZ_64M |
| 14 | |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 15 | #define CONFIG_SYS_MONITOR_LEN SZ_512K |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 16 | #define CONFIG_SYS_UBOOT_BASE \ |
| 17 | (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) |
| 18 | |
| 19 | #ifdef CONFIG_SPL_BUILD |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 20 | |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 21 | #define CONFIG_POWER_PCA9450 |
| 22 | |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 23 | #endif |
| 24 | |
| 25 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 26 | "image=Image\0" \ |
Teresa Remmet | 5fc6abf | 2021-07-07 12:57:59 +0000 | [diff] [blame] | 27 | "console=ttymxc0,115200\0" \ |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 28 | "fdt_addr=0x48000000\0" \ |
| 29 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
Teresa Remmet | 7de60a6 | 2021-07-07 12:58:00 +0000 | [diff] [blame] | 30 | "ip_dyn=yes\0" \ |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 31 | "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ |
Tom Rini | b113bca | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 32 | "mmcpart=1\0" \ |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 33 | "mmcroot=2\0" \ |
| 34 | "mmcautodetect=yes\0" \ |
| 35 | "mmcargs=setenv bootargs console=${console} " \ |
| 36 | "root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw\0" \ |
| 37 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 38 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 39 | "mmcboot=echo Booting from mmc ...; " \ |
| 40 | "run mmcargs; " \ |
| 41 | "if run loadfdt; then " \ |
| 42 | "booti ${loadaddr} - ${fdt_addr}; " \ |
| 43 | "else " \ |
| 44 | "echo WARN: Cannot load the DT; " \ |
| 45 | "fi;\0 " \ |
Teresa Remmet | 7de60a6 | 2021-07-07 12:58:00 +0000 | [diff] [blame] | 46 | "nfsroot=/nfs\0" \ |
| 47 | "netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp " \ |
| 48 | "nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 49 | "netboot=echo Booting from net ...; " \ |
| 50 | "run netargs; " \ |
| 51 | "if test ${ip_dyn} = yes; then " \ |
| 52 | "setenv get_cmd dhcp; " \ |
| 53 | "else " \ |
| 54 | "setenv get_cmd tftp; " \ |
| 55 | "fi; " \ |
| 56 | "${get_cmd} ${loadaddr} ${image}; " \ |
| 57 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 58 | "booti ${loadaddr} - ${fdt_addr}; " \ |
| 59 | "else " \ |
| 60 | "echo WARN: Cannot load the DT; " \ |
| 61 | "fi;\0" \ |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 62 | |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 63 | /* Link Definitions */ |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 64 | |
| 65 | #define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 |
| 66 | #define CONFIG_SYS_INIT_RAM_SIZE SZ_512K |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 67 | |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 68 | |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 69 | #define CONFIG_SYS_SDRAM_BASE 0x40000000 |
| 70 | |
| 71 | #define PHYS_SDRAM 0x40000000 |
| 72 | #define PHYS_SDRAM_SIZE 0x80000000 |
| 73 | |
Teresa Remmet | 30fb74d | 2021-01-13 16:28:09 +0100 | [diff] [blame] | 74 | #endif /* __PHYCORE_IMX8MP_H */ |