* [PATCH v11 1/3] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
2026-07-27 15:47 [PATCH v11 0/3] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-07-27 15:47 ` Kathiravan Thirumoorthy
2026-07-27 15:47 ` [PATCH v11 2/3] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-07-27 15:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio
Cc: linux-arm-msm, devicetree, linux-kernel, Kathiravan Thirumoorthy,
Krzysztof Kozlowski
IMEM shouldn’t be treated as a syscon or simple-mfd because it’s really
just on‑chip SRAM, not a block of control registers or a device with
multiple hardware functions.
Describing it as generic mmio‑sram keeps the model simple and closer to
what the hardware actually is.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Documentation/devicetree/bindings/sram/qcom,imem.yaml | 1 -
Documentation/devicetree/bindings/sram/sram.yaml | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
index eaa8ef367ff4..95630871d957 100644
--- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
@@ -18,7 +18,6 @@ properties:
items:
- enum:
- qcom,apq8064-imem
- - qcom,ipq5424-imem
- qcom,msm8226-imem
- qcom,msm8974-imem
- qcom,msm8976-imem
diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index b83fc6831947..0acb7593045c 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -37,6 +37,7 @@ properties:
- qcom,eliza-imem
- qcom,glymur-imem
- qcom,hawi-imem
+ - qcom,ipq5424-imem
- qcom,kaanapali-imem
- qcom,maili-imem
- qcom,milos-imem
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v11 2/3] arm64: dts: qcom: ipq5424: Add the IMEM node
2026-07-27 15:47 [PATCH v11 0/3] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-07-27 15:47 ` [PATCH v11 1/3] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
@ 2026-07-27 15:47 ` Kathiravan Thirumoorthy
2026-07-27 15:47 ` [PATCH v11 3/3] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-09-25 14:15 ` (subset) [PATCH v11 0/3] Add support to read the " Bjorn Andersson
3 siblings, 0 replies; 7+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-07-27 15:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio
Cc: linux-arm-msm, devicetree, linux-kernel, Kathiravan Thirumoorthy,
Dmitry Baryshkov, Konrad Dybcio
Add the IMEM node to the device tree to extract debugging information
like system restart reason, which is populated via IMEM. Define the
IMEM region to enable this functionality.
As described, overall IMEM region is 112KB but only initial 4KB is
accessible by all masters in the SoC.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index 702061e16a58..ed61db0749f8 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -730,6 +730,17 @@ ssphy_0: phy@7d000 {
status = "disabled";
};
+ sram@8600000 {
+ compatible = "qcom,ipq5424-imem", "mmio-sram";
+ reg = <0 0x08600000 0 0x1c000>;
+ ranges = <0 0 0x08600000 0x1c000>;
+
+ no-memory-wc;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+
usb3: usb3@8af8800 {
compatible = "qcom,ipq5424-dwc3", "qcom,dwc3";
reg = <0 0x08af8800 0 0x400>;
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v11 3/3] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
2026-07-27 15:47 [PATCH v11 0/3] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-07-27 15:47 ` [PATCH v11 1/3] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
2026-07-27 15:47 ` [PATCH v11 2/3] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
@ 2026-07-27 15:47 ` Kathiravan Thirumoorthy
2026-07-27 16:20 ` Mukesh Ojha
2026-09-25 14:15 ` (subset) [PATCH v11 0/3] Add support to read the " Bjorn Andersson
3 siblings, 1 reply; 7+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-07-27 15:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio
Cc: linux-arm-msm, devicetree, linux-kernel, Kathiravan Thirumoorthy,
Dmitry Baryshkov, Konrad Dybcio
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.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index ed61db0749f8..23f851e9241f 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -624,6 +624,7 @@ watchdog@f410000 {
reg = <0 0x0f410000 0 0x1000>;
interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
clocks = <&sleep_clk>;
+ sram = <&restart_reason>;
};
qusb_phy_1: phy@71000 {
@@ -739,6 +740,10 @@ sram@8600000 {
#address-cells = <1>;
#size-cells = <1>;
+
+ restart_reason: restartreason-sram@7b0 {
+ reg = <0x7b0 0x4>;
+ };
};
usb3: usb3@8af8800 {
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v11 3/3] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
2026-07-27 15:47 ` [PATCH v11 3/3] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-07-27 16:20 ` Mukesh Ojha
2026-07-27 16:40 ` Kathiravan Thirumoorthy
0 siblings, 1 reply; 7+ messages in thread
From: Mukesh Ojha @ 2026-07-27 16:20 UTC (permalink / raw)
To: Kathiravan Thirumoorthy
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
Dmitry Baryshkov, Konrad Dybcio
On Mon, Jul 27, 2026 at 09:17:37PM +0530, Kathiravan Thirumoorthy wrote:
> Add the "sram" property to the watchdog device node to enable
> retrieval of the system restart reason from IMEM, populated by XBL.
Just checking if it's XBL and not TZ? who writes into IMEM.
As when unsure, mentioning boot firmware is a better choice.
> Parse this information in the watchdog driver and update the bootstatus
> sysFS if the restart was triggered by a watchdog timeout.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> index ed61db0749f8..23f851e9241f 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> @@ -624,6 +624,7 @@ watchdog@f410000 {
> reg = <0 0x0f410000 0 0x1000>;
> interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
> clocks = <&sleep_clk>;
> + sram = <&restart_reason>;
> };
>
> qusb_phy_1: phy@71000 {
> @@ -739,6 +740,10 @@ sram@8600000 {
>
> #address-cells = <1>;
> #size-cells = <1>;
> +
> + restart_reason: restartreason-sram@7b0 {
> + reg = <0x7b0 0x4>;
> + };
> };
>
> usb3: usb3@8af8800 {
>
> --
> 2.34.1
>
--
-Mukesh Ojha
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v11 3/3] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
2026-07-27 16:20 ` Mukesh Ojha
@ 2026-07-27 16:40 ` Kathiravan Thirumoorthy
0 siblings, 0 replies; 7+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-07-27 16:40 UTC (permalink / raw)
To: Mukesh Ojha
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
Dmitry Baryshkov, Konrad Dybcio
On 7/27/2026 9:50 PM, Mukesh Ojha wrote:
> On Mon, Jul 27, 2026 at 09:17:37PM +0530, Kathiravan Thirumoorthy wrote:
>> Add the "sram" property to the watchdog device node to enable
>> retrieval of the system restart reason from IMEM, populated by XBL.
> Just checking if it's XBL and not TZ? who writes into IMEM.
>
> As when unsure, mentioning boot firmware is a better choice.
XBL consolidates the various SS reason codes and populates the final
reason via IMEM, which is consumed by the watchdog driver.
>
>> Parse this information in the watchdog driver and update the bootstatus
>> sysFS if the restart was triggered by a watchdog timeout.
>>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
>> index ed61db0749f8..23f851e9241f 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
>> @@ -624,6 +624,7 @@ watchdog@f410000 {
>> reg = <0 0x0f410000 0 0x1000>;
>> interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
>> clocks = <&sleep_clk>;
>> + sram = <&restart_reason>;
>> };
>>
>> qusb_phy_1: phy@71000 {
>> @@ -739,6 +740,10 @@ sram@8600000 {
>>
>> #address-cells = <1>;
>> #size-cells = <1>;
>> +
>> + restart_reason: restartreason-sram@7b0 {
>> + reg = <0x7b0 0x4>;
>> + };
>> };
>>
>> usb3: usb3@8af8800 {
>>
>> --
>> 2.34.1
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (subset) [PATCH v11 0/3] Add support to read the watchdog bootstatus from IMEM
2026-07-27 15:47 [PATCH v11 0/3] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
` (2 preceding siblings ...)
2026-07-27 15:47 ` [PATCH v11 3/3] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-09-25 14:15 ` Bjorn Andersson
3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2026-09-25 14:15 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Kathiravan Thirumoorthy
Cc: linux-arm-msm, devicetree, linux-kernel, Krzysztof Kozlowski,
Dmitry Baryshkov, Konrad Dybcio
From: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
On Mon, 27 Jul 2026 21:17:34 +0530, Kathiravan Thirumoorthy wrote:
> 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).
>
> [...]
Applied, thanks!
[1/3] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
commit: a97cccbf7a3025df41fa49d894c4e118594f046d
Best regards,
--
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread