[PATCH v4 1/2] arm64: dts: qcom: ipq9574: add support to get watchdog bootstatus from IMEM
From: Kathiravan Thirumoorthy
Date: Wed Nov 11 2026 - 23:44:04 EST
Add the "sram" property to the watchdog device node to enable
retrieval of the system restart reason from IMEM, populated by XBL.
Parse this information in the watchdog driver and update the bootstatus
sysFS if the restart was triggered by a watchdog timeout.
To achieve this, add the IMEM node. The overall IMEM region is 32KB but
only initial 4KB is accessible by all masters in the SoC.
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@xxxxxxxxxxxxxxxx>
---
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index abb7a8391b46..b50fcd6e91b7 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -757,6 +757,21 @@ usb_0_qmpphy: phy@7d000 {
status = "disabled";
};
+ sram@8600000 {
+ compatible = "qcom,ipq9574-imem", "mmio-sram";
+ reg = <0x08600000 0x8000>;
+ ranges = <0 0x08600000 0x8000>;
+
+ no-memory-wc;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ restart_reason: restartreason-sram@7a4 {
+ reg = <0x7a4 0x4>;
+ };
+ };
+
usb3: usb@8a00000 {
compatible = "qcom,ipq9574-dwc3", "qcom,snps-dwc3";
reg = <0x08a00000 0xfc100>;
@@ -841,6 +856,7 @@ watchdog: watchdog@b017000 {
interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
clocks = <&sleep_clk>;
timeout-sec = <30>;
+ sram = <&restart_reason>;
};
apcs_glb: mailbox@b111000 {
--
2.34.1