xref: /rk3399_ARM-atf/plat/socionext/uniphier/include/platform_def.h (revision 6eabbb07d7ee2aac3a8e8e734649c8eaa8385af6)
1 /*
2  * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef __PLATFORM_DEF_H__
8 #define __PLATFORM_DEF_H__
9 
10 #include <common_def.h>
11 #include <tbbr/tbbr_img_def.h>
12 
13 #define PLATFORM_STACK_SIZE		0x1000
14 
15 #define CACHE_WRITEBACK_SHIFT		6
16 #define CACHE_WRITEBACK_GRANULE		(1 << (CACHE_WRITEBACK_SHIFT))
17 
18 /* topology */
19 #define UNIPHIER_MAX_CPUS_PER_CLUSTER	4
20 #define UNIPHIER_CLUSTER_COUNT		2
21 
22 #define PLATFORM_CORE_COUNT		\
23 	((UNIPHIER_MAX_CPUS_PER_CLUSTER) * (UNIPHIER_CLUSTER_COUNT))
24 
25 #define PLAT_MAX_PWR_LVL		1
26 
27 #define PLAT_MAX_OFF_STATE		2
28 #define PLAT_MAX_RET_STATE		1
29 
30 #define UNIPHIER_SEC_DRAM_BASE		0x80000000
31 #define UNIPHIER_SEC_DRAM_LIMIT		0x82000000
32 #define UNIPHIER_SEC_DRAM_SIZE		((UNIPHIER_SEC_DRAM_LIMIT) - \
33 					 (UNIPHIER_SEC_DRAM_BASE))
34 
35 #define BL2_BASE			(UNIPHIER_SEC_DRAM_BASE)
36 #define BL2_LIMIT			((BL2_BASE) + 0x00020000)
37 
38 #define BL31_BASE			(BL2_LIMIT)
39 #define BL31_LIMIT			((BL31_BASE) + 0x00080000)
40 
41 #define BL32_BASE			(BL31_LIMIT)
42 #define BL32_LIMIT			(UNIPHIER_SEC_DRAM_LIMIT)
43 
44 #define PLAT_PHY_ADDR_SPACE_SIZE	(1ULL << 32)
45 #define PLAT_VIRT_ADDR_SPACE_SIZE	(1ULL << 32)
46 
47 #define PLAT_XLAT_TABLES_DYNAMIC	1
48 #define MAX_XLAT_TABLES			7
49 #define MAX_MMAP_REGIONS		6
50 
51 #define MAX_IO_HANDLES			2
52 #define MAX_IO_DEVICES			2
53 #define MAX_IO_BLOCK_DEVICES		1
54 
55 #define TSP_SEC_MEM_BASE		(BL32_BASE)
56 #define TSP_SEC_MEM_SIZE		((BL32_LIMIT) - (BL32_BASE))
57 #define TSP_IRQ_SEC_PHY_TIMER		29
58 
59 #endif /* __PLATFORM_DEF_H__ */
60