]> git.ipfire.org Git - thirdparty/u-boot.git/blame - include/configs/vcoreiii.h
treewide: mem: Move mtest related defines to Kconfig
[thirdparty/u-boot.git] / include / configs / vcoreiii.h
CommitLineData
6787c1ec
GC
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
5e1d417b 13#define CONFIG_SYS_MALLOC_LEN 0x1F0000
6787c1ec
GC
14#define CONFIG_SYS_LOAD_ADDR 0x00100000
15#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
16
1895b87e
HV
17#if defined(CONFIG_SOC_LUTON) || defined(CONFIG_SOC_SERVAL)
18#define CPU_CLOCK_RATE 416666666 /* Clock for the MIPS core */
6787c1ec
GC
19#define CONFIG_SYS_MIPS_TIMER_FREQ 208333333
20#else
1895b87e 21#define CPU_CLOCK_RATE 500000000 /* Clock for the MIPS core */
6787c1ec
GC
22#define CONFIG_SYS_MIPS_TIMER_FREQ (CPU_CLOCK_RATE / 2)
23#endif
24#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_MIPS_TIMER_FREQ
25
e9f1492b
LP
26#define CONFIG_BOARD_TYPES
27
6787c1ec
GC
28#define CONFIG_SYS_SDRAM_BASE 0x80000000
29#if defined(CONFIG_DDRTYPE_H5TQ1G63BFA) || defined(CONFIG_DDRTYPE_MT47H128M8HQ)
30#define CONFIG_SYS_SDRAM_SIZE (128 * SZ_1M)
31#elif defined(CONFIG_DDRTYPE_MT41J128M16HA) || defined(CONFIG_DDRTYPE_MT41K128M16JT)
32#define CONFIG_SYS_SDRAM_SIZE (256 * SZ_1M)
33#elif defined(CONFIG_DDRTYPE_H5TQ4G63MFR) || defined(CONFIG_DDRTYPE_MT41K256M16)
34#define CONFIG_SYS_SDRAM_SIZE (512 * SZ_1M)
35#else
36#error Unknown DDR size - please add!
37#endif
38
39#define CONFIG_CONS_INDEX 1
40
6787c1ec
GC
41#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
42
43#define CONFIG_BOARD_EARLY_INIT_R
44#if defined(CONFIG_MTDIDS_DEFAULT) && defined(CONFIG_MTDPARTS_DEFAULT)
45#define VCOREIII_DEFAULT_MTD_ENV \
46 "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" \
47 "mtdids="CONFIG_MTDIDS_DEFAULT"\0"
48#else
49#define VCOREIII_DEFAULT_MTD_ENV /* Go away */
50#endif
51
52#define CONFIG_SYS_BOOTM_LEN (16 << 20) /* Increase max gunzip size */
53
54#define CONFIG_EXTRA_ENV_SETTINGS \
55 VCOREIII_DEFAULT_MTD_ENV \
56 "loadaddr=0x81000000\0" \
57 "spi_image_off=0x00100000\0" \
58 "console=ttyS0,115200\0" \
59 "setup=setenv bootargs console=${console} ${mtdparts}" \
60 "${bootargs_extra}\0" \
61 "spiboot=run setup; sf probe; sf read ${loadaddr}" \
62 "${spi_image_off} 0x600000; bootm ${loadaddr}\0" \
63 "ubootfile=u-boot.bin\0" \
64 "update=sf probe;mtdparts;dhcp ${loadaddr} ${ubootfile};" \
65 "sf erase UBoot 0x100000;" \
66 "sf write ${loadaddr} UBoot ${filesize}\0" \
67 "bootcmd=run spiboot\0" \
68 ""
69#endif /* __VCOREIII_H */