public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/5] Add support to read the watchdog bootstatus from IMEM
@ 2026-01-30 10:44 Kathiravan Thirumoorthy
  2026-01-30 10:44 ` [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-01-30 10:44 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

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@0/f410000.watchdog/watchdog/watchdog0/bootstatus
32

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v6:
- Moved the IMEM compatible from qcom,imem to sram binding
- Updated the 'sram' property in watchdog binding to point to SRAM
  region and update the watchdog driver accordingly
- Dropped the Konrad's R-b tag in 2/5

Changes in v5:
- Rename property 'qcom,imem' to 'sram'
- Use dev_err_probe instead of dev_err
- Link to v4:
  https://lore.kernel.org/linux-arm-msm/20250519-wdt_reset_reason-v4-0-d59d21275c75@oss.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/

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>

---
Kathiravan Thirumoorthy (5):
      dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
      arm64: dts: qcom: ipq5424: Add the IMEM node
      dt-bindings: watchdog: qcom-wdt: Document sram 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 -
 Documentation/devicetree/bindings/sram/sram.yaml   |  1 +
 .../devicetree/bindings/watchdog/qcom-wdt.yaml     |  6 +++
 arch/arm64/boot/dts/qcom/ipq5424.dtsi              | 14 +++++++
 drivers/watchdog/qcom-wdt.c                        | 43 +++++++++++++++++++++-
 5 files changed, 62 insertions(+), 3 deletions(-)
---
base-commit: 33a647c659ffa5bdb94abc345c8c86768ff96215
change-id: 20250610-wdt_reset_reason-7a5afe702075

Best regards,
-- 
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
  2026-01-30 10:44 [PATCH v6 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-01-30 10:44 ` Kathiravan Thirumoorthy
  2026-01-31  8:20   ` Dmitry Baryshkov
  2026-02-05  9:18   ` Krzysztof Kozlowski
  2026-01-30 10:44 ` [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-01-30 10:44 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, 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.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
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 related	[flat|nested] 21+ messages in thread

* [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node
  2026-01-30 10:44 [PATCH v6 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
  2026-01-30 10:44 ` [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
@ 2026-01-30 10:44 ` Kathiravan Thirumoorthy
  2026-01-31  8:16   ` Dmitry Baryshkov
  2026-02-02 12:23   ` Konrad Dybcio
  2026-01-30 10:44 ` [PATCH v6 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property Kathiravan Thirumoorthy
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-01-30 10:44 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

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.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
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 | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index eb393f3fd728f0b2fc8cd93c849f8c170d76e312..90790f99f0597b63801d4e07b9b72cd372ad46d4 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -697,6 +697,15 @@ ssphy_0: phy@7d000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq5424-imem", "mmio-sram";
+			reg = <0 0x08600000 0 0x1c000>;
+			ranges = <0 0 0x08600000 0x1c000>;
+
+			#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 related	[flat|nested] 21+ messages in thread

* [PATCH v6 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property
  2026-01-30 10:44 [PATCH v6 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
  2026-01-30 10:44 ` [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
  2026-01-30 10:44 ` [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
@ 2026-01-30 10:44 ` Kathiravan Thirumoorthy
  2026-02-09 17:56   ` Rob Herring (Arm)
  2026-01-30 10:44 ` [PATCH v6 4/5] watchdog: qcom: add support to get the bootstatus from IMEM Kathiravan Thirumoorthy
  2026-01-30 10:44 ` [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
  4 siblings, 1 reply; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-01-30 10:44 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.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
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 related	[flat|nested] 21+ messages in thread

* [PATCH v6 4/5] watchdog: qcom: add support to get the bootstatus from IMEM
  2026-01-30 10:44 [PATCH v6 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
                   ` (2 preceding siblings ...)
  2026-01-30 10:44 ` [PATCH v6 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property Kathiravan Thirumoorthy
@ 2026-01-30 10:44 ` Kathiravan Thirumoorthy
  2026-01-30 10:44 ` [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
  4 siblings, 0 replies; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-01-30 10:44 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 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 related	[flat|nested] 21+ messages in thread

* [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-01-30 10:44 [PATCH v6 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
                   ` (3 preceding siblings ...)
  2026-01-30 10:44 ` [PATCH v6 4/5] watchdog: qcom: add support to get the bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-01-30 10:44 ` Kathiravan Thirumoorthy
  2026-01-31  8:18   ` Dmitry Baryshkov
  4 siblings, 1 reply; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-01-30 10:44 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

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.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
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 90790f99f0597b63801d4e07b9b72cd372ad46d4..dd91113c770502346dc4c65bd447a14bcbec4a27 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 {
@@ -704,6 +705,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 related	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node
  2026-01-30 10:44 ` [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
@ 2026-01-31  8:16   ` Dmitry Baryshkov
  2026-02-02 12:23   ` Konrad Dybcio
  1 sibling, 0 replies; 21+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31  8:16 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 Fri, Jan 30, 2026 at 04:14:31PM +0530, 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.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> 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 | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-01-30 10:44 ` [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
@ 2026-01-31  8:18   ` Dmitry Baryshkov
  2026-02-02 13:44     ` Mukesh Ojha
  0 siblings, 1 reply; 21+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31  8:18 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 Fri, Jan 30, 2026 at 04:14:34PM +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.
> Parse this information in the watchdog driver and update the bootstatus
> sysFS if the restart was triggered by a watchdog timeout.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> 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(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
  2026-01-30 10:44 ` [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
@ 2026-01-31  8:20   ` Dmitry Baryshkov
  2026-02-02 12:33     ` Konrad Dybcio
  2026-02-05  9:18   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 21+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31  8:20 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 Fri, Jan 30, 2026 at 04:14:30PM +0530, Kathiravan Thirumoorthy wrote:
> Based on the discussion in the linux-arm-msm list, 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.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> 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/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

Bjorn, Konrad, I sadly don't remember the outcome of our discussion. Do
we need to specify that this SRAM region is Qualcomm something IMEM or
do we not?

>          - qcom,kaanapali-imem
>          - qcom,rpm-msg-ram
>          - rockchip,rk3288-pmu-sram
> 
> -- 
> 2.34.1
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node
  2026-01-30 10:44 ` [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
  2026-01-31  8:16   ` Dmitry Baryshkov
@ 2026-02-02 12:23   ` Konrad Dybcio
  2026-02-02 12:50     ` Kathiravan Thirumoorthy
  1 sibling, 1 reply; 21+ messages in thread
From: Konrad Dybcio @ 2026-02-02 12:23 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 1/30/26 11:44 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.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> 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 | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> index eb393f3fd728f0b2fc8cd93c849f8c170d76e312..90790f99f0597b63801d4e07b9b72cd372ad46d4 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> @@ -697,6 +697,15 @@ ssphy_0: phy@7d000 {
>  			status = "disabled";
>  		};
>  
> +		sram@8600000 {
> +			compatible = "qcom,ipq5424-imem", "mmio-sram";
> +			reg = <0 0x08600000 0 0x1c000>;
> +			ranges = <0 0 0x08600000 0x1c000>;
> +
> +			#address-cells = <1>;
> +			#size-cells = <1>;

I think you may need to add 'no-memory-wc' too, in case someone uses
any of the sram functions on this in the future

Konrad

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
  2026-01-31  8:20   ` Dmitry Baryshkov
@ 2026-02-02 12:33     ` Konrad Dybcio
  0 siblings, 0 replies; 21+ messages in thread
From: Konrad Dybcio @ 2026-02-02 12:33 UTC (permalink / raw)
  To: Dmitry Baryshkov, 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 1/31/26 9:20 AM, Dmitry Baryshkov wrote:
> On Fri, Jan 30, 2026 at 04:14:30PM +0530, Kathiravan Thirumoorthy wrote:
>> Based on the discussion in the linux-arm-msm list, 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.
>>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>> 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/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
> 
> Bjorn, Konrad, I sadly don't remember the outcome of our discussion. Do
> we need to specify that this SRAM region is Qualcomm something IMEM or
> do we not?

Do you mean BOOT_IMEM vs SYSTEM_IMEM?

I don't think we have a usecase for the former in Linux and I'm not
sure we ever will (plus we already refer to SYSTEM_IMEM as "imem" in
a lot, lot of places)

Konrad

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node
  2026-02-02 12:23   ` Konrad Dybcio
@ 2026-02-02 12:50     ` Kathiravan Thirumoorthy
  0 siblings, 0 replies; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-02 12:50 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/2/2026 5:53 PM, Konrad Dybcio wrote:
> On 1/30/26 11:44 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.
>>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>> 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 | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
>> index eb393f3fd728f0b2fc8cd93c849f8c170d76e312..90790f99f0597b63801d4e07b9b72cd372ad46d4 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
>> @@ -697,6 +697,15 @@ ssphy_0: phy@7d000 {
>>   			status = "disabled";
>>   		};
>>   
>> +		sram@8600000 {
>> +			compatible = "qcom,ipq5424-imem", "mmio-sram";
>> +			reg = <0 0x08600000 0 0x1c000>;
>> +			ranges = <0 0 0x08600000 0x1c000>;
>> +
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
> I think you may need to add 'no-memory-wc' too, in case someone uses
> any of the sram functions on this in the future
Ack. Let me take care of this in next spin.
>
> Konrad

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-01-31  8:18   ` Dmitry Baryshkov
@ 2026-02-02 13:44     ` Mukesh Ojha
  2026-02-03  4:35       ` Kathiravan Thirumoorthy
  2026-02-04 12:39       ` Konrad Dybcio
  0 siblings, 2 replies; 21+ messages in thread
From: Mukesh Ojha @ 2026-02-02 13:44 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Kathiravan Thirumoorthy, 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 Sat, Jan 31, 2026 at 10:18:29AM +0200, Dmitry Baryshkov wrote:
> On Fri, Jan 30, 2026 at 04:14:34PM +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.
> > Parse this information in the watchdog driver and update the bootstatus
> > sysFS if the restart was triggered by a watchdog timeout.
> > 
> > Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> > ---
> > 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(+)
> > 
> 
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


I have a few more cookies (stored in a fixed IMEM location supported
downstream) that I want to add, and they are available on all Qualcomm
mobile SoCs. Should it be added under SMEM now?


> 
> 
> -- 
> With best wishes
> Dmitry

-- 
-Mukesh Ojha

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-02-02 13:44     ` Mukesh Ojha
@ 2026-02-03  4:35       ` Kathiravan Thirumoorthy
  2026-02-03  6:11         ` Mukesh Ojha
  2026-02-04 12:39       ` Konrad Dybcio
  1 sibling, 1 reply; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-03  4:35 UTC (permalink / raw)
  To: Mukesh Ojha, Dmitry Baryshkov
  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/2/2026 7:14 PM, Mukesh Ojha wrote:
> On Sat, Jan 31, 2026 at 10:18:29AM +0200, Dmitry Baryshkov wrote:
>> On Fri, Jan 30, 2026 at 04:14:34PM +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.
>>> Parse this information in the watchdog driver and update the bootstatus
>>> sysFS if the restart was triggered by a watchdog timeout.
>>>
>>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>>> ---
>>> 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(+)
>>>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
> I have a few more cookies (stored in a fixed IMEM location supported
> downstream) that I want to add, and they are available on all Qualcomm
> mobile SoCs. Should it be added under SMEM now?


Mukesh, you mean SMEM or SRAM? Do we have the consumers in upstream for 
all those cookies?


>
>
>>
>> -- 
>> With best wishes
>> Dmitry

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-02-03  4:35       ` Kathiravan Thirumoorthy
@ 2026-02-03  6:11         ` Mukesh Ojha
  0 siblings, 0 replies; 21+ messages in thread
From: Mukesh Ojha @ 2026-02-03  6:11 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy
  Cc: Dmitry Baryshkov, 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 Tue, Feb 03, 2026 at 10:05:26AM +0530, Kathiravan Thirumoorthy wrote:
> 
> On 2/2/2026 7:14 PM, Mukesh Ojha wrote:
> > On Sat, Jan 31, 2026 at 10:18:29AM +0200, Dmitry Baryshkov wrote:
> > > On Fri, Jan 30, 2026 at 04:14:34PM +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.
> > > > Parse this information in the watchdog driver and update the bootstatus
> > > > sysFS if the restart was triggered by a watchdog timeout.
> > > > 
> > > > Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> > > > ---
> > > > 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(+)
> > > > 
> > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > 
> > I have a few more cookies (stored in a fixed IMEM location supported
> > downstream) that I want to add, and they are available on all Qualcomm
> > mobile SoCs. Should it be added under SMEM now?
> 
> 
> Mukesh, you mean SMEM or SRAM? Do we have the consumers in upstream for all
> those cookies?

Forgive me,. yeah I meant SRAM. 

> 
> 
> > 
> > 
> > > 
> > > -- 
> > > With best wishes
> > > Dmitry

-- 
-Mukesh Ojha

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-02-02 13:44     ` Mukesh Ojha
  2026-02-03  4:35       ` Kathiravan Thirumoorthy
@ 2026-02-04 12:39       ` Konrad Dybcio
  2026-02-06 18:22         ` Mukesh Ojha
  1 sibling, 1 reply; 21+ messages in thread
From: Konrad Dybcio @ 2026-02-04 12:39 UTC (permalink / raw)
  To: Mukesh Ojha, Dmitry Baryshkov
  Cc: Kathiravan Thirumoorthy, 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/2/26 2:44 PM, Mukesh Ojha wrote:
> On Sat, Jan 31, 2026 at 10:18:29AM +0200, Dmitry Baryshkov wrote:
>> On Fri, Jan 30, 2026 at 04:14:34PM +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.
>>> Parse this information in the watchdog driver and update the bootstatus
>>> sysFS if the restart was triggered by a watchdog timeout.
>>>
>>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>>> ---
>>> 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(+)
>>>
>>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> 
> 
> I have a few more cookies (stored in a fixed IMEM location supported
> downstream) that I want to add, and they are available on all Qualcomm
> mobile SoCs. Should it be added under SMEM now?

FWIW currently they won't be probed (if you wanted to give them a compatible
string and bind a driver based on that), since drivers/misc/sram.c lacks an
of_platform_populate(), but that's trivial to change

I think getting agreement on dt-bindings may be the tougher part..

Are the cookies you want to use attached to any other part of the hardware
(e.g. in case of pil-info it's directly connected to the rprocs), or are
they general debug information?

Konrad

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
  2026-01-30 10:44 ` [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
  2026-01-31  8:20   ` Dmitry Baryshkov
@ 2026-02-05  9:18   ` Krzysztof Kozlowski
  2026-02-05  9:31     ` Kathiravan Thirumoorthy
  1 sibling, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-05  9:18 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 Fri, Jan 30, 2026 at 04:14:30PM +0530, Kathiravan Thirumoorthy wrote:
> Based on the discussion in the linux-arm-msm list, it is not
> appropriate to define the IMEM (On-Chip SRAM) as syscon or MFD.

3rd party discussions without any references are not valid reason. You

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram
  2026-02-05  9:18   ` Krzysztof Kozlowski
@ 2026-02-05  9:31     ` Kathiravan Thirumoorthy
  0 siblings, 0 replies; 21+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-02-05  9:31 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/5/2026 2:48 PM, Krzysztof Kozlowski wrote:
> On Fri, Jan 30, 2026 at 04:14:30PM +0530, Kathiravan Thirumoorthy wrote:
>> Based on the discussion in the linux-arm-msm list, it is not
>> appropriate to define the IMEM (On-Chip SRAM) as syscon or MFD.
> 3rd party discussions without any references are not valid reason. You


Here is the reference - 
https://lore.kernel.org/linux-arm-msm/e4c5ecc3-fd97-4b13-a057-bb1a3b7f9207@kernel.org. 
Let me include this in next revision.


>
> Best regards,
> Krzysztof
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-02-04 12:39       ` Konrad Dybcio
@ 2026-02-06 18:22         ` Mukesh Ojha
  2026-02-17  9:54           ` Konrad Dybcio
  0 siblings, 1 reply; 21+ messages in thread
From: Mukesh Ojha @ 2026-02-06 18:22 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Dmitry Baryshkov, Kathiravan Thirumoorthy, 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 04, 2026 at 01:39:43PM +0100, Konrad Dybcio wrote:
> On 2/2/26 2:44 PM, Mukesh Ojha wrote:
> > On Sat, Jan 31, 2026 at 10:18:29AM +0200, Dmitry Baryshkov wrote:
> >> On Fri, Jan 30, 2026 at 04:14:34PM +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.
> >>> Parse this information in the watchdog driver and update the bootstatus
> >>> sysFS if the restart was triggered by a watchdog timeout.
> >>>
> >>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> >>> ---
> >>> 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(+)
> >>>
> >>
> >> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > 
> > 
> > I have a few more cookies (stored in a fixed IMEM location supported
> > downstream) that I want to add, and they are available on all Qualcomm
> > mobile SoCs. Should it be added under SMEM now?
> 
> FWIW currently they won't be probed (if you wanted to give them a compatible
> string and bind a driver based on that), since drivers/misc/sram.c lacks an
> of_platform_populate(), but that's trivial to change
> 
> I think getting agreement on dt-bindings may be the tougher part..
> 
> Are the cookies you want to use attached to any other part of the hardware
> (e.g. in case of pil-info it's directly connected to the rprocs), or are
> they general debug information?

It is attached to Minidump collection storage type selection like USB or UFS/eMMC.
When we change dload mode (in SCM driver) to mini and change this IMEM to UFS
then the Minidump will be stored in UFS.

It has to be SCM driver which should host this but it does not need to
be driver or device creation.

> 
> Konrad

-- 
-Mukesh Ojha

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property
  2026-01-30 10:44 ` [PATCH v6 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property Kathiravan Thirumoorthy
@ 2026-02-09 17:56   ` Rob Herring (Arm)
  0 siblings, 0 replies; 21+ messages in thread
From: Rob Herring (Arm) @ 2026-02-09 17:56 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy
  Cc: Wim Van Sebroeck, Guenter Roeck, Bjorn Andersson, Konrad Dybcio,
	linux-arm-msm, devicetree, linux-kernel, Conor Dooley,
	Rajendra Nayak, linux-watchdog, Krzysztof Kozlowski


On Fri, 30 Jan 2026 16:14:32 +0530, Kathiravan Thirumoorthy wrote:
> 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.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> 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(+)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM
  2026-02-06 18:22         ` Mukesh Ojha
@ 2026-02-17  9:54           ` Konrad Dybcio
  0 siblings, 0 replies; 21+ messages in thread
From: Konrad Dybcio @ 2026-02-17  9:54 UTC (permalink / raw)
  To: Mukesh Ojha
  Cc: Dmitry Baryshkov, Kathiravan Thirumoorthy, 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/6/26 7:22 PM, Mukesh Ojha wrote:
> On Wed, Feb 04, 2026 at 01:39:43PM +0100, Konrad Dybcio wrote:
>> On 2/2/26 2:44 PM, Mukesh Ojha wrote:
>>> On Sat, Jan 31, 2026 at 10:18:29AM +0200, Dmitry Baryshkov wrote:
>>>> On Fri, Jan 30, 2026 at 04:14:34PM +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.
>>>>> Parse this information in the watchdog driver and update the bootstatus
>>>>> sysFS if the restart was triggered by a watchdog timeout.
>>>>>
>>>>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>>>>> ---
>>>>> 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(+)
>>>>>
>>>>
>>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>
>>>
>>> I have a few more cookies (stored in a fixed IMEM location supported
>>> downstream) that I want to add, and they are available on all Qualcomm
>>> mobile SoCs. Should it be added under SMEM now?
>>
>> FWIW currently they won't be probed (if you wanted to give them a compatible
>> string and bind a driver based on that), since drivers/misc/sram.c lacks an
>> of_platform_populate(), but that's trivial to change
>>
>> I think getting agreement on dt-bindings may be the tougher part..
>>
>> Are the cookies you want to use attached to any other part of the hardware
>> (e.g. in case of pil-info it's directly connected to the rprocs), or are
>> they general debug information?
> 
> It is attached to Minidump collection storage type selection like USB or UFS/eMMC.
> When we change dload mode (in SCM driver) to mini and change this IMEM to UFS
> then the Minidump will be stored in UFS.
> 
> It has to be SCM driver which should host this but it does not need to
> be driver or device creation.

Then I think something along these lines should be good:

sram@f00bar {
	compatible = "qcom,xxx-imem"....

	minidump_config: minidump-config@baz {
		reg = <0xbaz 0x1234>;
	};
};


...

scm {
	compatible = ...

	sram = <&minidump_config>;
	// perhaps "sram-names" too? doesn't exist today but scm seems
	// too broad to rely on an index-based lookup that works for everyone
				  
};

Konrad

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-02-17  9:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30 10:44 [PATCH v6 0/5] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-01-30 10:44 ` [PATCH v6 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
2026-01-31  8:20   ` Dmitry Baryshkov
2026-02-02 12:33     ` Konrad Dybcio
2026-02-05  9:18   ` Krzysztof Kozlowski
2026-02-05  9:31     ` Kathiravan Thirumoorthy
2026-01-30 10:44 ` [PATCH v6 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
2026-01-31  8:16   ` Dmitry Baryshkov
2026-02-02 12:23   ` Konrad Dybcio
2026-02-02 12:50     ` Kathiravan Thirumoorthy
2026-01-30 10:44 ` [PATCH v6 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property Kathiravan Thirumoorthy
2026-02-09 17:56   ` Rob Herring (Arm)
2026-01-30 10:44 ` [PATCH v6 4/5] watchdog: qcom: add support to get the bootstatus from IMEM Kathiravan Thirumoorthy
2026-01-30 10:44 ` [PATCH v6 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
2026-01-31  8:18   ` Dmitry Baryshkov
2026-02-02 13:44     ` Mukesh Ojha
2026-02-03  4:35       ` Kathiravan Thirumoorthy
2026-02-03  6:11         ` Mukesh Ojha
2026-02-04 12:39       ` Konrad Dybcio
2026-02-06 18:22         ` Mukesh Ojha
2026-02-17  9:54           ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox