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