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