platform.mk 3.89 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
#
# Copyright (c) 2021, MediaTek Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#

MTK_PLAT     := plat/mediatek
MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT}

PLAT_INCLUDES := -I${MTK_PLAT}/common/                            \
11
                 -I${MTK_PLAT}/common/drivers/gic600/             \
mtk20895's avatar
mtk20895 committed
12
                 -I${MTK_PLAT}/common/drivers/gpio/               \
13
                 -I${MTK_PLAT}/common/drivers/rtc/                \
14
                 -I${MTK_PLAT}/common/drivers/timer/              \
15
                 -I${MTK_PLAT_SOC}/drivers/dp/                  \
mtk20895's avatar
mtk20895 committed
16
                 -I${MTK_PLAT_SOC}/drivers/gpio/                  \
17
                 -I${MTK_PLAT_SOC}/drivers/mcdi/                  \
18
                 -I${MTK_PLAT_SOC}/drivers/pmic/                  \
James Liao's avatar
James Liao committed
19
                 -I${MTK_PLAT_SOC}/drivers/spmc/                  \
20
21
                 -I${MTK_PLAT_SOC}/include/

22
GICV3_SUPPORT_GIC600        :=      1
23
24
25
26
27
28
29
30
31
32
include drivers/arm/gic/v3/gicv3.mk
include lib/xlat_tables_v2/xlat_tables.mk

PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES}                              \
                          ${XLAT_TABLES_LIB_SRCS}                       \
                          plat/common/aarch64/crash_console_helpers.S   \
                          plat/common/plat_psci_common.c


BL31_SOURCES += common/desc_image_load.c                              \
33
                drivers/delay_timer/delay_timer.c                     \
mtk20895's avatar
mtk20895 committed
34
                drivers/gpio/gpio.c                                   \
35
                drivers/delay_timer/generic_delay_timer.c             \
36
37
38
39
40
                drivers/ti/uart/aarch64/16550_console.S               \
                lib/bl_aux_params/bl_aux_params.c                     \
                lib/cpus/aarch64/cortex_a55.S                         \
                lib/cpus/aarch64/cortex_a78.S                         \
                plat/common/plat_gicv3.c                              \
41
                ${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c         \
mtk20895's avatar
mtk20895 committed
42
                ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c       \
43
                ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
44
45
                ${MTK_PLAT}/common/drivers/rtc/rtc_common.c           \
                ${MTK_PLAT}/common/drivers/rtc/rtc_mt6359p.c          \
46
                ${MTK_PLAT}/common/drivers/timer/mt_timer.c           \
47
                ${MTK_PLAT}/common/mtk_cirq.c                         \
48
                ${MTK_PLAT}/common/mtk_plat_common.c                  \
Yidi Lin's avatar
Yidi Lin committed
49
                ${MTK_PLAT}/common/mtk_sip_svc.c                      \
50
51
52
53
                ${MTK_PLAT}/common/params_setup.c                     \
                ${MTK_PLAT_SOC}/aarch64/platform_common.c             \
                ${MTK_PLAT_SOC}/aarch64/plat_helpers.S                \
                ${MTK_PLAT_SOC}/bl31_plat_setup.c                     \
54
                ${MTK_PLAT_SOC}/drivers/dp/mt_dp.c                    \
mtk20895's avatar
mtk20895 committed
55
                ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c                 \
56
57
58
                ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c              \
                ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c          \
                ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c                \
mtk20895's avatar
mtk20895 committed
59
                ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c                 \
60
                ${MTK_PLAT_SOC}/drivers/pmic/pmic.c                   \
James Liao's avatar
James Liao committed
61
                ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c                 \
62
                ${MTK_PLAT_SOC}/plat_pm.c                             \
Yidi Lin's avatar
Yidi Lin committed
63
                ${MTK_PLAT_SOC}/plat_sip_calls.c                      \
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
                ${MTK_PLAT_SOC}/plat_topology.c

# Configs for A78 and A55
HW_ASSISTED_COHERENCY := 1
USE_COHERENT_MEM := 0
CTX_INCLUDE_AARCH32_REGS := 0
ERRATA_A55_1530923 := 1

# indicate the reset vector address can be programmed
PROGRAMMABLE_RESET_ADDRESS := 1

COLD_BOOT_SINGLE_CPU := 1

MACH_MT8195 := 1
$(eval $(call add_define,MACH_MT8195))

include lib/coreboot/coreboot.mk