[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250519-wdt_reset_reason-v4-0-d59d21275c75@oss.qualcomm.com>
Date: Mon, 19 May 2025 14:04:00 +0530
From: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
To: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>,
Rajendra Nayak <quic_rjendra@...cinc.com>
Cc: linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Subject: [PATCH v4 0/5] Add support to read the watchdog bootstatus from
IMEM
In Qualcomm IPQ SoCs, 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.
With the CONFIG_WATCHDOG_SYSFS enabled, user can extract the information
as below:
cat /sys/devices/platform/soc@...410000.watchdog/watchdog/watchdog0/bootstatus
32
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
---
Changes in v4:
- Kept only the WDIOF_CARDRESET and dropped other codes (Guenter)
- Renamed qcom_wdt_get_restart_reason() to qcom_wdt_get_bootstatus()
- Dropped the device data and describe the required information in the DT (Konrad)
- Link to v3:
https://lore.kernel.org/linux-arm-msm/20250502-wdt_reset_reason-v3-0-b2dc7ace38ca@oss.qualcomm.com/
Changes in v3:
- Picked up the relevant tags
- Dropped the fallback compatible handling
- Split the driver changes into 2. Introduce the device data in one and
extend the same in another for the use case
- Link to v2:
https://lore.kernel.org/linux-arm-msm/20250416-wdt_reset_reason-v2-0-c65bba312914@oss.qualcomm.com/
Changes in v2:
- Dropped the RFC tag
- Reworked the driver changes to use the syscon API
- Link to v1:
https://lore.kernel.org/linux-arm-msm/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: qcom-wdt: Document qcom,imem property
watchdog: qcom: add support to get the bootstatus from IMEM
arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
.../devicetree/bindings/sram/qcom,imem.yaml | 1 +
.../devicetree/bindings/watchdog/qcom-wdt.yaml | 20 +++++++++++
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 10 ++++++
drivers/watchdog/qcom-wdt.c | 42 ++++++++++++++++++++--
4 files changed, 71 insertions(+), 2 deletions(-)
---
base-commit: 8566fc3b96539e3235909d6bdda198e1282beaed
change-id: 20250408-wdt_reset_reason-e12921963fa6
Best regards,
--
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
Powered by blists - more mailing lists