* [PATCH v7 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
2026-02-25 6:43 [PATCH v7 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-02-25 6:43 ` Kathiravan Thirumoorthy
2026-02-25 10:13 ` Krzysztof Kozlowski
2026-02-25 6:43 ` [PATCH v7 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-25 6:43 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
Based on the discussion in the linux-arm-msm list[1], it is not
appropriate to define the IMEM (On-Chip SRAM) as syscon or MFD.
So drop the compatible from qcom,imem.yaml and add it in sram.yaml
binding.
[1] https://lore.kernel.org/linux-arm-msm/e4c5ecc3-fd97-4b13-a057-bb1a3b7f9207@kernel.org/
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v7:
* Added the reference link
Changes in v6:
* New patch
---
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 6a627c57ae2fecdbb81cae710f6fb5e48156b1f5..72d35e30c439ccf4901d937f838fe7c7a81f33b1 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 c451140962c86f4e8f98437a2830cb2c6a697e63..7bd24305a8c7d98dc6efad81e72dc8d86d8b212b 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -34,6 +34,7 @@ properties:
- nvidia,tegra186-sysram
- nvidia,tegra194-sysram
- nvidia,tegra234-sysram
+ - qcom,ipq5424-imem
- qcom,kaanapali-imem
- qcom,rpm-msg-ram
- rockchip,rk3288-pmu-sram
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v7 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
2026-02-25 6:43 ` [PATCH v7 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
@ 2026-02-25 10:13 ` Krzysztof Kozlowski
2026-02-25 11:28 ` Kathiravan Thirumoorthy
0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-25 10:13 UTC (permalink / raw)
To: Kathiravan Thirumoorthy
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Wim Van Sebroeck, Guenter Roeck, Rajendra Nayak,
linux-arm-msm, devicetree, linux-kernel, linux-watchdog
On Wed, Feb 25, 2026 at 12:13:10PM +0530, Kathiravan Thirumoorthy wrote:
> Based on the discussion in the linux-arm-msm list[1], it is not
> appropriate to define the IMEM (On-Chip SRAM) as syscon or MFD.
The reason should be here. I asked that referencing 3rd party resources
is not the same as providing the reason.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v7 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
2026-02-25 10:13 ` Krzysztof Kozlowski
@ 2026-02-25 11:28 ` Kathiravan Thirumoorthy
0 siblings, 0 replies; 12+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-25 11:28 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Wim Van Sebroeck, Guenter Roeck, Rajendra Nayak,
linux-arm-msm, devicetree, linux-kernel, linux-watchdog
On 2/25/2026 3:43 PM, Krzysztof Kozlowski wrote:
> On Wed, Feb 25, 2026 at 12:13:10PM +0530, Kathiravan Thirumoorthy wrote:
>> Based on the discussion in the linux-arm-msm list[1], it is not
>> appropriate to define the IMEM (On-Chip SRAM) as syscon or MFD.
> The reason should be here. I asked that referencing 3rd party resources
> is not the same as providing the reason.
Sorry, I misunderstood your statement. Let me rewrite as below. Please
let me know if this is okay.
"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. In reality it’s just memory that different
pieces of software read or write. Describing it as generic mmio‑SRAM
keeps the model simple and closer to what the hardware actually is."
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v7 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node
2026-02-25 6:43 [PATCH v7 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
@ 2026-02-25 6:43 ` Kathiravan Thirumoorthy
2026-02-25 12:34 ` Konrad Dybcio
2026-02-25 6:43 ` [PATCH v7 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property Kathiravan Thirumoorthy
` (2 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-25 6:43 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, Dmitry Baryshkov
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>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v7:
- added the flag 'no-memory-wc'
- Picked up the R-b tag
Changes in v6:
- move to mmio-sram and drop the Konrad's R-b tag
Changes in v5:
- No changes
Changes in v4:
- No changes
Changes in v3:
- Picked up the R-b tag
Changes in v2:
- Describe the entire IMEM region in the node
- Explicitly call out that initial 4K only accessible by all
masters in the commit message
---
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 eb393f3fd728f0b2fc8cd93c849f8c170d76e312..491bc3b00494c47c5524df069e9d65bb4654e863 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -697,6 +697,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@8a00000 {
compatible = "qcom,ipq5424-dwc3", "qcom,dwc3";
reg = <0 0x08af8800 0 0x400>;
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v7 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node
2026-02-25 6:43 ` [PATCH v7 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
@ 2026-02-25 12:34 ` Konrad Dybcio
0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2026-02-25 12:34 UTC (permalink / raw)
To: Kathiravan Thirumoorthy, 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,
Dmitry Baryshkov
On 2/25/26 7:43 AM, Kathiravan Thirumoorthy wrote:
> 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>
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v7 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property
2026-02-25 6:43 [PATCH v7 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
@ 2026-02-25 6:43 ` Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
4 siblings, 0 replies; 12+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-25 6:43 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
Document the "sram" property for the watchdog device on Qualcomm
IPQ platforms. Use this property to extract the restart reason from
IMEM, which is updated by XBL. Populate the watchdog's bootstatus sysFS
entry with this information, when the system reboots due to a watchdog
timeout.
Describe this property for the IPQ5424 watchdog device and extend support
to other targets subsequently.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v7:
- Picked up the R-b tag
Changes in v6:
- Update the 'sram' property to point to the SRAM region
Changes in v5:
- Rename the property 'qcom,imem' to 'sram'
Changes in v4:
- New patch
---
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index 9f861045b71e8316ae88f8078a86043a6d04def8..3ead00da3cd6ffa0f6102179565723d4ab6c2929 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -84,6 +84,12 @@ properties:
minItems: 1
maxItems: 5
+ sram:
+ maxItems: 1
+ description:
+ A reference to an region residing in IMEM(on-chip SRAM), which contains
+ the system restart reason value populated by the bootloader.
+
required:
- compatible
- reg
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM
2026-02-25 6:43 [PATCH v7 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
` (2 preceding siblings ...)
2026-02-25 6:43 ` [PATCH v7 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property Kathiravan Thirumoorthy
@ 2026-02-25 6:43 ` Kathiravan Thirumoorthy
2026-02-25 12:41 ` Konrad Dybcio
2026-02-25 6:43 ` [PATCH v7 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
4 siblings, 1 reply; 12+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-25 6:43 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
When the system boots up after a watchdog reset, the EXPIRED_STATUS bit
in the WDT_STS register is cleared. To identify if the system was
restarted due to WDT expiry, XBL update the information in the IMEM region.
Update the driver to read the restart reason from IMEM and populate the
bootstatus accordingly.
With the CONFIG_WATCHDOG_SYSFS enabled, user can extract the information
as below:
cat /sys/devices/platform/soc@0/f410000.watchdog/watchdog/watchdog0/bootstatus
32
For backward compatibility, keep the EXPIRED_STATUS bit check. Add a new
function qcom_wdt_get_bootstatus() to read the restart reason from
IMEM.
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v7:
- no changes
Changes in v6:
- Reworked to get the restart reason code from SRAM region
Changes in v5:
- Use dev_err_probe instead of dev_err
Changes in v4:
- Kept only WDIOF_CARDRESET and dropped other codes
- Renamed qcom_wdt_get_reason_reason() to
qcom_wdt_get_bootstatus()
- Moved the existing check inside qcom_wdt_get_bootstatus()
- Dropped the device data and put all the details in the DT node
Changes in v3:
- Split the introduction of device data into separate patch
- s/bootloaders/XBL - for clarity of which bootloader is
involved
- Mention the sysfs path on to extract this information
- s/compatible/imem_compatible in the device data structure to
avoid the confusion / better naming
Changes in v2:
- Use the syscon API to access the IMEM region
- Handle the error cases returned by qcom_wdt_get_restart_reason
- Define device specific data to retrieve the IMEM compatible,
offset and the value for non secure WDT, which allows to
extend the support for other SoCs
---
drivers/watchdog/qcom-wdt.c | 43 +++++++++++++++++++++++++++++++++++++++++--
1 file changed, 41 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
index dfaac5995c84c1f377023e6e62770c5548528a4c..14853162d57ccae3092fb1c01616fdfca0108e74 100644
--- a/drivers/watchdog/qcom-wdt.c
+++ b/drivers/watchdog/qcom-wdt.c
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>
@@ -42,6 +43,7 @@ struct qcom_wdt_match_data {
const u32 *offset;
bool pretimeout;
u32 max_tick_count;
+ u32 wdt_reason_val;
};
struct qcom_wdt {
@@ -185,6 +187,7 @@ static const struct qcom_wdt_match_data match_data_ipq5424 = {
.offset = reg_offset_data_kpss,
.pretimeout = true,
.max_tick_count = 0xFFFFFU,
+ .wdt_reason_val = 5,
};
static const struct qcom_wdt_match_data match_data_kpss = {
@@ -193,6 +196,41 @@ static const struct qcom_wdt_match_data match_data_kpss = {
.max_tick_count = 0xFFFFFU,
};
+static int qcom_wdt_get_bootstatus(struct device *dev, struct qcom_wdt *wdt,
+ u32 val)
+{
+ struct device_node *imem;
+ struct resource res;
+ void __iomem *addr;
+ int ret;
+
+ imem = of_parse_phandle(dev->of_node, "sram", 0);
+ if (!imem) {
+
+ /* Fallback to the existing check */
+ if (readl(wdt_addr(wdt, WDT_STS)) & 1)
+ wdt->wdd.bootstatus = WDIOF_CARDRESET;
+
+ return 0;
+ }
+
+ ret = of_address_to_resource(imem, 0, &res);
+ of_node_put(imem);
+ if (ret)
+ return ret;
+
+ addr = ioremap(res.start, resource_size(&res));
+ if (!addr)
+ return -ENOMEM;
+
+ if (readl(addr) == val)
+ wdt->wdd.bootstatus = WDIOF_CARDRESET;
+
+ iounmap(addr);
+
+ return 0;
+}
+
static int qcom_wdt_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -273,8 +311,9 @@ static int qcom_wdt_probe(struct platform_device *pdev)
wdt->wdd.parent = dev;
wdt->layout = data->offset;
- if (readl(wdt_addr(wdt, WDT_STS)) & 1)
- wdt->wdd.bootstatus = WDIOF_CARDRESET;
+ ret = qcom_wdt_get_bootstatus(dev, wdt, data->wdt_reason_val);
+ if (ret)
+ return ret;
/*
* If 'timeout-sec' unspecified in devicetree, assume a 30 second
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM
2026-02-25 6:43 ` [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-02-25 12:41 ` Konrad Dybcio
2026-02-25 13:25 ` Kathiravan Thirumoorthy
0 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2026-02-25 12:41 UTC (permalink / raw)
To: Kathiravan Thirumoorthy, 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
On 2/25/26 7:43 AM, Kathiravan Thirumoorthy wrote:
> When the system boots up after a watchdog reset, the EXPIRED_STATUS bit
> in the WDT_STS register is cleared. To identify if the system was
> restarted due to WDT expiry, XBL update the information in the IMEM region.
> Update the driver to read the restart reason from IMEM and populate the
> bootstatus accordingly.
>
> With the CONFIG_WATCHDOG_SYSFS enabled, user can extract the information
> as below:
>
> cat /sys/devices/platform/soc@0/f410000.watchdog/watchdog/watchdog0/bootstatus
> 32
>
> For backward compatibility, keep the EXPIRED_STATUS bit check. Add a new
> function qcom_wdt_get_bootstatus() to read the restart reason from
> IMEM.
>
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
[...]
> +static int qcom_wdt_get_bootstatus(struct device *dev, struct qcom_wdt *wdt,
> + u32 val)
> +{
> + struct device_node *imem;
> + struct resource res;
> + void __iomem *addr;
> + int ret;
> +
> + imem = of_parse_phandle(dev->of_node, "sram", 0);
> + if (!imem) {
> +
> + /* Fallback to the existing check */
Odd \n above
'existing' is imprecise, perhaps something like
/* Read the EXPIRED_STATUS bit as a fallback */
lg otherwise
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM
2026-02-25 12:41 ` Konrad Dybcio
@ 2026-02-25 13:25 ` Kathiravan Thirumoorthy
0 siblings, 0 replies; 12+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-25 13:25 UTC (permalink / raw)
To: Konrad Dybcio, 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
On 2/25/2026 6:11 PM, Konrad Dybcio wrote:
> On 2/25/26 7:43 AM, Kathiravan Thirumoorthy wrote:
>> When the system boots up after a watchdog reset, the EXPIRED_STATUS bit
>> in the WDT_STS register is cleared. To identify if the system was
>> restarted due to WDT expiry, XBL update the information in the IMEM region.
>> Update the driver to read the restart reason from IMEM and populate the
>> bootstatus accordingly.
>>
>> With the CONFIG_WATCHDOG_SYSFS enabled, user can extract the information
>> as below:
>>
>> cat /sys/devices/platform/soc@0/f410000.watchdog/watchdog/watchdog0/bootstatus
>> 32
>>
>> For backward compatibility, keep the EXPIRED_STATUS bit check. Add a new
>> function qcom_wdt_get_bootstatus() to read the restart reason from
>> IMEM.
>>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
> [...]
>
>> +static int qcom_wdt_get_bootstatus(struct device *dev, struct qcom_wdt *wdt,
>> + u32 val)
>> +{
>> + struct device_node *imem;
>> + struct resource res;
>> + void __iomem *addr;
>> + int ret;
>> +
>> + imem = of_parse_phandle(dev->of_node, "sram", 0);
>> + if (!imem) {
>> +
>> + /* Fallback to the existing check */
> Odd \n above
>
> 'existing' is imprecise, perhaps something like
>
> /* Read the EXPIRED_STATUS bit as a fallback */
Thanks, will update the comment as above in next spin.
>
> lg otherwise
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v7 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
2026-02-25 6:43 [PATCH v7 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
` (3 preceding siblings ...)
2026-02-25 6:43 ` [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-02-25 6:43 ` Kathiravan Thirumoorthy
2026-02-25 12:34 ` Konrad Dybcio
4 siblings, 1 reply; 12+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-25 6:43 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, Dmitry Baryshkov
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>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v7:
- Picked up the R-b tag
Changes in v6:
- Update the 'sram' property to point to the SRAM region
Changes in v5:
- Rename the property 'qcom,imem' to 'sram'
Changes in v4:
- New patch
---
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 491bc3b00494c47c5524df069e9d65bb4654e863..86de974949f48269170a2bfbeb64214d37fbe488 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -591,6 +591,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 {
@@ -706,6 +707,10 @@ sram@8600000 {
#address-cells = <1>;
#size-cells = <1>;
+
+ restart_reason: restartreason-sram@7b0 {
+ reg = <0x7b0 0x4>;
+ };
};
usb3: usb3@8a00000 {
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v7 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
2026-02-25 6:43 ` [PATCH v7 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
@ 2026-02-25 12:34 ` Konrad Dybcio
0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2026-02-25 12:34 UTC (permalink / raw)
To: Kathiravan Thirumoorthy, 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,
Dmitry Baryshkov
On 2/25/26 7:43 AM, 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.
> 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>
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread