blob: 14562143255e152cb1a5e893162a3b9202ad2e49 [file] [log] [blame]
Wolfgang Grandegger990ed442019-05-12 19:25:18 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2015 Marek Vasut <marex@denx.de>
4 */
5#ifndef __CONFIG_ARIES_MCVEVK_H__
6#define __CONFIG_ARIES_MCVEVK_H__
7
8#include <asm/arch/base_addr_ac5.h>
9
10/* Memory configurations */
11#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on MCV */
12
13/* Booting Linux */
14#define CONFIG_BOOTFILE "fitImage"
Wolfgang Grandegger990ed442019-05-12 19:25:18 +020015#define CONFIG_BOOTCOMMAND "run mmc_mmc"
Wolfgang Grandegger990ed442019-05-12 19:25:18 +020016
17/* Environment is in MMC */
Wolfgang Grandegger990ed442019-05-12 19:25:18 +020018
19/* Extra Environment */
20#define CONFIG_EXTRA_ENV_SETTINGS \
21 "consdev=ttyS0\0" \
22 "baudrate=115200\0" \
23 "bootscript=boot.scr\0" \
24 "setuuid=part uuid mmc 0:3 uuid\0" \
25 "netdev=eth0\0" \
26 "hostname=mcvevk\0" \
27 "kernel_addr_r=0x10000000\0" \
28 "socfpga_legacy_reset_compat=1\0" \
29 "bootm_size=0xa000000\0" \
30 "dfu_alt_info=mmc raw 0 3867148288\0" \
31 "update_filename=u-boot-with-spl.sfp\0" \
32 "update_sd_offset=0x800\0" \
33 "update_sd=" /* Update the SD firmware partition */ \
34 "if mmc rescan ; then " \
35 "if tftp ${update_filename} ; then " \
36 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
37 "setexpr fw_sz ${fw_sz} + 1 ; " \
38 "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
39 "fi ; " \
40 "fi\0" \
41 "update_qspi_offset=0x0\0" \
42 "update_qspi=" /* Update the QSPI firmware */ \
43 "if sf probe ; then " \
44 "if tftp ${update_filename} ; then " \
45 "sf update ${loadaddr} ${update_qspi_offset} ${filesize} ; " \
46 "fi ; " \
47 "fi\0" \
48 "fpga_filename=output_file.rbf\0" \
49 "load_fpga=" /* Load FPGA bitstream */ \
50 "if tftp ${fpga_filename} ; then " \
51 "fpga load 0 $loadaddr $filesize ; " \
52 "bridge enable ; " \
53 "fi\0" \
54 "addcons=" \
55 "setenv bootargs ${bootargs} " \
56 "console=${consdev},${baudrate}\0" \
57 "addip=" \
58 "setenv bootargs ${bootargs} " \
59 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
60 "${netmask}:${hostname}:${netdev}:off\0" \
61 "addmisc=" \
62 "setenv bootargs ${bootargs} ${miscargs}\0" \
63 "addargs=run addcons addmisc\0" \
64 "mmcload=" \
65 "mmc rescan ; " \
66 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
67 "netload=" \
68 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
69 "miscargs=nohlt panic=1\0" \
70 "mmcargs=setenv bootargs root=PARTUUID=${uuid} rw rootwait\0" \
71 "nfsargs=" \
72 "setenv bootargs root=/dev/nfs rw " \
73 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
74 "mmc_mmc=" \
75 "run mmcload setuuid mmcargs addargs ; " \
76 "bootm ${kernel_addr_r}\0" \
77 "mmc_nfs=" \
78 "run mmcload nfsargs addip addargs ; " \
79 "bootm ${kernel_addr_r}\0" \
80 "net_mmc=" \
81 "run netload setuuid mmcargs addargs ; " \
82 "bootm ${kernel_addr_r}\0" \
83 "net_nfs=" \
84 "run netload nfsargs addip addargs ; " \
85 "bootm ${kernel_addr_r}\0" \
86 "try_bootscript=" \
87 "mmc rescan;" \
88 "if test -e mmc 0:2 ${bootscript} ; then " \
89 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
90 "then ; " \
91 "echo Running bootscript... ; " \
92 "source ${kernel_addr_r} ; " \
93 "fi ; " \
94 "fi\0"
95
96/* The rest of the configuration is shared */
97#include <configs/socfpga_common.h>
98
99#endif /* __CONFIG_ARIES_MCVEVK_H__ */