1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2018 Marek Vasut <marex@denx.de>
5 #ifndef __CONFIG_DEVBOARDS_DBM_SOC1_H__
6 #define __CONFIG_DEVBOARDS_DBM_SOC1_H__
8 #include <asm/arch/base_addr_ac5.h>
10 /* Memory configurations */
11 #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB */
13 /* Environment is in MMC */
15 /* Extra Environment */
16 #define CONFIG_EXTRA_ENV_SETTINGS \
19 "bootscript=boot.scr\0" \
20 "bootdev=/dev/mmcblk0p2\0" \
21 "rootdev=/dev/mmcblk0p3\0" \
23 "hostname=dbm_soc1\0" \
24 "kernel_addr_r=0x10000000\0" \
25 "dfu_alt_info=mmc raw 0 3867148288\0" \
26 "update_filename=u-boot-with-spl.sfp\0" \
27 "update_sd_offset=0x800\0" \
28 "update_sd=" /* Update the SD firmware partition */ \
29 "if mmc rescan ; then " \
30 "if tftp ${update_filename} ; then " \
31 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
32 "setexpr fw_sz ${fw_sz} + 1 ; " \
33 "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
36 "fpga_filename=output_file.rbf\0" \
37 "load_fpga=" /* Load FPGA bitstream */ \
38 "if tftp ${fpga_filename} ; then " \
39 "fpga load 0 $loadaddr $filesize ; " \
43 "setenv bootargs ${bootargs} " \
44 "console=${consdev},${baudrate}\0" \
46 "setenv bootargs ${bootargs} " \
47 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
48 "${netmask}:${hostname}:${netdev}:off\0" \
50 "setenv bootargs ${bootargs} ${miscargs}\0" \
51 "addargs=run addcons addmisc\0" \
54 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
56 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
57 "miscargs=nohlt panic=1\0" \
58 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
60 "setenv bootargs root=/dev/nfs rw " \
61 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
63 "run mmcload mmcargs addargs ; " \
64 "bootm ${kernel_addr_r}\0" \
66 "run mmcload nfsargs addip addargs ; " \
67 "bootm ${kernel_addr_r}\0" \
69 "run netload mmcargs addargs ; " \
70 "bootm ${kernel_addr_r}\0" \
72 "run netload nfsargs addip addargs ; " \
73 "bootm ${kernel_addr_r}\0" \
76 "if test -e mmc 0:2 ${bootscript} ; then " \
77 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
79 "echo Running bootscript... ; " \
80 "source ${kernel_addr_r} ; " \
83 "socfpga_legacy_reset_compat=1\0"
85 /* The rest of the configuration is shared */
86 #include <configs/socfpga_common.h>
88 #endif /* __CONFIG_DEVBOARDS_DBM_SOC1_H__ */