LS1027A Watchdog hangs the system instead of rebooting

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

LS1027A Watchdog hangs the system instead of rebooting

552 次查看
mikelooijmans
Contributor IV

We have a custom board with LS1027A CPU on it.

When I manually reboot the system, the output is as follows:

root@ls1027:~# reboot
root@ls1027:~# watchdog: watchdog0: watchdog did not stop!
reboot: Restarting system
NOTICE: Fixed DDR on board

NOTICE: 2 GB DDR4, 32-bit, CL=11, ECC off

 The "NOTICE" outputs are from the ATF code that runs at boot. Apparently the system uses the watchdog to trigger the reset, which is working fine.

If I let the watchdog expire, for example like this:

root@ls1027:~# echo -n x > /dev/watchdog0
watchdog: watchdog0: watchdog did not stop!
root@ls1027:~#

Then when the watchdog expires, the system just hangs and is totally unresponsive. Need to power-cycle the board to get it back in working order.

0 项奖励
回复
11 回复数

447 次查看
mikelooijmans
Contributor IV

There's something on our system that blocks the watchdog from working and I can't figure out what it could possibly be.

The images I use on SD card and in FSPI flash are identical (same devicetree, same kernel, same bootloader, same rootfs).

The symptoms look as if it's related to the boot configuration pins, but the SDHC1 pins aren't connected to that. But the behavior is similar to when something is pulling a config pin down while it shouldn't (for FSPI boot they should all be high), and in some very very obscure way that's related to the SD interface on our board.

0 项奖励
回复

498 次查看
mikelooijmans
Contributor IV

I guess it's a FIT image, judging from the extension. Doesn't want to boot:

=> load mmc 0:4 $kernel_addr_r lsdk2108_yocto_tiny_LS_arm64.itb
37724135 bytes read in 2352 ms (15.3 MiB/s)
=> bootm $kernel_addr_r
## Loading kernel from FIT Image at 81000000 ...
Could not find configuration node
ERROR: can't get kernel image!

 

0 项奖励
回复

495 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please use the following command

=> bootm $kernel_addr_r#ls1028ardb

0 项奖励
回复

501 次查看
yipingwang
NXP TechSupport
NXP TechSupport

I verified LSDK21.08 tiny Linux on LS1028ARDB target board, there is no problem.

=> tftp 0xa0000000 b25805/ls1028ardb/lsdk2108_yocto_tiny_LS_arm64.itb

=> bootm 0xa0000000#ls1028ardb

Then check watchdog setting up successfully.

root@TinyLinux:~# dmesg | grep wdt
[ 4.619161] sp805-wdt c000000.watchdog: registration successful
[ 4.625227] sp805-wdt c010000.watchdog: registration successful

Then try the following command.

root@TinyLinux:~# echo -n x > /dev/watchdog0
[ 4424.375838] watchdog: watchdog0: watchdog did not stop!

After 1 minute the system will reboot.

Please download LSDK21.08 yocto tiny image with the following command and verify it on your custom board.

$ wget https://www.nxp.com/lgfiles/sdk/lsdk2108/lsdk2108_yocto_tiny_LS_arm64.itb

 

 

0 项奖励
回复

490 次查看
mikelooijmans
Contributor IV

Interesting, with this image it does reboot.

More interesting - if I boot from SD card, it works, also with our own image. If I boot from FSPI flash, it hangs.

 

0 项奖励
回复

477 次查看
mikelooijmans
Contributor IV

Even more confusing - the watchdog works when the board boots with an SD card present. It doesn't matter whether it actually uses the SD card from booting, the watchdog also works when booting from FSPI.

If the board booted without SD card present, the watchdog hangs.

If I remove the SD card after booting, the watchdog reset keeps working. Even after a (watchdog triggered) reboot.

0 项奖励
回复

486 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please use NXP released LSDK 21.08 or later than LSDK 21.08, probably it missed some watchdog related patches in your original Linux Kernel source code.

0 项奖励
回复

473 次查看
mikelooijmans
Contributor IV

to be exact, my kernel version is:
https://github.com/nxp-qoriq/linux.git

ccf0a99701a701fb48a04e31ffe3f9d585a8374a
(tagged "lf-6.6.y")

0 项奖励
回复

452 次查看
yipingwang
NXP TechSupport
NXP TechSupport

I verified Linux Kernel built from

commit ccf0a99701a701fb48a04e31ffe3f9d585a8374a (tag: lf-6.6.3-1.0.0)

There is no problem.

I uploaded the pre-built images in the following link.

https://support.nxp.com/s/case/5002p00002zpaRKAAY/community-ls1027a-watchdog-hangs-the-system-instea...

0 项奖励
回复

449 次查看
yipingwang
NXP TechSupport
NXP TechSupport

In addition, I remove SD card and boot the system, watchdog reboot works normally without any problem.

This feature is not related with SD card.

0 项奖励
回复

475 次查看
mikelooijmans
Contributor IV

I'm using the freescale linux kernel version 6.6 because we need features from the newer kernel.

Which are the patches you're referring to? then I  can check if they've been added to mainline.

0 项奖励
回复