1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) ASPEED Technology Inc.
4  *
5  * Copyright 2016 IBM Corporation
6  * (C) Copyright 2016 Google, Inc
7  */
8 
9 #ifndef __ASPEED_COMMON_CONFIG_H
10 #define __ASPEED_COMMON_CONFIG_H
11 
12 #include <asm/arch/platform.h>
13 #include <linux/sizes.h>
14 
15 
16 #define CONFIG_BOOTFILE		"all.bin"
17 
18 #define CONFIG_GATEWAYIP	192.168.0.1
19 #define CONFIG_NETMASK		255.255.255.0
20 #define CONFIG_IPADDR		192.168.0.45
21 #define CONFIG_SERVERIP		192.168.0.81
22 
23 #define CONFIG_STANDALONE_LOAD_ADDR 0x83000000
24 
25 /* Misc CPU related */
26 #define CONFIG_CMDLINE_TAG
27 #define CONFIG_SETUP_MEMORY_TAGS
28 #define CONFIG_INITRD_TAG
29 
30 #ifdef CONFIG_ASPEED_AST2605
31 #define CONFIG_SYS_SDRAM_BASE		(ASPEED_DRAM_BASE + SZ_32M)
32 #else
33 #define CONFIG_SYS_SDRAM_BASE		(ASPEED_DRAM_BASE)
34 #endif
35 
36 #ifdef CONFIG_PRE_CON_BUF_SZ
37 #define CONFIG_SYS_INIT_RAM_ADDR	(ASPEED_SRAM_BASE + CONFIG_PRE_CON_BUF_SZ)
38 #define CONFIG_SYS_INIT_RAM_SIZE	(ASPEED_SRAM_SIZE - CONFIG_PRE_CON_BUF_SZ)
39 #else
40 #define CONFIG_SYS_INIT_RAM_ADDR	(ASPEED_SRAM_BASE)
41 #define CONFIG_SYS_INIT_RAM_SIZE	(ASPEED_SRAM_SIZE)
42 #endif
43 
44 #define SYS_INIT_RAM_END \
45 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)
46 #define CONFIG_SYS_INIT_SP_ADDR \
47 	(SYS_INIT_RAM_END - GENERATED_GBL_DATA_SIZE)
48 
49 #define CONFIG_SYS_BOOTMAPSZ		(256 * 1024 * 1024)
50 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
51 
52 /*
53  * BOOTP options
54  */
55 #define CONFIG_BOOTP_BOOTFILESIZE
56 
57 /*
58  * Miscellaneous configurable options
59  */
60 #define CONFIG_SYS_BOOTM_LEN 		(0x800000 * 2)
61 
62 #define CONFIG_EXTRA_ENV_SETTINGS \
63 	"verify=yes\0"	\
64 	""
65 
66 /* Environment */
67 #ifdef CONFIG_ASPEED_PALLADIUM
68 #define CONFIG_ENV_IS_NOWHERE
69 #endif
70 
71 #ifndef CONFIG_ENV_SIZE
72 #define CONFIG_ENV_SIZE			0x10000
73 #endif
74 
75 #ifndef CONFIG_ENV_OFFSET
76 #define CONFIG_ENV_OFFSET		0xF0000
77 #endif
78 
79 #define CONFIG_ENV_SECT_SIZE	(4 << 10)
80 
81 /*
82  * Ethernet related
83  */
84 #define PHY_ANEG_TIMEOUT		800
85 
86 /* Uboot size */
87 #define CONFIG_SYS_MONITOR_LEN (1024 * 1024)
88 
89 #endif	/* __ASPEED_COMMON_CONFIG_H */
90