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_SYS_LOAD_ADDR 0x01000000
18 /* Environment is in MMC */
20 /* Extra Environment */
21 #define CONFIG_EXTRA_ENV_SETTINGS \
24 "bootscript=boot.scr\0" \
25 "bootdev=/dev/mmcblk0p2\0" \
26 "rootdev=/dev/mmcblk0p3\0" \
28 "hostname=dbm_soc1\0" \
29 "kernel_addr_r=0x10000000\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} ; " \
41 "fpga_filename=output_file.rbf\0" \
42 "load_fpga=" /* Load FPGA bitstream */ \
43 "if tftp ${fpga_filename} ; then " \
44 "fpga load 0 $loadaddr $filesize ; " \
48 "setenv bootargs ${bootargs} " \
49 "console=${consdev},${baudrate}\0" \
51 "setenv bootargs ${bootargs} " \
52 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
53 "${netmask}:${hostname}:${netdev}:off\0" \
55 "setenv bootargs ${bootargs} ${miscargs}\0" \
56 "addargs=run addcons addmisc\0" \
59 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
61 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
62 "miscargs=nohlt panic=1\0" \
63 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
65 "setenv bootargs root=/dev/nfs rw " \
66 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
68 "run mmcload mmcargs addargs ; " \
69 "bootm ${kernel_addr_r}\0" \
71 "run mmcload nfsargs addip addargs ; " \
72 "bootm ${kernel_addr_r}\0" \
74 "run netload mmcargs addargs ; " \
75 "bootm ${kernel_addr_r}\0" \
77 "run netload nfsargs addip addargs ; " \
78 "bootm ${kernel_addr_r}\0" \
81 "if test -e mmc 0:2 ${bootscript} ; then " \
82 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
84 "echo Running bootscript... ; " \
85 "source ${kernel_addr_r} ; " \
88 "socfpga_legacy_reset_compat=1\0"
90 /* The rest of the configuration is shared */
91 #include <configs/socfpga_common.h>
93 #endif /* __CONFIG_DEVBOARDS_DBM_SOC1_H__ */