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