Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 2 | /* |
Yangbo Lu | 34f39ce | 2021-06-03 10:51:19 +0800 | [diff] [blame] | 3 | * Copyright 2017, 2021 NXP |
Bhaskar Upadhaya | b0ce187 | 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 | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 11 | /* DDR */ |
| 12 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
| 13 | #define CONFIG_CHIP_SELECTS_PER_CTRL 1 |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 14 | #define CONFIG_SYS_SDRAM_SIZE 0x40000000 |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 15 | |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 16 | /* SATA */ |
| 17 | #define CONFIG_LIBATA |
| 18 | #define CONFIG_SCSI_AHCI |
| 19 | #define CONFIG_SCSI_AHCI_PLAT |
| 20 | |
| 21 | #define CONFIG_SYS_SATA AHCI_BASE_ADDR |
| 22 | |
| 23 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 |
| 24 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
| 25 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ |
| 26 | CONFIG_SYS_SCSI_MAX_LUN) |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 27 | |
| 28 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 29 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 30 | "verify=no\0" \ |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 31 | "initrd_high=0xffffffffffffffff\0" \ |
| 32 | "fdt_addr=0x00f00000\0" \ |
| 33 | "kernel_addr=0x01000000\0" \ |
| 34 | "kernelheader_addr=0x800000\0" \ |
| 35 | "scriptaddr=0x80000000\0" \ |
| 36 | "scripthdraddr=0x80080000\0" \ |
| 37 | "fdtheader_addr_r=0x80100000\0" \ |
| 38 | "kernelheader_addr_r=0x80200000\0" \ |
| 39 | "kernel_addr_r=0x81000000\0" \ |
| 40 | "fdt_addr_r=0x90000000\0" \ |
| 41 | "load_addr=0xa0000000\0" \ |
| 42 | "kernel_size=0x2800000\0" \ |
| 43 | "kernelheader_size=0x40000\0" \ |
Udit Agarwal | 3fba231 | 2020-06-08 18:55:44 +0530 | [diff] [blame] | 44 | "bootm_size=0x10000000\0" \ |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 45 | "console=ttyS0,115200\0" \ |
| 46 | BOOTENV \ |
| 47 | "boot_scripts=ls1012ardb_boot.scr\0" \ |
| 48 | "boot_script_hdr=hdr_ls1012ardb_bs.out\0" \ |
| 49 | "scan_dev_for_boot_part=" \ |
| 50 | "part list ${devtype} ${devnum} devplist; " \ |
| 51 | "env exists devplist || setenv devplist 1; " \ |
| 52 | "for distro_bootpart in ${devplist}; do " \ |
| 53 | "if fstype ${devtype} " \ |
| 54 | "${devnum}:${distro_bootpart} " \ |
| 55 | "bootfstype; then " \ |
| 56 | "run scan_dev_for_boot; " \ |
| 57 | "fi; " \ |
| 58 | "done\0" \ |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 59 | "boot_a_script=" \ |
| 60 | "load ${devtype} ${devnum}:${distro_bootpart} " \ |
| 61 | "${scriptaddr} ${prefix}${script}; " \ |
| 62 | "env exists secureboot && load ${devtype} " \ |
| 63 | "${devnum}:${distro_bootpart} " \ |
| 64 | "${scripthdraddr} ${prefix}${boot_script_hdr} " \ |
| 65 | "&& esbc_validate ${scripthdraddr};" \ |
| 66 | "source ${scriptaddr}\0" \ |
| 67 | "installer=load mmc 0:2 $load_addr " \ |
| 68 | "/flex_installer_arm64.itb; " \ |
| 69 | "bootm $load_addr#$board\0" \ |
Mian Yousaf Kaukab | 864c3db | 2021-04-14 12:33:58 +0200 | [diff] [blame] | 70 | "qspi_bootcmd=echo Trying load from qspi..;" \ |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 71 | "sf probe && sf read $load_addr " \ |
| 72 | "$kernel_addr $kernel_size; env exists secureboot " \ |
| 73 | "&& sf read $kernelheader_addr_r $kernelheader_addr " \ |
| 74 | "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ |
| 75 | "bootm $load_addr#$board\0" |
| 76 | |
| 77 | #undef CONFIG_BOOTCOMMAND |
Rajesh Bhagat | 7f91b65 | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 78 | #ifdef CONFIG_TFABOOT |
| 79 | #undef QSPI_NOR_BOOTCOMMAND |
Mian Yousaf Kaukab | 864c3db | 2021-04-14 12:33:58 +0200 | [diff] [blame] | 80 | #define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \ |
Rajesh Bhagat | 7f91b65 | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 81 | "env exists secureboot && esbc_halt;" |
| 82 | #else |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 83 | #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) |
Mian Yousaf Kaukab | 864c3db | 2021-04-14 12:33:58 +0200 | [diff] [blame] | 84 | #define CONFIG_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \ |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 85 | "env exists secureboot && esbc_halt;" |
| 86 | #endif |
Rajesh Bhagat | 7f91b65 | 2018-11-05 18:03:08 +0000 | [diff] [blame] | 87 | #endif |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 88 | |
| 89 | #define DEFAULT_PFE_MDIO_NAME "PFE_MDIO" |
| 90 | #define DEFAULT_PFE_MDIO1_NAME "PFE_MDIO1" |
| 91 | |
| 92 | #include <asm/fsl_secure_boot.h> |
| 93 | |
| 94 | #endif /* __LS1012A2G5RDB_H__ */ |