blob: 404f064e948a42918e35817446e3cc242f61c5d6 [file] [log] [blame]
Marek Vasutd88995a2015-08-03 01:37:28 +02001/*
2 * Copyright (C) 2015 Marek Vasut <marex@denx.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
Marek Vasuta548bc52017-04-05 13:17:03 +02006#ifndef __CONFIG_ARIES_MCVEVK_H__
7#define __CONFIG_ARIES_MCVEVK_H__
Marek Vasutd88995a2015-08-03 01:37:28 +02008
Dinh Nguyen871c24b2015-11-23 17:27:17 -06009#include <asm/arch/base_addr_ac5.h>
Marek Vasutd88995a2015-08-03 01:37:28 +020010
Marek Vasutd88995a2015-08-03 01:37:28 +020011#define CONFIG_HW_WATCHDOG
12
Marek Vasutd88995a2015-08-03 01:37:28 +020013/* Memory configurations */
14#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on MCV */
15
16/* Booting Linux */
Marek Vasutd88995a2015-08-03 01:37:28 +020017#define CONFIG_BOOTFILE "fitImage"
Marek Vasutd88995a2015-08-03 01:37:28 +020018#define CONFIG_PREBOOT "run try_bootscript"
19#define CONFIG_BOOTCOMMAND "run mmc_mmc"
20#define CONFIG_LOADADDR 0x01000000
21#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
22
Marek Vasutaad604a2015-09-24 09:06:06 +020023/* Environment is in MMC */
24#define CONFIG_ENV_OVERWRITE
Dinh Nguyen68a3e322015-09-23 15:38:01 -050025
Marek Vasutd88995a2015-08-03 01:37:28 +020026/* Extra Environment */
Marek Vasutd88995a2015-08-03 01:37:28 +020027#define CONFIG_EXTRA_ENV_SETTINGS \
28 "consdev=ttyS0\0" \
29 "baudrate=115200\0" \
30 "bootscript=boot.scr\0" \
31 "bootdev=/dev/mmcblk0p2\0" \
32 "rootdev=/dev/mmcblk0p3\0" \
33 "netdev=eth0\0" \
34 "hostname=mcvevk\0" \
35 "kernel_addr_r=0x10000000\0" \
Marek Vasutd70b3382016-10-29 22:08:39 +020036 "dfu_alt_info=mmc raw 0 3867148288\0" \
Simon Glassbd7dc382016-01-31 18:10:53 -070037 "update_filename=u-boot-with-spl.sfp\0" \
Marek Vasutd88995a2015-08-03 01:37:28 +020038 "update_sd_offset=0x800\0" \
39 "update_sd=" /* Update the SD firmware partition */ \
40 "if mmc rescan ; then " \
41 "if tftp ${update_filename} ; then " \
42 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
43 "setexpr fw_sz ${fw_sz} + 1 ; " \
44 "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
45 "fi ; " \
46 "fi\0" \
47 "update_qspi_offset=0x0\0" \
48 "update_qspi=" /* Update the QSPI firmware */ \
49 "if sf probe ; then " \
50 "if tftp ${update_filename} ; then " \
51 "sf update ${loadaddr} ${update_qspi_offset} ${filesize} ; " \
52 "fi ; " \
53 "fi\0" \
54 "fpga_filename=output_file.rbf\0" \
55 "load_fpga=" /* Load FPGA bitstream */ \
56 "if tftp ${fpga_filename} ; then " \
57 "fpga load 0 $loadaddr $filesize ; " \
58 "bridge enable ; " \
59 "fi\0" \
60 "addcons=" \
61 "setenv bootargs ${bootargs} " \
62 "console=${consdev},${baudrate}\0" \
63 "addip=" \
64 "setenv bootargs ${bootargs} " \
65 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
66 "${netmask}:${hostname}:${netdev}:off\0" \
67 "addmisc=" \
68 "setenv bootargs ${bootargs} ${miscargs}\0" \
69 "addargs=run addcons addmisc\0" \
70 "mmcload=" \
71 "mmc rescan ; " \
72 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
73 "netload=" \
74 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
75 "miscargs=nohlt panic=1\0" \
76 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
77 "nfsargs=" \
78 "setenv bootargs root=/dev/nfs rw " \
79 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
80 "mmc_mmc=" \
81 "run mmcload mmcargs addargs ; " \
82 "bootm ${kernel_addr_r}\0" \
83 "mmc_nfs=" \
84 "run mmcload nfsargs addip addargs ; " \
85 "bootm ${kernel_addr_r}\0" \
86 "net_mmc=" \
87 "run netload mmcargs addargs ; " \
88 "bootm ${kernel_addr_r}\0" \
89 "net_nfs=" \
90 "run netload nfsargs addip addargs ; " \
91 "bootm ${kernel_addr_r}\0" \
92 "try_bootscript=" \
93 "mmc rescan;" \
94 "if test -e mmc 0:2 ${bootscript} ; then " \
95 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
96 "then ; " \
97 "echo Running bootscript... ; " \
98 "source ${kernel_addr_r} ; " \
99 "fi ; " \
100 "fi\0"
101
102/* The rest of the configuration is shared */
103#include <configs/socfpga_common.h>
104
Marek Vasuta548bc52017-04-05 13:17:03 +0200105#endif /* __CONFIG_ARIES_MCVEVK_H__ */