* [PATCH v4 0/2] Add support for reporting boot status on Qualcomm IPQ9574 and IPQ5332
@ 2026-11-12 4:38 Kathiravan Thirumoorthy
2026-11-12 4:38 ` [PATCH v4 1/2] arm64: dts: qcom: ipq9574: add support to get watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-11-12 4:38 ` [PATCH v4 2/2] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
0 siblings, 2 replies; 4+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-11-12 4:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Abel Vesa
Cc: devicetree, linux-kernel, linux-arm-msm, Kathiravan Thirumoorthy,
Konrad Dybcio
Similar to IPQ5424, add the IMEM node and the restart-reason child node
on IPQ9574 and IPQ5332 to enable reporting of watchdog boot status.
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v4:
- Rebase on linux-next next-20261111 to fix the conflicts
- Dropped the binding which is applied
- Link to v3: https://patch.msgid.link/20261019-imem_restart_reason-v3-0-e6b1ff5de841@oss.qualcomm.com
Changes in v3:
- Picked the A-b tag
- Squashed 2/5, 3/5 and 4/5, 5/5 into one to match with the schema
definition
- Link to v2: https://patch.msgid.link/20261002-imem_restart_reason-v2-0-61703c6362e3@oss.qualcomm.com
Changes in v2:
- Placed the compatibles in alphabetical order
- Fixed the unit-address in the restartreason-sram node in 4/5 and 5/5
- Link to v1: https://patch.msgid.link/20261001-imem_restart_reason-v1-0-79f516906010@oss.qualcomm.com
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
To: Abel Vesa <abelvesa@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
---
Kathiravan Thirumoorthy (2):
arm64: dts: qcom: ipq9574: add support to get watchdog bootstatus from IMEM
arm64: dts: qcom: ipq5332: add support to get watchdog bootstatus from IMEM
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 16 ++++++++++++++++
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 16 ++++++++++++++++
2 files changed, 32 insertions(+)
---
base-commit: aaa2f954c21b205a0bcd0961e5b2be4e82e58455
change-id: 20260929-imem_restart_reason-15c5b95f9a5a
Best regards,
--
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v4 1/2] arm64: dts: qcom: ipq9574: add support to get watchdog bootstatus from IMEM
2026-11-12 4:38 [PATCH v4 0/2] Add support for reporting boot status on Qualcomm IPQ9574 and IPQ5332 Kathiravan Thirumoorthy
@ 2026-11-12 4:38 ` Kathiravan Thirumoorthy
2026-11-12 4:38 ` [PATCH v4 2/2] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
1 sibling, 0 replies; 4+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-11-12 4:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Abel Vesa
Cc: devicetree, linux-kernel, linux-arm-msm, Kathiravan Thirumoorthy,
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.
To achieve this, add the IMEM node. The overall IMEM region is 32KB but
only initial 4KB is accessible by all masters in the SoC.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index abb7a8391b46..b50fcd6e91b7 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -757,6 +757,21 @@ usb_0_qmpphy: phy@7d000 {
status = "disabled";
};
+ sram@8600000 {
+ compatible = "qcom,ipq9574-imem", "mmio-sram";
+ reg = <0x08600000 0x8000>;
+ ranges = <0 0x08600000 0x8000>;
+
+ no-memory-wc;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ restart_reason: restartreason-sram@7a4 {
+ reg = <0x7a4 0x4>;
+ };
+ };
+
usb3: usb@8a00000 {
compatible = "qcom,ipq9574-dwc3", "qcom,snps-dwc3";
reg = <0x08a00000 0xfc100>;
@@ -841,6 +856,7 @@ watchdog: watchdog@b017000 {
interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
clocks = <&sleep_clk>;
timeout-sec = <30>;
+ sram = <&restart_reason>;
};
apcs_glb: mailbox@b111000 {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v4 2/2] arm64: dts: qcom: ipq5332: add support to get watchdog bootstatus from IMEM
2026-11-12 4:38 [PATCH v4 0/2] Add support for reporting boot status on Qualcomm IPQ9574 and IPQ5332 Kathiravan Thirumoorthy
2026-11-12 4:38 ` [PATCH v4 1/2] arm64: dts: qcom: ipq9574: add support to get watchdog bootstatus from IMEM Kathiravan Thirumoorthy
@ 2026-11-12 4:38 ` Kathiravan Thirumoorthy
2026-11-12 4:50 ` sashiko-bot
1 sibling, 1 reply; 4+ messages in thread
From: Kathiravan Thirumoorthy @ 2026-11-12 4:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Abel Vesa
Cc: devicetree, linux-kernel, linux-arm-msm, Kathiravan Thirumoorthy,
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.
To achieve this, add the IMEM node. The overall IMEM region is 32KB but
only initial 4KB is accessible by all masters in the SoC.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index 25c32e966de9..06e08238a12c 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -493,6 +493,21 @@ qpic_nand: spi@79b0000 {
status = "disabled";
};
+ sram@8600000 {
+ compatible = "qcom,ipq5332-imem", "mmio-sram";
+ reg = <0x08600000 0x14000>;
+ ranges = <0 0x08600000 0x14000>;
+
+ no-memory-wc;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ restart_reason: restartreason-sram@7a4 {
+ reg = <0x7a4 0x4>;
+ };
+ };
+
usb: usb@8a00000 {
compatible = "qcom,ipq5332-dwc3", "qcom,snps-dwc3";
reg = <0x08a00000 0xfc100>;
@@ -573,6 +588,7 @@ watchdog: watchdog@b017000 {
interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
clocks = <&sleep_clk>;
timeout-sec = <30>;
+ sram = <&restart_reason>;
};
apcs_glb: mailbox@b111000 {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v4 2/2] arm64: dts: qcom: ipq5332: add support to get watchdog bootstatus from IMEM
2026-11-12 4:38 ` [PATCH v4 2/2] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
@ 2026-11-12 4:50 ` sashiko-bot
0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-12 4:50 UTC (permalink / raw)
To: Kathiravan Thirumoorthy; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: qcom: ipq5332: sram@8600000 size 0x14000
mismatches IMEM bounds
--
commit 2ebab85765d6af41cdb12da7f09a167a744fb0e3
Author: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
arm64: dts: qcom: ipq5332: add support to get watchdog bootstatus from IMEM
This commit adds the IMEM SRAM node with a restart_reason subnode and
references it from the watchdog node on IPQ5332.
> diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
> index 25c32e966de92..06e08238a12c0 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
> @@ -493,6 +493,21 @@ qpic_nand: spi@79b0000 {
> status = "disabled";
> };
>
> + sram@8600000 {
> + compatible = "qcom,ipq5332-imem", "mmio-sram";
> + reg = <0x08600000 0x14000>;
> + ranges = <0 0x08600000 0x14000>;
[Severity: Medium]
Should the reg and ranges size of sram@8600000 be 0x1000 instead of
0x14000, or is the commit message inaccurate?
The commit message states that the overall IMEM region is 32KB (0x8000) and
only the initial 4KB (0x1000) is accessible by all masters in the SoC, yet
reg and ranges specify 0x14000 (80KB). Because mmio-sram maps the full reg
range in sram_probe() and registers all unreserved subranges into
sram->pool via sram_reserve_regions() -> gen_pool_add_virt(), exposing
offsets beyond the 4KB accessible window in the pool can cause bus aborts
or access violations if an in-kernel consumer allocates from it. The commit
message also states that this patch parses the information in the watchdog
driver, whereas the diff only updates the devicetree.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-imem_restart_reason-v4-0-3c7177529526@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-12 4:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 4:38 [PATCH v4 0/2] Add support for reporting boot status on Qualcomm IPQ9574 and IPQ5332 Kathiravan Thirumoorthy
2026-11-12 4:38 ` [PATCH v4 1/2] arm64: dts: qcom: ipq9574: add support to get watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-11-12 4:38 ` [PATCH v4 2/2] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
2026-11-12 4:50 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox