linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's
@ 2025-07-08  5:39 Kathiravan Thirumoorthy
  2025-07-08  5:39 ` [PATCH v2 1/6] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08  5:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, Kathiravan Thirumoorthy

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.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
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/20250702-imem-v1-0-12d49b1ceff0@oss.qualcomm.com/

---
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,
-- 
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/6] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
  2025-07-08  5:39 [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
@ 2025-07-08  5:39 ` Kathiravan Thirumoorthy
  2025-07-08  5:39 ` [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08  5:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, Kathiravan Thirumoorthy

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

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v2:
- added the entries in the sorted order (Krzysztof)
---
 Documentation/devicetree/bindings/sram/qcom,imem.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
index 72d35e30c439ccf4901d937f838fe7c7a81f33b1..7286014e698f99184c1d6871f9a012c25c9147f6 100644
--- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
@@ -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

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node
  2025-07-08  5:39 [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
  2025-07-08  5:39 ` [PATCH v2 1/6] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
@ 2025-07-08  5:39 ` Kathiravan Thirumoorthy
  2025-07-08  6:47   ` Krzysztof Kozlowski
  2025-07-08 14:19   ` Konrad Dybcio
  2025-07-08  5:39 ` [PATCH v2 3/6] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08  5:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v2:
- Rounded off the size to 0x6000 (Konrad)
---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index fffb47ec244899cf45984adbe8c4f9820bef5c5f..2ba07a02c222958b924c5bc178ac67f955088f7a 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -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>;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/6] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-08  5:39 [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
  2025-07-08  5:39 ` [PATCH v2 1/6] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
  2025-07-08  5:39 ` [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
@ 2025-07-08  5:39 ` Kathiravan Thirumoorthy
  2025-07-08 14:19   ` Konrad Dybcio
  2025-07-08  5:39 ` [PATCH v2 4/6] arm64: dts: qcom: ipq5018: " Kathiravan Thirumoorthy
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08  5:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
---
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(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -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>;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 4/6] arm64: dts: qcom: ipq5018: Add the IMEM node
  2025-07-08  5:39 [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
                   ` (2 preceding siblings ...)
  2025-07-08  5:39 ` [PATCH v2 3/6] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
@ 2025-07-08  5:39 ` Kathiravan Thirumoorthy
  2025-07-08 14:20   ` Konrad Dybcio
  2025-07-08  5:39 ` [PATCH v2 5/6] arm64: dts: qcom: ipq9574: " Kathiravan Thirumoorthy
  2025-07-08  5:39 ` [PATCH v2 6/6] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
  5 siblings, 1 reply; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08  5:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v2:
- No changes
---
 arch/arm64/boot/dts/qcom/ipq5018.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
index 130360014c5e14c778e348d37e601f60325b0b14..c57d855e373b7cb26a3533f4651df078c1188fd0 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
@@ -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>;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 5/6] arm64: dts: qcom: ipq9574: Add the IMEM node
  2025-07-08  5:39 [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
                   ` (3 preceding siblings ...)
  2025-07-08  5:39 ` [PATCH v2 4/6] arm64: dts: qcom: ipq5018: " Kathiravan Thirumoorthy
@ 2025-07-08  5:39 ` Kathiravan Thirumoorthy
  2025-07-08 14:21   ` Konrad Dybcio
  2025-07-08  5:39 ` [PATCH v2 6/6] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
  5 siblings, 1 reply; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08  5:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v2:
- No changes
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 815b5f9540b80e91e81e02a97b20c0426f40b003..2a42e8a9c79274f2b983d31e0b7b587ad524b211 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -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>;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 6/6] arm64: dts: qcom: ipq5332: Add the IMEM node
  2025-07-08  5:39 [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
                   ` (4 preceding siblings ...)
  2025-07-08  5:39 ` [PATCH v2 5/6] arm64: dts: qcom: ipq9574: " Kathiravan Thirumoorthy
@ 2025-07-08  5:39 ` Kathiravan Thirumoorthy
  2025-07-08 14:21   ` Konrad Dybcio
  5 siblings, 1 reply; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08  5:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Changes in v2:
- No changes
---
 arch/arm64/boot/dts/qcom/ipq5332.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index bd28c490415ff61624f6ff0461d79e975f2c397f..6f54f6e758309932a35d7156f32ccdf09dd36ee0 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -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>;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node
  2025-07-08  5:39 ` [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
@ 2025-07-08  6:47   ` Krzysztof Kozlowski
  2025-07-08 10:19     ` Kathiravan Thirumoorthy
  2025-07-08 14:19   ` Konrad Dybcio
  1 sibling, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-08  6:47 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 08/07/2025 07:39, Kathiravan Thirumoorthy wrote:
> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> Changes in v2:
> - Rounded off the size to 0x6000 (Konrad)
> ---
>  arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
> index fffb47ec244899cf45984adbe8c4f9820bef5c5f..2ba07a02c222958b924c5bc178ac67f955088f7a 100644
> --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
> @@ -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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node
  2025-07-08  6:47   ` Krzysztof Kozlowski
@ 2025-07-08 10:19     ` Kathiravan Thirumoorthy
  0 siblings, 0 replies; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-08 10:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel


On 7/8/2025 12:17 PM, Krzysztof Kozlowski wrote:
> On 08/07/2025 07:39, Kathiravan Thirumoorthy wrote:
>> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>> Changes in v2:
>> - Rounded off the size to 0x6000 (Konrad)
>> ---
>>   arch/arm64/boot/dts/qcom/ipq8074.dtsi | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
>> index fffb47ec244899cf45984adbe8c4f9820bef5c5f..2ba07a02c222958b924c5bc178ac67f955088f7a 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
>> @@ -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.


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

[1] 
https://lore.kernel.org/linux-arm-msm/073480a2-0b6f-4dc0-b7eb-eec500b3106e@oss.qualcomm.com/


>
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node
  2025-07-08  5:39 ` [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
  2025-07-08  6:47   ` Krzysztof Kozlowski
@ 2025-07-08 14:19   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-08 14:19 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/8/25 7:39 AM, Kathiravan Thirumoorthy wrote:
> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> Changes in v2:
> - Rounded off the size to 0x6000 (Konrad)
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 3/6] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-08  5:39 ` [PATCH v2 3/6] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
@ 2025-07-08 14:19   ` Konrad Dybcio
  2025-07-09  4:28     ` Kathiravan Thirumoorthy
  0 siblings, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-08 14:19 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/8/25 7:39 AM, Kathiravan Thirumoorthy wrote:
> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> 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(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644
> --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> @@ -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?

Konrad

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 4/6] arm64: dts: qcom: ipq5018: Add the IMEM node
  2025-07-08  5:39 ` [PATCH v2 4/6] arm64: dts: qcom: ipq5018: " Kathiravan Thirumoorthy
@ 2025-07-08 14:20   ` Konrad Dybcio
  0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-08 14:20 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/8/25 7:39 AM, Kathiravan Thirumoorthy wrote:
> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 5/6] arm64: dts: qcom: ipq9574: Add the IMEM node
  2025-07-08  5:39 ` [PATCH v2 5/6] arm64: dts: qcom: ipq9574: " Kathiravan Thirumoorthy
@ 2025-07-08 14:21   ` Konrad Dybcio
  0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-08 14:21 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/8/25 7:39 AM, Kathiravan Thirumoorthy wrote:
> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 6/6] arm64: dts: qcom: ipq5332: Add the IMEM node
  2025-07-08  5:39 ` [PATCH v2 6/6] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
@ 2025-07-08 14:21   ` Konrad Dybcio
  0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-08 14:21 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/8/25 7:39 AM, Kathiravan Thirumoorthy wrote:
> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 3/6] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-08 14:19   ` Konrad Dybcio
@ 2025-07-09  4:28     ` Kathiravan Thirumoorthy
  2025-07-18 11:45       ` Konrad Dybcio
  0 siblings, 1 reply; 16+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-09  4:28 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel


On 7/8/2025 7:49 PM, Konrad Dybcio wrote:
> On 7/8/25 7:39 AM, Kathiravan Thirumoorthy wrote:
>> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>> 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(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>> index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>> @@ -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?

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.

>
> Konrad

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 3/6] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-09  4:28     ` Kathiravan Thirumoorthy
@ 2025-07-18 11:45       ` Konrad Dybcio
  0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-18 11:45 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/9/25 6:28 AM, Kathiravan Thirumoorthy wrote:
> 
> On 7/8/2025 7:49 PM, Konrad Dybcio wrote:
>> On 7/8/25 7:39 AM, Kathiravan Thirumoorthy wrote:
>>> 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 <kathiravan.thirumoorthy@oss.qualcomm.com>
>>> ---
>>> 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(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>>> index bfe59b0208415902c69fd0c0c7565d97997d4207..3b9e40045906b26b94e2d2510b0570d3eaf084ce 100644
>>> --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>>> @@ -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?
> 
> 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..

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-07-18 11:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08  5:39 [PATCH v2 0/6] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
2025-07-08  5:39 ` [PATCH v2 1/6] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
2025-07-08  5:39 ` [PATCH v2 2/6] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
2025-07-08  6:47   ` Krzysztof Kozlowski
2025-07-08 10:19     ` Kathiravan Thirumoorthy
2025-07-08 14:19   ` Konrad Dybcio
2025-07-08  5:39 ` [PATCH v2 3/6] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
2025-07-08 14:19   ` Konrad Dybcio
2025-07-09  4:28     ` Kathiravan Thirumoorthy
2025-07-18 11:45       ` Konrad Dybcio
2025-07-08  5:39 ` [PATCH v2 4/6] arm64: dts: qcom: ipq5018: " Kathiravan Thirumoorthy
2025-07-08 14:20   ` Konrad Dybcio
2025-07-08  5:39 ` [PATCH v2 5/6] arm64: dts: qcom: ipq9574: " Kathiravan Thirumoorthy
2025-07-08 14:21   ` Konrad Dybcio
2025-07-08  5:39 ` [PATCH v2 6/6] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
2025-07-08 14:21   ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).