承接上次IMX8MQ DDR4测试后,copy ddr4_timing.c文件到uboot/board/freescale/imx8mq_evk目录下,修改如下配置
diff --git a/arch/arm/dts/fsl-imx8mq-evk.dts b/arch/arm/dts/fsl-imx8mq-evk.dts
index 252d6f8ab8..01f2954fb9 100644
--- a/arch/arm/dts/fsl-imx8mq-evk.dts
+++ b/arch/arm/dts/fsl-imx8mq-evk.dts
@@ -561,7 +561,7 @@
bus-width = <4>;
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
vmmc-supply = <®_usdhc2_vmmc>;
status = "okay";
status = "disabled";
};
&usb3_phy0 {
diff --git a/board/freescale/imx8mq_evk/Makefile b/board/freescale/imx8mq_evk/Makefile
index 9ca20e09b4..94a24d6627 100644
--- a/board/freescale/imx8mq_evk/Makefile
+++ b/board/freescale/imx8mq_evk/Makefile
@@ -8,5 +8,6 @@ obj-y += imx8mq_evk.o
ifdef CONFIG_SPL_BUILD
obj-y += spl.o
-obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o lpddr4_timing_b0.o
+#obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o lpddr4_timing_b0.o
+obj-$(CONFIG_IMX8M_LPDDR4) += ddr4_timing.o
endif
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 2175cbfc66..1bb677005b 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -25,7 +25,7 @@
DECLARE_GLOBAL_DATA_PTR;
-extern struct dram_timing_info dram_timing_b0;
+extern struct dram_timing_info dram_timing;
void spl_dram_init(void)
{
@@ -33,7 +33,7 @@ void spl_dram_init(void)
if ((get_cpu_rev() & 0xfff) == CHIP_REV_2_1)
ddr_init(&dram_timing);
else
ddr_init(&dram_timing_b0);
ddr_init(&dram_timing);
}
define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 38ca1dc787..86f353604a 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -28,7 +28,7 @@ CONFIG_DM_I2C=y
CONFIG_DM_GPIO=y
CONFIG_CMD_GPIO=y
同时修改imx-boot/iMX8M/soc.mak文件
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak index d714259..8329786 100644 --- a/iMX8M/soc.mak +++ b/iMX8M/soc.mak @@ -54,7 +54,7 @@ HDMI = yes SPL_LOAD_ADDR = 0x7E1000 TEE_LOAD_ADDR = 0xfe000000 ATF_LOAD_ADDR = 0x00910000 -VAL_BOARD = arm2 +VAL_BOARD = evk #define the F(Q)SPI header file QSPI_HEADER = ../scripts/qspi_header QSPI_PACKER = ../scripts/fspi_packer.sh @@ -160,6 +160,9 @@ flash_ddr3l_val: $(MKIMG) signed_dp_imx8m.bin u-boot-spl-ddr3l.bin u-boot-ddr3l. flash_ddr4_val: $(MKIMG) signed_hdmi_imx8m.bin u-boot-spl-ddr4.bin u-boot-ddr4.itb ./mkimage_imx8 -fit -signed_hdmi signed_hdmi_imx8m.bin -loader u-boot-spl-ddr4.bin $(SPL_LOAD_ADDR) -second_loader u-boot-ddr4.itb 0x40200000 0x60000 -out $(OUTIMG) +flash_ddr4_evk: $(MKIMG) signed_hdmi_imx8m.bin u-boot-spl-ddr4.bin u-boot-ddr4-evk.itb ./mkimage_imx8 -fit -signed_hdmi signed_hdmi_imx8m.bin -loader u-boot-spl-ddr4.bin $(SPL_LOAD_ADDR) -second_loader u-boot-ddr4-evk.itb 0x40200000 0x60000 -out $(OUTIMG) + else flash_evk: flash_evk_no_hdmi