blob: a737d24b81ce80c51e1d18d1ab9deefc3a5e3d1d [file] [log] [blame]
developer1033ea12019-04-10 21:09:26 +08001#
developer8c327e82022-05-29 22:25:44 +08002# Copyright (c) 2019-2022, MediaTek Inc. All rights reserved.
developer1033ea12019-04-10 21:09:26 +08003#
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/ \
developerfe14b9f2022-09-05 11:18:04 +080011 -I${MTK_PLAT}/drivers/uart/ \
developer8c327e82022-05-29 22:25:44 +080012 -I${MTK_PLAT}/include/ \
developer88837432019-05-02 22:01:39 +080013 -I${MTK_PLAT_SOC}/drivers/ \
developer644ec1c2019-08-23 15:50:58 +080014 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer0d2cfca2019-08-23 10:23:34 +080015 -I${MTK_PLAT_SOC}/drivers/devapc/ \
developer555ed552019-08-21 22:49:49 +080016 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developera21d47e2019-05-02 19:29:25 +080017 -I${MTK_PLAT_SOC}/drivers/spmc/ \
developerb7ba14b2019-05-02 20:24:50 +080018 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developer345a6e52020-10-12 16:33:25 +080019 -I${MTK_PLAT_SOC}/drivers/timer/ \
developer6f37fd22019-05-02 20:02:05 +080020 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer083fa242019-08-21 20:50:20 +080021 -I${MTK_PLAT_SOC}/drivers/spm/ \
developerda573122019-08-21 21:17:49 +080022 -I${MTK_PLAT_SOC}/drivers/sspm/ \
developer6f37fd22019-05-02 20:02:05 +080023 -I${MTK_PLAT_SOC}/drivers/rtc/ \
developer1033ea12019-04-10 21:09:26 +080024 -I${MTK_PLAT_SOC}/include/
25
26PLAT_BL_COMMON_SOURCES := lib/xlat_tables/aarch64/xlat_tables.c \
27 lib/xlat_tables/xlat_tables_common.c \
developer1033ea12019-04-10 21:09:26 +080028 plat/common/plat_psci_common.c \
29 plat/common/aarch64/crash_console_helpers.S
30
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000031# Include GICv3 driver files
32include drivers/arm/gic/v3/gicv3.mk
33
Julius Werner1f363212019-05-30 17:34:08 -070034BL31_SOURCES += common/desc_image_load.c \
35 drivers/arm/cci/cci.c \
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000036 ${GICV3_SOURCES} \
developer1033ea12019-04-10 21:09:26 +080037 drivers/delay_timer/delay_timer.c \
38 drivers/delay_timer/generic_delay_timer.c \
39 drivers/gpio/gpio.c \
40 drivers/ti/uart/aarch64/16550_console.S \
developer092c53a2019-05-03 16:59:07 +080041 lib/bl_aux_params/bl_aux_params.c \
developer1033ea12019-04-10 21:09:26 +080042 lib/cpus/aarch64/aem_generic.S \
43 lib/cpus/aarch64/cortex_a53.S \
44 lib/cpus/aarch64/cortex_a73.S \
developer3f3f1ab2019-05-02 22:26:22 +080045 plat/common/plat_gicv3.c \
developer1033ea12019-04-10 21:09:26 +080046 ${MTK_PLAT}/common/mtk_plat_common.c \
developer092c53a2019-05-03 16:59:07 +080047 ${MTK_PLAT}/common/params_setup.c \
developerfe14b9f2022-09-05 11:18:04 +080048 ${MTK_PLAT}/drivers/pmic_wrap/pmic_wrap_init.c \
49 ${MTK_PLAT}/drivers/rtc/rtc_common.c \
50 ${MTK_PLAT}/drivers/uart/uart.c \
developer1033ea12019-04-10 21:09:26 +080051 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
52 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
developer0d2cfca2019-08-23 10:23:34 +080053 ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \
developer88837432019-05-02 22:01:39 +080054 ${MTK_PLAT_SOC}/drivers/mcsi/mcsi.c \
developer6f37fd22019-05-02 20:02:05 +080055 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
56 ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \
developer555ed552019-08-21 22:49:49 +080057 ${MTK_PLAT_SOC}/drivers/mcdi/mtk_mcdi.c \
developera21d47e2019-05-02 19:29:25 +080058 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \
developer083fa242019-08-21 20:50:20 +080059 ${MTK_PLAT_SOC}/drivers/spm/spm.c \
60 ${MTK_PLAT_SOC}/drivers/spm/spm_pmic_wrap.c \
61 ${MTK_PLAT_SOC}/drivers/spm/spm_suspend.c \
developerb7ba14b2019-05-02 20:24:50 +080062 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developer345a6e52020-10-12 16:33:25 +080063 ${MTK_PLAT_SOC}/drivers/timer/mt_timer.c \
developer644ec1c2019-08-23 15:50:58 +080064 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer1033ea12019-04-10 21:09:26 +080065 ${MTK_PLAT_SOC}/plat_pm.c \
66 ${MTK_PLAT_SOC}/plat_topology.c \
developer3f3f1ab2019-05-02 22:26:22 +080067 ${MTK_PLAT_SOC}/plat_mt_gic.c \
developera21d47e2019-05-02 19:29:25 +080068 ${MTK_PLAT_SOC}/plat_dcm.c \
developer1033ea12019-04-10 21:09:26 +080069 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
70 ${MTK_PLAT_SOC}/plat_debug.c \
developerda573122019-08-21 21:17:49 +080071 ${MTK_PLAT_SOC}/scu.c \
72 ${MTK_PLAT_SOC}/drivers/sspm/sspm.c
developer1033ea12019-04-10 21:09:26 +080073
74# Enable workarounds for selected Cortex-A53 erratas.
75ERRATA_A53_826319 := 0
76ERRATA_A53_836870 := 1
77ERRATA_A53_855873 := 1
78
79# indicate the reset vector address can be programmed
80PROGRAMMABLE_RESET_ADDRESS := 1
81
82COLD_BOOT_SINGLE_CPU := 1
83
84MULTI_CONSOLE_API := 1
85
86MACH_MT8183 := 1
87$(eval $(call add_define,MACH_MT8183))
88
Hung-Te Linc05a0b52019-05-02 21:42:41 +080089include lib/coreboot/coreboot.mk
90