Mathew McBride | e605fb1 | 2022-01-31 18:34:43 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2017 NXP |
| 4 | * Copyright 2019-2021 Traverse Technologies |
| 5 | */ |
| 6 | |
| 7 | #ifndef __TEN64_H |
| 8 | #define __TEN64_H |
| 9 | |
| 10 | #include "ls1088a_common.h" |
| 11 | |
Mathew McBride | e605fb1 | 2022-01-31 18:34:43 +0530 | [diff] [blame] | 12 | |
Mathew McBride | e605fb1 | 2022-01-31 18:34:43 +0530 | [diff] [blame] | 13 | #define CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS 5000 |
| 14 | |
| 15 | #define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd" |
| 16 | #define SD_BOOTCOMMAND "run distro_bootcmd" |
| 17 | |
| 18 | #define QSPI_MC_INIT_CMD \ |
| 19 | "sf probe 0:0 && sf read 0x80000000 0x300000 0x200000 &&" \ |
| 20 | "sf read 0x80200000 0x5C0000 0x40000 &&" \ |
| 21 | "fsl_mc start mc 0x80000000 0x80200000 && " \ |
| 22 | "sf read 0x80300000 0x580000 0x40000 && fsl_mc lazyapply DPL 0x80300000\0" |
| 23 | #define SD_MC_INIT_CMD \ |
| 24 | "mmcinfo; fatload mmc 0 0x80000000 mcfirmware/mc_ls1088a.itb; "\ |
| 25 | "fatload mmc 0 0x80200000 dpaa2config/dpc.0x1D-0x0D.dtb; "\ |
| 26 | "fsl_mc start mc 0x80000000 0x80200000\0" |
| 27 | |
| 28 | #define BOOT_TARGET_DEVICES(func) \ |
| 29 | func(NVME, nvme, 0) \ |
| 30 | func(USB, usb, 0) \ |
| 31 | func(MMC, mmc, 0) \ |
| 32 | func(SCSI, scsi, 0) \ |
| 33 | func(DHCP, dhcp, 0) \ |
| 34 | func(PXE, pxe, 0) |
| 35 | #include <config_distro_bootcmd.h> |
| 36 | |
| 37 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 38 | |
| 39 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 40 | "BOARD=ten64\0" \ |
| 41 | "fdt_addr_r=0x90000000\0" \ |
| 42 | "fdt_high=0xa0000000\0" \ |
| 43 | "kernel_addr_r=0x81000000\0" \ |
| 44 | "load_addr=0xa0000000\0" \ |
| 45 | BOOTENV \ |
| 46 | "load_efi_dtb=mtd read devicetree $fdt_addr_r && fdt addr $fdt_addr_r && " \ |
| 47 | "fdt resize && fdt boardsetup\0" \ |
| 48 | "bootcmd_recovery=mtd read recovery 0xa0000000; mtd read dpl 0x80100000 && " \ |
| 49 | "fsl_mc apply DPL 0x80100000 && bootm 0xa0000000#ten64\0" |
| 50 | |
| 51 | #endif /* __TEN64_H */ |