[ Related to IMX8MP Reboot Infinitly - #11 by SvenAlmgren ]
Hi! We also have this issue on two iMX8MP Q 4GB WB IT 1.1A modules.
We run our custom Linux with custom u-boot on a custom carrier, but we’ve also verified this on a Dahlia board running the latest 6.5.0+build.9 (2024-01-08) Toradex Embedde Linux Reference Minimal Image. Also tried with 6.5.0 upstream, and had the same issue during 6.4.0.
5.7.5+build.27 seems to work (I have reset the board over 100 times without the issue manifesting), but looking at the output CAAM seems not to be enabled on that build.
If I press reset a couple of times the board will eventually boot.
If I disable CAAM during SPL init the issue goes away entirely.
diff --git a/board/toradex/verdin-imx8mp/spl.c b/board/toradex/verdin-imx8mp/spl.c
index b901038e90..2b66bab5be 100644
--- a/board/toradex/verdin-imx8mp/spl.c
+++ b/board/toradex/verdin-imx8mp/spl.c
@@ -50,6 +50,7 @@ void spl_dram_init(void)
void spl_board_init(void)
{
+#if 0
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
struct udevice *dev;
int ret;
@@ -58,6 +59,7 @@ void spl_board_init(void)
if (ret)
printf("Failed to initialize caam_jr: %d\n", ret);
}
+#endif
/*
* Set GIC clock to 500Mhz for OD VDD_SOC. Kernel driver does
The first board we saw this on booted most of the times, probably around 49 of 50 boots worked, or even more. The second board instead fail about 5 times out of 6.
CAAM is enabled during second u-boot initialization with our fix, so the issue seems to be related to CAAM during SPL and it’s always near Find img info
in the console output, but it varies a bit with the exact config used during u-boot build. I don’t have the configs saved from my testings but I have some outputs saved.
The most common output is with the reset occurring right after BL31, and BL31 is only printed on the first (cold) boot, or after an external reset (the reset button). The loop seems to reach BL31 (or if it’s skipped, I’m not an expert here…)
This particular example got to print half of the secondary u-boot header before the reset.
U-Boot SPL 2022.04-6.4.0-devel+git.15fa90038d82 (Jan 31 2024 - 13:09:35 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802e000, size 888
Download 1079296, Total size 1079856
NOTICE: BL31: v2.6(release):lf_v2.6-g3c1583ba0a
NOTICE: BL31: Built : 11:00:38, Nov 21 2022
U-Boot 2022.04-6.4.0-devel+git.15fa90038d82 (Jan 31 2024 - 13:
U-Boot SPL 2022.04-6.4.0-devel+git.15fa90038d82 (Jan 31 2024 - 13:09:35 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802e000, size 888
U-Boot SPL 2022.04-6.4.0-devel+git.15fa90038d82 (Jan 31 2024 - 13:09:35 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802e000, size 888
Disabling CAAM during SPL have so far fixed the issue on both the problematic modules, and works with all other modules we have too.
The same thing happens with the upstream image from Toradex Easy Installer
U-Boot SPL 2022.04-6.5.0+git.28dc906f6107 (Dec 22 2023 - 09:31:10 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802a600, size 888
Need continue download 1024
U-Boot SPL 2022.04-6.5.0+git.28dc906f6107 (Dec 22 2023 - 09:31:10 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802a600, size 888
Need continue download 1024
U-Boot SPL 2022.04-6.5.0+git.28dc906f6107 (Dec 22 2023 - 09:31:10 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802a600, size 888
Need continue download 1024