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