blob: befaeaaf5462052972bab937775d6bd30e21f78d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Marek Vasutb06dad22018-02-24 23:34:00 +01002/*
3 * Copyright (C) 2018 Marek Vasut <marex@denx.de>
Marek Vasutb06dad22018-02-24 23:34:00 +01004 */
5#ifndef __CONFIG_DEVBOARDS_DBM_SOC1_H__
6#define __CONFIG_DEVBOARDS_DBM_SOC1_H__
7
8#include <asm/arch/base_addr_ac5.h>
9
10/* Memory configurations */
11#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB */
12
13/* Booting Linux */
14#define CONFIG_BOOTFILE "fitImage"
Marek Vasutb06dad22018-02-24 23:34:00 +010015#define CONFIG_BOOTCOMMAND "run mmc_mmc"
16#define CONFIG_LOADADDR 0x01000000
17#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
18
19/* Environment is in MMC */
20#define CONFIG_ENV_OVERWRITE
21
22/* Extra Environment */
23#define CONFIG_EXTRA_ENV_SETTINGS \
24 "consdev=ttyS0\0" \
25 "baudrate=115200\0" \
26 "bootscript=boot.scr\0" \
27 "bootdev=/dev/mmcblk0p2\0" \
28 "rootdev=/dev/mmcblk0p3\0" \
29 "netdev=eth0\0" \
30 "hostname=dbm_soc1\0" \
31 "kernel_addr_r=0x10000000\0" \
32 "dfu_alt_info=mmc raw 0 3867148288\0" \
33 "update_filename=u-boot-with-spl.sfp\0" \
34 "update_sd_offset=0x800\0" \
35 "update_sd=" /* Update the SD firmware partition */ \
36 "if mmc rescan ; then " \
37 "if tftp ${update_filename} ; then " \
38 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
39 "setexpr fw_sz ${fw_sz} + 1 ; " \
40 "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
41 "fi ; " \
42 "fi\0" \
43 "fpga_filename=output_file.rbf\0" \
44 "load_fpga=" /* Load FPGA bitstream */ \
45 "if tftp ${fpga_filename} ; then " \
46 "fpga load 0 $loadaddr $filesize ; " \
47 "bridge enable ; " \
48 "fi\0" \
49 "addcons=" \
50 "setenv bootargs ${bootargs} " \
51 "console=${consdev},${baudrate}\0" \
52 "addip=" \
53 "setenv bootargs ${bootargs} " \
54 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
55 "${netmask}:${hostname}:${netdev}:off\0" \
56 "addmisc=" \
57 "setenv bootargs ${bootargs} ${miscargs}\0" \
58 "addargs=run addcons addmisc\0" \
59 "mmcload=" \
60 "mmc rescan ; " \
61 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
62 "netload=" \
63 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
64 "miscargs=nohlt panic=1\0" \
65 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
66 "nfsargs=" \
67 "setenv bootargs root=/dev/nfs rw " \
68 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
69 "mmc_mmc=" \
70 "run mmcload mmcargs addargs ; " \
71 "bootm ${kernel_addr_r}\0" \
72 "mmc_nfs=" \
73 "run mmcload nfsargs addip addargs ; " \
74 "bootm ${kernel_addr_r}\0" \
75 "net_mmc=" \
76 "run netload mmcargs addargs ; " \
77 "bootm ${kernel_addr_r}\0" \
78 "net_nfs=" \
79 "run netload nfsargs addip addargs ; " \
80 "bootm ${kernel_addr_r}\0" \
81 "try_bootscript=" \
82 "mmc rescan;" \
83 "if test -e mmc 0:2 ${bootscript} ; then " \
84 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
85 "then ; " \
86 "echo Running bootscript... ; " \
87 "source ${kernel_addr_r} ; " \
88 "fi ; " \
Simon Goldschmidtdb3c2442019-07-10 22:09:14 +020089 "fi\0" \
90 "socfpga_legacy_reset_compat=1\0"
Marek Vasutb06dad22018-02-24 23:34:00 +010091
92/* The rest of the configuration is shared */
93#include <configs/socfpga_common.h>
94
95#endif /* __CONFIG_DEVBOARDS_DBM_SOC1_H__ */