blob: c5a9ae0cfc5db7edb0939de14a2dbf1b28e193ce [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/ \
developer012c3642021-03-23 15:33:13 +080011 -I${MTK_PLAT}/common/drivers/uart/ \
developer7d46db62020-12-14 16:53:22 +080012 -I${MTK_PLAT}/common/lpm/ \
developer404e08b2020-09-18 09:32:31 +080013 -I${MTK_PLAT_SOC}/include/ \
14 -I${MTK_PLAT_SOC}/drivers/ \
developera6304632020-09-08 14:36:07 +080015 -I${MTK_PLAT_SOC}/drivers/dcm \
developer47aad1c2021-02-09 11:28:00 +080016 -I${MTK_PLAT_SOC}/drivers/devapc \
developerbd481152020-11-02 10:45:34 +080017 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer86ada3c2020-07-03 09:19:06 +080018 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developera444a202020-06-15 16:41:03 +080019 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developer74cf3ec2020-08-12 16:31:06 +080020 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer4d055072020-08-25 22:31:14 +080021 -I${MTK_PLAT_SOC}/drivers/ptp3/ \
developerbeab2d72020-10-14 20:14:37 +080022 -I${MTK_PLAT_SOC}/drivers/rtc/ \
developer31f56a72020-06-16 13:28:28 +080023 -I${MTK_PLAT_SOC}/drivers/spmc/ \
developer012c3642021-03-23 15:33:13 +080024 -I${MTK_PLAT_SOC}/drivers/timer/
developer2189d3a2020-04-17 17:14:23 +080025
developerf9b56842020-06-09 13:38:35 +080026GICV3_SUPPORT_GIC600 := 1
developer2189d3a2020-04-17 17:14:23 +080027include drivers/arm/gic/v3/gicv3.mk
28include lib/xlat_tables_v2/xlat_tables.mk
29
30PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \
31 ${XLAT_TABLES_LIB_SRCS} \
32 plat/common/aarch64/crash_console_helpers.S \
33 plat/common/plat_psci_common.c
34
35BL31_SOURCES += common/desc_image_load.c \
developerf13d6492020-08-05 13:53:59 +080036 drivers/delay_timer/delay_timer.c \
37 drivers/delay_timer/generic_delay_timer.c \
developer2189d3a2020-04-17 17:14:23 +080038 drivers/ti/uart/aarch64/16550_console.S \
developer404e08b2020-09-18 09:32:31 +080039 drivers/gpio/gpio.c \
developer2189d3a2020-04-17 17:14:23 +080040 lib/bl_aux_params/bl_aux_params.c \
41 lib/cpus/aarch64/cortex_a55.S \
42 lib/cpus/aarch64/cortex_a76.S \
43 plat/common/plat_gicv3.c \
developer74cf3ec2020-08-12 16:31:06 +080044 ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
developerbeab2d72020-10-14 20:14:37 +080045 ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
developer0df1c3c2020-08-01 16:23:12 +080046 ${MTK_PLAT}/common/drivers/uart/uart.c \
developer7d46db62020-12-14 16:53:22 +080047 ${MTK_PLAT}/common/lpm/mt_lp_rm.c \
developer2189d3a2020-04-17 17:14:23 +080048 ${MTK_PLAT}/common/mtk_plat_common.c \
developera84a44a2020-08-19 17:20:15 +080049 ${MTK_PLAT}/common/mtk_sip_svc.c \
developer2189d3a2020-04-17 17:14:23 +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 \
developer74cf3ec2020-08-12 16:31:06 +080054 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
developerbeab2d72020-10-14 20:14:37 +080055 ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \
developer2189d3a2020-04-17 17:14:23 +080056 ${MTK_PLAT_SOC}/plat_pm.c \
developerf9b56842020-06-09 13:38:35 +080057 ${MTK_PLAT_SOC}/plat_topology.c \
developer404e08b2020-09-18 09:32:31 +080058 ${MTK_PLAT_SOC}/plat_mt_gic.c \
developer28d70382019-12-19 15:58:20 +080059 ${MTK_PLAT_SOC}/plat_mt_cirq.c \
developera84a44a2020-08-19 17:20:15 +080060 ${MTK_PLAT_SOC}/plat_sip_calls.c \
developera6304632020-09-08 14:36:07 +080061 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
62 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
developer47aad1c2021-02-09 11:28:00 +080063 ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \
developerbd481152020-11-02 10:45:34 +080064 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer86ada3c2020-07-03 09:19:06 +080065 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developera444a202020-06-15 16:41:03 +080066 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
67 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
developera6d504d2021-01-04 00:00:12 +080068 ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \
developera444a202020-06-15 16:41:03 +080069 ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
developer4d055072020-08-25 22:31:14 +080070 ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \
developer31f56a72020-06-16 13:28:28 +080071 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \
developer86ada3c2020-07-03 09:19:06 +080072 ${MTK_PLAT_SOC}/drivers/timer/mt_timer.c
developer2189d3a2020-04-17 17:14:23 +080073
developer5f735162021-01-04 00:02:34 +080074# Build SPM drivers
75include ${MTK_PLAT_SOC}/drivers/spm/build.mk
76
developer2189d3a2020-04-17 17:14:23 +080077# Configs for A76 and A55
78HW_ASSISTED_COHERENCY := 1
79USE_COHERENT_MEM := 0
80CTX_INCLUDE_AARCH32_REGS := 0
81
82# indicate the reset vector address can be programmed
83PROGRAMMABLE_RESET_ADDRESS := 1
84
85COLD_BOOT_SINGLE_CPU := 1
86
87MACH_MT8192 := 1
88$(eval $(call add_define,MACH_MT8192))
89
90include lib/coreboot/coreboot.mk
91