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