platform.mk 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #
  2. # Copyright (c) 2021-2024, MediaTek Inc. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. MTK_PLAT := plat/mediatek
  7. MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT}
  8. # True Random Number Generator firmware Interface
  9. TRNG_SUPPORT := 1
  10. PLAT_INCLUDES := -I${MTK_PLAT}/common/ \
  11. -I${MTK_PLAT}/drivers/cirq/ \
  12. -I${MTK_PLAT}/drivers/gic600/ \
  13. -I${MTK_PLAT}/drivers/gpio/ \
  14. -I${MTK_PLAT}/drivers/msdc/ \
  15. -I${MTK_PLAT}/drivers/msdc/${PLAT} \
  16. -I${MTK_PLAT}/drivers/pmic_wrap/ \
  17. -I${MTK_PLAT}/drivers/timer/ \
  18. -I${MTK_PLAT}/drivers/uart/ \
  19. -I${MTK_PLAT}/include/ \
  20. -I${MTK_PLAT}/include/lpm \
  21. -I${MTK_PLAT_SOC}/drivers/spm/ \
  22. -I${MTK_PLAT_SOC}/drivers/dcm/ \
  23. -I${MTK_PLAT_SOC}/drivers/dfd/ \
  24. -I${MTK_PLAT_SOC}/drivers/emi_mpu/ \
  25. -I${MTK_PLAT_SOC}/drivers/gpio/ \
  26. -I${MTK_PLAT_SOC}/drivers/mcdi/ \
  27. -I${MTK_PLAT_SOC}/drivers/pmic/ \
  28. -I${MTK_PLAT_SOC}/drivers/rtc/ \
  29. -I${MTK_PLAT_SOC}/drivers/spmc/ \
  30. -I${MTK_PLAT_SOC}/include/
  31. GICV3_SUPPORT_GIC600 := 1
  32. include drivers/arm/gic/v3/gicv3.mk
  33. include lib/xlat_tables_v2/xlat_tables.mk
  34. PLAT_BL_COMMON_SOURCES := ${GICV3_SOURCES} \
  35. ${XLAT_TABLES_LIB_SRCS} \
  36. plat/common/aarch64/crash_console_helpers.S \
  37. plat/common/plat_psci_common.c
  38. BL31_SOURCES += common/desc_image_load.c \
  39. drivers/delay_timer/delay_timer.c \
  40. drivers/gpio/gpio.c \
  41. drivers/delay_timer/generic_delay_timer.c \
  42. drivers/ti/uart/aarch64/16550_console.S \
  43. lib/bl_aux_params/bl_aux_params.c \
  44. lib/cpus/aarch64/cortex_a55.S \
  45. lib/cpus/aarch64/cortex_a76.S \
  46. plat/common/plat_gicv3.c \
  47. ${MTK_PLAT}/common/mtk_plat_common.c \
  48. ${MTK_PLAT}/common/mtk_sip_svc.c \
  49. ${MTK_PLAT}/common/params_setup.c \
  50. ${MTK_PLAT}/common/lpm/mt_lp_rm.c \
  51. ${MTK_PLAT}/drivers/cirq/mt_cirq.c \
  52. ${MTK_PLAT}/drivers/gic600/mt_gic_v3.c \
  53. ${MTK_PLAT}/drivers/gpio/mtgpio_common.c \
  54. ${MTK_PLAT}/drivers/msdc/mt_msdc.c \
  55. ${MTK_PLAT}/drivers/pmic_wrap/pmic_wrap_init.c \
  56. ${MTK_PLAT}/drivers/rtc/rtc_common.c \
  57. ${MTK_PLAT}/drivers/timer/mt_timer.c \
  58. ${MTK_PLAT}/drivers/uart/uart.c \
  59. ${MTK_PLAT_SOC}/aarch64/platform_common.c \
  60. ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
  61. ${MTK_PLAT_SOC}/bl31_plat_setup.c \
  62. ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
  63. ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
  64. ${MTK_PLAT_SOC}/drivers/dfd/plat_dfd.c \
  65. ${MTK_PLAT_SOC}/drivers/emi_mpu/emi_mpu.c \
  66. ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
  67. ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm.c \
  68. ${MTK_PLAT_SOC}/drivers/mcdi/mt_cpu_pm_cpc.c \
  69. ${MTK_PLAT_SOC}/drivers/mcdi/mt_mcdi.c \
  70. ${MTK_PLAT_SOC}/drivers/mcdi/mt_lp_irqremain.c \
  71. ${MTK_PLAT_SOC}/drivers/pmic/pmic.c \
  72. ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \
  73. ${MTK_PLAT_SOC}/drivers/spmc/mtspmc.c \
  74. ${MTK_PLAT_SOC}/plat_pm.c \
  75. ${MTK_PLAT_SOC}/plat_sip_calls.c \
  76. ${MTK_PLAT_SOC}/plat_topology.c
  77. ifeq (${TRNG_SUPPORT},1)
  78. BL31_SOURCES += ${MTK_PLAT}/drivers/rng/rng.c \
  79. ${MTK_PLAT}/drivers/rng/${PLAT}/rng_plat.c
  80. endif
  81. # Build SPM drivers
  82. include ${MTK_PLAT_SOC}/drivers/spm/build.mk
  83. # Configs for A76 and A55
  84. HW_ASSISTED_COHERENCY := 1
  85. USE_COHERENT_MEM := 0
  86. CTX_INCLUDE_AARCH32_REGS := 0
  87. ERRATA_A55_1530923 := 1
  88. ERRATA_A55_1221012 := 1
  89. ERRATA_A76_1257314 := 1
  90. ERRATA_A76_1262606 := 1
  91. ERRATA_A76_1262888 := 1
  92. ERRATA_A76_1275112 := 1
  93. ERRATA_A76_1286807 := 1
  94. ERRATA_A76_1791580 := 1
  95. ERRATA_A76_1165522 := 1
  96. ERRATA_A76_1868343 := 1
  97. ERRATA_A76_1946160 := 1
  98. # indicate the reset vector address can be programmed
  99. PROGRAMMABLE_RESET_ADDRESS := 1
  100. COLD_BOOT_SINGLE_CPU := 1
  101. MACH_MT8186 := 1
  102. $(eval $(call add_define,MACH_MT8186))
  103. include lib/coreboot/coreboot.mk