xref: /rk3399_ARM-atf/plat/nxp/s32/s32g274ardb2/platform.mk (revision a8dc2595ab7e10dac8285d2c0b6da7ebbcd0edb0)
1#
2# Copyright 2024-2025 NXP
3# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8include drivers/arm/gic/v3/gicv3.mk
9include lib/xlat_tables_v2/xlat_tables.mk
10
11PLAT_DRIVERS_PATH := drivers/nxp
12PLAT_COMMON_PATH  := plat/nxp/common
13PLAT_S32G274ARDB2 := plat/nxp/s32/s32g274ardb2
14
15CONSOLE           := LINFLEX
16
17include ${PLAT_COMMON_PATH}/plat_make_helper/plat_build_macros.mk
18
19# Flag to apply S32 erratum ERR051700. This erratum applies to all S32
20# revisions.
21S32_ERRATA_LIST += ERRATA_S32_051700
22
23PLAT_INCLUDES = \
24	-I${PLAT_S32G274ARDB2}/include \
25	-Idrivers/imx/usdhc \
26
27include plat/nxp/s32/s32g274ardb2/plat_ddr.mk
28
29PROGRAMMABLE_RESET_ADDRESS := 1
30
31COLD_BOOT_SINGLE_CPU := 0
32
33ENABLE_SVE_FOR_NS := 0
34
35RESET_TO_BL2 := 1
36
37INIT_UNUSED_NS_EL2 := 1
38
39ERRATA_A53_855873 := 1
40ERRATA_A53_836870 := 1
41ERRATA_A53_1530924 := 1
42ERRATA_SPECULATIVE_AT := 1
43ERRATA_S32_051700 := 1
44
45PLAT_XLAT_TABLES_DYNAMIC := 1
46$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
47
48NXP_ESDHC_LE := 1
49$(eval $(call add_define,NXP_ESDHC_LE))
50
51# Selecting Drivers for SoC
52$(eval $(call SET_NXP_MAKE_FLAG,CONSOLE_NEEDED,BL_COMM))
53$(eval $(call SET_NXP_MAKE_FLAG,CLK_NEEDED,BL_COMM))
54
55include ${PLAT_DRIVERS_PATH}/drivers.mk
56
57# Selecting the raw partition where the FIP image is stored
58FIP_PART ?= 0
59$(eval $(call add_define,FIP_PART))
60
61BL_COMMON_SOURCES += \
62	${PLAT_S32G274ARDB2}/plat_console.c \
63	${PLAT_S32G274ARDB2}/plat_helpers.S \
64	${PLAT_S32G274ARDB2}/s32cc_bl_common.c \
65	${XLAT_TABLES_LIB_SRCS} \
66
67BL2_SOURCES += \
68	${BL_COMMON_SOURCES} \
69	${PLAT_S32G274ARDB2}/plat_bl2_setup.c \
70	${PLAT_S32G274ARDB2}/plat_bl2_image_desc.c \
71	${PLAT_S32G274ARDB2}/plat_io_storage.c \
72	${PLAT_S32G274ARDB2}/s32cc_ncore.c \
73	${DDR_DRV_SRCS} \
74	common/desc_image_load.c \
75	common/tf_crc32.c \
76	drivers/delay_timer/delay_timer.c \
77	drivers/delay_timer/generic_delay_timer.c \
78	drivers/imx/usdhc/imx_usdhc.c \
79	drivers/io/io_block.c \
80	drivers/io/io_fip.c \
81	drivers/io/io_memmap.c \
82	drivers/io/io_storage.c \
83	drivers/mmc/mmc.c \
84	drivers/partition/gpt.c \
85	drivers/partition/partition.c \
86	lib/cpus/aarch64/cortex_a53.S \
87
88ARM_ARCH_FEATURE := crc
89
90BL31_SOURCES += \
91	${GICV3_SOURCES} \
92	${PLAT_S32G274ARDB2}/plat_bl31_setup.c \
93	${PLAT_S32G274ARDB2}/s32g2_psci.c \
94	${PLAT_S32G274ARDB2}/s32g2_soc.c \
95	${XLAT_TABLES_LIB_SRCS} \
96	lib/cpus/aarch64/cortex_a53.S \
97	plat/common/plat_gicv3.c \
98	plat/common/plat_psci_common.c \
99
100# process all errata flags
101$(eval $(call default_zeros, $(S32_ERRATA_LIST)))
102$(eval $(call add_defines, $(S32_ERRATA_LIST)))
103$(eval $(call assert_booleans, $(S32_ERRATA_LIST)))
104