Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 2 | /* |
Yangbo Lu | bb32e68 | 2021-06-03 10:51:19 +0800 | [diff] [blame] | 3 | * Copyright 2017, 2021 NXP |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __LS1012A2G5RDB_H__ |
| 7 | #define __LS1012A2G5RDB_H__ |
| 8 | |
| 9 | #include "ls1012a_common.h" |
| 10 | |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 11 | /* DDR */ |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 12 | #define CFG_SYS_SDRAM_SIZE 0x40000000 |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 13 | |
Tom Rini | c9edebe | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 14 | #undef CFG_EXTRA_ENV_SETTINGS |
| 15 | #define CFG_EXTRA_ENV_SETTINGS \ |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 16 | "verify=no\0" \ |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 17 | "initrd_high=0xffffffffffffffff\0" \ |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 18 | "kernel_addr=0x01000000\0" \ |
| 19 | "kernelheader_addr=0x800000\0" \ |
| 20 | "scriptaddr=0x80000000\0" \ |
| 21 | "scripthdraddr=0x80080000\0" \ |
| 22 | "fdtheader_addr_r=0x80100000\0" \ |
| 23 | "kernelheader_addr_r=0x80200000\0" \ |
| 24 | "kernel_addr_r=0x81000000\0" \ |
| 25 | "fdt_addr_r=0x90000000\0" \ |
| 26 | "load_addr=0xa0000000\0" \ |
| 27 | "kernel_size=0x2800000\0" \ |
| 28 | "kernelheader_size=0x40000\0" \ |
Udit Agarwal | 4fe5c55 | 2020-06-08 18:55:44 +0530 | [diff] [blame] | 29 | "bootm_size=0x10000000\0" \ |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 30 | "console=ttyS0,115200\0" \ |
| 31 | BOOTENV \ |
| 32 | "boot_scripts=ls1012ardb_boot.scr\0" \ |
| 33 | "boot_script_hdr=hdr_ls1012ardb_bs.out\0" \ |
| 34 | "scan_dev_for_boot_part=" \ |
| 35 | "part list ${devtype} ${devnum} devplist; " \ |
| 36 | "env exists devplist || setenv devplist 1; " \ |
| 37 | "for distro_bootpart in ${devplist}; do " \ |
| 38 | "if fstype ${devtype} " \ |
| 39 | "${devnum}:${distro_bootpart} " \ |
| 40 | "bootfstype; then " \ |
| 41 | "run scan_dev_for_boot; " \ |
| 42 | "fi; " \ |
| 43 | "done\0" \ |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 44 | "boot_a_script=" \ |
| 45 | "load ${devtype} ${devnum}:${distro_bootpart} " \ |
| 46 | "${scriptaddr} ${prefix}${script}; " \ |
| 47 | "env exists secureboot && load ${devtype} " \ |
| 48 | "${devnum}:${distro_bootpart} " \ |
| 49 | "${scripthdraddr} ${prefix}${boot_script_hdr} " \ |
| 50 | "&& esbc_validate ${scripthdraddr};" \ |
| 51 | "source ${scriptaddr}\0" \ |
| 52 | "installer=load mmc 0:2 $load_addr " \ |
| 53 | "/flex_installer_arm64.itb; " \ |
| 54 | "bootm $load_addr#$board\0" \ |
Mian Yousaf Kaukab | 2529deae | 2021-04-14 12:33:58 +0200 | [diff] [blame] | 55 | "qspi_bootcmd=echo Trying load from qspi..;" \ |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 56 | "sf probe && sf read $load_addr " \ |
| 57 | "$kernel_addr $kernel_size; env exists secureboot " \ |
| 58 | "&& sf read $kernelheader_addr_r $kernelheader_addr " \ |
| 59 | "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ |
| 60 | "bootm $load_addr#$board\0" |
| 61 | |
Rajesh Bhagat | 487084e | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 62 | #ifdef CONFIG_TFABOOT |
| 63 | #undef QSPI_NOR_BOOTCOMMAND |
Mian Yousaf Kaukab | 2529deae | 2021-04-14 12:33:58 +0200 | [diff] [blame] | 64 | #define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \ |
Rajesh Bhagat | 487084e | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 65 | "env exists secureboot && esbc_halt;" |
Rajesh Bhagat | 487084e | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 66 | #endif |
Bhaskar Upadhaya | 7fff22a | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 67 | |
| 68 | #define DEFAULT_PFE_MDIO_NAME "PFE_MDIO" |
| 69 | #define DEFAULT_PFE_MDIO1_NAME "PFE_MDIO1" |
| 70 | |
| 71 | #include <asm/fsl_secure_boot.h> |
| 72 | |
| 73 | #endif /* __LS1012A2G5RDB_H__ */ |