xref: /rk3399_ARM-atf/plat/arm/board/n1sdp/platform.mk (revision 06f3c7058c42a9f1a9f7df75ea2de71a000855e8)
1#
2# Copyright (c) 2018-2025, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7
8N1SDP_BASE		:=	plat/arm/board/n1sdp
9
10INTERCONNECT_SOURCES	:=	${N1SDP_BASE}/n1sdp_interconnect.c
11
12PLAT_INCLUDES		:=	-I${N1SDP_BASE}/include
13
14
15N1SDP_CPU_SOURCES	:=	lib/cpus/aarch64/neoverse_n1.S
16
17# Neoverse N1 cores support Armv8.2 extensions
18ARM_ARCH_MAJOR := 8
19ARM_ARCH_MINOR := 2
20
21# GIC-600 configuration
22USE_GIC_DRIVER			:=	3
23GICV3_SUPPORT_GIC600		:=	1
24GICV3_IMPL_GIC600_MULTICHIP	:=	1
25
26PLAT_BL_COMMON_SOURCES	:=	${N1SDP_BASE}/n1sdp_plat.c	        \
27				${N1SDP_BASE}/aarch64/n1sdp_helper.S
28
29BL1_SOURCES		:=	${N1SDP_CPU_SOURCES}                \
30				${INTERCONNECT_SOURCES}             \
31				${N1SDP_BASE}/n1sdp_err.c           \
32				${N1SDP_BASE}/n1sdp_trusted_boot.c  \
33				${N1SDP_BASE}/n1sdp_bl1_setup.c     \
34				drivers/arm/sbsa/sbsa.c
35
36BL2_SOURCES		:=	${N1SDP_BASE}/n1sdp_security.c      \
37				${N1SDP_BASE}/n1sdp_err.c           \
38				${N1SDP_BASE}/n1sdp_trusted_boot.c  \
39				lib/utils/mem_region.c              \
40				${N1SDP_BASE}/n1sdp_bl2_setup.c     \
41				${N1SDP_BASE}/n1sdp_image_load.c     \
42				drivers/arm/css/sds/sds.c
43
44BL31_SOURCES		:=	${N1SDP_CPU_SOURCES}			\
45				${INTERCONNECT_SOURCES}			\
46				${N1SDP_BASE}/n1sdp_bl31_setup.c	\
47				${N1SDP_BASE}/n1sdp_pm.c		\
48				${N1SDP_BASE}/n1sdp_topology.c	        \
49				${N1SDP_BASE}/n1sdp_security.c		\
50				drivers/arm/css/sds/sds.c
51
52FDT_SOURCES		+=	fdts/${PLAT}-single-chip.dts	\
53				fdts/${PLAT}-multi-chip.dts	\
54				${N1SDP_BASE}/fdts/n1sdp_fw_config.dts	\
55				${N1SDP_BASE}/fdts/n1sdp_tb_fw_config.dts	\
56				${N1SDP_BASE}/fdts/n1sdp_nt_fw_config.dts
57
58FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_fw_config.dtb
59TB_FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_tb_fw_config.dtb
60NT_FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_nt_fw_config.dtb
61
62# Add the FW_CONFIG to FIP and specify the same to certtool
63$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
64# Add the TB_FW_CONFIG to FIP and specify the same to certtool
65$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
66# Add the NT_FW_CONFIG to FIP and specify the same to certtool
67$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
68
69N1SDP_SPMC_MANIFEST_DTS	:=	${N1SDP_BASE}/fdts/${PLAT}_optee_spmc_manifest.dts
70FDT_SOURCES		+=	${N1SDP_SPMC_MANIFEST_DTS}
71N1SDP_TOS_FW_CONFIG	:=	${BUILD_PLAT}/fdts/${PLAT}_optee_spmc_manifest.dtb
72
73# Add the TOS_FW_CONFIG to FIP and specify the same to certtool
74$(eval $(call TOOL_ADD_PAYLOAD,${N1SDP_TOS_FW_CONFIG},--tos-fw-config,${N1SDP_TOS_FW_CONFIG}))
75
76# Setting to 0 as no NVCTR in N1SDP
77N1SDP_FW_NVCTR_VAL	:=	0
78TFW_NVCTR_VAL		:=	${N1SDP_FW_NVCTR_VAL}
79NTFW_NVCTR_VAL		:=	${N1SDP_FW_NVCTR_VAL}
80
81# Add N1SDP_FW_NVCTR_VAL
82$(eval $(call add_define,N1SDP_FW_NVCTR_VAL))
83
84# TF-A not required to load the SCP Images
85override CSS_LOAD_SCP_IMAGES	  	:=	0
86
87override NEED_BL2U		  	:=	no
88
89# 32 bit mode not supported
90override CTX_INCLUDE_AARCH32_REGS 	:=	0
91
92override ARM_PLAT_MT              	:=	1
93
94# Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the
95# SCP during power management operations and for SCP RAM Firmware transfer.
96CSS_USE_SCMI_SDS_DRIVER		  	:=	1
97
98# System coherency is managed in hardware
99HW_ASSISTED_COHERENCY			:=	1
100
101# When building for systems with hardware-assisted coherency, there's no need to
102# use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too.
103USE_COHERENT_MEM			:=	0
104
105# Enable the flag since N1SDP has a system level cache
106NEOVERSE_Nx_EXTERNAL_LLC		:=	1
107include plat/arm/common/arm_common.mk
108include plat/arm/css/common/css_common.mk
109include plat/arm/board/common/board_common.mk
110