All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Enable download mode support for IPQ SOCs
@ 2023-05-26 11:06 Vignesh Viswanathan
  2023-05-26 11:06 ` [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074 Vignesh Viswanathan
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vignesh Viswanathan @ 2023-05-26 11:06 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: quic_kathirav, quic_anusha, quic_sjaganat, quic_srichara,
	quic_varada, Vignesh Viswanathan

Enable download mode support for IPQ8074 and IPQ6018. Also add reserved
memory regions for uboot and SBL avoid losing the RAM contents which will
be used in postmorterm analysis.

Vignesh Viswanathan (3):
  dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074
  arm64: dts: qcom: enable the download mode support
  arm64: dts: qcom: add few more reserved memory region

 .../devicetree/bindings/mfd/qcom,tcsr.yaml    |  1 +
 arch/arm64/boot/dts/qcom/ipq6018.dtsi         | 17 +++++++++++++---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi         | 20 +++++++++++++++++--
 3 files changed, 33 insertions(+), 5 deletions(-)

-- 
2.40.1


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

* [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074
  2023-05-26 11:06 [PATCH 0/3] Enable download mode support for IPQ SOCs Vignesh Viswanathan
@ 2023-05-26 11:06 ` Vignesh Viswanathan
  2023-05-26 18:38   ` Conor Dooley
  2023-06-08 16:24   ` Lee Jones
  2023-05-26 11:06 ` [PATCH 2/3] arm64: dts: qcom: enable the download mode support Vignesh Viswanathan
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 7+ messages in thread
From: Vignesh Viswanathan @ 2023-05-26 11:06 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: quic_kathirav, quic_anusha, quic_sjaganat, quic_srichara,
	quic_varada, Vignesh Viswanathan

Document the qcom,tcsr-ipq8074 compatible.

Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com>
---
 Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
index fe790af7b4fb..5ad9d5deaaf8 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
@@ -34,6 +34,7 @@ properties:
           - qcom,tcsr-ipq5332
           - qcom,tcsr-ipq6018
           - qcom,tcsr-ipq8064
+          - qcom,tcsr-ipq8074
           - qcom,tcsr-ipq9574
           - qcom,tcsr-mdm9615
           - qcom,tcsr-msm8226
-- 
2.40.1


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

* [PATCH 2/3] arm64: dts: qcom: enable the download mode support
  2023-05-26 11:06 [PATCH 0/3] Enable download mode support for IPQ SOCs Vignesh Viswanathan
  2023-05-26 11:06 ` [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074 Vignesh Viswanathan
@ 2023-05-26 11:06 ` Vignesh Viswanathan
  2023-05-26 11:06 ` [PATCH 3/3] arm64: dts: qcom: add few more reserved memory region Vignesh Viswanathan
  2023-05-27  1:07 ` (subset) [PATCH 0/3] Enable download mode support for IPQ SOCs Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Vignesh Viswanathan @ 2023-05-26 11:06 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: quic_kathirav, quic_anusha, quic_sjaganat, quic_srichara,
	quic_varada, Vignesh Viswanathan

Like any other Qualcomm SoCs, IPQ8074 and IPQ6018 also supports the
download mode to collect the RAM dumps if system crashes, to perform
the post mortem analysis. Add support for the same.

Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index f531797f2619..2d77a8336111 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -91,6 +91,7 @@ L2_0: l2-cache {
 	firmware {
 		scm {
 			compatible = "qcom,scm-ipq6018", "qcom,scm";
+			qcom,dload-mode = <&tcsr 0x6100>;
 		};
 	};
 
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 5b2c1986c8f4..00e559de00fb 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -103,6 +103,7 @@ memory@4ac00000 {
 	firmware {
 		scm {
 			compatible = "qcom,scm-ipq8074", "qcom,scm";
+			qcom,dload-mode = <&tcsr 0x6100>;
 		};
 	};
 
@@ -382,6 +383,11 @@ tcsr_mutex: hwlock@1905000 {
 			#hwlock-cells = <1>;
 		};
 
+		tcsr: syscon@1937000 {
+			compatible = "qcom,tcsr-ipq8074", "syscon";
+			reg = <0x01937000 0x21000>;
+		};
+
 		spmi_bus: spmi@200f000 {
 			compatible = "qcom,spmi-pmic-arb";
 			reg = <0x0200f000 0x001000>,
-- 
2.40.1


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

* [PATCH 3/3] arm64: dts: qcom: add few more reserved memory region
  2023-05-26 11:06 [PATCH 0/3] Enable download mode support for IPQ SOCs Vignesh Viswanathan
  2023-05-26 11:06 ` [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074 Vignesh Viswanathan
  2023-05-26 11:06 ` [PATCH 2/3] arm64: dts: qcom: enable the download mode support Vignesh Viswanathan
@ 2023-05-26 11:06 ` Vignesh Viswanathan
  2023-05-27  1:07 ` (subset) [PATCH 0/3] Enable download mode support for IPQ SOCs Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Vignesh Viswanathan @ 2023-05-26 11:06 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: quic_kathirav, quic_anusha, quic_sjaganat, quic_srichara,
	quic_varada, Vignesh Viswanathan

In IPQ SoCs, bootloader will collect the system RAM contents upon crash
for the post morterm analysis. If we don't reserve the memory region used
by bootloader, obviously linux will consume it and upon next boot on
crash, bootloader will be loaded in the same region, which will lead to
loose some of the data, sometimes we may miss out critical information.
So lets reserve the region used by the bootloader.

Similarly SBL copies some data into the reserved region and it will be
used in the crash scenario. So reserve 1MB for SBL as well.

While at it, drop the size padding in the reserved memory region,
wherever applicable.

Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq6018.dtsi | 16 +++++++++++++---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 14 ++++++++++++--
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index 2d77a8336111..fc64a5efbe2c 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -156,18 +156,28 @@ rpm_msg_ram: memory@60000 {
 			no-map;
 		};
 
+		bootloader@4a100000 {
+			reg = <0x0 0x4a100000 0x0 0x400000>;
+			no-map;
+		};
+
+		sbl@4a500000 {
+			reg = <0x0 0x4a500000 0x0 0x100000>;
+			no-map;
+		};
+
 		tz: memory@4a600000 {
-			reg = <0x0 0x4a600000 0x0 0x00400000>;
+			reg = <0x0 0x4a600000 0x0 0x400000>;
 			no-map;
 		};
 
 		smem_region: memory@4aa00000 {
-			reg = <0x0 0x4aa00000 0x0 0x00100000>;
+			reg = <0x0 0x4aa00000 0x0 0x100000>;
 			no-map;
 		};
 
 		q6_region: memory@4ab00000 {
-			reg = <0x0 0x4ab00000 0x0 0x05500000>;
+			reg = <0x0 0x4ab00000 0x0 0x5500000>;
 			no-map;
 		};
 	};
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 00e559de00fb..0793b691a095 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -86,17 +86,27 @@ reserved-memory {
 		#size-cells = <2>;
 		ranges;
 
+		bootloader@4a600000 {
+			reg = <0x0 0x4a600000 0x0 0x400000>;
+			no-map;
+		};
+
+		sbl@4aa00000 {
+			reg = <0x0 0x4aa00000 0x0 0x100000>;
+			no-map;
+		};
+
 		smem@4ab00000 {
 			compatible = "qcom,smem";
-			reg = <0x0 0x4ab00000 0x0 0x00100000>;
+			reg = <0x0 0x4ab00000 0x0 0x100000>;
 			no-map;
 
 			hwlocks = <&tcsr_mutex 0>;
 		};
 
 		memory@4ac00000 {
+			reg = <0x0 0x4ac00000 0x0 0x400000>;
 			no-map;
-			reg = <0x0 0x4ac00000 0x0 0x00400000>;
 		};
 	};
 
-- 
2.40.1


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

* Re: [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074
  2023-05-26 11:06 ` [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074 Vignesh Viswanathan
@ 2023-05-26 18:38   ` Conor Dooley
  2023-06-08 16:24   ` Lee Jones
  1 sibling, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-05-26 18:38 UTC (permalink / raw)
  To: Vignesh Viswanathan
  Cc: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel, quic_kathirav, quic_anusha, quic_sjaganat,
	quic_srichara, quic_varada

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

On Fri, May 26, 2023 at 04:36:51PM +0530, Vignesh Viswanathan wrote:
> Document the qcom,tcsr-ipq8074 compatible.
> 
> Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: (subset) [PATCH 0/3] Enable download mode support for IPQ SOCs
  2023-05-26 11:06 [PATCH 0/3] Enable download mode support for IPQ SOCs Vignesh Viswanathan
                   ` (2 preceding siblings ...)
  2023-05-26 11:06 ` [PATCH 3/3] arm64: dts: qcom: add few more reserved memory region Vignesh Viswanathan
@ 2023-05-27  1:07 ` Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2023-05-27  1:07 UTC (permalink / raw)
  To: conor+dt, agross, robh+dt, linux-kernel, Vignesh Viswanathan,
	konrad.dybcio, lee, linux-arm-msm, devicetree,
	krzysztof.kozlowski+dt
  Cc: quic_kathirav, quic_srichara, quic_sjaganat, quic_anusha, quic_varada

On Fri, 26 May 2023 16:36:50 +0530, Vignesh Viswanathan wrote:
> Enable download mode support for IPQ8074 and IPQ6018. Also add reserved
> memory regions for uboot and SBL avoid losing the RAM contents which will
> be used in postmorterm analysis.
> 
> Vignesh Viswanathan (3):
>   dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074
>   arm64: dts: qcom: enable the download mode support
>   arm64: dts: qcom: add few more reserved memory region
> 
> [...]

Applied, thanks!

[2/3] arm64: dts: qcom: enable the download mode support
      commit: 9b2406aaba7841863ac041225316c1ec1c86ea36
[3/3] arm64: dts: qcom: add few more reserved memory region
      commit: 0cd4e90cb2dec02ff859f5c98f744f43a23aea65

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

* Re: [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074
  2023-05-26 11:06 ` [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074 Vignesh Viswanathan
  2023-05-26 18:38   ` Conor Dooley
@ 2023-06-08 16:24   ` Lee Jones
  1 sibling, 0 replies; 7+ messages in thread
From: Lee Jones @ 2023-06-08 16:24 UTC (permalink / raw)
  To: Vignesh Viswanathan
  Cc: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel, quic_kathirav, quic_anusha, quic_sjaganat,
	quic_srichara, quic_varada

On Fri, 26 May 2023, Vignesh Viswanathan wrote:

> Document the qcom,tcsr-ipq8074 compatible.
> 
> Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com>
> ---
>  Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks

-- 
Lee Jones [李琼斯]

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

end of thread, other threads:[~2023-06-08 16:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 11:06 [PATCH 0/3] Enable download mode support for IPQ SOCs Vignesh Viswanathan
2023-05-26 11:06 ` [PATCH 1/3] dt-bindings: mfd: qcom,tcsr: add the compatible for IPQ8074 Vignesh Viswanathan
2023-05-26 18:38   ` Conor Dooley
2023-06-08 16:24   ` Lee Jones
2023-05-26 11:06 ` [PATCH 2/3] arm64: dts: qcom: enable the download mode support Vignesh Viswanathan
2023-05-26 11:06 ` [PATCH 3/3] arm64: dts: qcom: add few more reserved memory region Vignesh Viswanathan
2023-05-27  1:07 ` (subset) [PATCH 0/3] Enable download mode support for IPQ SOCs Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.