developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 1 | # |
developer | 8c327e8 | 2022-05-29 22:25:44 +0800 | [diff] [blame] | 2 | # Copyright (c) 2020-2022, MediaTek Inc. All rights reserved. |
developer | 2189d3a | 2020-04-17 17:14:23 +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 | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 12 | -I${MTK_PLAT}/drivers/gic600/ \ |
| 13 | -I${MTK_PLAT}/drivers/gpio/ \ |
| 14 | -I${MTK_PLAT}/drivers/lpm/ \ |
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 | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 17 | -I${MTK_PLAT}/drivers/rtc/ \ |
| 18 | -I${MTK_PLAT}/drivers/timer/ \ |
| 19 | -I${MTK_PLAT}/drivers/uart/ \ |
developer | 8c327e8 | 2022-05-29 22:25:44 +0800 | [diff] [blame] | 20 | -I${MTK_PLAT}/include/ \ |
developer | 404e08b | 2020-09-18 09:32:31 +0800 | [diff] [blame] | 21 | -I${MTK_PLAT_SOC}/include/ \ |
| 22 | -I${MTK_PLAT_SOC}/drivers/ \ |
developer | ceb197f | 2021-04-20 12:53:15 +0800 | [diff] [blame] | 23 | -I${MTK_PLAT_SOC}/drivers/apusys/ \ |
developer | a630463 | 2020-09-08 14:36:07 +0800 | [diff] [blame] | 24 | -I${MTK_PLAT_SOC}/drivers/dcm \ |
developer | 47aad1c | 2021-02-09 11:28:00 +0800 | [diff] [blame] | 25 | -I${MTK_PLAT_SOC}/drivers/devapc \ |
developer | 4d81931 | 2021-07-05 20:42:09 +0800 | [diff] [blame] | 26 | -I${MTK_PLAT_SOC}/drivers/dfd \ |
developer | bd48115 | 2020-11-02 10:45:34 +0800 | [diff] [blame] | 27 | -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \ |
developer | 86ada3c | 2020-07-03 09:19:06 +0800 | [diff] [blame] | 28 | -I${MTK_PLAT_SOC}/drivers/gpio/ \ |
developer | a444a20 | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 29 | -I${MTK_PLAT_SOC}/drivers/mcdi/ \ |
developer | 74cf3ec | 2020-08-12 16:31:06 +0800 | [diff] [blame] | 30 | -I${MTK_PLAT_SOC}/drivers/pmic/ \ |
developer | 4d05507 | 2020-08-25 22:31:14 +0800 | [diff] [blame] | 31 | -I${MTK_PLAT_SOC}/drivers/ptp3/ \ |
developer | bd1401f | 2021-03-26 15:53:20 +0800 | [diff] [blame] | 32 | -I${MTK_PLAT_SOC}/drivers/spmc/ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 33 | |
developer | f9b5684 | 2020-06-09 13:38:35 +0800 | [diff] [blame] | 34 | GICV3_SUPPORT_GIC600 := 1 |
developer | 2189d3a | 2020-04-17 17:14:23 +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 | BL31_SOURCES += common/desc_image_load.c \ |
developer | f13d649 | 2020-08-05 13:53:59 +0800 | [diff] [blame] | 44 | drivers/delay_timer/delay_timer.c \ |
| 45 | drivers/delay_timer/generic_delay_timer.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 46 | drivers/ti/uart/aarch64/16550_console.S \ |
developer | 404e08b | 2020-09-18 09:32:31 +0800 | [diff] [blame] | 47 | drivers/gpio/gpio.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 48 | 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 \ |
developer | a84a44a | 2020-08-19 17:20:15 +0800 | [diff] [blame] | 53 | ${MTK_PLAT}/common/mtk_sip_svc.c \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 54 | ${MTK_PLAT}/common/params_setup.c \ |
developer | bdeb0ba | 2022-07-08 14:48:56 +0800 | [diff] [blame] | 55 | ${MTK_PLAT}/drivers/cirq/mt_cirq.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 56 | ${MTK_PLAT}/drivers/gic600/mt_gic_v3.c \ |
| 57 | ${MTK_PLAT}/drivers/gpio/mtgpio_common.c \ |
| 58 | ${MTK_PLAT}/drivers/lpm/mt_lp_rm.c \ |
developer | 929097e | 2022-09-01 16:32:46 +0800 | [diff] [blame] | 59 | ${MTK_PLAT}/drivers/pmic/pmic.c \ |
developer | fe14b9f | 2022-09-05 11:18:04 +0800 | [diff] [blame] | 60 | ${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 \ |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 65 | ${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 \ |
developer | f9b5684 | 2020-06-09 13:38:35 +0800 | [diff] [blame] | 69 | ${MTK_PLAT_SOC}/plat_topology.c \ |
developer | a84a44a | 2020-08-19 17:20:15 +0800 | [diff] [blame] | 70 | ${MTK_PLAT_SOC}/plat_sip_calls.c \ |
developer | ceb197f | 2021-04-20 12:53:15 +0800 | [diff] [blame] | 71 | ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys.c \ |
developer | 282d3df | 2021-04-20 18:08:35 +0800 | [diff] [blame] | 72 | ${MTK_PLAT_SOC}/drivers/apusys/mtk_apusys_apc.c \ |
developer | a630463 | 2020-09-08 14:36:07 +0800 | [diff] [blame] | 73 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \ |
| 74 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \ |
developer | 47aad1c | 2021-02-09 11:28:00 +0800 | [diff] [blame] | 75 | ${MTK_PLAT_SOC}/drivers/devapc/devapc.c \ |
developer | 4d81931 | 2021-07-05 20:42:09 +0800 | [diff] [blame] | 76 | ${MTK_PLAT_SOC}/drivers/dfd/plat_dfd.c \ |
developer | bd48115 | 2020-11-02 10:45:34 +0800 | [diff] [blame] | 77 | ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \ |
developer | 86ada3c | 2020-07-03 09:19:06 +0800 | [diff] [blame] | 78 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | a444a20 | 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 \ |
developer | a6d504d | 2021-01-04 00:00:12 +0800 | [diff] [blame] | 81 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \ |
developer | a444a20 | 2020-06-15 16:41:03 +0800 | [diff] [blame] | 82 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \ |
developer | 4d05507 | 2020-08-25 22:31:14 +0800 | [diff] [blame] | 83 | ${MTK_PLAT_SOC}/drivers/ptp3/mtk_ptp3_main.c \ |
developer | bd1401f | 2021-03-26 15:53:20 +0800 | [diff] [blame] | 84 | ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 85 | |
developer | 5f73516 | 2021-01-04 00:02:34 +0800 | [diff] [blame] | 86 | # Build SPM drivers |
| 87 | include ${MTK_PLAT_SOC}/drivers/spm/build.mk |
| 88 | |
developer | 2189d3a | 2020-04-17 17:14:23 +0800 | [diff] [blame] | 89 | # Configs for A76 and A55 |
| 90 | HW_ASSISTED_COHERENCY := 1 |
| 91 | USE_COHERENT_MEM := 0 |
| 92 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 93 | |
| 94 | # indicate the reset vector address can be programmed |
| 95 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 96 | |
| 97 | COLD_BOOT_SINGLE_CPU := 1 |
| 98 | |
| 99 | MACH_MT8192 := 1 |
| 100 | $(eval $(call add_define,MACH_MT8192)) |
| 101 | |
| 102 | include lib/coreboot/coreboot.mk |
| 103 | |