Hello,
I have a custom i.mx8mm board design with 1GB LPDDR4.
I use kernel branch imx_4.14.98_2.0.0 and everything is working fine. However I tried to switch something more up-to-date : imx_4.14.98_2.3.0
Now the board isn't booting, kernel is loading and CPU freezes.
My investigations leads me to notice that the implementation of drivers/soc/imx/busfreq-imx8mq.c changed. The freeze is caused by the call of arm_smccc_smc(FSL_SIP_DDR_DVFS, 0x11, i, 0, 0, 0, 0, 0, &res); in the probe function.
Removing that call and the associated logic arroung fsp_table solves the issue and kernel is fully booting.
Could someone try to understand what could cause that ?
DDR calibration is done by SPL training and parameters generated by stress tool. Stresstest was successfull too.
origin_noc_rate = clk_get_rate(noc_div);
if (origin_noc_rate == 0) {
WARN_ON(1);
return -EINVAL;
}
/*
* Get the supported frequency, normally the lowest frequency point
* is used for low bus & audio bus mode.
*/
for (i = 0; i < 4; i++) {
arm_smccc_smc(FSL_SIP_DDR_DVFS, 0x11, i, 0, 0, 0, 0, 0, &res);
err = res.a0;
if (err < 0)
return -EINVAL;
fsp_table[i] = res.a0;
}
/* get the lowest fsp index */
for (i = 0; i < 4; i++)
if (fsp_table[i] == 0)
break;
low_bus_mode_fsp_index = i - 1;
/*
* if lowest fsp data rate higher than 666mts, then no dll off mode or
* bypass mode support.
*/
if (fsp_table[low_bus_mode_fsp_index] >= DLL_ON_DRATE)
bypass_support = false;
I realize this is an older question, but I recently ran into the same issue on a custom imx8mn board using imx-5.10.72-2.2.0.
In my case, I had defined a new ATF_PLATFORM. An unexpected side effect was that I no longer fell into the code that was ifdef'd in by "PLAT_imx8mn". Once I added my platform to the relevant checks, this issue went away for me (along with a few others!).
You can find these defines within the imx-atf source in the following files:
Hope this helps someone out! Cheers,
Kipp
Hi Igor,
Thanks for feedback.
However, I had a look on L5.4.47_2.2.0 source code and the same asm smcc with coe 0x11 is used in busfreq_probe. So I am still afraid that it won't work.
Please help me to understand what is going wrong and what could be the root cause. I suspect the DDRC firmware...
Hi matt67
one can try attached patch, also could you try with software release which is formally
supported according to official nxp linux documentation on
Best regards
igor
Additional information : I was using firmware-imx-7.5.bin, as it seems that this point may have a link with the DDRC firmware, so I switched to firmware-imx-8.9.bin and recompile u-boot without more success, as I stuck at the same SMC instruction.
Hi matt67
L4.14.98_2.3.0 does not support i.MX8M Mini as described on below link, column
"Supported Platforms" :
Recommended to try latest kernels, use latest RPA tool and ddr test
Best regards
igor