Martin Roth | 9231f0b | 2022-10-28 22:39:23 -0600 | [diff] [blame] | 1 | ## SPDX-License-Identifier: GPL-2.0-only |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 2 | ifeq ($(CONFIG_SOC_MEDIATEK_MT8183),y) |
| 3 | |
Tristan Shieh | 4c6dfbc | 2018-06-01 14:33:11 +0800 | [diff] [blame] | 4 | bootblock-y += bootblock.c |
Po Xu | 3f11803 | 2020-08-04 11:39:47 +0800 | [diff] [blame] | 5 | bootblock-y += ../common/auxadc.c |
Po Xu | f71f179 | 2018-07-16 18:41:49 +0800 | [diff] [blame] | 6 | bootblock-y += ../common/gpio.c gpio.c |
Weiyi Lu | 60e1fcb | 2018-06-01 14:58:54 +0800 | [diff] [blame] | 7 | bootblock-y += ../common/pll.c pll.c |
mengqi.zhang | 9faa584 | 2018-07-02 23:23:00 +0800 | [diff] [blame] | 8 | bootblock-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c |
You-Cheng Syu | 44e9c37 | 2019-01-23 19:54:05 +0800 | [diff] [blame] | 9 | bootblock-y += mt8183.c |
Qii Wang | 66532b0 | 2019-01-18 09:29:09 +0800 | [diff] [blame] | 10 | bootblock-y += ../common/i2c.c i2c.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 11 | bootblock-y += ../common/timer.c |
Nico Huber | 755db95 | 2018-11-11 01:42:17 +0100 | [diff] [blame] | 12 | bootblock-y += ../common/uart.c |
Tristan Shieh | 4c6dfbc | 2018-06-01 14:33:11 +0800 | [diff] [blame] | 13 | bootblock-y += ../common/wdt.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 14 | |
Hung-Te Lin | 03e9cb9 | 2018-06-26 13:42:04 +0800 | [diff] [blame] | 15 | decompressor-y += decompressor.c |
| 16 | decompressor-y += ../common/mmu_operations.c |
| 17 | decompressor-y += ../common/timer.c |
| 18 | |
Po Xu | 3f11803 | 2020-08-04 11:39:47 +0800 | [diff] [blame] | 19 | verstage-y += ../common/auxadc.c |
Po Xu | f71f179 | 2018-07-16 18:41:49 +0800 | [diff] [blame] | 20 | verstage-y += ../common/gpio.c gpio.c |
mengqi.zhang | 9faa584 | 2018-07-02 23:23:00 +0800 | [diff] [blame] | 21 | verstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c |
You-Cheng Syu | 44e9c37 | 2019-01-23 19:54:05 +0800 | [diff] [blame] | 22 | verstage-y += mt8183.c |
Qii Wang | 66532b0 | 2019-01-18 09:29:09 +0800 | [diff] [blame] | 23 | verstage-y += ../common/i2c.c i2c.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 24 | verstage-y += ../common/timer.c |
Nico Huber | 755db95 | 2018-11-11 01:42:17 +0100 | [diff] [blame] | 25 | verstage-y += ../common/uart.c |
Tristan Shieh | 4c6dfbc | 2018-06-01 14:33:11 +0800 | [diff] [blame] | 26 | verstage-y += ../common/wdt.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 27 | |
Po Xu | 3f11803 | 2020-08-04 11:39:47 +0800 | [diff] [blame] | 28 | romstage-y += ../common/auxadc.c |
Julius Werner | 5d6593a | 2018-08-10 16:13:26 -0700 | [diff] [blame] | 29 | romstage-y += ../common/cbmem.c emi.c |
Huayang Duan | e19d61b | 2018-09-26 14:51:51 +0800 | [diff] [blame] | 30 | romstage-y += dramc_init_setting.c |
Yu-Ping Wu | 732e215 | 2019-10-03 18:04:07 +0800 | [diff] [blame] | 31 | romstage-y += dramc_param.c |
Huayang Duan | 6c36d15 | 2018-09-26 15:37:58 +0800 | [diff] [blame] | 32 | romstage-y += dramc_pi_basic_api.c |
Huayang Duan | dac7f53 | 2018-09-26 15:53:23 +0800 | [diff] [blame] | 33 | romstage-y += dramc_pi_calibration_api.c |
Huayang Duan | c2ef102 | 2018-09-26 14:24:02 +0800 | [diff] [blame] | 34 | romstage-y += memory.c |
Huayang Duan | 4d15d2f | 2018-09-26 21:23:53 +0800 | [diff] [blame] | 35 | romstage-$(CONFIG_MEMORY_TEST) += ../common/memory_test.c |
You-Cheng Syu | fff2ad9 | 2019-01-29 20:04:59 +0800 | [diff] [blame] | 36 | romstage-y += mt8183.c |
Po Xu | f71f179 | 2018-07-16 18:41:49 +0800 | [diff] [blame] | 37 | romstage-y += ../common/gpio.c gpio.c |
Tristan Shieh | 0eb92df | 2018-06-08 18:21:45 +0800 | [diff] [blame] | 38 | romstage-y += ../common/mmu_operations.c mmu_operations.c |
Tristan Shieh | 3d96f60 | 2019-04-26 11:58:30 +0800 | [diff] [blame] | 39 | romstage-y += ../common/pll.c pll.c |
Hsin-Hsiung Wang | 23b1afe | 2018-10-24 19:18:28 +0800 | [diff] [blame] | 40 | romstage-y += ../common/pmic_wrap.c pmic_wrap.c mt6358.c |
Yuchen Huang | b0ab41e | 2020-08-18 16:29:29 +0800 | [diff] [blame] | 41 | romstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c |
mengqi.zhang | 9faa584 | 2018-07-02 23:23:00 +0800 | [diff] [blame] | 42 | romstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c |
Qii Wang | 66532b0 | 2019-01-18 09:29:09 +0800 | [diff] [blame] | 43 | romstage-y += ../common/i2c.c i2c.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 44 | romstage-y += ../common/timer.c |
Nico Huber | 755db95 | 2018-11-11 01:42:17 +0100 | [diff] [blame] | 45 | romstage-y += ../common/uart.c |
Tristan Shieh | 4c6dfbc | 2018-06-01 14:33:11 +0800 | [diff] [blame] | 46 | romstage-y += ../common/wdt.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 47 | |
Hung-Te Lin | a01f8bc | 2022-09-06 14:32:05 +0800 | [diff] [blame] | 48 | ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c |
Arthur Heymans | d05f57c | 2019-10-23 18:54:48 +0200 | [diff] [blame] | 49 | ramstage-y += emi.c |
Po Xu | 3f11803 | 2020-08-04 11:39:47 +0800 | [diff] [blame] | 50 | ramstage-y += ../common/auxadc.c |
Yongqiang Niu | 84d5d65 | 2019-02-20 14:29:31 +0800 | [diff] [blame] | 51 | ramstage-y += ../common/ddp.c ddp.c |
Yidi Lin | a183079 | 2020-12-10 15:59:49 +0800 | [diff] [blame] | 52 | ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c |
Po Xu | f71f179 | 2018-07-16 18:41:49 +0800 | [diff] [blame] | 53 | ramstage-y += ../common/gpio.c gpio.c |
Qii Wang | 66532b0 | 2019-01-18 09:29:09 +0800 | [diff] [blame] | 54 | ramstage-y += ../common/i2c.c i2c.c |
Yidi Lin | eb69dd6 | 2020-12-07 20:43:50 +0800 | [diff] [blame] | 55 | ramstage-y += ../common/mcu.c |
Tristan Shieh | 0eb92df | 2018-06-08 18:21:45 +0800 | [diff] [blame] | 56 | ramstage-y += ../common/mmu_operations.c mmu_operations.c |
Tristan Shieh | 85c3475 | 2018-06-05 12:20:00 +0800 | [diff] [blame] | 57 | ramstage-y += ../common/mtcmos.c mtcmos.c |
You-Cheng Syu | 10494c4 | 2019-06-10 17:17:49 +0800 | [diff] [blame] | 58 | ramstage-y += ../common/pmic_wrap.c |
Yuchen Huang | b0ab41e | 2020-08-18 16:29:29 +0800 | [diff] [blame] | 59 | ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c |
Tristan Shieh | 0eb92df | 2018-06-08 18:21:45 +0800 | [diff] [blame] | 60 | ramstage-y += soc.c |
mengqi.zhang | 9faa584 | 2018-07-02 23:23:00 +0800 | [diff] [blame] | 61 | ramstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c |
Dawei Chien | 2422f8c | 2019-05-30 11:55:10 +0800 | [diff] [blame] | 62 | ramstage-y += spm.c |
Rex-BC Chen | e235f9a | 2021-05-27 21:10:17 +0800 | [diff] [blame] | 63 | ramstage-y += ../common/sspm.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 64 | ramstage-y += ../common/timer.c |
Nico Huber | 755db95 | 2018-11-11 01:42:17 +0100 | [diff] [blame] | 65 | ramstage-y += ../common/uart.c |
Jumin Li | b2c136d | 2018-09-20 17:40:45 +0800 | [diff] [blame] | 66 | ramstage-y += ../common/usb.c |
Tristan Shieh | 4c6dfbc | 2018-06-01 14:33:11 +0800 | [diff] [blame] | 67 | ramstage-y += ../common/wdt.c |
Yanjie Jiang | 64dea2e | 2019-05-07 10:31:07 +0800 | [diff] [blame] | 68 | ramstage-y += md_ctrl.c |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 69 | |
Dawei Chien | 2422f8c | 2019-05-30 11:55:10 +0800 | [diff] [blame] | 70 | MT8183_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8183 |
| 71 | |
| 72 | cbfs-files-y += pcm_allinone_lp4_3200.bin |
| 73 | pcm_allinone_lp4_3200.bin-file := $(MT8183_BLOB_DIR)/pcm_allinone_lp4_3200.bin |
| 74 | pcm_allinone_lp4_3200.bin-type := raw |
| 75 | pcm_allinone_lp4_3200.bin-compression := $(CBFS_COMPRESS_FLAG) |
| 76 | |
| 77 | cbfs-files-y += pcm_allinone_lp4_3733.bin |
| 78 | pcm_allinone_lp4_3733.bin-file := $(MT8183_BLOB_DIR)/pcm_allinone_lp4_3733.bin |
| 79 | pcm_allinone_lp4_3733.bin-type := raw |
| 80 | pcm_allinone_lp4_3733.bin-compression := $(CBFS_COMPRESS_FLAG) |
| 81 | |
Erin Lo | bbeed7a | 2019-07-16 10:08:33 +0800 | [diff] [blame] | 82 | cbfs-files-y += sspm.bin |
Dawei Chien | 2422f8c | 2019-05-30 11:55:10 +0800 | [diff] [blame] | 83 | sspm.bin-file := $(MT8183_BLOB_DIR)/sspm.bin |
Erin Lo | bbeed7a | 2019-07-16 10:08:33 +0800 | [diff] [blame] | 84 | sspm.bin-type := raw |
| 85 | sspm.bin-compression := $(CBFS_COMPRESS_FLAG) |
| 86 | |
Huayang Duan | 078332e | 2019-08-27 13:36:14 +0800 | [diff] [blame] | 87 | DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram |
| 88 | $(DRAM_CBFS)-file := $(MT8183_BLOB_DIR)/dram.elf |
| 89 | $(DRAM_CBFS)-type := stage |
Hung-Te Lin | 2b32cb2 | 2019-10-15 17:19:44 +0800 | [diff] [blame] | 90 | $(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) |
Huayang Duan | 078332e | 2019-08-27 13:36:14 +0800 | [diff] [blame] | 91 | ifneq ($(wildcard $($(DRAM_CBFS)-file)),) |
| 92 | cbfs-files-y += $(DRAM_CBFS) |
| 93 | endif |
| 94 | |
kenny liang | 416be81 | 2018-08-30 00:01:13 +0800 | [diff] [blame] | 95 | BL31_MAKEARGS += PLAT=mt8183 |
| 96 | |
Tristan Shieh | 3ddf57e | 2018-05-31 09:20:53 +0800 | [diff] [blame] | 97 | CPPFLAGS_common += -Isrc/soc/mediatek/mt8183/include |
| 98 | CPPFLAGS_common += -Isrc/soc/mediatek/common/include |
| 99 | |
| 100 | $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin |
| 101 | ./util/mtkheader/gen-bl-img.py mt8183 emmc $< $@ |
| 102 | |
| 103 | endif |