1## SPDX-License-Identifier: GPL-2.0-only 2 3ifeq ($(CONFIG_SOC_QUALCOMM_SC7180),y) 4 5decompressor-y += decompressor.c 6decompressor-y += mmu.c 7decompressor-y += ../common/timer.c 8all-y += ../common/timer.c 9all-y += ../common/gpio.c 10all-y += ../common/spi.c 11all-$(CONFIG_SC7180_QSPI) += ../common/qspi.c 12all-y += ../common/qupv3_i2c.c 13all-y += ../common/qupv3_spi.c 14all-y += clock.c 15all-y += ../common/clock.c 16all-y += qcom_qup_se.c 17all-y += ../common/qupv3_config.c 18all-y += ../common/qup_se_handler.c 19 20################################################################################ 21bootblock-y += bootblock.c 22bootblock-y += mmu.c 23bootblock-$(CONFIG_DRIVERS_UART) += ../common/uart_bitbang.c 24################################################################################ 25verstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c 26 27################################################################################ 28romstage-y += cbmem.c 29romstage-y += ../common/qclib.c 30romstage-y += ../common/watchdog.c 31romstage-y += qclib.c 32romstage-y += ../common/mmu.c 33romstage-y += mmu.c 34romstage-y += ../common/usb/usb.c 35romstage-y += carve_out.c 36romstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c 37 38################################################################################ 39ramstage-y += soc.c 40ramstage-y += carve_out.c 41ramstage-y += ../common/aop_load_reset.c 42ramstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c 43ramstage-y += ../common/usb/usb.c 44ramstage-y += ../common/usb/qusb_phy.c 45ramstage-y += ../common/usb/qmpv3_usb_phy.c 46ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += display/dsi_phy_pll.c 47ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += display/dsi_phy.c 48ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += display/dsi.c 49ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += display/disp.c 50ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += ../common/display/mdss.c 51 52################################################################################ 53 54CPPFLAGS_common += -Isrc/soc/qualcomm/sc7180/include 55CPPFLAGS_common += -Isrc/soc/qualcomm/common/include 56 57BL31_MAKEARGS += PLAT=sc7180 58 59ifeq ($(CONFIG_USE_QC_BLOBS),y) 60 61SC7180_BLOB := $(top)/3rdparty/qc_blobs/sc7180 62 63ifeq ($(CONFIG_QC_SDI_ENABLE),y) 64BL31_MAKEARGS += QTI_SDI_BUILD=1 65BL31_MAKEARGS += QTISECLIB_PATH=$(SC7180_BLOB)/qtiseclib/libqtisec_dbg.a 66else 67BL31_MAKEARGS += QTISECLIB_PATH=$(SC7180_BLOB)/qtiseclib/libqtisec.a 68endif # CONFIG_QC_SDI_ENABLE 69 70################################################################################ 71ifeq ($(CONFIG_QC_SDI_ENABLE),y) 72QCSDI_FILE := $(SC7180_BLOB)/boot/QcSdi.elf 73QCSDI_CBFS := $(CONFIG_CBFS_PREFIX)/qcsdi 74$(QCSDI_CBFS)-file := $(QCSDI_FILE) 75$(QCSDI_CBFS)-type := stage 76$(QCSDI_CBFS)-compression := $(CBFS_COMPRESS_FLAG) 77cbfs-files-y += $(QCSDI_CBFS) 78endif 79 80################################################################################ 81QCLIB_FILE := $(SC7180_BLOB)/boot/QcLib.elf 82QCLIB_CBFS := $(CONFIG_CBFS_PREFIX)/qclib 83$(QCLIB_CBFS)-file := $(QCLIB_FILE) 84$(QCLIB_CBFS)-type := stage 85$(QCLIB_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) 86cbfs-files-y += $(QCLIB_CBFS) 87 88################################################################################ 89PMIC_FILE := $(SC7180_BLOB)/boot/Pmic.bin 90PMIC_CBFS := $(CONFIG_CBFS_PREFIX)/pmiccfg 91$(PMIC_CBFS)-file := $(PMIC_FILE) 92$(PMIC_CBFS)-type := raw 93$(PMIC_CBFS)-compression := $(CBFS_COMPRESS_FLAG) 94cbfs-files-y += $(PMIC_CBFS) 95 96################################################################################ 97DCB_FILE := $(SC7180_BLOB)/boot/dcb.bin 98DCB_CBFS := $(CONFIG_CBFS_PREFIX)/dcb 99$(DCB_CBFS)-file := $(DCB_FILE) 100$(DCB_CBFS)-type := raw 101$(DCB_CBFS)-compression := $(CBFS_COMPRESS_FLAG) 102cbfs-files-y += $(DCB_CBFS) 103 104################################################################################ 105DCB_LONGSYS1P8_FILE := $(SC7180_BLOB)/boot/dcb_slow.bin 106DCB_LONGSYS1P8_CBFS := $(CONFIG_CBFS_PREFIX)/dcb_longsys1p8 107$(DCB_LONGSYS1P8_CBFS)-file := $(DCB_LONGSYS1P8_FILE) 108$(DCB_LONGSYS1P8_CBFS)-type := raw 109$(DCB_LONGSYS1P8_CBFS)-compression := $(CBFS_COMPRESS_FLAG) 110cbfs-files-y += $(DCB_LONGSYS1P8_CBFS) 111 112################################################################################ 113AOP_FILE := $(SC7180_BLOB)/aop/aop.mbn 114AOP_CBFS := $(CONFIG_CBFS_PREFIX)/aop 115$(AOP_CBFS)-file := $(AOP_FILE) 116$(AOP_CBFS)-type := payload 117$(AOP_CBFS)-compression := $(CBFS_COMPRESS_FLAG) 118cbfs-files-y += $(AOP_CBFS) 119 120################################################################################ 121UART_FW_FILE := $(SC7180_BLOB)/qup_fw/uart_fw.bin 122UART_FW_CBFS := $(CONFIG_CBFS_PREFIX)/uart_fw 123$(UART_FW_CBFS)-file := $(UART_FW_FILE) 124$(UART_FW_CBFS)-type := raw 125$(UART_FW_CBFS)-compression := none 126cbfs-files-y += $(UART_FW_CBFS) 127 128################################################################################ 129SPI_FW_FILE := $(SC7180_BLOB)/qup_fw/spi_fw.bin 130SPI_FW_CBFS := $(CONFIG_CBFS_PREFIX)/spi_fw 131$(SPI_FW_CBFS)-file := $(SPI_FW_FILE) 132$(SPI_FW_CBFS)-type := raw 133$(SPI_FW_CBFS)-compression := none 134cbfs-files-y += $(SPI_FW_CBFS) 135 136################################################################################ 137I2C_FW_FILE := $(SC7180_BLOB)/qup_fw/i2c_fw.bin 138I2C_FW_CBFS := $(CONFIG_CBFS_PREFIX)/i2c_fw 139$(I2C_FW_CBFS)-file := $(I2C_FW_FILE) 140$(I2C_FW_CBFS)-type := raw 141$(I2C_FW_CBFS)-compression := none 142cbfs-files-y += $(I2C_FW_CBFS) 143 144################################################################################ 145QC_SEC_FILE := $(SC7180_BLOB)/qc_sec/qc_sec.mbn 146$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.elf 147 @util/qualcomm/createxbl.py --mbn_version 6 -f $(objcbfs)/bootblock.raw.elf \ 148 -x $(QC_SEC_FILE) -o $(objcbfs)/merged_bb_qcsec.mbn \ 149 -a 64 -d 64 -c 64 150 @printf "\nqgpt.py 4K sector size\n" 151 @util/qualcomm/qgpt.py $(objcbfs)/merged_bb_qcsec.mbn \ 152 $(objcbfs)/bootblock.bin 153 154endif 155 156endif 157