blob: 0263bb82893f37ee62294c1dd38c40b468efe765 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +05302/*
Yangbo Lubb32e682021-06-03 10:51:19 +08003 * Copyright 2017, 2021 NXP
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +05304 */
5
6#ifndef __LS1012A2G5RDB_H__
7#define __LS1012A2G5RDB_H__
8
9#include "ls1012a_common.h"
10
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053011/* DDR */
12#define CONFIG_DIMM_SLOTS_PER_CTLR 1
13#define CONFIG_CHIP_SELECTS_PER_CTRL 1
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053014#define CONFIG_SYS_SDRAM_SIZE 0x40000000
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053015
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053016/* SATA */
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053017
18#define CONFIG_SYS_SATA AHCI_BASE_ADDR
19
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053020#undef CONFIG_EXTRA_ENV_SETTINGS
21#define CONFIG_EXTRA_ENV_SETTINGS \
22 "verify=no\0" \
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053023 "initrd_high=0xffffffffffffffff\0" \
24 "fdt_addr=0x00f00000\0" \
25 "kernel_addr=0x01000000\0" \
26 "kernelheader_addr=0x800000\0" \
27 "scriptaddr=0x80000000\0" \
28 "scripthdraddr=0x80080000\0" \
29 "fdtheader_addr_r=0x80100000\0" \
30 "kernelheader_addr_r=0x80200000\0" \
31 "kernel_addr_r=0x81000000\0" \
32 "fdt_addr_r=0x90000000\0" \
33 "load_addr=0xa0000000\0" \
34 "kernel_size=0x2800000\0" \
35 "kernelheader_size=0x40000\0" \
Udit Agarwal4fe5c552020-06-08 18:55:44 +053036 "bootm_size=0x10000000\0" \
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053037 "console=ttyS0,115200\0" \
38 BOOTENV \
39 "boot_scripts=ls1012ardb_boot.scr\0" \
40 "boot_script_hdr=hdr_ls1012ardb_bs.out\0" \
41 "scan_dev_for_boot_part=" \
42 "part list ${devtype} ${devnum} devplist; " \
43 "env exists devplist || setenv devplist 1; " \
44 "for distro_bootpart in ${devplist}; do " \
45 "if fstype ${devtype} " \
46 "${devnum}:${distro_bootpart} " \
47 "bootfstype; then " \
48 "run scan_dev_for_boot; " \
49 "fi; " \
50 "done\0" \
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053051 "boot_a_script=" \
52 "load ${devtype} ${devnum}:${distro_bootpart} " \
53 "${scriptaddr} ${prefix}${script}; " \
54 "env exists secureboot && load ${devtype} " \
55 "${devnum}:${distro_bootpart} " \
56 "${scripthdraddr} ${prefix}${boot_script_hdr} " \
57 "&& esbc_validate ${scripthdraddr};" \
58 "source ${scriptaddr}\0" \
59 "installer=load mmc 0:2 $load_addr " \
60 "/flex_installer_arm64.itb; " \
61 "bootm $load_addr#$board\0" \
Mian Yousaf Kaukab2529deae2021-04-14 12:33:58 +020062 "qspi_bootcmd=echo Trying load from qspi..;" \
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053063 "sf probe && sf read $load_addr " \
64 "$kernel_addr $kernel_size; env exists secureboot " \
65 "&& sf read $kernelheader_addr_r $kernelheader_addr " \
66 "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \
67 "bootm $load_addr#$board\0"
68
Rajesh Bhagat487084e2018-11-05 18:03:08 +000069#ifdef CONFIG_TFABOOT
70#undef QSPI_NOR_BOOTCOMMAND
Mian Yousaf Kaukab2529deae2021-04-14 12:33:58 +020071#define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \
Rajesh Bhagat487084e2018-11-05 18:03:08 +000072 "env exists secureboot && esbc_halt;"
Rajesh Bhagat487084e2018-11-05 18:03:08 +000073#endif
Bhaskar Upadhaya7fff22a2018-01-11 20:03:31 +053074
75#define DEFAULT_PFE_MDIO_NAME "PFE_MDIO"
76#define DEFAULT_PFE_MDIO1_NAME "PFE_MDIO1"
77
78#include <asm/fsl_secure_boot.h>
79
80#endif /* __LS1012A2G5RDB_H__ */