5c5036b8be65a689cdb8568f65746757f318b4b8
[platform/kernel/u-boot.git] / include / configs / vcoreiii.h
1 /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2 /*
3  * Copyright (c) 2018 Microsemi Corporation
4  */
5
6 #ifndef __VCOREIII_H
7 #define __VCOREIII_H
8
9 #include <linux/sizes.h>
10
11 /* Onboard devices */
12
13 #define CONFIG_SYS_INIT_SP_OFFSET       0x400000
14
15 #if defined(CONFIG_SOC_LUTON) || defined(CONFIG_SOC_SERVAL)
16 #define CONFIG_SYS_MIPS_TIMER_FREQ      208333333
17 #else
18 #define CONFIG_SYS_MIPS_TIMER_FREQ      250000000
19 #endif
20 #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_MIPS_TIMER_FREQ
21
22 #define CONFIG_SYS_SDRAM_BASE           0x80000000
23 #if defined(CONFIG_DDRTYPE_H5TQ1G63BFA) || defined(CONFIG_DDRTYPE_MT47H128M8HQ)
24 #define CONFIG_SYS_SDRAM_SIZE           (128 * SZ_1M)
25 #elif defined(CONFIG_DDRTYPE_MT41J128M16HA) || defined(CONFIG_DDRTYPE_MT41K128M16JT)
26 #define CONFIG_SYS_SDRAM_SIZE           (256 * SZ_1M)
27 #elif defined(CONFIG_DDRTYPE_H5TQ4G63MFR) || defined(CONFIG_DDRTYPE_MT41K256M16)
28 #define CONFIG_SYS_SDRAM_SIZE           (512 * SZ_1M)
29 #else
30 #error Unknown DDR size - please add!
31 #endif
32
33 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
34         "loadaddr=0x81000000\0"                                         \
35         "spi_image_off=0x00100000\0"                                    \
36         "console=ttyS0,115200\0"                                        \
37         "setup=setenv bootargs console=${console} ${mtdparts}"          \
38         "${bootargs_extra}\0"                                           \
39         "spiboot=run setup; sf probe; sf read ${loadaddr}"              \
40         "${spi_image_off} 0x600000; bootm ${loadaddr}\0"                \
41         "ubootfile=u-boot.bin\0"                                        \
42         "update=sf probe;mtdparts;dhcp ${loadaddr} ${ubootfile};"       \
43         "sf erase UBoot 0x100000;"                                      \
44         "sf write ${loadaddr} UBoot  ${filesize}\0"                     \
45         "bootcmd=run spiboot\0"                                         \
46         ""
47 #endif                          /* __VCOREIII_H */