i.mx8mm freeze on imx_4.14.98_2.3.0 related to drivers/soc/imx/busfreq-imx8mq.c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx8mm freeze on imx_4.14.98_2.3.0 related to drivers/soc/imx/busfreq-imx8mq.c

1,431 Views
matt67
Contributor III

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;

 

 

 

 

0 Kudos
5 Replies

969 Views
kippowens
Contributor IV

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:

  • imx-atf/plat/imx/common/imx_sip_svc.c
  • imx-atf/plat/imx/common/imx_sip_svc.h
  • imx-atf/plat/imx/imx8m/gpc_common.c
  • imx-atf/plat/imx/imx8m/ddr/dram_retention.c

Hope this helps someone out!  Cheers,
Kipp

Tags (1)
0 Kudos

1,396 Views
matt67
Contributor III

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...

0 Kudos

1,390 Views
igorpadykov
NXP Employee
NXP Employee

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

0 Kudos

1,423 Views
matt67
Contributor III

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.

 

 

0 Kudos

1,410 Views
igorpadykov
NXP Employee
NXP Employee

Hi matt67

 

L4.14.98_2.3.0 does not support i.MX8M Mini as described on below link, column

"Supported Platforms" :

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

Recommended to try latest kernels, use latest RPA tool and ddr test

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8M-Family-DDR-Tool-Release/ta-p/110...

 

Best regards
igor

0 Kudos