mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git] / src / soc / mediatek / mt8192 / Makefile.mk
blob5d4b87b51eee3fc6506b98d5b8b904dce2d5ea86
1 ## SPDX-License-Identifier: GPL-2.0-only
2 ifeq ($(CONFIG_SOC_MEDIATEK_MT8192),y)
4 # for bootblock, verstage, romstage, ramstage
5 all-y += ../common/flash_controller.c
6 all-y += ../common/gpio.c ../common/gpio_op.c gpio.c
7 all-y += ../common/i2c.c i2c.c
8 all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c
9 all-y += ../common/timer.c
10 all-y += ../common/uart.c
12 bootblock-y += bootblock.c
13 bootblock-y += ../common/eint_event.c
14 bootblock-y += ../common/mmu_operations.c
15 bootblock-y += ../common/pll.c pll.c
16 bootblock-y += ../common/tracker.c ../common/tracker_v2.c
17 bootblock-y += ../common/wdt.c ../common/wdt_req.c
19 romstage-y += ../common/auxadc.c
20 romstage-y += ../common/cbmem.c
21 romstage-y += ../common/clkbuf.c srclken_rc.c
22 romstage-y += ../common/dram_init.c
23 romstage-y += ../common/dramc_param.c
24 romstage-y += ../common/memory.c ../common/memory_test.c
25 romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
26 romstage-y += ../common/pll.c pll.c
27 romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c
28 romstage-y += ../common/pmif_spi.c pmif_spi.c
29 romstage-y += ../common/pmif_spmi.c pmif_spmi.c
30 romstage-y += ../common/mt6315.c mt6315.c
31 romstage-y += ../common/mt6359p.c mt6359p.c
32 romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c
34 ramstage-y += apusys.c
35 ramstage-y += ../common/auxadc.c
36 ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c
37 ramstage-y += ../common/ddp.c ddp.c
38 ramstage-y += devapc.c
39 ramstage-y += ../common/dfd.c
40 ramstage-y += ../common/dpm.c
41 ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c
42 ramstage-y += ../common/mcu.c
43 ramstage-y += ../common/mcupm.c
44 ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
45 ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c
46 ramstage-y += ../common/mtcmos.c mtcmos.c
47 ramstage-y += ../common/pmif.c
48 ramstage-y += ../common/rtc.c ../common/rtc_mt6359p.c
49 ramstage-y += soc.c
50 ramstage-y += ../common/spm.c spm.c
51 ramstage-y += ../common/sspm.c
52 ramstage-y += ../common/ufs.c
53 ramstage-y += ../common/usb.c usb.c
55 CPPFLAGS_common += -Isrc/soc/mediatek/mt8192/include
56 CPPFLAGS_common += -Isrc/soc/mediatek/common/include
57 CPPFLAGS_common += -Isrc/vendorcode/mediatek/mt8192/include
59 BL31_MAKEARGS += PLAT=mt8192
61 MT8192_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8192
63 mcu-firmware-files := \
64 $(CONFIG_DPM_DM_FIRMWARE) \
65 $(CONFIG_DPM_PM_FIRMWARE) \
66 $(CONFIG_MCUPM_FIRMWARE) \
67 $(CONFIG_SSPM_FIRMWARE) \
68 $(CONFIG_SPM_FIRMWARE)
70 $(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \
71 $(eval $(fw)-file := $(MT8192_BLOB_DIR)/$(fw)) \
72 $(eval $(fw)-type := raw) \
73 $(eval $(fw)-compression := LZ4) \
74 $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \
77 DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram
78 $(DRAM_CBFS)-file := $(MT8192_BLOB_DIR)/dram.elf
79 $(DRAM_CBFS)-type := stage
80 $(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
81 ifneq ($(wildcard $($(DRAM_CBFS)-file)),)
82 cbfs-files-y += $(DRAM_CBFS)
83 endif
85 $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
86 ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@
88 endif