1 /* 2 * Copyright 2017 NXP 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef __LS1012A2G5RDB_H__ 8 #define __LS1012A2G5RDB_H__ 9 10 #include "ls1012a_common.h" 11 12 /* DDR */ 13 #define CONFIG_DIMM_SLOTS_PER_CTLR 1 14 #define CONFIG_CHIP_SELECTS_PER_CTRL 1 15 #define CONFIG_NR_DRAM_BANKS 2 16 #define CONFIG_SYS_SDRAM_SIZE 0x40000000 17 #define CONFIG_CMD_MEMINFO 18 #define CONFIG_SYS_MEMTEST_START 0x80000000 19 #define CONFIG_SYS_MEMTEST_END 0x9fffffff 20 21 /* MMC */ 22 #ifdef CONFIG_MMC 23 #define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33 24 #endif 25 26 /* SATA */ 27 #define CONFIG_LIBATA 28 #define CONFIG_SCSI_AHCI 29 #define CONFIG_SCSI_AHCI_PLAT 30 31 #define CONFIG_SYS_SATA AHCI_BASE_ADDR 32 33 #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 34 #define CONFIG_SYS_SCSI_MAX_LUN 1 35 #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ 36 CONFIG_SYS_SCSI_MAX_LUN) 37 #define CONFIG_NET_MULTI 38 39 #define CONFIG_CMD_MEMINFO 40 #define CONFIG_SYS_MEMTEST_START 0x80000000 41 #define CONFIG_SYS_MEMTEST_END 0x9fffffff 42 43 #undef CONFIG_EXTRA_ENV_SETTINGS 44 #define CONFIG_EXTRA_ENV_SETTINGS \ 45 "verify=no\0" \ 46 "fdt_high=0xffffffffffffffff\0" \ 47 "initrd_high=0xffffffffffffffff\0" \ 48 "fdt_addr=0x00f00000\0" \ 49 "kernel_addr=0x01000000\0" \ 50 "kernelheader_addr=0x800000\0" \ 51 "scriptaddr=0x80000000\0" \ 52 "scripthdraddr=0x80080000\0" \ 53 "fdtheader_addr_r=0x80100000\0" \ 54 "kernelheader_addr_r=0x80200000\0" \ 55 "kernel_addr_r=0x81000000\0" \ 56 "fdt_addr_r=0x90000000\0" \ 57 "load_addr=0xa0000000\0" \ 58 "kernel_size=0x2800000\0" \ 59 "kernelheader_size=0x40000\0" \ 60 "console=ttyS0,115200\0" \ 61 BOOTENV \ 62 "boot_scripts=ls1012ardb_boot.scr\0" \ 63 "boot_script_hdr=hdr_ls1012ardb_bs.out\0" \ 64 "scan_dev_for_boot_part=" \ 65 "part list ${devtype} ${devnum} devplist; " \ 66 "env exists devplist || setenv devplist 1; " \ 67 "for distro_bootpart in ${devplist}; do " \ 68 "if fstype ${devtype} " \ 69 "${devnum}:${distro_bootpart} " \ 70 "bootfstype; then " \ 71 "run scan_dev_for_boot; " \ 72 "fi; " \ 73 "done\0" \ 74 "scan_dev_for_boot=" \ 75 "echo Scanning ${devtype} " \ 76 "${devnum}:${distro_bootpart}...; " \ 77 "for prefix in ${boot_prefixes}; do " \ 78 "run scan_dev_for_scripts; " \ 79 "done;" \ 80 "\0" \ 81 "boot_a_script=" \ 82 "load ${devtype} ${devnum}:${distro_bootpart} " \ 83 "${scriptaddr} ${prefix}${script}; " \ 84 "env exists secureboot && load ${devtype} " \ 85 "${devnum}:${distro_bootpart} " \ 86 "${scripthdraddr} ${prefix}${boot_script_hdr} " \ 87 "&& esbc_validate ${scripthdraddr};" \ 88 "source ${scriptaddr}\0" \ 89 "installer=load mmc 0:2 $load_addr " \ 90 "/flex_installer_arm64.itb; " \ 91 "bootm $load_addr#$board\0" \ 92 "qspi_bootcmd=echo Trying load from qspi..;" \ 93 "sf probe && sf read $load_addr " \ 94 "$kernel_addr $kernel_size; env exists secureboot " \ 95 "&& sf read $kernelheader_addr_r $kernelheader_addr " \ 96 "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ 97 "bootm $load_addr#$board\0" 98 99 #undef CONFIG_BOOTCOMMAND 100 #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) 101 #define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd; run qspi_bootcmd; " \ 102 "env exists secureboot && esbc_halt;" 103 #endif 104 105 #define DEFAULT_PFE_MDIO_NAME "PFE_MDIO" 106 #define DEFAULT_PFE_MDIO1_NAME "PFE_MDIO1" 107 108 #include <asm/fsl_secure_boot.h> 109 110 #endif /* __LS1012A2G5RDB_H__ */ 111