blob: 02dd59892bcce6f286c91625cb323130316c1630 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Prabhakar Kushwahaff78aa22016-06-03 18:41:36 +05302/*
3 * Copyright 2016 Freescale Semiconductor, Inc.
Prabhakar Kushwahaff78aa22016-06-03 18:41:36 +05304 */
5
6#ifndef __LS1012ARDB_H__
7#define __LS1012ARDB_H__
8
9#include "ls1012a_common.h"
10
Shengzhou Liub9e745b2016-08-26 18:30:39 +080011/* DDR */
Prabhakar Kushwahaff78aa22016-06-03 18:41:36 +053012#define CONFIG_DIMM_SLOTS_PER_CTLR 1
13#define CONFIG_CHIP_SELECTS_PER_CTRL 1
Prabhakar Kushwahaff78aa22016-06-03 18:41:36 +053014#define CONFIG_SYS_SDRAM_SIZE 0x20000000
Shengzhou Liub9e745b2016-08-26 18:30:39 +080015#define CONFIG_CHIP_SELECTS_PER_CTRL 1
Prabhakar Kushwahaff78aa22016-06-03 18:41:36 +053016
Rajesh Bhagat4c616a12017-11-30 16:44:45 +053017#ifndef CONFIG_SPL_BUILD
18#undef BOOT_TARGET_DEVICES
19#define BOOT_TARGET_DEVICES(func) \
20 func(USB, usb, 0)
21#endif
22
Pratiyush Srivastava76379df2016-10-07 23:08:38 +053023#undef CONFIG_EXTRA_ENV_SETTINGS
Rajesh Bhagat4c616a12017-11-30 16:44:45 +053024#define CONFIG_EXTRA_ENV_SETTINGS \
25 "verify=no\0" \
26 "fdt_high=0xffffffffffffffff\0" \
Rajesh Bhagat4c616a12017-11-30 16:44:45 +053027 "fdt_addr=0x00f00000\0" \
28 "kernel_addr=0x01000000\0" \
29 "scriptaddr=0x80000000\0" \
30 "fdtheader_addr_r=0x80100000\0" \
31 "kernelheader_addr_r=0x80200000\0" \
32 "kernel_addr_r=0x96000000\0" \
33 "fdt_addr_r=0x90000000\0" \
34 "load_addr=0x96000000\0" \
35 "kernel_size=0x2800000\0" \
Udit Agarwal3fba2312020-06-08 18:55:44 +053036 "bootm_size=0x10000000\0" \
Rajesh Bhagat4c616a12017-11-30 16:44:45 +053037 "console=ttyS0,115200\0" \
38 BOOTENV \
39 "boot_scripts=ls1012afrdm_boot.scr\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" \
Rajesh Bhagat4c616a12017-11-30 16:44:45 +053050 "installer=load usb 0:2 $load_addr " \
51 "/flex_installer_arm64.itb; " \
52 "bootm $load_addr#$board\0" \
Biwen Lia3c98052019-11-15 15:10:14 +080053 "qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \
Rajesh Bhagat4c616a12017-11-30 16:44:45 +053054 "sf probe && sf read $load_addr " \
55 "$kernel_addr $kernel_size && bootm $load_addr#$board\0"
56
57#undef CONFIG_BOOTCOMMAND
Rajesh Bhagat7f91b652018-11-05 18:03:08 +000058#ifdef CONFIG_TFABOOT
59#undef QSPI_NOR_BOOTCOMMAND
60#define QSPI_NOR_BOOTCOMMAND "pfe stop;run distro_bootcmd;run qspi_bootcmd"
61#else
Calvin Johnsona802d1e2018-03-08 15:30:35 +053062#define CONFIG_BOOTCOMMAND "pfe stop;run distro_bootcmd;run qspi_bootcmd"
Rajesh Bhagat7f91b652018-11-05 18:03:08 +000063#endif
Pratiyush Srivastava76379df2016-10-07 23:08:38 +053064
Prabhakar Kushwahaff78aa22016-06-03 18:41:36 +053065#endif /* __LS1012ARDB_H__ */