blob: cbdaadd94dcec5e5515b5310cdf51d474251d717 [file] [log] [blame]
developer2189d3a2020-04-17 17:14:23 +08001#
2# Copyright (c) 2020, 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/ \
developerbd1401f2021-03-26 15:53:20 +080014 -I${MTK_PLAT}/common/drivers/timer/ \
christine.zhua22c10b2021-03-24 21:44:52 +080015 -I${MTK_PLAT}/common/drivers/uart/ \
developer7d46db62020-12-14 16:53:22 +080016 -I${MTK_PLAT}/common/lpm/ \
developer404e08b2020-09-18 09:32:31 +080017 -I${MTK_PLAT_SOC}/include/ \
18 -I${MTK_PLAT_SOC}/drivers/ \
developerceb197f2021-04-20 12:53:15 +080019 -I${MTK_PLAT_SOC}/drivers/apusys/ \
developera6304632020-09-08 14:36:07 +080020 -I${MTK_PLAT_SOC}/drivers/dcm \
developer47aad1c2021-02-09 11:28:00 +080021 -I${MTK_PLAT_SOC}/drivers/devapc \
developer4d819312021-07-05 20:42:09 +080022 -I${MTK_PLAT_SOC}/drivers/dfd \
developerbd481152020-11-02 10:45:34 +080023 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer86ada3c2020-07-03 09:19:06 +080024 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developera444a202020-06-15 16:41:03 +080025 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developer74cf3ec2020-08-12 16:31:06 +080026 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer4d055072020-08-25 22:31:14 +080027 -I${MTK_PLAT_SOC}/drivers/ptp3/ \
developerbd1401f2021-03-26 15:53:20 +080028 -I${MTK_PLAT_SOC}/drivers/spmc/
developer2189d3a2020-04-17 17:14:23 +080029
developerf9b56842020-06-09 13:38:35 +080030GICV3_SUPPORT_GIC600 := 1
developer2189d3a2020-04-17 17:14:23 +080031include drivers/arm/gic/v3/gicv3.mk
32include lib/xlat_tables_v2/xlat_tables.mk
33
34PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \
35 ${XLAT_TABLES_LIB_SRCS} \
36 plat/common/aarch64/crash_console_helpers.S \
37 plat/common/plat_psci_common.c
38
39BL31_SOURCES += common/desc_image_load.c \
developerf13d6492020-08-05 13:53:59 +080040 drivers/delay_timer/delay_timer.c \
41 drivers/delay_timer/generic_delay_timer.c \
developer2189d3a2020-04-17 17:14:23 +080042 drivers/ti/uart/aarch64/16550_console.S \
developer404e08b2020-09-18 09:32:31 +080043 drivers/gpio/gpio.c \
developer2189d3a2020-04-17 17:14:23 +080044 lib/bl_aux_params/bl_aux_params.c \
45 lib/cpus/aarch64/cortex_a55.S \
46 lib/cpus/aarch64/cortex_a76.S \
47 plat/common/plat_gicv3.c \
christine.zhua22c10b2021-03-24 21:44:52 +080048 ${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c \
developer912c7d22021-03-31 14:53:43 +080049 ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c \
developer74cf3ec2020-08-12 16:31:06 +080050 ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
developerbeab2d72020-10-14 20:14:37 +080051 ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
developer0e726372021-04-08 19:07:49 +080052 ${MTK_PLAT}/common/drivers/rtc/rtc_mt6359p.c \
developerbd1401f2021-03-26 15:53:20 +080053 ${MTK_PLAT}/common/drivers/timer/mt_timer.c \
developer0df1c3c2020-08-01 16:23:12 +080054 ${MTK_PLAT}/common/drivers/uart/uart.c \
developer7d46db62020-12-14 16:53:22 +080055 ${MTK_PLAT}/common/lpm/mt_lp_rm.c \
developer8273a602021-03-25 11:26:46 +080056 ${MTK_PLAT}/common/mtk_cirq.c \
developer2189d3a2020-04-17 17:14:23 +080057 ${MTK_PLAT}/common/mtk_plat_common.c \
developera84a44a2020-08-19 17:20:15 +080058 ${MTK_PLAT}/common/mtk_sip_svc.c \
developer2189d3a2020-04-17 17:14:23 +080059 ${MTK_PLAT}/common/params_setup.c \
60 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
61 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
62 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
developer74cf3ec2020-08-12 16:31:06 +080063 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
developer2189d3a2020-04-17 17:14:23 +080064 ${MTK_PLAT_SOC}/plat_pm.c \
developerf9b56842020-06-09 13:38:35 +080065 ${MTK_PLAT_SOC}/plat_topology.c \
developera84a44a2020-08-19 17:20:15 +080066 ${MTK_PLAT_SOC}/plat_sip_calls.c \
developerceb197f2021-04-20 12:53:15 +080067 ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys.c \
developer282d3df2021-04-20 18:08:35 +080068 ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys_apc.c \
developera6304632020-09-08 14:36:07 +080069 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
70 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
developer47aad1c2021-02-09 11:28:00 +080071 ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \
developer4d819312021-07-05 20:42:09 +080072 ${MTK_PLAT_SOC}/drivers/dfd/plat_dfd.c \
developerbd481152020-11-02 10:45:34 +080073 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer86ada3c2020-07-03 09:19:06 +080074 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developera444a202020-06-15 16:41:03 +080075 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
76 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
developera6d504d2021-01-04 00:00:12 +080077 ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \
developera444a202020-06-15 16:41:03 +080078 ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
developer4d055072020-08-25 22:31:14 +080079 ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \
developerbd1401f2021-03-26 15:53:20 +080080 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c
developer2189d3a2020-04-17 17:14:23 +080081
developer5f735162021-01-04 00:02:34 +080082# Build SPM drivers
83include ${MTK_PLAT_SOC}/drivers/spm/build.mk
84
developer2189d3a2020-04-17 17:14:23 +080085# Configs for A76 and A55
86HW_ASSISTED_COHERENCY := 1
87USE_COHERENT_MEM := 0
88CTX_INCLUDE_AARCH32_REGS := 0
89
90# indicate the reset vector address can be programmed
91PROGRAMMABLE_RESET_ADDRESS := 1
92
93COLD_BOOT_SINGLE_CPU := 1
94
95MACH_MT8192 := 1
96$(eval $(call add_define,MACH_MT8192))
97
98include lib/coreboot/coreboot.mk
99