[PATCH v3 2/3] arm64: dts: qcom: ipq9574: add support to get watchdog bootstatus from IMEM

From: Kathiravan Thirumoorthy

Date: Mon Oct 19 2026 - 13:04:00 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.

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 771a59585645..e1908f01851d 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@8af8800 {
compatible = "qcom,ipq9574-dwc3", "qcom,dwc3";
reg = <0x08af8800 0x400>;
@@ -847,6 +862,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