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