blob: 026cf41bf3632bc05cc8b2a970727b9b12c78dc3 [file] [log] [blame]
developer8670d252021-03-19 22:13:11 +08001#
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/ \
christine.zhua22c10b2021-03-24 21:44:52 +080011 -I${MTK_PLAT}/common/drivers/gic600/ \
developer912c7d22021-03-31 14:53:43 +080012 -I${MTK_PLAT}/common/drivers/gpio/ \
developer0e726372021-04-08 19:07:49 +080013 -I${MTK_PLAT}/common/drivers/rtc/ \
developer4c1354b2021-04-22 14:56:58 +080014 -I${MTK_PLAT}/common/drivers/timer/ \
Rex-BC Chenb48c6c42021-04-12 11:10:31 +080015 -I${MTK_PLAT_SOC}/drivers/dp/ \
developer912c7d22021-03-31 14:53:43 +080016 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developer037c99f2020-06-15 16:41:03 +080017 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developerddb7f402021-04-08 16:37:15 +080018 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer2a56b2c2020-06-16 13:28:28 +080019 -I${MTK_PLAT_SOC}/drivers/spmc/ \
developer8670d252021-03-19 22:13:11 +080020 -I${MTK_PLAT_SOC}/include/
21
christine.zhua22c10b2021-03-24 21:44:52 +080022GICV3_SUPPORT_GIC600 := 1
developer8670d252021-03-19 22:13:11 +080023include 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 \
developer98b97182021-03-26 18:33:43 +080033 drivers/delay_timer/delay_timer.c \
developer912c7d22021-03-31 14:53:43 +080034 drivers/gpio/gpio.c \
developer98b97182021-03-26 18:33:43 +080035 drivers/delay_timer/generic_delay_timer.c \
developer8670d252021-03-19 22:13:11 +080036 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_a78.S \
40 plat/common/plat_gicv3.c \
christine.zhua22c10b2021-03-24 21:44:52 +080041 ${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c \
developer912c7d22021-03-31 14:53:43 +080042 ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c \
developerddb7f402021-04-08 16:37:15 +080043 ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
developer0e726372021-04-08 19:07:49 +080044 ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
45 ${MTK_PLAT}/common/drivers/rtc/rtc_mt6359p.c \
developer4c1354b2021-04-22 14:56:58 +080046 ${MTK_PLAT}/common/drivers/timer/mt_timer.c \
developer8273a602021-03-25 11:26:46 +080047 ${MTK_PLAT}/common/mtk_cirq.c \
developer8670d252021-03-19 22:13:11 +080048 ${MTK_PLAT}/common/mtk_plat_common.c \
developerc0c07822021-03-29 16:50:30 +080049 ${MTK_PLAT}/common/mtk_sip_svc.c \
developer8670d252021-03-19 22:13:11 +080050 ${MTK_PLAT}/common/params_setup.c \
51 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
52 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
53 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
Rex-BC Chenb48c6c42021-04-12 11:10:31 +080054 ${MTK_PLAT_SOC}/drivers/dp/mt_dp.c \
developer912c7d22021-03-31 14:53:43 +080055 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developer037c99f2020-06-15 16:41:03 +080056 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
57 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
58 ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
developer912c7d22021-03-31 14:53:43 +080059 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developerddb7f402021-04-08 16:37:15 +080060 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
developer2a56b2c2020-06-16 13:28:28 +080061 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \
developer8670d252021-03-19 22:13:11 +080062 ${MTK_PLAT_SOC}/plat_pm.c \
developerc0c07822021-03-29 16:50:30 +080063 ${MTK_PLAT_SOC}/plat_sip_calls.c \
developer8670d252021-03-19 22:13:11 +080064 ${MTK_PLAT_SOC}/plat_topology.c
65
66# Configs for A78 and A55
67HW_ASSISTED_COHERENCY := 1
68USE_COHERENT_MEM := 0
69CTX_INCLUDE_AARCH32_REGS := 0
70ERRATA_A55_1530923 := 1
71
72# indicate the reset vector address can be programmed
73PROGRAMMABLE_RESET_ADDRESS := 1
74
75COLD_BOOT_SINGLE_CPU := 1
76
77MACH_MT8195 := 1
78$(eval $(call add_define,MACH_MT8195))
79
80include lib/coreboot/coreboot.mk