imx8mp ddr training stuck

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx8mp ddr training stuck

2,497 次查看
siegfried_buerger
Contributor II

We have a custom board with the imx8mp CPU and a "K4FBE3D4HM" RAM.

Bootloader gets stuck during RAM-training.

U-Boot SPL 2022.04-00005-g8812d8f3da-dirty (May 09 2023 - 15:16:40 +0200)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200 MTS
DRAM PHY training for 3200MTS

I traced it back to this function inside "drivers/ddr/imx/phy/ddrphy_utils.c"

static inline void poll_pmu_message_ready(void)
{
unsinged int reg;
do {
reg = reg32_read(IP2APB_DDRPHY_IPS_BASE_ADDR(0) + ddrtphy_addr_remap(0xd0004));
} while (reg & 0x1);
}

I've implemented a workaround to break out of the do-while loop after some waiting. The training would then proceed and pass and everything seems to work.

This issue does not appear when I boot with USB serial boot.

The ddr-timings are generated by the mscale ddr tool. The stress test doesn't show any problems as well.

 

Did anyone have a similar issue or any idea how to approach this? 

Best regards,
Marius

 

 

0 项奖励
11 回复数

2,439 次查看
siegfried_buerger
Contributor II

Hi @Dhruvit,

thanks for your reply.

The bootloader is built separately. I've tested it with imx-firmware-8.10, -8.16 and -8.19. The issue remains the same. 

Regards.

0 项奖励

2,397 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @siegfried_buerger,

I hope you are doing well.

Could you please try to get debug logs in u-boot?

Please share more information about PMIC used in custom board.

Please provide me with the build steps for further debugging. (could you please try to build an image using the yocto build system ?)

Thanks & Regards,
Dhruvit Vasavada

0 项奖励

2,311 次查看
siegfried_buerger
Contributor II

Hi @Dhruvit,

the PMIC on our board is a "PCA9450CHNY".

I'm going to try to build an image with yocto using nxp resources. Hopefully this will help.

Thank you!
Regards

0 项奖励

2,284 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @siegfried_buerger,

The PMIC on our board is a "PCA9450CHNY"
=> It is the default pmic in NXP BSP, it will not need any change in BSP.

Yes, Please try with Yocto by applying patches for custom changes in u-boot-imx.

Thanks & Regards,
Dhruvit Vasavada

0 项奖励

2,204 次查看
siegfried_buerger
Contributor II

Hi @Dhruvit,

sorry it took me so long. So I've built the bootloader image with the official nxp yocto. Now it goes straight to "training failed" on bootup.

I'm using the latest versions.

Any ideas?

标记 (1)
0 项奖励

2,175 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @siegfried_buerger

I hope you are doing well.

Have you replaced the code (generated by successful training and calibration in MSCALE DDR Tool) in u-boot for custom DDR?

Please provide me with the DDR changes in u-boot-imx, u-boot configuration, and steps to flash image for further debugging.

Thanks & Regards,
Dhruvit Vasavada 

0 项奖励

2,131 次查看
siegfried_buerger
Contributor II

Hi @Dhruvit,

I removed everything related to USB-C as we don't use a USB-C power input on our board.
I also changed the ram timing (lpddr4_timing.c), see the attached file.

I built u-boot-imx and imx-boot and flashed the imx-boot image via uuu tool onto the emmc. Fastboot works without any issues but as soon as I try to boot the board in emmc boot it says "Training FAILED"

Regards,
Marius

0 项奖励

2,105 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @siegfried_buerger,

I hope you are doing well.

Could you please share uuu command that you have used?

This issue could be due to imx-boot having an updated u-boot image but the .wic image is not being updated with the latest u-boot with ddr customization.

So that, during serial download mode ddr training is successful. when changing to emmc it uses the old u-boot which results in Training FAILED.

Thanks & Regards,
Dhruvit Vasavada

0 项奖励

2,098 次查看
siegfried_buerger
Contributor II

Hi @Dhruvit,

it's the same image according to the timestamps.
This is the log from when I start the uuu-tool:

siegfried_buerger_1-1689245543217.png

and this is the log from when I boot from emmc:

siegfried_buerger_0-1689245461859.png

I attached the script I use with uuu tool like this:

./uuu uuu.emmc.txt

 

Regards,
Marius

 

0 项奖励

2,027 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @siegfried_buerger,

I hope you are doing well.

Could you please try with another boot device (sdcard or NOR flash )?

Please provide me with detailed logs with debugging enabled in u-boot.

Thanks & Regards,
Dhruvit Vasavada

 

0 项奖励

2,457 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @siegfried_buerger,

I hope you are doing well.

This issue could be due to not loading the correct ddr training firmware binary.

Please mention how you are building the bootloader (using yocto or separately.) and the BSP version

Please make sure that the latest lpddr training firmware binaries (from firmware-imx package) are used.

Thanks & Regards,
Dhruvit Vasavada

0 项奖励