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!