Hello,
I have a question related to providing "reset reason" on iMX8QM based bord.
We use API call "sc_pm_reset_reason" (SCUFW 1.15.0). from U-boot which sends PM_FUNC_RESET_REASON message to SCU. Unfortunately we receive always the same value: 0 or 2 (depending on boot media: eMMC or SDCard), which can be translated using imx8qm-scu-firmware/platform/svc/pm/api.h as "0 = Power on reset" "2 = Software reset", so in fact SCUFW just ignores real reset reason, e.g. "3 = Partition watchdog reset"
After some investigation we found that it happens because of different "partitions" set (caller_pt = 1) and read (caller_pt=3) reset reasons.
Another finding is that return value of soc_reset_reason() - it always constant (0 or 2) and does not depend on the real reboot cause.
This post has attached patch with workaround that adds some printings to understand behavior and quick fix for the issue.
Could someone please have a look - thanks in advance!
Hi @aliaksei_kakhayeu
Can you share where you trigger WDOG reset? Cortex-A or Cortex-M?
Best Regards,
Zhiming
Hi @aliaksei_kakhayeu
Would you mind share the POR design on your board?
Here is POR design on i.MX8QM MEK, the SCU WDOG will trigger POR signal to i.MX8. And the watchdog in Linux is a virtual watchdog. From the i.MX8QM MEK perspective, the WDOG reset is implemented as a POR-type reset.
If you simply want to make the reason for the reset clearer, then this modification is acceptable.
Best Regards,
Zhiming
Hi @Zhiming_Liu
I trigger watchdog by manual kernel crashing: "echo c > /proc/sysrq-trigger" on Cortex-A.
Hi @Zhiming_Liu
We decided to use this patch - thanks for help!
I'm also working on an iMX8QM project, and I found this doc very helpful for my project.
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8-i-MX8X-Board-Reset/ta-p/1391130