xref: /rk3399_ARM-atf/plat/arm/board/n1sdp/platform.mk (revision cf953bca5c01245fd5473c5785a0dc307c55e18d)
180d37c28SDeepak Pandey#
2*cf953bcaSGovindraj Raja# Copyright (c) 2018-2023, 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
17*cf953bcaSGovindraj Raja# Neoverse N1 cores support Armv8.2 extensions
18*cf953bcaSGovindraj RajaARM_ARCH_MAJOR := 8
19*cf953bcaSGovindraj RajaARM_ARCH_MINOR := 2
20*cf953bcaSGovindraj Raja
21a6ea06f5SAlexei Fedorov# GIC-600 configuration
22b4ad365aSAndre PrzywaraGICV3_SUPPORT_GIC600		:=	1
23a6ea06f5SAlexei FedorovGICV3_IMPL_GIC600_MULTICHIP	:=	1
2480d37c28SDeepak Pandey
25a6ea06f5SAlexei Fedorov# Include GICv3 driver files
26a6ea06f5SAlexei Fedorovinclude drivers/arm/gic/v3/gicv3.mk
27a6ea06f5SAlexei Fedorov
28a6ea06f5SAlexei FedorovN1SDP_GIC_SOURCES	:=	${GICV3_SOURCES}			\
2980d37c28SDeepak Pandey				plat/common/plat_gicv3.c		\
3080d37c28SDeepak Pandey				plat/arm/common/arm_gicv3.c		\
3180d37c28SDeepak Pandey
3280d37c28SDeepak PandeyPLAT_BL_COMMON_SOURCES	:=	${N1SDP_BASE}/n1sdp_plat.c	        \
3380d37c28SDeepak Pandey				${N1SDP_BASE}/aarch64/n1sdp_helper.S
3480d37c28SDeepak Pandey
35fe2b37f6Ssah01BL1_SOURCES		:=	${N1SDP_CPU_SOURCES}                \
36fe2b37f6Ssah01				${INTERCONNECT_SOURCES}             \
37fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_err.c           \
38fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_trusted_boot.c  \
39fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_bl1_setup.c     \
40fe2b37f6Ssah01				drivers/arm/sbsa/sbsa.c
41fe2b37f6Ssah01
42fe2b37f6Ssah01BL2_SOURCES		:=	${N1SDP_BASE}/n1sdp_security.c      \
43fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_err.c           \
44fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_trusted_boot.c  \
45fe2b37f6Ssah01				lib/utils/mem_region.c              \
46fe2b37f6Ssah01				${N1SDP_BASE}/n1sdp_bl2_setup.c     \
47cf85030eSsahil				${N1SDP_BASE}/n1sdp_image_load.c     \
48fe2b37f6Ssah01				drivers/arm/css/sds/sds.c
4980d37c28SDeepak Pandey
5080d37c28SDeepak PandeyBL31_SOURCES		:=	${N1SDP_CPU_SOURCES}			\
5180d37c28SDeepak Pandey				${INTERCONNECT_SOURCES}			\
5280d37c28SDeepak Pandey				${N1SDP_GIC_SOURCES}			\
5380d37c28SDeepak Pandey				${N1SDP_BASE}/n1sdp_bl31_setup.c	\
545bdafc40SWerner Lewis				${N1SDP_BASE}/n1sdp_pm.c		\
5580d37c28SDeepak Pandey				${N1SDP_BASE}/n1sdp_topology.c	        \
56de8bc83eSManoj Kumar				${N1SDP_BASE}/n1sdp_security.c		\
57de8bc83eSManoj Kumar				drivers/arm/css/sds/sds.c
5880d37c28SDeepak Pandey
59000653b4SAndre PrzywaraFDT_SOURCES		+=	fdts/${PLAT}-single-chip.dts	\
60fe2b37f6Ssah01				fdts/${PLAT}-multi-chip.dts	\
61fe2b37f6Ssah01				${N1SDP_BASE}/fdts/n1sdp_fw_config.dts	\
62cf85030eSsahil				${N1SDP_BASE}/fdts/n1sdp_tb_fw_config.dts	\
63cf85030eSsahil				${N1SDP_BASE}/fdts/n1sdp_nt_fw_config.dts
64fe2b37f6Ssah01
65fe2b37f6Ssah01FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_fw_config.dtb
66fe2b37f6Ssah01TB_FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_tb_fw_config.dtb
67cf85030eSsahilNT_FW_CONFIG		:=	${BUILD_PLAT}/fdts/n1sdp_nt_fw_config.dtb
68fe2b37f6Ssah01
69fe2b37f6Ssah01# Add the FW_CONFIG to FIP and specify the same to certtool
70fe2b37f6Ssah01$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
71fe2b37f6Ssah01# Add the TB_FW_CONFIG to FIP and specify the same to certtool
72fe2b37f6Ssah01$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
73cf85030eSsahil# Add the NT_FW_CONFIG to FIP and specify the same to certtool
74cf85030eSsahil$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
75fe2b37f6Ssah01
769090fe00SVishnu BanavathN1SDP_SPMC_MANIFEST_DTS	:=	${N1SDP_BASE}/fdts/${PLAT}_optee_spmc_manifest.dts
779090fe00SVishnu BanavathFDT_SOURCES		+=	${N1SDP_SPMC_MANIFEST_DTS}
789090fe00SVishnu BanavathN1SDP_TOS_FW_CONFIG	:=	${BUILD_PLAT}/fdts/${PLAT}_optee_spmc_manifest.dtb
799090fe00SVishnu Banavath
809090fe00SVishnu Banavath# Add the TOS_FW_CONFIG to FIP and specify the same to certtool
819090fe00SVishnu Banavath$(eval $(call TOOL_ADD_PAYLOAD,${N1SDP_TOS_FW_CONFIG},--tos-fw-config,${N1SDP_TOS_FW_CONFIG}))
829090fe00SVishnu Banavath
83fe2b37f6Ssah01# Setting to 0 as no NVCTR in N1SDP
84fe2b37f6Ssah01N1SDP_FW_NVCTR_VAL	:=	0
85fe2b37f6Ssah01TFW_NVCTR_VAL		:=	${N1SDP_FW_NVCTR_VAL}
86fe2b37f6Ssah01NTFW_NVCTR_VAL		:=	${N1SDP_FW_NVCTR_VAL}
87fe2b37f6Ssah01
88fe2b37f6Ssah01# Add N1SDP_FW_NVCTR_VAL
89fe2b37f6Ssah01$(eval $(call add_define,N1SDP_FW_NVCTR_VAL))
9080d37c28SDeepak Pandey
9180d37c28SDeepak Pandey# TF-A not required to load the SCP Images
9280d37c28SDeepak Pandeyoverride CSS_LOAD_SCP_IMAGES	  	:=	0
9380d37c28SDeepak Pandey
9480d37c28SDeepak Pandeyoverride NEED_BL2U		  	:=	no
9580d37c28SDeepak Pandey
9680d37c28SDeepak Pandey# 32 bit mode not supported
9780d37c28SDeepak Pandeyoverride CTX_INCLUDE_AARCH32_REGS 	:=	0
9880d37c28SDeepak Pandey
9980d37c28SDeepak Pandeyoverride ARM_PLAT_MT              	:=	1
10080d37c28SDeepak Pandey
10180d37c28SDeepak Pandey# Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the
10280d37c28SDeepak Pandey# SCP during power management operations and for SCP RAM Firmware transfer.
10380d37c28SDeepak PandeyCSS_USE_SCMI_SDS_DRIVER		  	:=	1
10480d37c28SDeepak Pandey
10580d37c28SDeepak Pandey# System coherency is managed in hardware
10680d37c28SDeepak PandeyHW_ASSISTED_COHERENCY			:=	1
10780d37c28SDeepak Pandey
10880d37c28SDeepak Pandey# When building for systems with hardware-assisted coherency, there's no need to
10980d37c28SDeepak Pandey# use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too.
11080d37c28SDeepak PandeyUSE_COHERENT_MEM			:=	0
111303b6d06SChandni Cherukuri
112303b6d06SChandni Cherukuri# Enable the flag since N1SDP has a system level cache
11325bbbd2dSJavier Almansa SobrinoNEOVERSE_Nx_EXTERNAL_LLC		:=	1
11480d37c28SDeepak Pandeyinclude plat/arm/common/arm_common.mk
11580d37c28SDeepak Pandeyinclude plat/arm/css/common/css_common.mk
11680d37c28SDeepak Pandeyinclude plat/arm/board/common/board_common.mk
117