xref: /rk3399_ARM-atf/plat/arm/board/n1sdp/platform.mk (revision c5c54e20ee5656e16c7714d500bc732585c4aa4e)
180d37c28SDeepak Pandey#
2*c5c54e20SBoyan Karatotev# Copyright (c) 2018-2025, Arm Limited. All rights reserved.
380d37c28SDeepak Pandey#
480d37c28SDeepak Pandey# SPDX-License-Identifier: BSD-3-Clause
580d37c28SDeepak Pandey#
680d37c28SDeepak Pandey
780d37c28SDeepak Pandey
880d37c28SDeepak PandeyN1SDP_BASE		:=	plat/arm/board/n1sdp
980d37c28SDeepak Pandey
1080d37c28SDeepak PandeyINTERCONNECT_SOURCES	:=	${N1SDP_BASE}/n1sdp_interconnect.c
1180d37c28SDeepak Pandey
1280d37c28SDeepak PandeyPLAT_INCLUDES		:=	-I${N1SDP_BASE}/include
1380d37c28SDeepak Pandey
1480d37c28SDeepak Pandey
15da6d75a0SJohn TsichritzisN1SDP_CPU_SOURCES	:=	lib/cpus/aarch64/neoverse_n1.S
1680d37c28SDeepak Pandey
17cf953bcaSGovindraj Raja# Neoverse N1 cores support Armv8.2 extensions
18cf953bcaSGovindraj RajaARM_ARCH_MAJOR := 8
19cf953bcaSGovindraj RajaARM_ARCH_MINOR := 2
20cf953bcaSGovindraj Raja
21a6ea06f5SAlexei Fedorov# GIC-600 configuration
22*c5c54e20SBoyan KaratotevUSE_GIC_DRIVER			:=	3
23b4ad365aSAndre PrzywaraGICV3_SUPPORT_GIC600		:=	1
24a6ea06f5SAlexei FedorovGICV3_IMPL_GIC600_MULTICHIP	:=	1
2580d37c28SDeepak Pandey
2680d37c28SDeepak PandeyPLAT_BL_COMMON_SOURCES	:=	${N1SDP_BASE}/n1sdp_plat.c	        \
2780d37c28SDeepak Pandey				${N1SDP_BASE}/aarch64/n1sdp_helper.S
2880d37c28SDeepak Pandey
29fe2b37f6Ssah01BL1_SOURCES		:=	${N1SDP_CPU_SOURCES}                \
30fe2b37f6Ssah01				${INTERCONNECT_SOURCES}             \
31fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_err.c           \
32fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_trusted_boot.c  \
33fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_bl1_setup.c     \
34fe2b37f6Ssah01				drivers/arm/sbsa/sbsa.c
35fe2b37f6Ssah01
36fe2b37f6Ssah01BL2_SOURCES		:=	${N1SDP_BASE}/n1sdp_security.c      \
37fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_err.c           \
38fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_trusted_boot.c  \
39fe2b37f6Ssah01				lib/utils/mem_region.c              \
40fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_bl2_setup.c     \
41cf85030eSsahil				${N1SDP_BASE}/n1sdp_image_load.c     \
42fe2b37f6Ssah01				drivers/arm/css/sds/sds.c
4380d37c28SDeepak Pandey
4480d37c28SDeepak PandeyBL31_SOURCES		:=	${N1SDP_CPU_SOURCES}			\
4580d37c28SDeepak Pandey				${INTERCONNECT_SOURCES}			\
4680d37c28SDeepak Pandey				${N1SDP_BASE}/n1sdp_bl31_setup.c	\
475bdafc40SWerner Lewis				${N1SDP_BASE}/n1sdp_pm.c		\
4880d37c28SDeepak Pandey				${N1SDP_BASE}/n1sdp_topology.c	        \
49de8bc83eSManoj Kumar				${N1SDP_BASE}/n1sdp_security.c		\
50de8bc83eSManoj Kumar				drivers/arm/css/sds/sds.c
5180d37c28SDeepak Pandey
52000653b4SAndre PrzywaraFDT_SOURCES		+=	fdts/${PLAT}-single-chip.dts	\
53fe2b37f6Ssah01				fdts/${PLAT}-multi-chip.dts	\
54fe2b37f6Ssah01				${N1SDP_BASE}/fdts/n1sdp_fw_config.dts	\
55cf85030eSsahil				${N1SDP_BASE}/fdts/n1sdp_tb_fw_config.dts	\
56cf85030eSsahil				${N1SDP_BASE}/fdts/n1sdp_nt_fw_config.dts
57fe2b37f6Ssah01
58fe2b37f6Ssah01FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_fw_config.dtb
59fe2b37f6Ssah01TB_FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_tb_fw_config.dtb
60cf85030eSsahilNT_FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_nt_fw_config.dtb
61fe2b37f6Ssah01
62fe2b37f6Ssah01# Add the FW_CONFIG to FIP and specify the same to certtool
63fe2b37f6Ssah01$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
64fe2b37f6Ssah01# Add the TB_FW_CONFIG to FIP and specify the same to certtool
65fe2b37f6Ssah01$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
66cf85030eSsahil# Add the NT_FW_CONFIG to FIP and specify the same to certtool
67cf85030eSsahil$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
68fe2b37f6Ssah01
699090fe00SVishnu BanavathN1SDP_SPMC_MANIFEST_DTS	:=	${N1SDP_BASE}/fdts/${PLAT}_optee_spmc_manifest.dts
709090fe00SVishnu BanavathFDT_SOURCES		+=	${N1SDP_SPMC_MANIFEST_DTS}
719090fe00SVishnu BanavathN1SDP_TOS_FW_CONFIG	:=	${BUILD_PLAT}/fdts/${PLAT}_optee_spmc_manifest.dtb
729090fe00SVishnu Banavath
739090fe00SVishnu Banavath# Add the TOS_FW_CONFIG to FIP and specify the same to certtool
749090fe00SVishnu Banavath$(eval $(call TOOL_ADD_PAYLOAD,${N1SDP_TOS_FW_CONFIG},--tos-fw-config,${N1SDP_TOS_FW_CONFIG}))
759090fe00SVishnu Banavath
76fe2b37f6Ssah01# Setting to 0 as no NVCTR in N1SDP
77fe2b37f6Ssah01N1SDP_FW_NVCTR_VAL	:=	0
78fe2b37f6Ssah01TFW_NVCTR_VAL		:=	${N1SDP_FW_NVCTR_VAL}
79fe2b37f6Ssah01NTFW_NVCTR_VAL		:=	${N1SDP_FW_NVCTR_VAL}
80fe2b37f6Ssah01
81fe2b37f6Ssah01# Add N1SDP_FW_NVCTR_VAL
82fe2b37f6Ssah01$(eval $(call add_define,N1SDP_FW_NVCTR_VAL))
8380d37c28SDeepak Pandey
8480d37c28SDeepak Pandey# TF-A not required to load the SCP Images
8580d37c28SDeepak Pandeyoverride CSS_LOAD_SCP_IMAGES	  	:=	0
8680d37c28SDeepak Pandey
8780d37c28SDeepak Pandeyoverride NEED_BL2U		  	:=	no
8880d37c28SDeepak Pandey
8980d37c28SDeepak Pandey# 32 bit mode not supported
9080d37c28SDeepak Pandeyoverride CTX_INCLUDE_AARCH32_REGS 	:=	0
9180d37c28SDeepak Pandey
9280d37c28SDeepak Pandeyoverride ARM_PLAT_MT              	:=	1
9380d37c28SDeepak Pandey
9480d37c28SDeepak Pandey# Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the
9580d37c28SDeepak Pandey# SCP during power management operations and for SCP RAM Firmware transfer.
9680d37c28SDeepak PandeyCSS_USE_SCMI_SDS_DRIVER		  	:=	1
9780d37c28SDeepak Pandey
9880d37c28SDeepak Pandey# System coherency is managed in hardware
9980d37c28SDeepak PandeyHW_ASSISTED_COHERENCY			:=	1
10080d37c28SDeepak Pandey
10180d37c28SDeepak Pandey# When building for systems with hardware-assisted coherency, there's no need to
10280d37c28SDeepak Pandey# use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too.
10380d37c28SDeepak PandeyUSE_COHERENT_MEM			:=	0
104303b6d06SChandni Cherukuri
105303b6d06SChandni Cherukuri# Enable the flag since N1SDP has a system level cache
10625bbbd2dSJavier Almansa SobrinoNEOVERSE_Nx_EXTERNAL_LLC		:=	1
10780d37c28SDeepak Pandeyinclude plat/arm/common/arm_common.mk
10880d37c28SDeepak Pandeyinclude plat/arm/css/common/css_common.mk
10980d37c28SDeepak Pandeyinclude plat/arm/board/common/board_common.mk
110