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
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
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
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
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
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
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
© 2016 - 2026 Red Hat, Inc.