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