xref: /rk3399_ARM-atf/plat/mediatek/mt8186/platform.mk (revision 1da57e54b2270b3b49710afa6fd947b01d61b261)
1#
2# Copyright (c) 2021, MediaTek Inc. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7MTK_PLAT     := plat/mediatek
8MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT}
9
10PLAT_INCLUDES := -I${MTK_PLAT}/common/                            \
11                 -I${MTK_PLAT}/common/drivers/gic600/             \
12                 -I${MTK_PLAT}/common/drivers/gpio/             \
13                 -I${MTK_PLAT}/common/drivers/timer/              \
14                 -I${MTK_PLAT_SOC}/drivers/dcm/                   \
15                 -I${MTK_PLAT_SOC}/drivers/emi_mpu/               \
16                 -I${MTK_PLAT_SOC}/drivers/gpio/               \
17                 -I${MTK_PLAT_SOC}/drivers/pmic/                  \
18                 -I${MTK_PLAT_SOC}/drivers/rtc/                   \
19                 -I${MTK_PLAT_SOC}/drivers/spmc/                  \
20                 -I${MTK_PLAT_SOC}/include/
21
22GICV3_SUPPORT_GIC600        :=      1
23include drivers/arm/gic/v3/gicv3.mk
24include lib/xlat_tables_v2/xlat_tables.mk
25
26PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES}                              \
27                          ${XLAT_TABLES_LIB_SRCS}                       \
28                          plat/common/aarch64/crash_console_helpers.S   \
29                          plat/common/plat_psci_common.c
30
31
32BL31_SOURCES += common/desc_image_load.c                              \
33                drivers/delay_timer/delay_timer.c                     \
34                drivers/gpio/gpio.c                                   \
35                drivers/delay_timer/generic_delay_timer.c             \
36                drivers/ti/uart/aarch64/16550_console.S               \
37                lib/bl_aux_params/bl_aux_params.c                     \
38                lib/cpus/aarch64/cortex_a55.S                         \
39                lib/cpus/aarch64/cortex_a76.S                         \
40                plat/common/plat_gicv3.c                              \
41                ${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c         \
42                ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c       \
43                ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init.c \
44                ${MTK_PLAT}/common/drivers/rtc/rtc_common.c           \
45                ${MTK_PLAT}/common/mtk_plat_common.c                  \
46                ${MTK_PLAT}/common/mtk_sip_svc.c                      \
47                ${MTK_PLAT}/common/params_setup.c                     \
48                ${MTK_PLAT}/common/drivers/timer/mt_timer.c           \
49                ${MTK_PLAT}/common/mtk_cirq.c           	      \
50                ${MTK_PLAT_SOC}/aarch64/platform_common.c             \
51                ${MTK_PLAT_SOC}/aarch64/plat_helpers.S                \
52                ${MTK_PLAT_SOC}/bl31_plat_setup.c                     \
53                ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c                 \
54                ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c           \
55                ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c             \
56                ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c                 \
57                ${MTK_PLAT_SOC}/drivers/pmic/pmic.c                   \
58                ${MTK_PLAT_SOC}/drivers/rtc/rtc.c                     \
59                ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c                 \
60                ${MTK_PLAT_SOC}/plat_pm.c                             \
61                ${MTK_PLAT_SOC}/plat_sip_calls.c                      \
62                ${MTK_PLAT_SOC}/plat_topology.c
63
64# Configs for A76 and A55
65HW_ASSISTED_COHERENCY := 1
66USE_COHERENT_MEM := 0
67CTX_INCLUDE_AARCH32_REGS := 0
68ERRATA_A55_1530923 := 1
69ERRATA_A55_1221012 := 1
70
71# indicate the reset vector address can be programmed
72PROGRAMMABLE_RESET_ADDRESS := 1
73
74COLD_BOOT_SINGLE_CPU := 1
75
76MACH_MT8186 := 1
77$(eval $(call add_define,MACH_MT8186))
78
79include lib/coreboot/coreboot.mk
80