blob: 604ea20e2cf42372e7c4782a5c1eb9e803e02391 [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
11/* U-Boot Commands */
Marek Vasut8e8b62a2015-08-03 01:37:28 +020012#define CONFIG_FAT_WRITE
13#define CONFIG_HW_WATCHDOG
14
Marek Vasut8e8b62a2015-08-03 01:37:28 +020015/* Memory configurations */
16#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on MCV */
17
18/* Booting Linux */
Marek Vasut8e8b62a2015-08-03 01:37:28 +020019#define CONFIG_BOOTFILE "fitImage"
20#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)
21#define CONFIG_PREBOOT "run try_bootscript"
22#define CONFIG_BOOTCOMMAND "run mmc_mmc"
23#define CONFIG_LOADADDR 0x01000000
24#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
25
Marek Vasut2febc662015-09-24 09:06:06 +020026/* Environment is in MMC */
27#define CONFIG_ENV_OVERWRITE
28#define CONFIG_ENV_IS_IN_MMC
Dinh Nguyen813e7e62015-09-23 15:38:01 -050029
Marek Vasut8e8b62a2015-08-03 01:37:28 +020030/* Extra Environment */
Marek Vasut8e8b62a2015-08-03 01:37:28 +020031#define CONFIG_EXTRA_ENV_SETTINGS \
32 "consdev=ttyS0\0" \
33 "baudrate=115200\0" \
34 "bootscript=boot.scr\0" \
35 "bootdev=/dev/mmcblk0p2\0" \
36 "rootdev=/dev/mmcblk0p3\0" \
37 "netdev=eth0\0" \
38 "hostname=mcvevk\0" \
39 "kernel_addr_r=0x10000000\0" \
Simon Glass7bdddb02016-01-31 18:10:53 -070040 "update_filename=u-boot-with-spl.sfp\0" \
Marek Vasut8e8b62a2015-08-03 01:37:28 +020041 "update_sd_offset=0x800\0" \
42 "update_sd=" /* Update the SD firmware partition */ \
43 "if mmc rescan ; then " \
44 "if tftp ${update_filename} ; then " \
45 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
46 "setexpr fw_sz ${fw_sz} + 1 ; " \
47 "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
48 "fi ; " \
49 "fi\0" \
50 "update_qspi_offset=0x0\0" \
51 "update_qspi=" /* Update the QSPI firmware */ \
52 "if sf probe ; then " \
53 "if tftp ${update_filename} ; then " \
54 "sf update ${loadaddr} ${update_qspi_offset} ${filesize} ; " \
55 "fi ; " \
56 "fi\0" \
57 "fpga_filename=output_file.rbf\0" \
58 "load_fpga=" /* Load FPGA bitstream */ \
59 "if tftp ${fpga_filename} ; then " \
60 "fpga load 0 $loadaddr $filesize ; " \
61 "bridge enable ; " \
62 "fi\0" \
63 "addcons=" \
64 "setenv bootargs ${bootargs} " \
65 "console=${consdev},${baudrate}\0" \
66 "addip=" \
67 "setenv bootargs ${bootargs} " \
68 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
69 "${netmask}:${hostname}:${netdev}:off\0" \
70 "addmisc=" \
71 "setenv bootargs ${bootargs} ${miscargs}\0" \
72 "addargs=run addcons addmisc\0" \
73 "mmcload=" \
74 "mmc rescan ; " \
75 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
76 "netload=" \
77 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
78 "miscargs=nohlt panic=1\0" \
79 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
80 "nfsargs=" \
81 "setenv bootargs root=/dev/nfs rw " \
82 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
83 "mmc_mmc=" \
84 "run mmcload mmcargs addargs ; " \
85 "bootm ${kernel_addr_r}\0" \
86 "mmc_nfs=" \
87 "run mmcload nfsargs addip addargs ; " \
88 "bootm ${kernel_addr_r}\0" \
89 "net_mmc=" \
90 "run netload mmcargs addargs ; " \
91 "bootm ${kernel_addr_r}\0" \
92 "net_nfs=" \
93 "run netload nfsargs addip addargs ; " \
94 "bootm ${kernel_addr_r}\0" \
95 "try_bootscript=" \
96 "mmc rescan;" \
97 "if test -e mmc 0:2 ${bootscript} ; then " \
98 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
99 "then ; " \
100 "echo Running bootscript... ; " \
101 "source ${kernel_addr_r} ; " \
102 "fi ; " \
103 "fi\0"
104
105/* The rest of the configuration is shared */
106#include <configs/socfpga_common.h>
107
Marek Vasut9d6c56b2017-04-05 13:17:03 +0200108#endif /* __CONFIG_ARIES_MCVEVK_H__ */