Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Marek Vasut <marex@denx.de> |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 4 | */ |
Marek Vasut | 9d6c56b | 2017-04-05 13:17:03 +0200 | [diff] [blame] | 5 | #ifndef __CONFIG_ARIES_MCVEVK_H__ |
| 6 | #define __CONFIG_ARIES_MCVEVK_H__ |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 7 | |
Dinh Nguyen | eca8b5c | 2015-11-23 17:27:17 -0600 | [diff] [blame] | 8 | #include <asm/arch/base_addr_ac5.h> |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 9 | |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 10 | /* Memory configurations */ |
| 11 | #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on MCV */ |
| 12 | |
| 13 | /* Booting Linux */ |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 14 | #define CONFIG_BOOTFILE "fitImage" |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 15 | #define CONFIG_PREBOOT "run try_bootscript" |
| 16 | #define CONFIG_BOOTCOMMAND "run mmc_mmc" |
| 17 | #define CONFIG_LOADADDR 0x01000000 |
| 18 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 19 | |
Marek Vasut | 2febc66 | 2015-09-24 09:06:06 +0200 | [diff] [blame] | 20 | /* Environment is in MMC */ |
| 21 | #define CONFIG_ENV_OVERWRITE |
Dinh Nguyen | 813e7e6 | 2015-09-23 15:38:01 -0500 | [diff] [blame] | 22 | |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 23 | /* Extra Environment */ |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 24 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 25 | "consdev=ttyS0\0" \ |
| 26 | "baudrate=115200\0" \ |
| 27 | "bootscript=boot.scr\0" \ |
| 28 | "bootdev=/dev/mmcblk0p2\0" \ |
| 29 | "rootdev=/dev/mmcblk0p3\0" \ |
| 30 | "netdev=eth0\0" \ |
| 31 | "hostname=mcvevk\0" \ |
| 32 | "kernel_addr_r=0x10000000\0" \ |
Marek Vasut | b3af03e | 2016-10-29 22:08:39 +0200 | [diff] [blame] | 33 | "dfu_alt_info=mmc raw 0 3867148288\0" \ |
Simon Glass | 7bdddb0 | 2016-01-31 18:10:53 -0700 | [diff] [blame] | 34 | "update_filename=u-boot-with-spl.sfp\0" \ |
Marek Vasut | 8e8b62a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 35 | "update_sd_offset=0x800\0" \ |
| 36 | "update_sd=" /* Update the SD firmware partition */ \ |
| 37 | "if mmc rescan ; then " \ |
| 38 | "if tftp ${update_filename} ; then " \ |
| 39 | "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \ |
| 40 | "setexpr fw_sz ${fw_sz} + 1 ; " \ |
| 41 | "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \ |
| 42 | "fi ; " \ |
| 43 | "fi\0" \ |
| 44 | "update_qspi_offset=0x0\0" \ |
| 45 | "update_qspi=" /* Update the QSPI firmware */ \ |
| 46 | "if sf probe ; then " \ |
| 47 | "if tftp ${update_filename} ; then " \ |
| 48 | "sf update ${loadaddr} ${update_qspi_offset} ${filesize} ; " \ |
| 49 | "fi ; " \ |
| 50 | "fi\0" \ |
| 51 | "fpga_filename=output_file.rbf\0" \ |
| 52 | "load_fpga=" /* Load FPGA bitstream */ \ |
| 53 | "if tftp ${fpga_filename} ; then " \ |
| 54 | "fpga load 0 $loadaddr $filesize ; " \ |
| 55 | "bridge enable ; " \ |
| 56 | "fi\0" \ |
| 57 | "addcons=" \ |
| 58 | "setenv bootargs ${bootargs} " \ |
| 59 | "console=${consdev},${baudrate}\0" \ |
| 60 | "addip=" \ |
| 61 | "setenv bootargs ${bootargs} " \ |
| 62 | "ip=${ipaddr}:${serverip}:${gatewayip}:" \ |
| 63 | "${netmask}:${hostname}:${netdev}:off\0" \ |
| 64 | "addmisc=" \ |
| 65 | "setenv bootargs ${bootargs} ${miscargs}\0" \ |
| 66 | "addargs=run addcons addmisc\0" \ |
| 67 | "mmcload=" \ |
| 68 | "mmc rescan ; " \ |
| 69 | "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \ |
| 70 | "netload=" \ |
| 71 | "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ |
| 72 | "miscargs=nohlt panic=1\0" \ |
| 73 | "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \ |
| 74 | "nfsargs=" \ |
| 75 | "setenv bootargs root=/dev/nfs rw " \ |
| 76 | "nfsroot=${serverip}:${rootpath},v3,tcp\0" \ |
| 77 | "mmc_mmc=" \ |
| 78 | "run mmcload mmcargs addargs ; " \ |
| 79 | "bootm ${kernel_addr_r}\0" \ |
| 80 | "mmc_nfs=" \ |
| 81 | "run mmcload nfsargs addip addargs ; " \ |
| 82 | "bootm ${kernel_addr_r}\0" \ |
| 83 | "net_mmc=" \ |
| 84 | "run netload mmcargs addargs ; " \ |
| 85 | "bootm ${kernel_addr_r}\0" \ |
| 86 | "net_nfs=" \ |
| 87 | "run netload nfsargs addip addargs ; " \ |
| 88 | "bootm ${kernel_addr_r}\0" \ |
| 89 | "try_bootscript=" \ |
| 90 | "mmc rescan;" \ |
| 91 | "if test -e mmc 0:2 ${bootscript} ; then " \ |
| 92 | "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \ |
| 93 | "then ; " \ |
| 94 | "echo Running bootscript... ; " \ |
| 95 | "source ${kernel_addr_r} ; " \ |
| 96 | "fi ; " \ |
| 97 | "fi\0" |
| 98 | |
| 99 | /* The rest of the configuration is shared */ |
| 100 | #include <configs/socfpga_common.h> |
| 101 | |
Marek Vasut | 9d6c56b | 2017-04-05 13:17:03 +0200 | [diff] [blame] | 102 | #endif /* __CONFIG_ARIES_MCVEVK_H__ */ |