public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Add support to read the restart reason from IMEM
@ 2025-04-16  8:29 Kathiravan Thirumoorthy
  2025-04-16  8:29 ` [PATCH v2 1/5] dt-bindings: sram: qcom,imem: Document IPQ5424 compatible Kathiravan Thirumoorthy
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-04-16  8:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Wim Van Sebroeck, Guenter Roeck, Rajendra Nayak
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-watchdog,
	Kathiravan Thirumoorthy

In Qualcomm IPQ SoC, if the system is rebooted due to the watchdog
timeout, there is no way to identify it. Current approach of checking
the EXPIRED_STATUS in WDT_STS is not working.

To achieve this, if the system is rebooted due to watchdog timeout, the
information is captured in the IMEM by the bootloader (along with other
reason codes as well).

This series attempts to address this by adding the support to read the
IMEM and populate the information via bootstatus sysfs file. As of now,
we are handling only the non secure watchdog timeout reason.

Konrad, I sticked with syscon API to access the IMEM instead of exposing
it as mmio-sram to align with what is available in the mainline. Do let
me know if the current approach is still not correct / feasible.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v2:
- Dropped the RFC tag
- Reworked the driver changes to use the syscon API
- Link to v1: 20250408-wdt_reset_reason-v1-0-e6ec30c2c926@oss.qualcomm.com

---
Kathiravan Thirumoorthy (5):
      dt-bindings: sram: qcom,imem: Document IPQ5424 compatible
      arm64: dts: qcom: ipq5424: Add the IMEM node
      dt-bindings: watchdog: separate out the IPQ5424 compatilble
      arm64: dts: qcom: ipq5424: drop the fallback WDT compatible
      watchdog: qcom: add support to read the restart reason from IMEM

 .../devicetree/bindings/sram/qcom,imem.yaml        |  1 +
 .../devicetree/bindings/watchdog/qcom-wdt.yaml     |  7 +++-
 arch/arm64/boot/dts/qcom/ipq5424.dtsi              | 11 ++++-
 drivers/watchdog/qcom-wdt.c                        | 47 +++++++++++++++++++++-
 4 files changed, 61 insertions(+), 5 deletions(-)
---
base-commit: 7702d0130dc002bab2c3571ddb6ff68f82d99aea
change-id: 20250408-wdt_reset_reason-e12921963fa6

Best regards,
-- 
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-05-02  4:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  8:29 [PATCH v2 0/5] Add support to read the restart reason from IMEM Kathiravan Thirumoorthy
2025-04-16  8:29 ` [PATCH v2 1/5] dt-bindings: sram: qcom,imem: Document IPQ5424 compatible Kathiravan Thirumoorthy
2025-04-21 19:12   ` Rob Herring (Arm)
2025-04-16  8:29 ` [PATCH v2 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
2025-04-16 14:52   ` Konrad Dybcio
2025-04-16  8:29 ` [PATCH v2 3/5] dt-bindings: watchdog: separate out the IPQ5424 compatilble Kathiravan Thirumoorthy
2025-04-21 19:43   ` Rob Herring
2025-04-28  4:02     ` Kathiravan Thirumoorthy
2025-04-16  8:29 ` [PATCH v2 4/5] arm64: dts: qcom: ipq5424: drop the fallback WDT compatible Kathiravan Thirumoorthy
2025-04-21 19:44   ` Rob Herring
2025-04-16  8:29 ` [PATCH v2 5/5] watchdog: qcom: add support to read the restart reason from IMEM Kathiravan Thirumoorthy
2025-04-16 14:51   ` Konrad Dybcio
2025-04-17  6:19     ` Kathiravan Thirumoorthy
2025-04-30 14:28       ` Konrad Dybcio
2025-04-30 14:58         ` Kathiravan Thirumoorthy
2025-05-01  0:01   ` Bryan O'Donoghue
2025-05-02  4:42     ` Kathiravan Thirumoorthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox