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 */
14 #define CONFIG_BOOTFILE "fitImage"
15 #define CONFIG_BOOTCOMMAND "run mmc_mmc"
17 /* Environment is in MMC */
19 /* Extra Environment */
20 #define CONFIG_EXTRA_ENV_SETTINGS \
23 "bootscript=boot.scr\0" \
24 "bootdev=/dev/mmcblk0p2\0" \
25 "rootdev=/dev/mmcblk0p3\0" \
27 "hostname=dbm_soc1\0" \
28 "kernel_addr_r=0x10000000\0" \
29 "dfu_alt_info=mmc raw 0 3867148288\0" \
30 "update_filename=u-boot-with-spl.sfp\0" \
31 "update_sd_offset=0x800\0" \
32 "update_sd=" /* Update the SD firmware partition */ \
33 "if mmc rescan ; then " \
34 "if tftp ${update_filename} ; then " \
35 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
36 "setexpr fw_sz ${fw_sz} + 1 ; " \
37 "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
40 "fpga_filename=output_file.rbf\0" \
41 "load_fpga=" /* Load FPGA bitstream */ \
42 "if tftp ${fpga_filename} ; then " \
43 "fpga load 0 $loadaddr $filesize ; " \
47 "setenv bootargs ${bootargs} " \
48 "console=${consdev},${baudrate}\0" \
50 "setenv bootargs ${bootargs} " \
51 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
52 "${netmask}:${hostname}:${netdev}:off\0" \
54 "setenv bootargs ${bootargs} ${miscargs}\0" \
55 "addargs=run addcons addmisc\0" \
58 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
60 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
61 "miscargs=nohlt panic=1\0" \
62 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
64 "setenv bootargs root=/dev/nfs rw " \
65 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
67 "run mmcload mmcargs addargs ; " \
68 "bootm ${kernel_addr_r}\0" \
70 "run mmcload nfsargs addip addargs ; " \
71 "bootm ${kernel_addr_r}\0" \
73 "run netload mmcargs addargs ; " \
74 "bootm ${kernel_addr_r}\0" \
76 "run netload nfsargs addip addargs ; " \
77 "bootm ${kernel_addr_r}\0" \
80 "if test -e mmc 0:2 ${bootscript} ; then " \
81 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
83 "echo Running bootscript... ; " \
84 "source ${kernel_addr_r} ; " \
87 "socfpga_legacy_reset_compat=1\0"
89 /* The rest of the configuration is shared */
90 #include <configs/socfpga_common.h>
92 #endif /* __CONFIG_DEVBOARDS_DBM_SOC1_H__ */