blob: 869e0ad6b82ee097f2d1a759eb5b30d4041d0937 [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/*
3 * Copyright 2017 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
13#define CONFIG_CHIP_SELECTS_PER_CTRL 1
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053014#define CONFIG_SYS_SDRAM_SIZE 0x40000000
15#define CONFIG_CMD_MEMINFO
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053016
17/* MMC */
18#ifdef CONFIG_MMC
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053019#define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
20#endif
21
22/* SATA */
23#define CONFIG_LIBATA
24#define CONFIG_SCSI_AHCI
25#define CONFIG_SCSI_AHCI_PLAT
26
27#define CONFIG_SYS_SATA AHCI_BASE_ADDR
28
29#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
30#define CONFIG_SYS_SCSI_MAX_LUN 1
31#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
32 CONFIG_SYS_SCSI_MAX_LUN)
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053033#define CONFIG_CMD_MEMINFO
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053034
35#undef CONFIG_EXTRA_ENV_SETTINGS
36#define CONFIG_EXTRA_ENV_SETTINGS \
37 "verify=no\0" \
38 "fdt_high=0xffffffffffffffff\0" \
39 "initrd_high=0xffffffffffffffff\0" \
40 "fdt_addr=0x00f00000\0" \
41 "kernel_addr=0x01000000\0" \
42 "kernelheader_addr=0x800000\0" \
43 "scriptaddr=0x80000000\0" \
44 "scripthdraddr=0x80080000\0" \
45 "fdtheader_addr_r=0x80100000\0" \
46 "kernelheader_addr_r=0x80200000\0" \
47 "kernel_addr_r=0x81000000\0" \
48 "fdt_addr_r=0x90000000\0" \
49 "load_addr=0xa0000000\0" \
50 "kernel_size=0x2800000\0" \
51 "kernelheader_size=0x40000\0" \
52 "console=ttyS0,115200\0" \
53 BOOTENV \
54 "boot_scripts=ls1012ardb_boot.scr\0" \
55 "boot_script_hdr=hdr_ls1012ardb_bs.out\0" \
56 "scan_dev_for_boot_part=" \
57 "part list ${devtype} ${devnum} devplist; " \
58 "env exists devplist || setenv devplist 1; " \
59 "for distro_bootpart in ${devplist}; do " \
60 "if fstype ${devtype} " \
61 "${devnum}:${distro_bootpart} " \
62 "bootfstype; then " \
63 "run scan_dev_for_boot; " \
64 "fi; " \
65 "done\0" \
66 "scan_dev_for_boot=" \
67 "echo Scanning ${devtype} " \
68 "${devnum}:${distro_bootpart}...; " \
69 "for prefix in ${boot_prefixes}; do " \
70 "run scan_dev_for_scripts; " \
71 "done;" \
72 "\0" \
73 "boot_a_script=" \
74 "load ${devtype} ${devnum}:${distro_bootpart} " \
75 "${scriptaddr} ${prefix}${script}; " \
76 "env exists secureboot && load ${devtype} " \
77 "${devnum}:${distro_bootpart} " \
78 "${scripthdraddr} ${prefix}${boot_script_hdr} " \
79 "&& esbc_validate ${scripthdraddr};" \
80 "source ${scriptaddr}\0" \
81 "installer=load mmc 0:2 $load_addr " \
82 "/flex_installer_arm64.itb; " \
83 "bootm $load_addr#$board\0" \
Biwen Lia3c98052019-11-15 15:10:14 +080084 "qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053085 "sf probe && sf read $load_addr " \
86 "$kernel_addr $kernel_size; env exists secureboot " \
87 "&& sf read $kernelheader_addr_r $kernelheader_addr " \
88 "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \
89 "bootm $load_addr#$board\0"
90
91#undef CONFIG_BOOTCOMMAND
Rajesh Bhagat7f91b652018-11-05 18:03:08 +000092#ifdef CONFIG_TFABOOT
93#undef QSPI_NOR_BOOTCOMMAND
94#define QSPI_NOR_BOOTCOMMAND "pfe stop;run distro_bootcmd; run qspi_bootcmd; " \
95 "env exists secureboot && esbc_halt;"
96#else
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053097#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
Calvin Johnsona802d1e2018-03-08 15:30:35 +053098#define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd; run qspi_bootcmd; " \
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +053099 "env exists secureboot && esbc_halt;"
100#endif
Rajesh Bhagat7f91b652018-11-05 18:03:08 +0000101#endif
Bhaskar Upadhayab0ce1872018-01-11 20:03:31 +0530102
103#define DEFAULT_PFE_MDIO_NAME "PFE_MDIO"
104#define DEFAULT_PFE_MDIO1_NAME "PFE_MDIO1"
105
106#include <asm/fsl_secure_boot.h>
107
108#endif /* __LS1012A2G5RDB_H__ */