Thanks Pavel,
We have run memory tests and they show that DDR4 is fine.
In the firmware/atf/plat/nxp/drivers/sd/sd_mmc.c file, function esdhc_read_data_nodma(), we log val here:
/* get data from data port */
val = mmio_read_32((uintptr_t)&mmc->esdhc_regs->datport);
This shows that val is corrupted now and then. This is not related to DDR4.
Any ideas what could be causing this and how to fix it?
Have a great day,
Rolf Peder Klemetsen