xref: /rk3399_ARM-atf/plat/socionext/synquacer/include/platform_def.h (revision e373b6a28c34f81ac5681a7e03de5b95e269b192)
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 
71083b2b3SAntonio Nino Diaz #ifndef PLATFORM_DEF_H
81083b2b3SAntonio Nino Diaz #define PLATFORM_DEF_H
9c35d59a3SSumit Garg 
1009d40e0eSAntonio Nino Diaz #include <lib/utils_def.h>
1109d40e0eSAntonio Nino Diaz #include <plat/common/common_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 
191083b2b3SAntonio Nino Diaz #define PLAT_MAX_PWR_LVL		U(1)
201083b2b3SAntonio Nino Diaz #define PLAT_MAX_RET_STATE		U(1)
211083b2b3SAntonio 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 
41*e373b6a2SArd Biesheuvel #define BL32_BASE			0xfc000000
42*e373b6a2SArd Biesheuvel 
430eb275c9SSumit Garg #define PLAT_SQ_CCN_BASE		0x32000000
440eb275c9SSumit Garg #define PLAT_SQ_CLUSTER_TO_CCN_ID_MAP					\
450eb275c9SSumit Garg 					0,	/* Cluster 0 */		\
460eb275c9SSumit Garg 					18,	/* Cluster 1 */		\
470eb275c9SSumit Garg 					11,	/* Cluster 2 */		\
480eb275c9SSumit Garg 					29,	/* Cluster 3 */		\
490eb275c9SSumit Garg 					35,	/* Cluster 4 */		\
500eb275c9SSumit Garg 					17,	/* Cluster 5 */		\
510eb275c9SSumit Garg 					12,	/* Cluster 6 */		\
520eb275c9SSumit Garg 					30,	/* Cluster 7 */		\
530eb275c9SSumit Garg 					14,	/* Cluster 8 */		\
540eb275c9SSumit Garg 					32,	/* Cluster 9 */		\
550eb275c9SSumit Garg 					15,	/* Cluster 10 */	\
560eb275c9SSumit Garg 					33	/* Cluster 11 */
570eb275c9SSumit Garg 
5867b40070SSumit Garg /* UART related constants */
5967b40070SSumit Garg #define PLAT_SQ_BOOT_UART_BASE		0x2A400000
6067b40070SSumit Garg #define PLAT_SQ_BOOT_UART_CLK_IN_HZ	62500000
6167b40070SSumit Garg #define SQ_CONSOLE_BAUDRATE		115200
6267b40070SSumit Garg 
635931fdacSSumit Garg #define SQ_SYS_CNTCTL_BASE		0x2a430000
645931fdacSSumit Garg 
655931fdacSSumit Garg #define SQ_SYS_TIMCTL_BASE		0x2a810000
665931fdacSSumit Garg #define PLAT_SQ_NSTIMER_FRAME_ID	0
675931fdacSSumit Garg 
68cfe19f85SArd Biesheuvel #define DRAMINFO_BASE			0x2E00FFC0
69cfe19f85SArd Biesheuvel 
7005377100SSumit Garg #define PLAT_SQ_MHU_BASE		0x45000000
7105377100SSumit Garg 
72b7ad0444SSumit Garg #define PLAT_SQ_SCP_COM_SHARED_MEM_BASE		0x45400000
73b7ad0444SSumit Garg #define SCPI_CMD_GET_DRAMINFO			0x1
74b7ad0444SSumit Garg 
7585427debSSumit Garg #define SQ_BOOT_CFG_ADDR			0x45410000
7685427debSSumit Garg #define PLAT_SQ_PRIMARY_CPU_SHIFT		8
7785427debSSumit Garg #define PLAT_SQ_PRIMARY_CPU_BIT_WIDTH		6
7885427debSSumit Garg 
79b529799fSSumit Garg #define PLAT_SQ_GICD_BASE		0x30000000
80b529799fSSumit Garg #define PLAT_SQ_GICR_BASE		0x30400000
81b529799fSSumit Garg 
82753701ccSSumit Garg #define PLAT_SQ_GPIO_BASE		0x51000000
83753701ccSSumit Garg 
841083b2b3SAntonio Nino Diaz #endif /* PLATFORM_DEF_H */
85