blob: 49d1059bdd00c10042153204c1cb0bdf7aaef359 [file] [log] [blame]
Nina Wuf85f37d2020-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.zhuc63f1452021-03-24 21:44:52 +080011 -I${MTK_PLAT}/common/drivers/gic600/ \
mtk20895aebd4dc2021-03-31 14:53:43 +080012 -I${MTK_PLAT}/common/drivers/gpio/ \
Yidi Lin46946032021-03-26 15:53:20 +080013 -I${MTK_PLAT}/common/drivers/timer/ \
christine.zhuc63f1452021-03-24 21:44:52 +080014 -I${MTK_PLAT}/common/drivers/uart/ \
Roger Lucab49192020-12-14 16:53:22 +080015 -I${MTK_PLAT}/common/lpm/ \
Po Xu054af8f2020-09-18 09:32:31 +080016 -I${MTK_PLAT_SOC}/include/ \
17 -I${MTK_PLAT_SOC}/drivers/ \
Nina Wu43d7bbc2020-09-08 14:36:07 +080018 -I${MTK_PLAT_SOC}/drivers/dcm \
Xi Chen42f2fa82020-11-02 10:45:34 +080019 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
Dehui Sun4a128012020-07-03 09:19:06 +080020 -I${MTK_PLAT_SOC}/drivers/gpio/ \
James Liao271d9492020-06-15 16:41:03 +080021 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
Hsin-Hsiung Wangcbd63312020-08-12 16:31:06 +080022 -I${MTK_PLAT_SOC}/drivers/pmic/ \
elly.chiang8709c932020-08-25 22:31:14 +080023 -I${MTK_PLAT_SOC}/drivers/ptp3/ \
Yuchen Huangb686d332020-10-14 20:14:37 +080024 -I${MTK_PLAT_SOC}/drivers/rtc/ \
Yidi Lin46946032021-03-26 15:53:20 +080025 -I${MTK_PLAT_SOC}/drivers/spmc/
Nina Wuf85f37d2020-04-17 17:14:23 +080026
Greta Zhang74f72b12020-06-09 13:38:35 +080027GICV3_SUPPORT_GIC600 := 1
Nina Wuf85f37d2020-04-17 17:14:23 +080028include drivers/arm/gic/v3/gicv3.mk
29include lib/xlat_tables_v2/xlat_tables.mk
30
31PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \
32 ${XLAT_TABLES_LIB_SRCS} \
33 plat/common/aarch64/crash_console_helpers.S \
34 plat/common/plat_psci_common.c
35
36BL31_SOURCES += common/desc_image_load.c \
Nina Wu95cc8892020-08-05 13:53:59 +080037 drivers/delay_timer/delay_timer.c \
38 drivers/delay_timer/generic_delay_timer.c \
Nina Wuf85f37d2020-04-17 17:14:23 +080039 drivers/ti/uart/aarch64/16550_console.S \
Po Xu054af8f2020-09-18 09:32:31 +080040 drivers/gpio/gpio.c \
Nina Wuf85f37d2020-04-17 17:14:23 +080041 lib/bl_aux_params/bl_aux_params.c \
42 lib/cpus/aarch64/cortex_a55.S \
43 lib/cpus/aarch64/cortex_a76.S \
44 plat/common/plat_gicv3.c \
christine.zhuc63f1452021-03-24 21:44:52 +080045 ${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c \
mtk20895aebd4dc2021-03-31 14:53:43 +080046 ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c \
Hsin-Hsiung Wangcbd63312020-08-12 16:31:06 +080047 ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
Yuchen Huangb686d332020-10-14 20:14:37 +080048 ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
Yidi Lin46946032021-03-26 15:53:20 +080049 ${MTK_PLAT}/common/drivers/timer/mt_timer.c \
Yuchen Huangbb28dc72020-08-01 16:23:12 +080050 ${MTK_PLAT}/common/drivers/uart/uart.c \
Roger Lucab49192020-12-14 16:53:22 +080051 ${MTK_PLAT}/common/lpm/mt_lp_rm.c \
gtk_pangaoe5490f92021-03-25 11:26:46 +080052 ${MTK_PLAT}/common/mtk_cirq.c \
Nina Wuf85f37d2020-04-17 17:14:23 +080053 ${MTK_PLAT}/common/mtk_plat_common.c \
Nina Wu189f0382020-08-19 17:20:15 +080054 ${MTK_PLAT}/common/mtk_sip_svc.c \
Nina Wuf85f37d2020-04-17 17:14:23 +080055 ${MTK_PLAT}/common/params_setup.c \
56 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
57 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
58 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
Hsin-Hsiung Wangcbd63312020-08-12 16:31:06 +080059 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
Yuchen Huangb686d332020-10-14 20:14:37 +080060 ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \
Nina Wuf85f37d2020-04-17 17:14:23 +080061 ${MTK_PLAT_SOC}/plat_pm.c \
Greta Zhang74f72b12020-06-09 13:38:35 +080062 ${MTK_PLAT_SOC}/plat_topology.c \
Nina Wu189f0382020-08-19 17:20:15 +080063 ${MTK_PLAT_SOC}/plat_sip_calls.c \
Nina Wu43d7bbc2020-09-08 14:36:07 +080064 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
65 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
Xi Chen42f2fa82020-11-02 10:45:34 +080066 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
Dehui Sun4a128012020-07-03 09:19:06 +080067 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
James Liao271d9492020-06-15 16:41:03 +080068 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
69 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
Roger Ludf600252021-01-04 00:00:12 +080070 ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \
James Liao271d9492020-06-15 16:41:03 +080071 ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
elly.chiang8709c932020-08-25 22:31:14 +080072 ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \
Yidi Lin46946032021-03-26 15:53:20 +080073 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c
Nina Wuf85f37d2020-04-17 17:14:23 +080074
Roger Luebb44442021-01-04 00:02:34 +080075# Build SPM drivers
76include ${MTK_PLAT_SOC}/drivers/spm/build.mk
77
Nina Wuf85f37d2020-04-17 17:14:23 +080078# Configs for A76 and A55
79HW_ASSISTED_COHERENCY := 1
80USE_COHERENT_MEM := 0
81CTX_INCLUDE_AARCH32_REGS := 0
82
83# indicate the reset vector address can be programmed
84PROGRAMMABLE_RESET_ADDRESS := 1
85
86COLD_BOOT_SINGLE_CPU := 1
87
88MACH_MT8192 := 1
89$(eval $(call add_define,MACH_MT8192))
90
91include lib/coreboot/coreboot.mk
92