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

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.

In IPQ8074 and IPQ6018, IMEM region size are 0x5FFF and 0x7FFF which are
little weird. I have cross checked with HW docs as well.

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

DT binding patch and IPQ5424 DTS patch are from the series[1]. Dropped
the Rob's Ack from the binding patch since new entries are added.

[1]
https://lore.kernel.org/linux-arm-msm/20250610-wdt_reset_reason-v5-0-2d2835160ab5@oss.qualcomm.com/

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
Kathiravan Thirumoorthy (7):
      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
      arm64: dts: qcom: ipq5424: Add the IMEM node

 Documentation/devicetree/bindings/sram/qcom,imem.yaml | 6 ++++++
 arch/arm64/boot/dts/qcom/ipq5018.dtsi                 | 9 +++++++++
 arch/arm64/boot/dts/qcom/ipq5332.dtsi                 | 9 +++++++++
 arch/arm64/boot/dts/qcom/ipq5424.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 +++++++++
 7 files changed, 60 insertions(+)
---
base-commit: 3f804361f3b9af33e00b90ec9cb5afcc96831e60
change-id: 20250702-imem-9799ae786170

Best regards,
-- 
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>


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

* [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
  2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
@ 2025-07-02 10:17 ` Kathiravan Thirumoorthy
  2025-07-02 10:19   ` Krzysztof Kozlowski
  2025-07-02 10:17 ` [PATCH 2/7] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:17 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>
---
 Documentation/devicetree/bindings/sram/qcom,imem.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
index 72d35e30c439ccf4901d937f838fe7c7a81f33b1..48e2f332e0e9fc9fa4147fa12d9c6c70a77fafda 100644
--- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
@@ -18,6 +18,12 @@ properties:
     items:
       - enum:
           - qcom,apq8064-imem
+          - qcom,ipq8074-imem
+          - qcom,ipq6018-imem
+          - qcom,ipq5018-imem
+          - qcom,ipq9574-imem
+          - qcom,ipq5332-imem
+          - qcom,ipq5424-imem
           - qcom,msm8226-imem
           - qcom,msm8974-imem
           - qcom,msm8976-imem

-- 
2.34.1


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

* [PATCH 2/7] arm64: dts: qcom: ipq8074: Add the IMEM node
  2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
@ 2025-07-02 10:17 ` Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 3/7] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:17 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 approximately 24KB but only initial
4KB is accessible by all masters in the SoC.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
 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..93dd11c394589132f3d5ecda32bcaecad2509029 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 0x5fff>;
+			ranges = <0 0x08600000 0x5fff>;
+
+			#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] 17+ messages in thread

* [PATCH 3/7] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 2/7] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
@ 2025-07-02 10:17 ` Kathiravan Thirumoorthy
  2025-07-02 10:50   ` Krzysztof Kozlowski
  2025-07-02 12:59   ` Konrad Dybcio
  2025-07-02 10:17 ` [PATCH 4/7] arm64: dts: qcom: ipq5018: " Kathiravan Thirumoorthy
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:17 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 approximately 32KB but only initial
4KB is accessible by all masters in the SoC.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
 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..7eca5ba416c2ef5ef1c4e0eb4f58f1ca94fc92f0 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 = <0 0x08600000 0 0x7fff>;
+			ranges = <0 0 0x08600000 0x7fff>;
+
+			#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] 17+ messages in thread

* [PATCH 4/7] arm64: dts: qcom: ipq5018: Add the IMEM node
  2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
                   ` (2 preceding siblings ...)
  2025-07-02 10:17 ` [PATCH 3/7] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
@ 2025-07-02 10:17 ` Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 5/7] arm64: dts: qcom: ipq9574: " Kathiravan Thirumoorthy
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:17 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>
---
 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] 17+ messages in thread

* [PATCH 5/7] arm64: dts: qcom: ipq9574: Add the IMEM node
  2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
                   ` (3 preceding siblings ...)
  2025-07-02 10:17 ` [PATCH 4/7] arm64: dts: qcom: ipq5018: " Kathiravan Thirumoorthy
@ 2025-07-02 10:17 ` Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 6/7] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 7/7] arm64: dts: qcom: ipq5424: " Kathiravan Thirumoorthy
  6 siblings, 0 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:17 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>
---
 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] 17+ messages in thread

* [PATCH 6/7] arm64: dts: qcom: ipq5332: Add the IMEM node
  2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
                   ` (4 preceding siblings ...)
  2025-07-02 10:17 ` [PATCH 5/7] arm64: dts: qcom: ipq9574: " Kathiravan Thirumoorthy
@ 2025-07-02 10:17 ` Kathiravan Thirumoorthy
  2025-07-02 10:17 ` [PATCH 7/7] arm64: dts: qcom: ipq5424: " Kathiravan Thirumoorthy
  6 siblings, 0 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:17 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>
---
 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] 17+ messages in thread

* [PATCH 7/7] arm64: dts: qcom: ipq5424: Add the IMEM node
  2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
                   ` (5 preceding siblings ...)
  2025-07-02 10:17 ` [PATCH 6/7] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
@ 2025-07-02 10:17 ` Kathiravan Thirumoorthy
  6 siblings, 0 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:17 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel, Kathiravan Thirumoorthy,
	Konrad Dybcio

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 112KB 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/ipq5424.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index 66bd2261eb25d79051adddef604c55f5b01e6e8b..7fdc003f210e5a69944b00361a16fbdf58f39801 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -591,6 +591,15 @@ ssphy_0: phy@7d000 {
 			status = "disabled";
 		};
 
+		sram@8600000 {
+			compatible = "qcom,ipq5424-imem", "syscon", "simple-mfd";
+			reg = <0 0x08600000 0 0x1c000>;
+			ranges = <0 0 0x08600000 0x1c000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		usb3: usb3@8a00000 {
 			compatible = "qcom,ipq5424-dwc3", "qcom,dwc3";
 			reg = <0 0x08af8800 0 0x400>;

-- 
2.34.1


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

* Re: [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
  2025-07-02 10:17 ` [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
@ 2025-07-02 10:19   ` Krzysztof Kozlowski
  2025-07-02 10:46     ` Kathiravan Thirumoorthy
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-02 10: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 02/07/2025 12:17, Kathiravan Thirumoorthy wrote:
> IMEM is present in the Qualcomm's IPQ SoCs as well. Document the same.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
>  Documentation/devicetree/bindings/sram/qcom,imem.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)


Where is the changelog? This is not a v1.

> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> index 72d35e30c439ccf4901d937f838fe7c7a81f33b1..48e2f332e0e9fc9fa4147fa12d9c6c70a77fafda 100644
> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> @@ -18,6 +18,12 @@ properties:
>      items:
>        - enum:
>            - qcom,apq8064-imem
> +          - qcom,ipq8074-imem
> +          - qcom,ipq6018-imem
> +          - qcom,ipq5018-imem
> +          - qcom,ipq9574-imem
> +          - qcom,ipq5332-imem
> +          - qcom,ipq5424-imem

Random order, no, follow existing style. This applies for every qcom
binding and you received such feedbacks in the past.


Best regards,
Krzysztof

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

* Re: [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
  2025-07-02 10:19   ` Krzysztof Kozlowski
@ 2025-07-02 10:46     ` Kathiravan Thirumoorthy
  2025-07-02 10:48       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:46 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/2/2025 3:49 PM, Krzysztof Kozlowski wrote:
> On 02/07/2025 12:17, Kathiravan Thirumoorthy wrote:
>> IMEM is present in the Qualcomm's IPQ SoCs as well. Document the same.
>>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>>   Documentation/devicetree/bindings/sram/qcom,imem.yaml | 6 ++++++
>>   1 file changed, 6 insertions(+)
>
> Where is the changelog? This is not a v1.

This is the v1. The series[1] I pointed out describes only for the 
IPQ5424 SoC. Since I have added few more SoCs, thought v1 is the 
appropriate numbering.

[1] 
https://lore.kernel.org/linux-arm-msm/20250610-wdt_reset_reason-v5-0-2d2835160ab5@oss.qualcomm.com/

>
>> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>> index 72d35e30c439ccf4901d937f838fe7c7a81f33b1..48e2f332e0e9fc9fa4147fa12d9c6c70a77fafda 100644
>> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>> @@ -18,6 +18,12 @@ properties:
>>       items:
>>         - enum:
>>             - qcom,apq8064-imem
>> +          - qcom,ipq8074-imem
>> +          - qcom,ipq6018-imem
>> +          - qcom,ipq5018-imem
>> +          - qcom,ipq9574-imem
>> +          - qcom,ipq5332-imem
>> +          - qcom,ipq5424-imem
> Random order, no, follow existing style. This applies for every qcom
> binding and you received such feedbacks in the past.

Apologies — I arranged them based on the evolutionary order of SoCs. 
I’ll correct this in v2 and ensure it’s handled properly in the future.

>
> Best regards,
> Krzysztof

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

* Re: [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
  2025-07-02 10:46     ` Kathiravan Thirumoorthy
@ 2025-07-02 10:48       ` Krzysztof Kozlowski
  2025-07-02 10:59         ` Kathiravan Thirumoorthy
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-02 10:48 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 02/07/2025 12:46, Kathiravan Thirumoorthy wrote:
> 
> On 7/2/2025 3:49 PM, Krzysztof Kozlowski wrote:
>> On 02/07/2025 12:17, Kathiravan Thirumoorthy wrote:
>>> IMEM is present in the Qualcomm's IPQ SoCs as well. Document the same.
>>>
>>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>>> ---
>>>   Documentation/devicetree/bindings/sram/qcom,imem.yaml | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>
>> Where is the changelog? This is not a v1.
> 
> This is the v1. The series[1] I pointed out describes only for the 
> IPQ5424 SoC. Since I have added few more SoCs, thought v1 is the 
> appropriate numbering.
> 
> [1] 
> https://lore.kernel.org/linux-arm-msm/20250610-wdt_reset_reason-v5-0-2d2835160ab5@oss.qualcomm.com/

But IPQ5424 is already there, so you reworked that patch.


> 
>>
>>> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>> index 72d35e30c439ccf4901d937f838fe7c7a81f33b1..48e2f332e0e9fc9fa4147fa12d9c6c70a77fafda 100644
>>> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>> @@ -18,6 +18,12 @@ properties:
>>>       items:
>>>         - enum:
>>>             - qcom,apq8064-imem
>>> +          - qcom,ipq8074-imem
>>> +          - qcom,ipq6018-imem
>>> +          - qcom,ipq5018-imem
>>> +          - qcom,ipq9574-imem
>>> +          - qcom,ipq5332-imem
>>> +          - qcom,ipq5424-imem
>> Random order, no, follow existing style. This applies for every qcom
>> binding and you received such feedbacks in the past.
> 
> Apologies — I arranged them based on the evolutionary order of SoCs. 

Where is such ordering documented? How is it expressed in your internal
guideline for example?

Best regards,
Krzysztof

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

* Re: [PATCH 3/7] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-02 10:17 ` [PATCH 3/7] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
@ 2025-07-02 10:50   ` Krzysztof Kozlowski
  2025-07-02 13:00     ` Konrad Dybcio
  2025-07-02 12:59   ` Konrad Dybcio
  1 sibling, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-02 10:50 UTC (permalink / raw)
  To: Kathiravan Thirumoorthy, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 02/07/2025 12:17, 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 approximately 32KB but only initial
> 4KB is accessible by all masters in the SoC.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
>  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..7eca5ba416c2ef5ef1c4e0eb4f58f1ca94fc92f0 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";

No, this is not a simple MFD. Where are any children if this is a MFD?

> +			reg = <0 0x08600000 0 0x7fff>;
> +			ranges = <0 0 0x08600000 0x7fff>;

Why different style?

> +
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +		};
> +
>  		usb3: usb@8af8800 {
>  			compatible = "qcom,ipq6018-dwc3", "qcom,dwc3";
>  			reg = <0x0 0x08af8800 0x0 0x400>;

Look here.

> 


Best regards,
Krzysztof

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

* Re: [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
  2025-07-02 10:48       ` Krzysztof Kozlowski
@ 2025-07-02 10:59         ` Kathiravan Thirumoorthy
  2025-07-04  8:51           ` Kathiravan Thirumoorthy
  0 siblings, 1 reply; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-02 10:59 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/2/2025 4:18 PM, Krzysztof Kozlowski wrote:
> On 02/07/2025 12:46, Kathiravan Thirumoorthy wrote:
>> On 7/2/2025 3:49 PM, Krzysztof Kozlowski wrote:
>>> On 02/07/2025 12:17, Kathiravan Thirumoorthy wrote:
>>>> IMEM is present in the Qualcomm's IPQ SoCs as well. Document the same.
>>>>
>>>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>>>> ---
>>>>    Documentation/devicetree/bindings/sram/qcom,imem.yaml | 6 ++++++
>>>>    1 file changed, 6 insertions(+)
>>> Where is the changelog? This is not a v1.
>> This is the v1. The series[1] I pointed out describes only for the
>> IPQ5424 SoC. Since I have added few more SoCs, thought v1 is the
>> appropriate numbering.
>>
>> [1]
>> https://lore.kernel.org/linux-arm-msm/20250610-wdt_reset_reason-v5-0-2d2835160ab5@oss.qualcomm.com/
> But IPQ5424 is already there, so you reworked that patch.
Okay, so this should be V6?
>
>
>>>> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>> index 72d35e30c439ccf4901d937f838fe7c7a81f33b1..48e2f332e0e9fc9fa4147fa12d9c6c70a77fafda 100644
>>>> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>> @@ -18,6 +18,12 @@ properties:
>>>>        items:
>>>>          - enum:
>>>>              - qcom,apq8064-imem
>>>> +          - qcom,ipq8074-imem
>>>> +          - qcom,ipq6018-imem
>>>> +          - qcom,ipq5018-imem
>>>> +          - qcom,ipq9574-imem
>>>> +          - qcom,ipq5332-imem
>>>> +          - qcom,ipq5424-imem
>>> Random order, no, follow existing style. This applies for every qcom
>>> binding and you received such feedbacks in the past.
>> Apologies — I arranged them based on the evolutionary order of SoCs.
> Where is such ordering documented? How is it expressed in your internal
> guideline for example?
I made the mistake unintentionally and apologized for the same!
>
> Best regards,
> Krzysztof

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

* Re: [PATCH 3/7] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-02 10:17 ` [PATCH 3/7] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
  2025-07-02 10:50   ` Krzysztof Kozlowski
@ 2025-07-02 12:59   ` Konrad Dybcio
  2025-07-04  8:54     ` Kathiravan Thirumoorthy
  1 sibling, 1 reply; 17+ messages in thread
From: Konrad Dybcio @ 2025-07-02 12:59 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/2/25 12:17 PM, 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 approximately 32KB but only initial
> 4KB is accessible by all masters in the SoC.
> 
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
>  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..7eca5ba416c2ef5ef1c4e0eb4f58f1ca94fc92f0 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 = <0 0x08600000 0 0x7fff>;
> +			ranges = <0 0 0x08600000 0x7fff>;

I firmly believe there's an off-by-one in the docs and there
isn't an odd number of bytes reserved in the hw

Konrad

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

* Re: [PATCH 3/7] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-02 10:50   ` Krzysztof Kozlowski
@ 2025-07-02 13:00     ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2025-07-02 13:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kathiravan Thirumoorthy, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

On 7/2/25 12:50 PM, Krzysztof Kozlowski wrote:
> On 02/07/2025 12:17, 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 approximately 32KB but only initial
>> 4KB is accessible by all masters in the SoC.
>>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>>  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..7eca5ba416c2ef5ef1c4e0eb4f58f1ca94fc92f0 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";
> 
> No, this is not a simple MFD. Where are any children if this is a MFD?

IMEM is just a block of SRAM shared across cores on the platform.
It's present on all Qualcomm platforms and usually stores cookies
such as reboot reason.

A user would be welcome, but I'm not opposed to a lone description
either, at it still shrinks the undescribed-reg-space-hole

Konrad

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

* Re: [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles
  2025-07-02 10:59         ` Kathiravan Thirumoorthy
@ 2025-07-04  8:51           ` Kathiravan Thirumoorthy
  0 siblings, 0 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-04  8:51 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/2/2025 4:29 PM, Kathiravan Thirumoorthy wrote:
>
> On 7/2/2025 4:18 PM, Krzysztof Kozlowski wrote:
>> On 02/07/2025 12:46, Kathiravan Thirumoorthy wrote:
>>> On 7/2/2025 3:49 PM, Krzysztof Kozlowski wrote:
>>>> On 02/07/2025 12:17, Kathiravan Thirumoorthy wrote:
>>>>> IMEM is present in the Qualcomm's IPQ SoCs as well. Document the 
>>>>> same.
>>>>>
>>>>> Signed-off-by: Kathiravan Thirumoorthy 
>>>>> <kathiravan.thirumoorthy@oss.qualcomm.com>
>>>>> ---
>>>>>    Documentation/devicetree/bindings/sram/qcom,imem.yaml | 6 ++++++
>>>>>    1 file changed, 6 insertions(+)
>>>> Where is the changelog? This is not a v1.
>>> This is the v1. The series[1] I pointed out describes only for the
>>> IPQ5424 SoC. Since I have added few more SoCs, thought v1 is the
>>> appropriate numbering.
>>>
>>> [1]
>>> https://lore.kernel.org/linux-arm-msm/20250610-wdt_reset_reason-v5-0-2d2835160ab5@oss.qualcomm.com/ 
>>>
>> But IPQ5424 is already there, so you reworked that patch.
> Okay, so this should be V6?


Let me drop the IPQ5424 support and send the V2. I hope that is fine.


>>
>>
>>>>> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml 
>>>>> b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>>> index 
>>>>> 72d35e30c439ccf4901d937f838fe7c7a81f33b1..48e2f332e0e9fc9fa4147fa12d9c6c70a77fafda 
>>>>> 100644
>>>>> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>>> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>>> @@ -18,6 +18,12 @@ properties:
>>>>>        items:
>>>>>          - enum:
>>>>>              - qcom,apq8064-imem
>>>>> +          - qcom,ipq8074-imem
>>>>> +          - qcom,ipq6018-imem
>>>>> +          - qcom,ipq5018-imem
>>>>> +          - qcom,ipq9574-imem
>>>>> +          - qcom,ipq5332-imem
>>>>> +          - qcom,ipq5424-imem
>>>> Random order, no, follow existing style. This applies for every qcom
>>>> binding and you received such feedbacks in the past.
>>> Apologies — I arranged them based on the evolutionary order of SoCs.
>> Where is such ordering documented? How is it expressed in your internal
>> guideline for example?
> I made the mistake unintentionally and apologized for the same!
>>
>> Best regards,
>> Krzysztof

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

* Re: [PATCH 3/7] arm64: dts: qcom: ipq6018: Add the IMEM node
  2025-07-02 12:59   ` Konrad Dybcio
@ 2025-07-04  8:54     ` Kathiravan Thirumoorthy
  0 siblings, 0 replies; 17+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-04  8:54 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/2/2025 6:29 PM, Konrad Dybcio wrote:
> On 7/2/25 12:17 PM, 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 approximately 32KB but only initial
>> 4KB is accessible by all masters in the SoC.
>>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
>>   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..7eca5ba416c2ef5ef1c4e0eb4f58f1ca94fc92f0 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 = <0 0x08600000 0 0x7fff>;
>> +			ranges = <0 0 0x08600000 0x7fff>;
> I firmly believe there's an off-by-one in the docs and there
> isn't an odd number of bytes reserved in the hw
Thanks, I cross checked this in the SoC and I'm able to access the full 
4 byte at the end. Let me fix this up in the V2.
>
> Konrad

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

end of thread, other threads:[~2025-07-04  8:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 10:17 [PATCH 0/7] Describe the IMEM present in Qualcomm IPQ SoC's Kathiravan Thirumoorthy
2025-07-02 10:17 ` [PATCH 1/7] dt-bindings: sram: qcom,imem: Document Qualcomm IPQ SoC's IMEM compatibles Kathiravan Thirumoorthy
2025-07-02 10:19   ` Krzysztof Kozlowski
2025-07-02 10:46     ` Kathiravan Thirumoorthy
2025-07-02 10:48       ` Krzysztof Kozlowski
2025-07-02 10:59         ` Kathiravan Thirumoorthy
2025-07-04  8:51           ` Kathiravan Thirumoorthy
2025-07-02 10:17 ` [PATCH 2/7] arm64: dts: qcom: ipq8074: Add the IMEM node Kathiravan Thirumoorthy
2025-07-02 10:17 ` [PATCH 3/7] arm64: dts: qcom: ipq6018: " Kathiravan Thirumoorthy
2025-07-02 10:50   ` Krzysztof Kozlowski
2025-07-02 13:00     ` Konrad Dybcio
2025-07-02 12:59   ` Konrad Dybcio
2025-07-04  8:54     ` Kathiravan Thirumoorthy
2025-07-02 10:17 ` [PATCH 4/7] arm64: dts: qcom: ipq5018: " Kathiravan Thirumoorthy
2025-07-02 10:17 ` [PATCH 5/7] arm64: dts: qcom: ipq9574: " Kathiravan Thirumoorthy
2025-07-02 10:17 ` [PATCH 6/7] arm64: dts: qcom: ipq5332: " Kathiravan Thirumoorthy
2025-07-02 10:17 ` [PATCH 7/7] arm64: dts: qcom: ipq5424: " Kathiravan Thirumoorthy

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).