blob: a19fc45d2de23a3c6e07edc28702159ff861eb97 [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/ \
developerafdd96a2022-09-29 10:41:26 +080011 -I${MTK_PLAT}/common/lpm/ \
developerbdeb0ba2022-07-08 14:48:56 +080012 -I${MTK_PLAT}/drivers/cirq/ \
developerfe14b9f2022-09-05 11:18:04 +080013 -I${MTK_PLAT}/drivers/gic600/ \
14 -I${MTK_PLAT}/drivers/gpio/ \
developer929097e2022-09-01 16:32:46 +080015 -I${MTK_PLAT}/drivers/pmic/ \
developer0e2a2842022-09-01 15:16:23 +080016 -I${MTK_PLAT}/drivers/pmic_wrap/ \
developerfe14b9f2022-09-05 11:18:04 +080017 -I${MTK_PLAT}/drivers/rtc/ \
18 -I${MTK_PLAT}/drivers/timer/ \
19 -I${MTK_PLAT}/drivers/uart/ \
developer8c327e82022-05-29 22:25:44 +080020 -I${MTK_PLAT}/include/ \
developer404e08b2020-09-18 09:32:31 +080021 -I${MTK_PLAT_SOC}/include/ \
22 -I${MTK_PLAT_SOC}/drivers/ \
developerceb197f2021-04-20 12:53:15 +080023 -I${MTK_PLAT_SOC}/drivers/apusys/ \
developera6304632020-09-08 14:36:07 +080024 -I${MTK_PLAT_SOC}/drivers/dcm \
developer47aad1c2021-02-09 11:28:00 +080025 -I${MTK_PLAT_SOC}/drivers/devapc \
developer4d819312021-07-05 20:42:09 +080026 -I${MTK_PLAT_SOC}/drivers/dfd \
developerbd481152020-11-02 10:45:34 +080027 -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
developer86ada3c2020-07-03 09:19:06 +080028 -I${MTK_PLAT_SOC}/drivers/gpio/ \
developera444a202020-06-15 16:41:03 +080029 -I${MTK_PLAT_SOC}/drivers/mcdi/ \
developer74cf3ec2020-08-12 16:31:06 +080030 -I${MTK_PLAT_SOC}/drivers/pmic/ \
developer4d055072020-08-25 22:31:14 +080031 -I${MTK_PLAT_SOC}/drivers/ptp3/ \
developerbd1401f2021-03-26 15:53:20 +080032 -I${MTK_PLAT_SOC}/drivers/spmc/
developer2189d3a2020-04-17 17:14:23 +080033
developerf9b56842020-06-09 13:38:35 +080034GICV3_SUPPORT_GIC600 := 1
developer2189d3a2020-04-17 17:14:23 +080035include drivers/arm/gic/v3/gicv3.mk
36include lib/xlat_tables_v2/xlat_tables.mk
37
38PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \
39 ${XLAT_TABLES_LIB_SRCS} \
40 plat/common/aarch64/crash_console_helpers.S \
41 plat/common/plat_psci_common.c
42
43BL31_SOURCES += common/desc_image_load.c \
developerf13d6492020-08-05 13:53:59 +080044 drivers/delay_timer/delay_timer.c \
45 drivers/delay_timer/generic_delay_timer.c \
developer2189d3a2020-04-17 17:14:23 +080046 drivers/ti/uart/aarch64/16550_console.S \
developer404e08b2020-09-18 09:32:31 +080047 drivers/gpio/gpio.c \
developer2189d3a2020-04-17 17:14:23 +080048 lib/bl_aux_params/bl_aux_params.c \
49 lib/cpus/aarch64/cortex_a55.S \
50 lib/cpus/aarch64/cortex_a76.S \
51 plat/common/plat_gicv3.c \
52 ${MTK_PLAT}/common/mtk_plat_common.c \
developera84a44a2020-08-19 17:20:15 +080053 ${MTK_PLAT}/common/mtk_sip_svc.c \
developer2189d3a2020-04-17 17:14:23 +080054 ${MTK_PLAT}/common/params_setup.c \
developerafdd96a2022-09-29 10:41:26 +080055 ${MTK_PLAT}/common/lpm/mt_lp_rm.c \
developerbdeb0ba2022-07-08 14:48:56 +080056 ${MTK_PLAT}/drivers/cirq/mt_cirq.c \
developerfe14b9f2022-09-05 11:18:04 +080057 ${MTK_PLAT}/drivers/gic600/mt_gic_v3.c \
58 ${MTK_PLAT}/drivers/gpio/mtgpio_common.c \
developer929097e2022-09-01 16:32:46 +080059 ${MTK_PLAT}/drivers/pmic/pmic.c \
developerfe14b9f2022-09-05 11:18:04 +080060 ${MTK_PLAT}/drivers/pmic_wrap/pmic_wrap_init_v2.c \
61 ${MTK_PLAT}/drivers/rtc/rtc_common.c \
62 ${MTK_PLAT}/drivers/rtc/rtc_mt6359p.c \
63 ${MTK_PLAT}/drivers/timer/mt_timer.c \
64 ${MTK_PLAT}/drivers/uart/uart.c \
developer2189d3a2020-04-17 17:14:23 +080065 ${MTK_PLAT_SOC}/aarch64/platform_common.c \
66 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
67 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
68 ${MTK_PLAT_SOC}/plat_pm.c \
developerf9b56842020-06-09 13:38:35 +080069 ${MTK_PLAT_SOC}/plat_topology.c \
developera84a44a2020-08-19 17:20:15 +080070 ${MTK_PLAT_SOC}/plat_sip_calls.c \
developerceb197f2021-04-20 12:53:15 +080071 ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys.c \
developer282d3df2021-04-20 18:08:35 +080072 ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys_apc.c \
developera6304632020-09-08 14:36:07 +080073 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
74 ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
developer47aad1c2021-02-09 11:28:00 +080075 ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \
developer4d819312021-07-05 20:42:09 +080076 ${MTK_PLAT_SOC}/drivers/dfd/plat_dfd.c \
developerbd481152020-11-02 10:45:34 +080077 ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
developer86ada3c2020-07-03 09:19:06 +080078 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
developera444a202020-06-15 16:41:03 +080079 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
80 ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
developera6d504d2021-01-04 00:00:12 +080081 ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \
developera444a202020-06-15 16:41:03 +080082 ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
developer4d055072020-08-25 22:31:14 +080083 ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \
developerbd1401f2021-03-26 15:53:20 +080084 ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c
developer2189d3a2020-04-17 17:14:23 +080085
developer5f735162021-01-04 00:02:34 +080086# Build SPM drivers
87include ${MTK_PLAT_SOC}/drivers/spm/build.mk
88
developer2189d3a2020-04-17 17:14:23 +080089# Configs for A76 and A55
90HW_ASSISTED_COHERENCY := 1
91USE_COHERENT_MEM := 0
92CTX_INCLUDE_AARCH32_REGS := 0
93
94# indicate the reset vector address can be programmed
95PROGRAMMABLE_RESET_ADDRESS := 1
96
97COLD_BOOT_SINGLE_CPU := 1
98
99MACH_MT8192 := 1
100$(eval $(call add_define,MACH_MT8192))
101
102include lib/coreboot/coreboot.mk
103