blob: 643477b9a1fc4bf8f646b0a41950002b028bf2d6 [file] [log] [blame]
developer2189d3a2020-04-17 17:14:23 +08001#
developer8c327e82022-05-29 22:25:44 +08002# Copyright (c) 2020-2022, MediaTek Inc. All rights reserved.
developer2189d3a2020-04-17 17:14:23 +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/gic600/ \
12 -I${MTK_PLAT}/drivers/gpio/ \
13 -I${MTK_PLAT}/drivers/lpm/ \
14 -I${MTK_PLAT}/drivers/rtc/ \
15 -I${MTK_PLAT}/drivers/timer/ \
16 -I${MTK_PLAT}/drivers/uart/ \
developer8c327e82022-05-29 22:25:44 +080017 -I${MTK_PLAT}/include/ \
developer404e08b2020-09-18 09:32:31 +080018 -I${MTK_PLAT_SOC}/include/ \
19 -I${MTK_PLAT_SOC}/drivers/ \
developerceb197f2021-04-20 12:53:15 +080020 -I${MTK_PLAT_SOC}/drivers/apusys/ \
developera6304632020-09-08 14:36:07 +080021 -I${MTK_PLAT_SOC}/drivers/dcm \
developer47aad1c2021-02-09 11:28:00 +080022 -I${MTK_PLAT_SOC}/drivers/devapc \
developer4d819312021-07-05 20:42:09 +080023 -I${MTK_PLAT_SOC}/drivers/dfd \
developerbd481152020-11-02 10:45:34 +080024 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer86ada3c2020-07-03 09:19:06 +080025 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developera444a202020-06-15 16:41:03 +080026 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developer74cf3ec2020-08-12 16:31:06 +080027 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer4d055072020-08-25 22:31:14 +080028 -I${MTK_PLAT_SOC}/drivers/ptp3/ \
developerbd1401f2021-03-26 15:53:20 +080029 -I${MTK_PLAT_SOC}/drivers/spmc/
developer2189d3a2020-04-17 17:14:23 +080030
developerf9b56842020-06-09 13:38:35 +080031GICV3_SUPPORT_GIC600 := 1
developer2189d3a2020-04-17 17:14:23 +080032include drivers/arm/gic/v3/gicv3.mk
33include lib/xlat_tables_v2/xlat_tables.mk
34
35PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \
36 ${XLAT_TABLES_LIB_SRCS} \
37 plat/common/aarch64/crash_console_helpers.S \
38 plat/common/plat_psci_common.c
39
40BL31_SOURCES += common/desc_image_load.c \
developerf13d6492020-08-05 13:53:59 +080041 drivers/delay_timer/delay_timer.c \
42 drivers/delay_timer/generic_delay_timer.c \
developer2189d3a2020-04-17 17:14:23 +080043 drivers/ti/uart/aarch64/16550_console.S \
developer404e08b2020-09-18 09:32:31 +080044 drivers/gpio/gpio.c \
developer2189d3a2020-04-17 17:14:23 +080045 lib/bl_aux_params/bl_aux_params.c \
46 lib/cpus/aarch64/cortex_a55.S \
47 lib/cpus/aarch64/cortex_a76.S \
48 plat/common/plat_gicv3.c \
developer8273a602021-03-25 11:26:46 +080049 ${MTK_PLAT}/common/mtk_cirq.c \
developer2189d3a2020-04-17 17:14:23 +080050 ${MTK_PLAT}/common/mtk_plat_common.c \
developera84a44a2020-08-19 17:20:15 +080051 ${MTK_PLAT}/common/mtk_sip_svc.c \
developer2189d3a2020-04-17 17:14:23 +080052 ${MTK_PLAT}/common/params_setup.c \
developerfe14b9f2022-09-05 11:18:04 +080053 ${MTK_PLAT}/drivers/gic600/mt_gic_v3.c \
54 ${MTK_PLAT}/drivers/gpio/mtgpio_common.c \
55 ${MTK_PLAT}/drivers/lpm/mt_lp_rm.c \
56 ${MTK_PLAT}/drivers/pmic_wrap/pmic_wrap_init_v2.c \
57 ${MTK_PLAT}/drivers/rtc/rtc_common.c \
58 ${MTK_PLAT}/drivers/rtc/rtc_mt6359p.c \
59 ${MTK_PLAT}/drivers/timer/mt_timer.c \
60 ${MTK_PLAT}/drivers/uart/uart.c \
developer2189d3a2020-04-17 17:14:23 +080061 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
62 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
63 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
developer74cf3ec2020-08-12 16:31:06 +080064 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
developer2189d3a2020-04-17 17:14:23 +080065 ${MTK_PLAT_SOC}/plat_pm.c \
developerf9b56842020-06-09 13:38:35 +080066 ${MTK_PLAT_SOC}/plat_topology.c \
developera84a44a2020-08-19 17:20:15 +080067 ${MTK_PLAT_SOC}/plat_sip_calls.c \
developerceb197f2021-04-20 12:53:15 +080068 ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys.c \
developer282d3df2021-04-20 18:08:35 +080069 ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys_apc.c \
developera6304632020-09-08 14:36:07 +080070 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
71 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
developer47aad1c2021-02-09 11:28:00 +080072 ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \
developer4d819312021-07-05 20:42:09 +080073 ${MTK_PLAT_SOC}/drivers/dfd/plat_dfd.c \
developerbd481152020-11-02 10:45:34 +080074 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer86ada3c2020-07-03 09:19:06 +080075 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developera444a202020-06-15 16:41:03 +080076 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
77 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
developera6d504d2021-01-04 00:00:12 +080078 ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \
developera444a202020-06-15 16:41:03 +080079 ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
developer4d055072020-08-25 22:31:14 +080080 ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \
developerbd1401f2021-03-26 15:53:20 +080081 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c
developer2189d3a2020-04-17 17:14:23 +080082
developer5f735162021-01-04 00:02:34 +080083# Build SPM drivers
84include ${MTK_PLAT_SOC}/drivers/spm/build.mk
85
developer2189d3a2020-04-17 17:14:23 +080086# Configs for A76 and A55
87HW_ASSISTED_COHERENCY := 1
88USE_COHERENT_MEM := 0
89CTX_INCLUDE_AARCH32_REGS := 0
90
91# indicate the reset vector address can be programmed
92PROGRAMMABLE_RESET_ADDRESS := 1
93
94COLD_BOOT_SINGLE_CPU := 1
95
96MACH_MT8192 := 1
97$(eval $(call add_define,MACH_MT8192))
98
99include lib/coreboot/coreboot.mk
100