Skip to contentSkip to conversation

Describe the IMEM present in Qualcomm IPQ SoC's

PATCH In review Kathiravan Thirumoorthy 3 participants 21 messages Feb 28 – Mar 4

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 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 v3:
- Describe the IMEM as 'mmio-sram' instead of syscon and MFD
- Dropped all the R-b tags
- Link to v2:
https://lore.kernel.org/linux-arm-msm/[email 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: Describe the IMEM present in Qualcomm IPQ SoCs
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/sram.yaml |  5 +++++
 arch/arm64/boot/dts/qcom/ipq5018.dtsi            | 11 +++++++++++
 arch/arm64/boot/dts/qcom/ipq5332.dtsi            | 11 +++++++++++
 arch/arm64/boot/dts/qcom/ipq6018.dtsi            | 11 +++++++++++
 arch/arm64/boot/dts/qcom/ipq8074.dtsi            | 11 +++++++++++
 arch/arm64/boot/dts/qcom/ipq9574.dtsi            | 11 +++++++++++
 6 files changed, 60 insertions(+)

---
base-commit: 3fa5e5702a82d259897bd7e209469bc06368bf31
change-id: 20250702-imem-9799ae786170

Best regards,

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

PATCH v3 1/6 dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Qualcomm IPQ SoCs also have the IMEM(On-chip SRAM) 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.

---
 Documentation/devicetree/bindings/sram/sram.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/sram/sram.yaml +5 -0
index c451140962c86f4e8f98437a2830cb2c6a697e63..83e8c1e7070de782557fa7a36573cc48cbe28c62 100644
@@ -34,6 +34,11 @@ properties:
         - nvidia,tegra186-sysram
         - nvidia,tegra194-sysram
         - nvidia,tegra234-sysram
+        - qcom,ipq5018-imem
+        - qcom,ipq5332-imem
+        - qcom,ipq6018-imem
+        - qcom,ipq8074-imem
+        - qcom,ipq9574-imem
         - qcom,kaanapali-imem
         - qcom,rpm-msg-ram
         - rockchip,rk3288-pmu-sram
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 2 lines · Kathiravan Thirumoorthy

Qualcomm IPQ SoCs also have the IMEM(On-chip SRAM) region and used for the various debugging purposes like storing system restart reason and

This binding does not allow restart reason. pil-reloc-info was kind of allowed, but now I think this might have been a mistake because that bindings were posted incomplete.

Quoted 1 line

so on. As a preparatory work, first describe the IMEM region and

Nope, sorry. Bindings must be posted complete, see writing-bindings.

It makes no sense to squeeze here something knowingly incomplete and then in two weeks remove it, because it is not correct. That's exactly what happened with incomplete Kaanapali.

Post complete bindings.

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 7 lines · Krzysztof Kozlowski
Quoted 2 lines · Kathiravan Thirumoorthy

Qualcomm IPQ SoCs also have the IMEM(On-chip SRAM) region and used for the various debugging purposes like storing system restart reason and

This binding does not allow restart reason. pil-reloc-info was kind of allowed, but now I think this might have been a mistake because that bindings were posted incomplete.

The sram.yaml binding allows any arbitrrary subnode (sort of like nvmem), so long as the name includes 'smem'

Konrad

#4 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 10 lines · Konrad Dybcio
Quoted 7 lines · Krzysztof Kozlowski
Quoted 2 lines · Kathiravan Thirumoorthy

Qualcomm IPQ SoCs also have the IMEM(On-chip SRAM) region and used for the various debugging purposes like storing system restart reason and

This binding does not allow restart reason. pil-reloc-info was kind of allowed, but now I think this might have been a mistake because that bindings were posted incomplete.

The sram.yaml binding allows any arbitrrary subnode (sort of like nvmem),

Not, true, look at the compatible. It requires a specific type of nodes.

Quoted 1 line

so long as the name includes 'smem'

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 6 lines · Krzysztof Kozlowski
Quoted 5 lines · Konrad Dybcio
Quoted 4 lines · Krzysztof Kozlowski
Quoted 2 lines · Kathiravan Thirumoorthy

Qualcomm IPQ SoCs also have the IMEM(On-chip SRAM) region and used for the various debugging purposes like storing system restart reason and

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

This binding does not allow restart reason. pil-reloc-info was kind of allowed, but now I think this might have been a mistake because that bindings were posted incomplete.

The sram.yaml binding allows any arbitrrary subnode (sort of like nvmem),

Not, true, look at the compatible. It requires a specific type of nodes.

Right, I didn't scroll far enough!

Quoted 4 lines
Quoted 1 line

so long as the name includes 'smem'

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:
"^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

Konrad

#6 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 10 lines · Konrad Dybcio
Quoted 3 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:
"^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 7 lines · Krzysztof Kozlowski
Quoted 6 lines · Konrad Dybcio
Quoted 3 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

Quoted 7 lines
Quoted 4 lines

patternProperties:
"^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

In any case, I believe it'd be good to drop that requirement

Konrad

#8 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 11 lines · Konrad Dybcio
Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Konrad Dybcio
Quoted 3 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:
"^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

In any case, I believe it'd be good to drop that requirement

Ah, and one more thing, the syscon-reboot-mode is Linux driver with its own Linux requirements - syscon - so probably not working with sram bindings. That's another reason full binding should be posted and tested
- I speculate it simply does not work.

Quoted 1 line

Konrad

Best regards,
Krzysztof

#9 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 17 lines · Krzysztof Kozlowski
Quoted 16 lines · Konrad Dybcio
Quoted 14 lines · Krzysztof Kozlowski
Quoted 10 lines · Konrad Dybcio
Quoted 3 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:
"^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

Quoted 6 lines
Quoted 1 line

In any case, I believe it'd be good to drop that requirement

Ah, and one more thing, the syscon-reboot-mode is Linux driver with its own Linux requirements - syscon - so probably not working with sram bindings. That's another reason full binding should be posted and tested
- I speculate it simply does not work.

It won't even probe, we talked about that a long time ago on a similar occasion

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

Konrad

#10 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 15 lines · Konrad Dybcio
Quoted 14 lines · Krzysztof Kozlowski
Quoted 13 lines · Konrad Dybcio
Quoted 11 lines · Krzysztof Kozlowski
Quoted 8 lines · Konrad Dybcio
Quoted 2 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:

   "^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

In any case, I believe it'd be good to drop that requirement

Quoted 8 lines
Quoted 4 lines

Ah, and one more thing, the syscon-reboot-mode is Linux driver with its own Linux requirements - syscon - so probably not working with sram bindings. That's another reason full binding should be posted and tested
- I speculate it simply does not work.

It won't even probe, we talked about that a long time ago on a similar occasion

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

Sorry, TBH, I'm confused here...

I agree that, DT node should be as simple as below for now until the child node is added.

sram@8600000 {
   compatible = "qcom,ipq5332-imem", "mmio-sram";
   reg = <0x08600000 0x14000>;
   no-memory-wc;
};

When I add the child node, it will eventually become like

sram@8600000 {
        compatible = "qcom,ipq5332-imem", "mmio-sram"; reg = <0 0x08600000 0 0x1c000>; ranges = <0 0 0x08600000 0x1c000>;

        no-memory-wc;

        #address-cells = <1>;
        #size-cells = <1>;

        restart_reason: restartreason-sram@7b0 {
                reg = <0x7b0 0x4>;
        };
};

which seems to be matching with the binding requirements.

and the consumer can reference to this node like

sram = <&restart_reason>;

I'm not following what's being suggested here. Can you please help me to understand further on this.

Quoted 2 lines

Konrad

#11 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 55 lines · Kathiravan Thirumoorthy
Quoted 15 lines · Konrad Dybcio
Quoted 14 lines · Krzysztof Kozlowski
Quoted 13 lines · Konrad Dybcio
Quoted 11 lines · Krzysztof Kozlowski
Quoted 8 lines · Konrad Dybcio
Quoted 2 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:

   "^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

In any case, I believe it'd be good to drop that requirement

Quoted 8 lines
Quoted 4 lines

Ah, and one more thing, the syscon-reboot-mode is Linux driver with its own Linux requirements - syscon - so probably not working with sram bindings. That's another reason full binding should be posted and tested
- I speculate it simply does not work.

It won't even probe, we talked about that a long time ago on a similar occasion

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

Sorry, TBH, I'm confused here...

I agree that, DT node should be as simple as below for now until the child node is added.

sram@8600000 {
   compatible = "qcom,ipq5332-imem", "mmio-sram"; reg = <0x08600000 0x14000>; no-memory-wc;
};

When I add the child node, it will eventually become like

sram@8600000 {
        compatible = "qcom,ipq5332-imem", "mmio-sram"; reg = <0 0x08600000 0 0x1c000>; ranges = <0 0 0x08600000 0x1c000>;

        no-memory-wc;

        #address-cells = <1>;
        #size-cells = <1>;

        restart_reason: restartreason-sram@7b0 {
                reg = <0x7b0 0x4>;
        };
};

Quoted 8 lines

which seems to be matching with the binding requirements.

and the consumer can reference to this node like

sram = <&restart_reason>;

I'm not following what's being suggested here. Can you please help me to understand further on this.

I already asked you what to do.

"Nope, sorry. Bindings must be posted complete, see writing-bindings."

So post it after testing. We suggest that it simply does not work, but you can always prove us wrong.

Best regards,
Krzysztof

#12 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 65 lines · Krzysztof Kozlowski
Quoted 55 lines · Kathiravan Thirumoorthy
Quoted 15 lines · Konrad Dybcio
Quoted 14 lines · Krzysztof Kozlowski
Quoted 13 lines · Konrad Dybcio
Quoted 11 lines · Krzysztof Kozlowski
Quoted 8 lines · Konrad Dybcio
Quoted 2 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:

   "^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

In any case, I believe it'd be good to drop that requirement

Quoted 8 lines
Quoted 4 lines

Ah, and one more thing, the syscon-reboot-mode is Linux driver with its own Linux requirements - syscon - so probably not working with sram bindings. That's another reason full binding should be posted and tested
- I speculate it simply does not work.

It won't even probe, we talked about that a long time ago on a similar occasion

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

Sorry, TBH, I'm confused here...

I agree that, DT node should be as simple as below for now until the child node is added.

sram@8600000 {
   compatible = "qcom,ipq5332-imem", "mmio-sram"; reg = <0x08600000 0x14000>; no-memory-wc;
};

When I add the child node, it will eventually become like

sram@8600000 {
        compatible = "qcom,ipq5332-imem", "mmio-sram"; reg = <0 0x08600000 0 0x1c000>; ranges = <0 0 0x08600000 0x1c000>;

        no-memory-wc;

        #address-cells = <1>;
        #size-cells = <1>;

        restart_reason: restartreason-sram@7b0 {
                reg = <0x7b0 0x4>;
        };
};

Quoted 8 lines

which seems to be matching with the binding requirements.

and the consumer can reference to this node like

sram = <&restart_reason>;

I'm not following what's being suggested here. Can you please help me to understand further on this.

Quoted 6 lines

I already asked you what to do.

"Nope, sorry. Bindings must be posted complete, see writing-bindings."

So post it after testing. We suggest that it simply does not work, but you can always prove us wrong.

Are you by chance confusing 'syscon-reboot-mode' (write TO imem to set the restart reason) with this node (read FROM imem to present a restart reason via wdog)?

Konrad

#13 lore raw

Re: [PATCH v3 1/6] dt-bindings: sram: Describe the IMEM present in Qualcomm IPQ SoCs

Quoted 68 lines · Konrad Dybcio
Quoted 67 lines · Krzysztof Kozlowski
Quoted 55 lines · Kathiravan Thirumoorthy
Quoted 15 lines · Konrad Dybcio
Quoted 14 lines · Krzysztof Kozlowski
Quoted 13 lines · Konrad Dybcio
Quoted 11 lines · Krzysztof Kozlowski
Quoted 8 lines · Konrad Dybcio
Quoted 2 lines

Also not accurate - "sram" is not the reboot reason, which has node name called "reboot-mode".

What I was referring to is:

patternProperties:

   "^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":

where the 'sram' (not 'smem' as I typo'd above) is obligatory

I know and sram is not part of "reboot-mode" name. It is "reboot-mode" in existing binding and DTS, not "reboot-mode-sram".

In any case, I believe it'd be good to drop that requirement

Quoted 8 lines
Quoted 4 lines

Ah, and one more thing, the syscon-reboot-mode is Linux driver with its own Linux requirements - syscon - so probably not working with sram bindings. That's another reason full binding should be posted and tested
- I speculate it simply does not work.

It won't even probe, we talked about that a long time ago on a similar occasion

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

Sorry, TBH, I'm confused here...

I agree that, DT node should be as simple as below for now until the child node is added.

sram@8600000 {
   compatible = "qcom,ipq5332-imem", "mmio-sram"; reg = <0x08600000 0x14000>; no-memory-wc;
};

When I add the child node, it will eventually become like

sram@8600000 {
        compatible = "qcom,ipq5332-imem", "mmio-sram"; reg = <0 0x08600000 0 0x1c000>; ranges = <0 0 0x08600000 0x1c000>;

        no-memory-wc;

        #address-cells = <1>;
        #size-cells = <1>;

        restart_reason: restartreason-sram@7b0 {
                reg = <0x7b0 0x4>;
        };
};

Quoted 8 lines

which seems to be matching with the binding requirements.

and the consumer can reference to this node like

sram = <&restart_reason>;

I'm not following what's being suggested here. Can you please help me to understand further on this.

I already asked you what to do.

Quoted 8 lines
Quoted 4 lines

"Nope, sorry. Bindings must be posted complete, see writing-bindings."

So post it after testing. We suggest that it simply does not work, but you can always prove us wrong.

Are you by chance confusing 'syscon-reboot-mode' (write TO imem to set the restart reason) with this node (read FROM imem to present a restart reason via wdog)?

Previously IMEM was in with reboot-mode, so that is why I am asking. Commit msg mentions only "restart reason" but also states it is not adding complete picture, so I am done guessing here.

Best regards,
Krzysztof

#14 lore raw

PATCH v3 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.

---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +11 -0
index 256e12cf6d54417582a8b50e061f40719a4004a1..086b34ba7b09d68e24d2c1da28f303357ce503ea 100644
@@ -625,6 +625,17 @@ qpic_nand: nand-controller@79b0000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq8074-imem", "mmio-sram";
+			reg = <0x08600000 0x6000>;
+			ranges = <0 0x08600000 0x6000>;
+
+			no-memory-wc;
+
+			#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
#15 lore raw

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

Quoted 17 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.

---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +0 -0
index 256e12cf6d54417582a8b50e061f40719a4004a1..086b34ba7b09d68e24d2c1da28f303357ce503ea 100644

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

Quoted 7 lines
arch/arm64/boot/dts/qcom/ipq8074.dtsi +4 -0
@@ -625,6 +625,17 @@ qpic_nand: nand-controller@79b0000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq8074-imem", "mmio-sram";
+			reg = <0x08600000 0x6000>;
+			ranges = <0 0x08600000 0x6000>;

Nope.

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

Quoted 5 lines
arch/arm64/boot/dts/qcom/ipq8074.dtsi +5 -0
+
+			no-memory-wc;
+
+			#address-cells = <1>;
+			#size-cells = <1>;

Nope. These are completely redundant and not needed. Post complete DTS so you will see how your DTS and binding DO NOT WORK. Posting half-baked code gives you opposite impression - that it is working...

Best regards,
Krzysztof

#16 lore raw

PATCH v3 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.

---
 arch/arm64/boot/dts/qcom/ipq6018.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/ipq6018.dtsi +11 -0
index 40f1c262126eff3761430a47472b52d27f961040..7d6f1821fcc8809c643ce974380b02828b438b90 100644
@@ -659,6 +659,17 @@ qpic_nand: nand-controller@79b0000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq6018-imem", "mmio-sram";
+			reg = <0x0 0x08600000 0x0 0x8000>;
+			ranges = <0 0 0x08600000 0x8000>;
+
+			no-memory-wc;
+
+			#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
#17 lore raw

PATCH v3 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.

---
 arch/arm64/boot/dts/qcom/ipq5018.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/ipq5018.dtsi +11 -0
index 6f8004a22a1ffdb6da0be410b772be5fe0473eef..591adae3918322f97a5dcd8b191be1b50344e3d1 100644
@@ -567,6 +567,17 @@ qpic_nand: spi@79b0000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq5018-imem", "mmio-sram";
+			reg = <0x08600000 0x14000>;
+			ranges = <0 0x08600000 0x14000>;
+
+			no-memory-wc;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		usb: usb@8af8800 {
 			compatible = "qcom,ipq5018-dwc3", "qcom,dwc3";
 			reg = <0x08af8800 0x400>;
Signature · 1 line
2.34.1
#18 lore raw

PATCH v3 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.

---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +11 -0
index d7278f2137ac58305cc4e82c1d6c26c08bc7a405..2ed111139c579787069def7f29f2d07e9a454e04 100644
@@ -741,6 +741,17 @@ 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>;
+		};
+
 		usb3: usb@8af8800 {
 			compatible = "qcom,ipq9574-dwc3", "qcom,dwc3";
 			reg = <0x08af8800 0x400>;
Signature · 1 line
2.34.1
#19 lore raw

PATCH v3 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.

---
 arch/arm64/boot/dts/qcom/ipq5332.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/ipq5332.dtsi +11 -0
index 45fc512a3bab221c0d99f819294abf63369987da..b5f87db419fe7c1cecd05b5a85745cc3971028e4 100644
@@ -423,6 +423,17 @@ blsp1_spi2: spi@78b7000 {
 			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>;
+		};
+
 		usb: usb@8af8800 {
 			compatible = "qcom,ipq5332-dwc3", "qcom,dwc3";
 			reg = <0x08af8800 0x400>;
Signature · 1 line
2.34.1
#20 lore raw

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

Quoted 17 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.

---
 arch/arm64/boot/dts/qcom/ipq5332.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/ipq5332.dtsi +0 -0
index 45fc512a3bab221c0d99f819294abf63369987da..b5f87db419fe7c1cecd05b5a85745cc3971028e4 100644

arch/arm64/boot/dts/qcom/ipq5332.dtsi blsp1_spi2: spi@78b7000 { · line 429

Quoted 7 lines
arch/arm64/boot/dts/qcom/ipq5332.dtsi +4 -0
@@ -423,6 +423,17 @@ blsp1_spi2: spi@78b7000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq5332-imem", "mmio-sram";
+			reg = <0x08600000 0x14000>;
+			ranges = <0 0x08600000 0x14000>;

Why?

arch/arm64/boot/dts/qcom/ipq5332.dtsi blsp1_spi2: spi@78b7000 { · line 434

Quoted 5 lines
arch/arm64/boot/dts/qcom/ipq5332.dtsi +5 -0
+
+			no-memory-wc;
+
+			#address-cells = <1>;
+			#size-cells = <1>;

Why? You do not have any children.

Best regards,
Krzysztof