blob: 72c71fea8584dc30328d65033216d60a03b0bdd8 [file] [log] [blame]
developer8670d252021-03-19 22:13:11 +08001#
2# Copyright (c) 2021, 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/ \
developer4c1354b2021-04-22 14:56:58 +080014 -I${MTK_PLAT}/common/drivers/timer/ \
Edward-JW Yang9c783682021-06-28 11:08:10 +080015 -I${MTK_PLAT}/common/drivers/uart/ \
16 -I${MTK_PLAT}/common/lpm/ \
developer47917892021-11-01 16:43:47 +080017 -I${MTK_PLAT_SOC}/drivers/apusys/ \
developer90b13412021-07-02 15:54:57 +080018 -I${MTK_PLAT_SOC}/drivers/dcm \
Rex-BC Chen17903042021-08-10 11:10:58 +080019 -I${MTK_PLAT_SOC}/drivers/dfd \
developer90b13412021-07-02 15:54:57 +080020 -I${MTK_PLAT_SOC}/drivers/dp/ \
developere2be2dd2021-08-19 15:34:43 +080021 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer912c7d22021-03-31 14:53:43 +080022 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developer037c99f2020-06-15 16:41:03 +080023 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developerddb7f402021-04-08 16:37:15 +080024 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer2a56b2c2020-06-16 13:28:28 +080025 -I${MTK_PLAT_SOC}/drivers/spmc/ \
developerb23acff2021-06-20 16:48:08 +080026 -I${MTK_PLAT_SOC}/drivers/ptp3/ \
developer8670d252021-03-19 22:13:11 +080027 -I${MTK_PLAT_SOC}/include/
28
christine.zhua22c10b2021-03-24 21:44:52 +080029GICV3_SUPPORT_GIC600 := 1
developer8670d252021-03-19 22:13:11 +080030include drivers/arm/gic/v3/gicv3.mk
31include lib/xlat_tables_v2/xlat_tables.mk
32
33PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \
34 ${XLAT_TABLES_LIB_SRCS} \
35 plat/common/aarch64/crash_console_helpers.S \
36 plat/common/plat_psci_common.c
37
38
39BL31_SOURCES += common/desc_image_load.c \
developer98b97182021-03-26 18:33:43 +080040 drivers/delay_timer/delay_timer.c \
developer912c7d22021-03-31 14:53:43 +080041 drivers/gpio/gpio.c \
developer98b97182021-03-26 18:33:43 +080042 drivers/delay_timer/generic_delay_timer.c \
developer8670d252021-03-19 22:13:11 +080043 drivers/ti/uart/aarch64/16550_console.S \
44 lib/bl_aux_params/bl_aux_params.c \
45 lib/cpus/aarch64/cortex_a55.S \
46 lib/cpus/aarch64/cortex_a78.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 \
developerddb7f402021-04-08 16:37:15 +080050 ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
developer0e726372021-04-08 19:07:49 +080051 ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
52 ${MTK_PLAT}/common/drivers/rtc/rtc_mt6359p.c \
developer4c1354b2021-04-22 14:56:58 +080053 ${MTK_PLAT}/common/drivers/timer/mt_timer.c \
Edward-JW Yang9c783682021-06-28 11:08:10 +080054 ${MTK_PLAT}/common/drivers/uart/uart.c \
55 ${MTK_PLAT}/common/lpm/mt_lp_rm.c \
developer8273a602021-03-25 11:26:46 +080056 ${MTK_PLAT}/common/mtk_cirq.c \
developer8670d252021-03-19 22:13:11 +080057 ${MTK_PLAT}/common/mtk_plat_common.c \
developerc0c07822021-03-29 16:50:30 +080058 ${MTK_PLAT}/common/mtk_sip_svc.c \
developer8670d252021-03-19 22:13:11 +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 \
developer80159062021-11-08 16:37:39 +080063 ${MTK_PLAT_SOC}/drivers/apusys/apupll.c \
64 ${MTK_PLAT_SOC}/drivers/apusys/apupwr_clkctl.c \
65 ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys.c \
developer90b13412021-07-02 15:54:57 +080066 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
67 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
Rex-BC Chen17903042021-08-10 11:10:58 +080068 ${MTK_PLAT_SOC}/drivers/dfd/plat_dfd.c \
Rex-BC Chenb48c6c42021-04-12 11:10:31 +080069 ${MTK_PLAT_SOC}/drivers/dp/mt_dp.c \
developere2be2dd2021-08-19 15:34:43 +080070 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer912c7d22021-03-31 14:53:43 +080071 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developer037c99f2020-06-15 16:41:03 +080072 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
73 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
74 ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
Edward-JW Yang9c783682021-06-28 11:08:10 +080075 ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \
developer912c7d22021-03-31 14:53:43 +080076 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developerddb7f402021-04-08 16:37:15 +080077 ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
developerb23acff2021-06-20 16:48:08 +080078 ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \
developer2a56b2c2020-06-16 13:28:28 +080079 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \
developer8670d252021-03-19 22:13:11 +080080 ${MTK_PLAT_SOC}/plat_pm.c \
developerc0c07822021-03-29 16:50:30 +080081 ${MTK_PLAT_SOC}/plat_sip_calls.c \
developer8670d252021-03-19 22:13:11 +080082 ${MTK_PLAT_SOC}/plat_topology.c
83
Edward-JW Yang1c7fd0b2021-06-28 11:29:51 +080084# Build SPM drivers
85include ${MTK_PLAT_SOC}/drivers/spm/build.mk
86
developer8670d252021-03-19 22:13:11 +080087# Configs for A78 and A55
88HW_ASSISTED_COHERENCY := 1
89USE_COHERENT_MEM := 0
90CTX_INCLUDE_AARCH32_REGS := 0
91ERRATA_A55_1530923 := 1
92
93# indicate the reset vector address can be programmed
94PROGRAMMABLE_RESET_ADDRESS := 1
95
96COLD_BOOT_SINGLE_CPU := 1
97
98MACH_MT8195 := 1
99$(eval $(call add_define,MACH_MT8195))
100
101include lib/coreboot/coreboot.mk