With the current Yocto 26.0-dev, we can now build genio-720-evk-norboot-ufs for NOR Boot with a UFS Root File System. Since genio-360-evk-norboot exists for NOR Boot with an eMMC Root File System, and Genio 520/720 also support eMMC, so is it possible to add a new machine config for NOR Boot with an eMMC Root File System?
You could support NOR + G720 support EMMC by your own. However this combination is out of scope for the v26.0 release. We will evaluate if could be another default machine configuration. Thanks
HI Macpaul,
I’ve tried to create a new norboot-emmc machine. The device boots up but stops at U-Boot because it fails to read any data from the eMMC. I also took a look at BL2’s git history and think the eMMC might need some extra initialization for this case. If so, I’d appreciate it if you could provide any information regarding this. Thanks!
Hi Macpaul,
In U-Boot, the eMMC is configured to use DMA mode. We observed the following behaviors:
- If the boot device is eMMC, DMA operates without any issues.
- If the boot device is NOR, the CPU fails to read eMMC data because no interrupt occurs.
However, the CPU can successfully read eMMC data if the eMMC is switched to PIO mode:
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index 0758c7662b..5b63a638d9 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -2009,7 +2009,7 @@ static const struct msdc_compatible mt8183_compat = {
.busy_check = true,
.stop_clk_fix = true,
.enhance_rx = true,
- .use_dma_mode = true,
+ .use_dma_mode = false,
};
It seems that the eMMC DMA is properly configured in BootROM when booting from eMMC, but not when booting from NOR.
Could you please help clarify what settings might be missing for the eMMC DMA configuration? Thanks.
Dear @Rockefeller_Lin
Good catch!
Dear @ht.lin , please help to check this issue. Thanks.
Hi Rockefeller
You may apply the patch below under u-boot to see if it works for nor+emmc combination.
Thanks.
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index 0758c7662b..4e4b2a8514 100644
-– a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -1776,6 +1781,8 @@ static void msdc_init_hw(struct msdc_host *host)
rd_dly1_reg);
}+ setbits_le32(&host->base->sdc_sts, 0x1 << 30);
/* Configure to enable SDIO mode otherwise sdio cmd5 won’t work */
setbits_le32(&host->base->sdc_cfg, SDC_CFG_SDIO);
Hi HT,
Thanks for your support! The patch works for NOR+eMMC.