Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 1 | # |
jason-ch chen | fa82b9b | 2021-11-16 09:48:20 +0800 | [diff] [blame] | 2 | # Copyright (c) 2021-2022, MediaTek Inc. All rights reserved. |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +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/ \ |
Christine Zhu | ccd2600 | 2021-10-11 21:29:58 +0800 | [diff] [blame] | 11 | -I${MTK_PLAT}/common/drivers/gic600/ \ |
Guodong Liu | 532016e | 2021-10-15 16:52:18 +0800 | [diff] [blame] | 12 | -I${MTK_PLAT}/common/drivers/gpio/ \ |
jason-ch chen | fa82b9b | 2021-11-16 09:48:20 +0800 | [diff] [blame] | 13 | -I${MTK_PLAT}/common/drivers/uart/ \ |
Rex-BC Chen | d24c05d | 2021-10-06 18:55:53 +0800 | [diff] [blame] | 14 | -I${MTK_PLAT}/common/drivers/timer/ \ |
jason-ch chen | fa82b9b | 2021-11-16 09:48:20 +0800 | [diff] [blame] | 15 | -I${MTK_PLAT}/common/lpm/ \ |
| 16 | -I${MTK_PLAT_SOC}/drivers/spm/ \ |
Edward-JW Yang | 63582ec | 2021-11-01 20:20:18 +0800 | [diff] [blame] | 17 | -I${MTK_PLAT_SOC}/drivers/dcm/ \ |
Penny Jan | fb70fb4 | 2021-10-03 10:11:04 +0800 | [diff] [blame] | 18 | -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \ |
Guodong Liu | 532016e | 2021-10-15 16:52:18 +0800 | [diff] [blame] | 19 | -I${MTK_PLAT_SOC}/drivers/gpio/ \ |
developer | ba7b7d2 | 2021-11-14 10:14:45 +0800 | [diff] [blame] | 20 | -I${MTK_PLAT_SOC}/drivers/mcdi/ \ |
James Lo | 4ac7a41 | 2021-10-06 18:12:30 +0800 | [diff] [blame] | 21 | -I${MTK_PLAT_SOC}/drivers/pmic/ \ |
Yuchen Huang | ad04044 | 2021-11-12 16:56:33 +0800 | [diff] [blame] | 22 | -I${MTK_PLAT_SOC}/drivers/rtc/ \ |
developer | c3dabd8 | 2021-11-08 11:30:40 +0800 | [diff] [blame] | 23 | -I${MTK_PLAT_SOC}/drivers/spmc/ \ |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 24 | -I${MTK_PLAT_SOC}/include/ |
| 25 | |
Christine Zhu | ccd2600 | 2021-10-11 21:29:58 +0800 | [diff] [blame] | 26 | GICV3_SUPPORT_GIC600 := 1 |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 27 | include drivers/arm/gic/v3/gicv3.mk |
| 28 | include lib/xlat_tables_v2/xlat_tables.mk |
| 29 | |
| 30 | PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \ |
| 31 | ${XLAT_TABLES_LIB_SRCS} \ |
| 32 | plat/common/aarch64/crash_console_helpers.S \ |
| 33 | plat/common/plat_psci_common.c |
| 34 | |
| 35 | |
| 36 | BL31_SOURCES += common/desc_image_load.c \ |
Rex-BC Chen | 0bee8f9 | 2021-10-06 19:00:13 +0800 | [diff] [blame] | 37 | drivers/delay_timer/delay_timer.c \ |
Guodong Liu | 532016e | 2021-10-15 16:52:18 +0800 | [diff] [blame] | 38 | drivers/gpio/gpio.c \ |
Rex-BC Chen | 0bee8f9 | 2021-10-06 19:00:13 +0800 | [diff] [blame] | 39 | drivers/delay_timer/generic_delay_timer.c \ |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 40 | drivers/ti/uart/aarch64/16550_console.S \ |
| 41 | lib/bl_aux_params/bl_aux_params.c \ |
| 42 | lib/cpus/aarch64/cortex_a55.S \ |
| 43 | lib/cpus/aarch64/cortex_a76.S \ |
| 44 | plat/common/plat_gicv3.c \ |
Christine Zhu | ccd2600 | 2021-10-11 21:29:58 +0800 | [diff] [blame] | 45 | ${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c \ |
Guodong Liu | 532016e | 2021-10-15 16:52:18 +0800 | [diff] [blame] | 46 | ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c \ |
James Lo | 4ac7a41 | 2021-10-06 18:12:30 +0800 | [diff] [blame] | 47 | ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init.c \ |
Yuchen Huang | ad04044 | 2021-11-12 16:56:33 +0800 | [diff] [blame] | 48 | ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \ |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 49 | ${MTK_PLAT}/common/mtk_plat_common.c \ |
Rex-BC Chen | abd9ecf | 2021-10-06 19:25:50 +0800 | [diff] [blame] | 50 | ${MTK_PLAT}/common/mtk_sip_svc.c \ |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 51 | ${MTK_PLAT}/common/params_setup.c \ |
Rex-BC Chen | d24c05d | 2021-10-06 18:55:53 +0800 | [diff] [blame] | 52 | ${MTK_PLAT}/common/drivers/timer/mt_timer.c \ |
jason-ch chen | fa82b9b | 2021-11-16 09:48:20 +0800 | [diff] [blame] | 53 | ${MTK_PLAT}/common/drivers/uart/uart.c \ |
Zhengnan Chen | fd835f9 | 2021-10-12 17:05:49 +0800 | [diff] [blame] | 54 | ${MTK_PLAT}/common/mtk_cirq.c \ |
jason-ch chen | fa82b9b | 2021-11-16 09:48:20 +0800 | [diff] [blame] | 55 | ${MTK_PLAT}/common/lpm/mt_lp_rm.c \ |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 56 | ${MTK_PLAT_SOC}/aarch64/platform_common.c \ |
| 57 | ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \ |
| 58 | ${MTK_PLAT_SOC}/bl31_plat_setup.c \ |
Edward-JW Yang | 63582ec | 2021-11-01 20:20:18 +0800 | [diff] [blame] | 59 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \ |
| 60 | ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \ |
Penny Jan | fb70fb4 | 2021-10-03 10:11:04 +0800 | [diff] [blame] | 61 | ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \ |
Guodong Liu | 532016e | 2021-10-15 16:52:18 +0800 | [diff] [blame] | 62 | ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ |
developer | ba7b7d2 | 2021-11-14 10:14:45 +0800 | [diff] [blame] | 63 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \ |
| 64 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \ |
| 65 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \ |
jason-ch chen | fa82b9b | 2021-11-16 09:48:20 +0800 | [diff] [blame] | 66 | ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \ |
James Lo | 4ac7a41 | 2021-10-06 18:12:30 +0800 | [diff] [blame] | 67 | ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \ |
Yuchen Huang | ad04044 | 2021-11-12 16:56:33 +0800 | [diff] [blame] | 68 | ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \ |
developer | c3dabd8 | 2021-11-08 11:30:40 +0800 | [diff] [blame] | 69 | ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \ |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 70 | ${MTK_PLAT_SOC}/plat_pm.c \ |
Rex-BC Chen | abd9ecf | 2021-10-06 19:25:50 +0800 | [diff] [blame] | 71 | ${MTK_PLAT_SOC}/plat_sip_calls.c \ |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 72 | ${MTK_PLAT_SOC}/plat_topology.c |
| 73 | |
jason-ch chen | fa82b9b | 2021-11-16 09:48:20 +0800 | [diff] [blame] | 74 | # Build SPM drivers |
| 75 | include ${MTK_PLAT_SOC}/drivers/spm/build.mk |
| 76 | |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 77 | # Configs for A76 and A55 |
| 78 | HW_ASSISTED_COHERENCY := 1 |
| 79 | USE_COHERENT_MEM := 0 |
| 80 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 81 | ERRATA_A55_1530923 := 1 |
| 82 | ERRATA_A55_1221012 := 1 |
| 83 | |
Rex-BC Chen | 4a1570a | 2021-11-25 18:55:04 +0800 | [diff] [blame] | 84 | ERRATA_A76_1257314 := 1 |
| 85 | ERRATA_A76_1262606 := 1 |
| 86 | ERRATA_A76_1262888 := 1 |
| 87 | ERRATA_A76_1275112 := 1 |
| 88 | ERRATA_A76_1286807 := 1 |
| 89 | ERRATA_A76_1791580 := 1 |
| 90 | ERRATA_A76_1165522 := 1 |
| 91 | ERRATA_A76_1868343 := 1 |
| 92 | ERRATA_A76_1946160 := 1 |
| 93 | |
Rex-BC Chen | 749b211 | 2021-09-28 11:24:09 +0800 | [diff] [blame] | 94 | # indicate the reset vector address can be programmed |
| 95 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 96 | |
| 97 | COLD_BOOT_SINGLE_CPU := 1 |
| 98 | |
| 99 | MACH_MT8186 := 1 |
| 100 | $(eval $(call add_define,MACH_MT8186)) |
| 101 | |
| 102 | include lib/coreboot/coreboot.mk |