Skip to contentSkip to conversation

Describe the IMEM present in Qualcomm IPQ SoC's

PATCH Superseded Kathiravan Thirumoorthy 3 participants 16 messages Jul 8, 2025 – Jul 18, 2025

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Describe the IMEM present in Qualcomm IPQ SoC's

Qualcomm IPQ SoCs also have the IMEM region and used for the various debugging purposes like storing system restart reason and so on. As a preparatory work, first describe the IMEM region and susbsequently add the required features.

Across all SoCs, only initial 4KB can be accessed by all the masters in the SoC, remaining regions are access protected.

---
Changes in v2:
- Dropped the IPQ5424 support
- Sorted the compatibles list
- Rounded off the size for IPQ8074 and IPQ6018
- In IPQ6018, use 0x0 for reg instead of 0
- Link to v1:
https://lore.kernel.org/linux-arm-msm/[email protected]/

---
Kathiravan Thirumoorthy (6):
dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
arm64: dts: qcom: ipq8074: Add the IMEM node
arm64: dts: qcom: ipq6018: Add the IMEM node
arm64: dts: qcom: ipq5018: Add the IMEM node
arm64: dts: qcom: ipq9574: Add the IMEM node
arm64: dts: qcom: ipq5332: Add the IMEM node

 Documentation/devicetree/bindings/sram/qcom,imem.yaml | 5 +++++
 arch/arm64/boot/dts/qcom/ipq5018.dtsi                 | 9 +++++++++
 arch/arm64/boot/dts/qcom/ipq5332.dtsi                 | 9 +++++++++
 arch/arm64/boot/dts/qcom/ipq6018.dtsi                 | 9 +++++++++
 arch/arm64/boot/dts/qcom/ipq8074.dtsi                 | 9 +++++++++
 arch/arm64/boot/dts/qcom/ipq9574.dtsi                 | 9 +++++++++
 6 files changed, 50 insertions(+)

---
base-commit: 26ffb3d6f02cd0935fb9fa3db897767beee1cb2a
change-id: 20250702-imem-9799ae786170

Best regards,

Signature · 1 line
Kathiravan Thirumoorthy <[email protected]>
#1 lore raw

PATCH v2 1/6 dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles

IMEM is present in the Qualcomm's IPQ SoCs as well. Document the same.

---
Changes in v2:
- added the entries in the sorted order (Krzysztof)

---
 Documentation/devicetree/bindings/sram/qcom,imem.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/sram/qcom,imem.yaml +5 -0
index 72d35e30c439ccf4901d937f838fe7c7a81f33b1..7286014e698f99184c1d6871f9a012c25c9147f6 100644
@@ -18,6 +18,11 @@ properties:
     items:
       - enum:
           - qcom,apq8064-imem
+          - qcom,ipq5018-imem
+          - qcom,ipq5332-imem
+          - qcom,ipq6018-imem
+          - qcom,ipq8074-imem
+          - qcom,ipq9574-imem
           - qcom,msm8226-imem
           - qcom,msm8974-imem
           - qcom,msm8976-imem
Signature · 1 line
2.34.1
#2 lore raw

PATCH v2 2/6 arm64: dts: qcom: ipq8074: Add the IMEM node

In reply to 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 24KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x6000 (Konrad)

---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +9 -0
index fffb47ec244899cf45984adbe8c4f9820bef5c5f..2ba07a02c222958b924c5bc178ac67f955088f7a 100644
@@ -625,6 +625,15 @@ qpic_nand: nand-controller@79b0000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq8074-imem", "syscon", "simple-mfd";
+			reg = <0x08600000 0x6000>;
+			ranges = <0 0x08600000 0x6000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		usb_0: usb@8af8800 {
 			compatible = "qcom,ipq8074-dwc3", "qcom,dwc3";
 			reg = <0x08af8800 0x400>;
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node

Quoted 20 lines · 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 24KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x6000 (Konrad)

---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +0 -0
index fffb47ec244899cf45984adbe8c4f9820bef5c5f..2ba07a02c222958b924c5bc178ac67f955088f7a 100644

arch/arm64/boot/dts/qcom/ipq8074.dtsi qpic_nand: nand-controller@79b0000 { · line 629

Quoted 5 lines
arch/arm64/boot/dts/qcom/ipq8074.dtsi +2 -0
@@ -625,6 +625,15 @@ qpic_nand: nand-controller@79b0000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq8074-imem", "syscon", "simple-mfd";

It is still not simple-mfd. You should post complete node with children or do not make it a simple-mfd.

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node

Quoted 24 lines · Krzysztof Kozlowski
Quoted 23 lines · 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 24KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x6000 (Konrad)

---
  arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++
  1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +0 -0
index fffb47ec244899cf45984adbe8c4f9820bef5c5f..2ba07a02c222958b924c5bc178ac67f955088f7a 100644
@@ -625,6 +625,15 @@ qpic_nand: nand-controller@79b0000 {
  			status = "disabled";
  		};
 
Quoted 5 lines

arch/arm64/boot/dts/qcom/ipq8074.dtsi qpic_nand: nand-controller@79b0000 { · line 629

Quoted 2 lines
arch/arm64/boot/dts/qcom/ipq8074.dtsi +2 -0
+		sram@8600000 {
+			compatible = "qcom,ipq8074-imem", "syscon", "simple-mfd";

It is still not simple-mfd. You should post complete node with children or do not make it a simple-mfd.

Sure. Based on the outcome of the series[1], will update it.

[1] https://lore.kernel.org/linux-arm-msm/[email protected]/

Quoted 3 lines

Best regards,
Krzysztof

Reviewed-by on v2 2/6
#5 lore raw

Re: [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node

In reply to Kathiravan Thirumoorthy
Quoted 4 lines · 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.

Quoted 8 lines

As described, overall IMEM region is 24KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x6000 (Konrad)
---

Konrad

#6 lore raw

PATCH v2 3/6 arm64: dts: qcom: ipq6018: Add the IMEM node

In reply to 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 32KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x8000 (Konrad)
- Represent the reg's address space in hexadecimal format (Krzysztof)
---
In 'ranges' property 0 is used instead of 0x0 to align with the existing format.

---
 arch/arm64/boot/dts/qcom/ipq6018.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq6018.dtsi +9 -0
index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644
@@ -659,6 +659,15 @@ qpic_nand: nand-controller@79b0000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq6018-imem", "syscon", "simple-mfd";
+			reg = <0x0 0x08600000 0x0 0x8000>;
+			ranges = <0 0 0x08600000 0x8000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		usb3: usb@8af8800 {
 			compatible = "qcom,ipq6018-dwc3", "qcom,dwc3";
 			reg = <0x0 0x08af8800 0x0 0x400>;
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v2 3/6] arm64: dts: qcom: ipq6018: Add the IMEM node

Quoted 25 lines · 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 32KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x8000 (Konrad)
- Represent the reg's address space in hexadecimal format (Krzysztof)
---
In 'ranges' property 0 is used instead of 0x0 to align with the existing format.

---
 arch/arm64/boot/dts/qcom/ipq6018.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq6018.dtsi +0 -0
index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644
@@ -659,6 +659,15 @@ qpic_nand: nand-controller@79b0000 {
 			status = "disabled";

arch/arm64/boot/dts/qcom/ipq6018.dtsi qpic_nand: nand-controller@79b0000 { · line 669

Quoted 10 lines
arch/arm64/boot/dts/qcom/ipq6018.dtsi +8 -0
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq6018-imem", "syscon", "simple-mfd";
+			reg = <0x0 0x08600000 0x0 0x8000>;
+			ranges = <0 0 0x08600000 0x8000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};

On this platform, shouldn't it be 0x6860_0000?

Konrad

#8 lore raw

Re: [PATCH v2 3/6] arm64: dts: qcom: ipq6018: Add the IMEM node

Quoted 28 lines · Konrad Dybcio
Quoted 27 lines · 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 32KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x8000 (Konrad)
- Represent the reg's address space in hexadecimal format (Krzysztof)
---
In 'ranges' property 0 is used instead of 0x0 to align with the existing format.

---
  arch/arm64/boot/dts/qcom/ipq6018.dtsi | 9 +++++++++
  1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq6018.dtsi +0 -0
index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644
@@ -659,6 +659,15 @@ qpic_nand: nand-controller@79b0000 {
  			status = "disabled";
  		};
 
Quoted 9 lines

arch/arm64/boot/dts/qcom/ipq6018.dtsi qpic_nand: nand-controller@79b0000 { · line 669

Quoted 8 lines
arch/arm64/boot/dts/qcom/ipq6018.dtsi +8 -0
+		sram@8600000 {
+			compatible = "qcom,ipq6018-imem", "syscon", "simple-mfd";
+			reg = <0x0 0x08600000 0x0 0x8000>;
+			ranges = <0 0 0x08600000 0x8000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};

On this platform, shouldn't it be 0x6860_0000?

Actually, that's from the RPM perspective. From the ARM side, the address is 0x0860_0000. The hardware docs show the RPM view by default, so please switch to the ARM view.

Quoted 2 lines

Konrad

Reviewed-by
#9 lore raw

Re: [PATCH v2 3/6] arm64: dts: qcom: ipq6018: Add the IMEM node

Quoted 39 lines · Kathiravan Thirumoorthy
Quoted 20 lines · Konrad Dybcio
Quoted 19 lines · 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 32KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- Rounded off the size to 0x8000 (Konrad)
- Represent the reg's address space in hexadecimal format (Krzysztof)
---
In 'ranges' property 0 is used instead of 0x0 to align with the existing format.
---
  arch/arm64/boot/dts/qcom/ipq6018.dtsi | 9 +++++++++

  1 file changed, 9 insertions(+)
Quoted 16 lines
Quoted 5 lines
arch/arm64/boot/dts/qcom/ipq6018.dtsi +0 -0
index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644

arch/arm64/boot/dts/qcom/ipq6018.dtsi qpic_nand: nand-controller@79b0000 { · line 668

Quoted 10 lines
arch/arm64/boot/dts/qcom/ipq6018.dtsi +7 -0
@@ -659,6 +659,15 @@ qpic_nand: nand-controller@79b0000 {
               status = "disabled";
           };
   +        sram@8600000 {
+            compatible = "qcom,ipq6018-imem", "syscon", "simple-mfd";
+            reg = <0x0 0x08600000 0x0 0x8000>;
+            ranges = <0 0 0x08600000 0x8000>;
+
+            #address-cells = <1>;
+            #size-cells = <1>;
+        };

On this platform, shouldn't it be 0x6860_0000?

Quoted 1 line

Actually, that's from the RPM perspective. From the ARM side, the address is 0x0860_0000. The hardware docs show the RPM view by default, so please switch to the ARM view.

Right, this is an odd default..

Konrad

#10 lore raw

PATCH v2 4/6 arm64: dts: qcom: ipq5018: Add the IMEM node

In reply to 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 80KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- No changes

---
 arch/arm64/boot/dts/qcom/ipq5018.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq5018.dtsi +9 -0
index 130360014c5e14c778e348d37e601f60325b0b14..c57d855e373b7cb26a3533f4651df078c1188fd0 100644
@@ -278,6 +278,15 @@ blsp1_spi1: spi@78b5000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq5018-imem", "syscon", "simple-mfd";
+			reg = <0x08600000 0x14000>;
+			ranges = <0 0x08600000 0x14000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		usb: usb@8af8800 {
 			compatible = "qcom,ipq5018-dwc3", "qcom,dwc3";
 			reg = <0x08af8800 0x400>;
Signature · 1 line
2.34.1
Reviewed-by on v2 4/6
#11 lore raw

Re: [PATCH v2 4/6] arm64: dts: qcom: ipq5018: Add the IMEM node

Quoted 9 lines · 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 80KB but only initial 4KB is accessible by all masters in the SoC.

---

Konrad

#12 lore raw

PATCH v2 5/6 arm64: dts: qcom: ipq9574: Add the IMEM node

In reply to 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 32KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- No changes

---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +9 -0
index 815b5f9540b80e91e81e02a97b20c0426f40b003..2a42e8a9c79274f2b983d31e0b7b587ad524b211 100644
@@ -741,6 +741,15 @@ usb_0_qmpphy: phy@7d000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq9574-imem", "syscon", "simple-mfd";
+			reg = <0x08600000 0x8000>;
+			ranges = <0 0x08600000 0x8000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		usb3: usb@8af8800 {
 			compatible = "qcom,ipq9574-dwc3", "qcom,dwc3";
 			reg = <0x08af8800 0x400>;
Signature · 1 line
2.34.1
Reviewed-by on v2 5/6
#13 lore raw

Re: [PATCH v2 5/6] arm64: dts: qcom: ipq9574: Add the IMEM node

Quoted 9 lines · 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 32KB but only initial 4KB is accessible by all masters in the SoC.

---

Konrad

#14 lore raw

PATCH v2 6/6 arm64: dts: qcom: ipq5332: Add the IMEM node

In reply to 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 80KB but only initial 4KB is accessible by all masters in the SoC.

---
Changes in v2:
- No changes

---
 arch/arm64/boot/dts/qcom/ipq5332.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/ipq5332.dtsi +9 -0
index bd28c490415ff61624f6ff0461d79e975f2c397f..6f54f6e758309932a35d7156f32ccdf09dd36ee0 100644
@@ -423,6 +423,15 @@ blsp1_spi2: spi@78b7000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq5332-imem", "syscon", "simple-mfd";
+			reg = <0x08600000 0x14000>;
+			ranges = <0 0x08600000 0x14000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		usb: usb@8af8800 {
 			compatible = "qcom,ipq5332-dwc3", "qcom,dwc3";
 			reg = <0x08af8800 0x400>;
Signature · 1 line
2.34.1
Reviewed-by on v2 6/6
#15 lore raw

Re: [PATCH v2 6/6] arm64: dts: qcom: ipq5332: Add the IMEM node

Quoted 9 lines · 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 80KB but only initial 4KB is accessible by all masters in the SoC.

---

Konrad