blob: 137da2f1fcf4800e37fbfc595644f05a3755a114 [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"
Marek Vasutb06dad22018-02-24 23:34:00 +010016
17/* Environment is in MMC */
Marek Vasutb06dad22018-02-24 23:34:00 +010018
19/* Extra Environment */
20#define CONFIG_EXTRA_ENV_SETTINGS \
21 "consdev=ttyS0\0" \
22 "baudrate=115200\0" \
23 "bootscript=boot.scr\0" \
24 "bootdev=/dev/mmcblk0p2\0" \
25 "rootdev=/dev/mmcblk0p3\0" \
26 "netdev=eth0\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} ; " \
38 "fi ; " \
39 "fi\0" \
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 ; " \
44 "bridge enable ; " \
45 "fi\0" \
46 "addcons=" \
47 "setenv bootargs ${bootargs} " \
48 "console=${consdev},${baudrate}\0" \
49 "addip=" \
50 "setenv bootargs ${bootargs} " \
51 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
52 "${netmask}:${hostname}:${netdev}:off\0" \
53 "addmisc=" \
54 "setenv bootargs ${bootargs} ${miscargs}\0" \
55 "addargs=run addcons addmisc\0" \
56 "mmcload=" \
57 "mmc rescan ; " \
58 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
59 "netload=" \
60 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
61 "miscargs=nohlt panic=1\0" \
62 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
63 "nfsargs=" \
64 "setenv bootargs root=/dev/nfs rw " \
65 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
66 "mmc_mmc=" \
67 "run mmcload mmcargs addargs ; " \
68 "bootm ${kernel_addr_r}\0" \
69 "mmc_nfs=" \
70 "run mmcload nfsargs addip addargs ; " \
71 "bootm ${kernel_addr_r}\0" \
72 "net_mmc=" \
73 "run netload mmcargs addargs ; " \
74 "bootm ${kernel_addr_r}\0" \
75 "net_nfs=" \
76 "run netload nfsargs addip addargs ; " \
77 "bootm ${kernel_addr_r}\0" \
78 "try_bootscript=" \
79 "mmc rescan;" \
80 "if test -e mmc 0:2 ${bootscript} ; then " \
81 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \
82 "then ; " \
83 "echo Running bootscript... ; " \
84 "source ${kernel_addr_r} ; " \
85 "fi ; " \
Simon Goldschmidtdb3c2442019-07-10 22:09:14 +020086 "fi\0" \
87 "socfpga_legacy_reset_compat=1\0"
Marek Vasutb06dad22018-02-24 23:34:00 +010088
89/* The rest of the configuration is shared */
90#include <configs/socfpga_common.h>
91
92#endif /* __CONFIG_DEVBOARDS_DBM_SOC1_H__ */