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"
16 #define CONFIG_LOADADDR 0x01000000
17 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
19 /* Environment is in MMC */
21 /* Extra Environment */
22 #define CONFIG_EXTRA_ENV_SETTINGS \
25 "bootscript=boot.scr\0" \
26 "bootdev=/dev/mmcblk0p2\0" \
27 "rootdev=/dev/mmcblk0p3\0" \
29 "hostname=dbm_soc1\0" \
30 "kernel_addr_r=0x10000000\0" \
31 "dfu_alt_info=mmc raw 0 3867148288\0" \
32 "update_filename=u-boot-with-spl.sfp\0" \
33 "update_sd_offset=0x800\0" \
34 "update_sd=" /* Update the SD firmware partition */ \
35 "if mmc rescan ; then " \
36 "if tftp ${update_filename} ; then " \
37 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
38 "setexpr fw_sz ${fw_sz} + 1 ; " \
39 "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
42 "fpga_filename=output_file.rbf\0" \
43 "load_fpga=" /* Load FPGA bitstream */ \
44 "if tftp ${fpga_filename} ; then " \
45 "fpga load 0 $loadaddr $filesize ; " \
49 "setenv bootargs ${bootargs} " \
50 "console=${consdev},${baudrate}\0" \
52 "setenv bootargs ${bootargs} " \
53 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
54 "${netmask}:${hostname}:${netdev}:off\0" \
56 "setenv bootargs ${bootargs} ${miscargs}\0" \
57 "addargs=run addcons addmisc\0" \
60 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
62 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
63 "miscargs=nohlt panic=1\0" \
64 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
66 "setenv bootargs root=/dev/nfs rw " \
67 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
69 "run mmcload mmcargs addargs ; " \
70 "bootm ${kernel_addr_r}\0" \
72 "run mmcload nfsargs addip addargs ; " \
73 "bootm ${kernel_addr_r}\0" \
75 "run netload mmcargs addargs ; " \
76 "bootm ${kernel_addr_r}\0" \
78 "run netload nfsargs addip addargs ; " \
79 "bootm ${kernel_addr_r}\0" \
82 "if test -e mmc 0:2 ${bootscript} ; then " \
83 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
85 "echo Running bootscript... ; " \
86 "source ${kernel_addr_r} ; " \
89 "socfpga_legacy_reset_compat=1\0"
91 /* The rest of the configuration is shared */
92 #include <configs/socfpga_common.h>
94 #endif /* __CONFIG_DEVBOARDS_DBM_SOC1_H__ */