xref: /rk3399_ARM-atf/plat/socionext/synquacer/include/platform_def.h (revision 1083b2b315cd71f714eb0d0bca20e54ef7be02ad)
1c35d59a3SSumit Garg /*
2c35d59a3SSumit Garg  * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3c35d59a3SSumit Garg  *
4c35d59a3SSumit Garg  * SPDX-License-Identifier: BSD-3-Clause
5c35d59a3SSumit Garg  */
6c35d59a3SSumit Garg 
7*1083b2b3SAntonio Nino Diaz #ifndef PLATFORM_DEF_H
8*1083b2b3SAntonio Nino Diaz #define PLATFORM_DEF_H
9c35d59a3SSumit Garg 
10c35d59a3SSumit Garg #include <common_def.h>
11*1083b2b3SAntonio Nino Diaz #include <utils_def.h>
12c35d59a3SSumit Garg 
13007a7a33SSumit Garg /* CPU topology */
14007a7a33SSumit Garg #define PLAT_MAX_CORES_PER_CLUSTER	2
15007a7a33SSumit Garg #define PLAT_CLUSTER_COUNT		12
16007a7a33SSumit Garg #define PLATFORM_CORE_COUNT		(PLAT_CLUSTER_COUNT *	\
17007a7a33SSumit Garg 					 PLAT_MAX_CORES_PER_CLUSTER)
18007a7a33SSumit Garg 
19*1083b2b3SAntonio Nino Diaz #define PLAT_MAX_PWR_LVL		U(1)
20*1083b2b3SAntonio Nino Diaz #define PLAT_MAX_RET_STATE		U(1)
21*1083b2b3SAntonio Nino Diaz #define PLAT_MAX_OFF_STATE		U(2)
22753701ccSSumit Garg 
23753701ccSSumit Garg #define SQ_LOCAL_STATE_RUN		0
24753701ccSSumit Garg #define SQ_LOCAL_STATE_RET		1
25753701ccSSumit Garg #define SQ_LOCAL_STATE_OFF		2
26753701ccSSumit Garg 
27c35d59a3SSumit Garg #define CACHE_WRITEBACK_SHIFT		6
28c35d59a3SSumit Garg #define CACHE_WRITEBACK_GRANULE		(1 << CACHE_WRITEBACK_SHIFT)
29c35d59a3SSumit Garg 
308cd37d7bSSumit Garg #define PLAT_PHY_ADDR_SPACE_SIZE	(1ULL << 32)
318cd37d7bSSumit Garg #define PLAT_VIRT_ADDR_SPACE_SIZE	(1ULL << 32)
328cd37d7bSSumit Garg #define MAX_XLAT_TABLES			4
338cd37d7bSSumit Garg #define MAX_MMAP_REGIONS		6
348cd37d7bSSumit Garg 
35c35d59a3SSumit Garg #define PLATFORM_STACK_SIZE		0x400
36c35d59a3SSumit Garg 
37c35d59a3SSumit Garg #define BL31_BASE			0x04000000
38c35d59a3SSumit Garg #define BL31_SIZE			0x00080000
39c35d59a3SSumit Garg #define BL31_LIMIT			(BL31_BASE + BL31_SIZE)
40c35d59a3SSumit Garg 
410eb275c9SSumit Garg #define PLAT_SQ_CCN_BASE		0x32000000
420eb275c9SSumit Garg #define PLAT_SQ_CLUSTER_TO_CCN_ID_MAP					\
430eb275c9SSumit Garg 					0,	/* Cluster 0 */		\
440eb275c9SSumit Garg 					18,	/* Cluster 1 */		\
450eb275c9SSumit Garg 					11,	/* Cluster 2 */		\
460eb275c9SSumit Garg 					29,	/* Cluster 3 */		\
470eb275c9SSumit Garg 					35,	/* Cluster 4 */		\
480eb275c9SSumit Garg 					17,	/* Cluster 5 */		\
490eb275c9SSumit Garg 					12,	/* Cluster 6 */		\
500eb275c9SSumit Garg 					30,	/* Cluster 7 */		\
510eb275c9SSumit Garg 					14,	/* Cluster 8 */		\
520eb275c9SSumit Garg 					32,	/* Cluster 9 */		\
530eb275c9SSumit Garg 					15,	/* Cluster 10 */	\
540eb275c9SSumit Garg 					33	/* Cluster 11 */
550eb275c9SSumit Garg 
5667b40070SSumit Garg /* UART related constants */
5767b40070SSumit Garg #define PLAT_SQ_BOOT_UART_BASE		0x2A400000
5867b40070SSumit Garg #define PLAT_SQ_BOOT_UART_CLK_IN_HZ	62500000
5967b40070SSumit Garg #define SQ_CONSOLE_BAUDRATE		115200
6067b40070SSumit Garg 
615931fdacSSumit Garg #define SQ_SYS_CNTCTL_BASE		0x2a430000
625931fdacSSumit Garg 
635931fdacSSumit Garg #define SQ_SYS_TIMCTL_BASE		0x2a810000
645931fdacSSumit Garg #define PLAT_SQ_NSTIMER_FRAME_ID	0
655931fdacSSumit Garg 
66cfe19f85SArd Biesheuvel #define DRAMINFO_BASE			0x2E00FFC0
67cfe19f85SArd Biesheuvel 
6805377100SSumit Garg #define PLAT_SQ_MHU_BASE		0x45000000
6905377100SSumit Garg 
70b7ad0444SSumit Garg #define PLAT_SQ_SCP_COM_SHARED_MEM_BASE		0x45400000
71b7ad0444SSumit Garg #define SCPI_CMD_GET_DRAMINFO			0x1
72b7ad0444SSumit Garg 
7385427debSSumit Garg #define SQ_BOOT_CFG_ADDR			0x45410000
7485427debSSumit Garg #define PLAT_SQ_PRIMARY_CPU_SHIFT		8
7585427debSSumit Garg #define PLAT_SQ_PRIMARY_CPU_BIT_WIDTH		6
7685427debSSumit Garg 
77b529799fSSumit Garg #define PLAT_SQ_GICD_BASE		0x30000000
78b529799fSSumit Garg #define PLAT_SQ_GICR_BASE		0x30400000
79b529799fSSumit Garg 
80753701ccSSumit Garg #define PLAT_SQ_GPIO_BASE		0x51000000
81753701ccSSumit Garg 
82*1083b2b3SAntonio Nino Diaz #endif /* PLATFORM_DEF_H */
83