Describe the IMEM present in Qualcomm IPQ SoC's
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]>
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
@@ -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
PATCH v2 2/6 arm64: dts: qcom: ipq8074: Add the IMEM node
In reply to Kathiravan ThirumoorthyAdd 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
@@ -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
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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Changes in v2:
- Rounded off the size to0x6000(Konrad)--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm64/boot/dts/qcom/ipq8074.dtsi +0
-0
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
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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Changes in v2:
- Rounded off the size to0x6000(Konrad)--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm64/boot/dts/qcom/ipq8074.dtsi +0
-0@@ -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
Re: [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node
In reply to Kathiravan ThirumoorthyQuoted 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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Changes in v2:
- Rounded off the size to0x6000(Konrad)
---
Konrad
PATCH v2 3/6 arm64: dts: qcom: ipq6018: Add the IMEM node
In reply to Kathiravan ThirumoorthyAdd 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
@@ -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
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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Changes in v2:
- Rounded off the size to0x8000(Konrad)
- Represent the reg's address space in hexadecimal format (Krzysztof)
---
In 'ranges' property 0 is used instead of0x0to 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@@ -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
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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Changes in v2:
- Rounded off the size to0x8000(Konrad)
- Represent the reg's address space in hexadecimal format (Krzysztof)
---
In 'ranges' property 0 is used instead of0x0to 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@@ -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
Konrad Dybcio
Reviewed-byRe: [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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Changes in v2:
- Rounded off the size to0x8000(Konrad)
- Represent the reg's address space in hexadecimal format (Krzysztof)
---
In 'ranges' property 0 is used instead of0x0to 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
-0arch/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
PATCH v2 4/6 arm64: dts: qcom: ipq5018: Add the IMEM node
In reply to Kathiravan ThirumoorthyAdd 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
@@ -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
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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Konrad
PATCH v2 5/6 arm64: dts: qcom: ipq9574: Add the IMEM node
In reply to Kathiravan ThirumoorthyAdd 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
@@ -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
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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Konrad
PATCH v2 6/6 arm64: dts: qcom: ipq5332: Add the IMEM node
In reply to Kathiravan ThirumoorthyAdd 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
@@ -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
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.
Signed-off-by Kathiravan Thirumoorthy <[email protected]>---
Konrad