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