developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 1 | # |
developer | 92e7aec | 2023-01-06 14:53:37 +0800 | [diff] [blame] | 2 | # Copyright (c) 2021-2023, MediaTek Inc. All rights reserved. |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | MTK_PLAT := plat/mediatek |
| 8 | MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT} |
| 9 | |
| 10 | PLAT_INCLUDES := -I${MTK_PLAT}/common/ \ |
developer | bdeb0ba | 2022-07-08 14:48:56 +0800 | [diff] [blame] | 11 | -I${MTK_PLAT}/drivers/cirq/ \ |
developer | ec6eef7 | 2022-07-11 18:48:43 +0800 | [diff] [blame] | 12 | -I${MTK_PLAT}/drivers/dp/ \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 13 | -I${MTK_PLAT}/drivers/gic600/ \ |
| 14 | -I${MTK_PLAT}/drivers/gpio/ \ |
developer | 929097e | 2022-09-01 16:32:46 +0800 | [diff] [blame] | 15 | -I${MTK_PLAT}/drivers/pmic/ \ |
developer | 0e2a284 | 2022-09-01 15:16:23 +0800 | [diff] [blame] | 16 | -I${MTK_PLAT}/drivers/pmic_wrap/ \ |
developer | 8d3be08 | 2022-11-03 19:49:23 +0800 | [diff] [blame] | 17 | -I${MTK_PLAT}/drivers/ptp3/ \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 18 | -I${MTK_PLAT}/drivers/rtc/ \ |
| 19 | -I${MTK_PLAT}/drivers/timer/ \ |
| 20 | -I${MTK_PLAT}/drivers/uart/ \ |
developer | 8c327e8 | 2022-05-29 22:25:44 +0800 | [diff] [blame] | 21 | -I${MTK_PLAT}/include/ \ |
developer | 92e7aec | 2023-01-06 14:53:37 +0800 | [diff] [blame] | 22 | -I${MTK_PLAT}/include/lpm/ \ |
developer | 4791789 | 2021-11-01 16:43:47 +0800 | [diff] [blame] | 23 | -I${MTK_PLAT_SOC}/drivers/apusys/ \ |
developer | 90b1341 | 2021-07-02 15:54:57 +0800 | [diff] [blame] | 24 | -I${MTK_PLAT_SOC}/drivers/dcm \ |
Rex-BC Chen | 1790304 | 2021-08-10 11:10:58 +0800 | [diff] [blame] | 25 | -I${MTK_PLAT_SOC}/drivers/dfd \ |
developer | e2be2dd | 2021-08-19 15:34:43 +0800 | [diff] [blame] | 26 | -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 27 | -I${MTK_PLAT_SOC}/drivers/gpio/ \ |
developer | 037c99f | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 28 | -I${MTK_PLAT_SOC}/drivers/mcdi/ \ |
developer | ddb7f40 | 2021-04-08 16:37:15 +0800 | [diff] [blame] | 29 | -I${MTK_PLAT_SOC}/drivers/pmic/ \ |
developer | 2a56b2c | 2020-06-16 13:28:28 +0800 | [diff] [blame] | 30 | -I${MTK_PLAT_SOC}/drivers/spmc/ \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 31 | -I${MTK_PLAT_SOC}/drivers/ptp3/ \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 32 | -I${MTK_PLAT_SOC}/include/ |
| 33 | |
christine.zhu | a22c10b | 2021-03-24 21:44:52 +0800 | [diff] [blame] | 34 | GICV3_SUPPORT_GIC600 := 1 |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 35 | include drivers/arm/gic/v3/gicv3.mk |
| 36 | include lib/xlat_tables_v2/xlat_tables.mk |
| 37 | |
| 38 | PLAT_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 | |
| 43 | |
| 44 | BL31_SOURCES += common/desc_image_load.c \ |
developer | 98b9718 | 2021-03-26 18:33:43 +0800 | [diff] [blame] | 45 | drivers/delay_timer/delay_timer.c \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 46 | drivers/gpio/gpio.c \ |
developer | 98b9718 | 2021-03-26 18:33:43 +0800 | [diff] [blame] | 47 | drivers/delay_timer/generic_delay_timer.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 48 | drivers/ti/uart/aarch64/16550_console.S \ |
| 49 | lib/bl_aux_params/bl_aux_params.c \ |
| 50 | lib/cpus/aarch64/cortex_a55.S \ |
| 51 | lib/cpus/aarch64/cortex_a78.S \ |
| 52 | plat/common/plat_gicv3.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 53 | ${MTK_PLAT}/common/mtk_plat_common.c \ |
developer | c0c0782 | 2021-03-29 16:50:30 +0800 | [diff] [blame] | 54 | ${MTK_PLAT}/common/mtk_sip_svc.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 55 | ${MTK_PLAT}/common/params_setup.c \ |
developer | afdd96a | 2022-09-29 10:41:26 +0800 | [diff] [blame] | 56 | ${MTK_PLAT}/common/lpm/mt_lp_rm.c \ |
developer | bdeb0ba | 2022-07-08 14:48:56 +0800 | [diff] [blame] | 57 | ${MTK_PLAT}/drivers/cirq/mt_cirq.c \ |
developer | ec6eef7 | 2022-07-11 18:48:43 +0800 | [diff] [blame] | 58 | ${MTK_PLAT}/drivers/dp/mt_dp.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 59 | ${MTK_PLAT}/drivers/gic600/mt_gic_v3.c \ |
| 60 | ${MTK_PLAT}/drivers/gpio/mtgpio_common.c \ |
developer | 929097e | 2022-09-01 16:32:46 +0800 | [diff] [blame] | 61 | ${MTK_PLAT}/drivers/pmic/pmic.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 62 | ${MTK_PLAT}/drivers/pmic_wrap/pmic_wrap_init_v2.c \ |
developer | 8d3be08 | 2022-11-03 19:49:23 +0800 | [diff] [blame] | 63 | ${MTK_PLAT}/drivers/ptp3/ptp3_common.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 64 | ${MTK_PLAT}/drivers/rtc/rtc_common.c \ |
| 65 | ${MTK_PLAT}/drivers/rtc/rtc_mt6359p.c \ |
| 66 | ${MTK_PLAT}/drivers/timer/mt_timer.c \ |
| 67 | ${MTK_PLAT}/drivers/uart/uart.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 68 | ${MTK_PLAT_SOC}/aarch64/platform_common.c \ |
| 69 | ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \ |
| 70 | ${MTK_PLAT_SOC}/bl31_plat_setup.c \ |
developer | 8015906 | 2021-11-08 16:37:39 +0800 | [diff] [blame] | 71 | ${MTK_PLAT_SOC}/drivers/apusys/apupll.c \ |
| 72 | ${MTK_PLAT_SOC}/drivers/apusys/apupwr_clkctl.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 73 | ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys.c \ |
developer | 90b1341 | 2021-07-02 15:54:57 +0800 | [diff] [blame] | 74 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \ |
| 75 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \ |
Rex-BC Chen | 1790304 | 2021-08-10 11:10:58 +0800 | [diff] [blame] | 76 | ${MTK_PLAT_SOC}/drivers/dfd/plat_dfd.c \ |
developer | e2be2dd | 2021-08-19 15:34:43 +0800 | [diff] [blame] | 77 | ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 78 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | 037c99f | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 79 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \ |
| 80 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \ |
| 81 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 82 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \ |
developer | 912c7d2 | 2021-03-31 14:53:43 +0800 | [diff] [blame] | 83 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | 2a56b2c | 2020-06-16 13:28:28 +0800 | [diff] [blame] | 84 | ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 85 | ${MTK_PLAT_SOC}/plat_pm.c \ |
developer | c0c0782 | 2021-03-29 16:50:30 +0800 | [diff] [blame] | 86 | ${MTK_PLAT_SOC}/plat_sip_calls.c \ |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 87 | ${MTK_PLAT_SOC}/plat_topology.c |
| 88 | |
Edward-JW Yang | 1c7fd0b | 2021-06-28 11:29:51 +0800 | [diff] [blame] | 89 | # Build SPM drivers |
| 90 | include ${MTK_PLAT_SOC}/drivers/spm/build.mk |
| 91 | |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 92 | # Configs for A78 and A55 |
| 93 | HW_ASSISTED_COHERENCY := 1 |
| 94 | USE_COHERENT_MEM := 0 |
| 95 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 96 | ERRATA_A55_1530923 := 1 |
| 97 | |
Rex-BC Chen | 733885a | 2022-01-05 14:51:57 +0800 | [diff] [blame] | 98 | ERRATA_A78_1688305 := 1 |
| 99 | ERRATA_A78_1941498 := 1 |
| 100 | ERRATA_A78_1951500 := 1 |
| 101 | ERRATA_A78_1821534 := 1 |
| 102 | ERRATA_A78_2132060 := 1 |
| 103 | ERRATA_A78_2242635 := 1 |
| 104 | |
developer | 8670d25 | 2021-03-19 22:13:11 +0800 | [diff] [blame] | 105 | # indicate the reset vector address can be programmed |
| 106 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 107 | |
| 108 | COLD_BOOT_SINGLE_CPU := 1 |
| 109 | |
| 110 | MACH_MT8195 := 1 |
| 111 | $(eval $(call add_define,MACH_MT8195)) |
| 112 | |
| 113 | include lib/coreboot/coreboot.mk |