diff mbox series

[v1,5/5] arm64: dts: qcom: sm8250: Add memory dump node

Message ID 1698052857-6918-6-git-send-email-quic_zhenhuah@quicinc.com (mailing list archive)
State Changes Requested
Headers show
Series soc/arm64: qcom: add initial version of memory dump | expand

Commit Message

Zhenhua Huang Oct. 23, 2023, 9:20 a.m. UTC
Add device node for memory dump on sm8250. Usage of memory dump
is to populate configuration in reserved memory, allowing
firmware to do the dump accordingly.

Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Krzysztof Kozlowski Oct. 23, 2023, 9:33 a.m. UTC | #1
On 23/10/2023 11:20, Zhenhua Huang wrote:
> Add device node for memory dump on sm8250. Usage of memory dump
> is to populate configuration in reserved memory, allowing
> firmware to do the dump accordingly.
> 
> Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sm8250.dtsi | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index a4e58ad..d379524 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -674,6 +674,11 @@
>  		reg = <0x0 0x80000000 0x0 0x0>;
>  	};
>  
> +	mem-dump {
> +		compatible = "qcom,mem-dump";

Sorry, this is not a hardware.

> +		memory-region = <&dump_mem>;
> +	};
Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index a4e58ad..d379524 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -674,6 +674,11 @@ 
 		reg = <0x0 0x80000000 0x0 0x0>;
 	};
 
+	mem-dump {
+		compatible = "qcom,mem-dump";
+		memory-region = <&dump_mem>;
+	};
+
 	pmu {
 		compatible = "arm,armv8-pmuv3";
 		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
@@ -851,6 +856,13 @@ 
 			reg = <0x0 0x8bf00000 0x0 0x4600000>;
 			no-map;
 		};
+
+		dump_mem: mem-dump-region {
+			compatible = "shared-dma-pool";
+			size = <0 0x2800000>;
+			alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
+			reusable;
+		};
 	};
 
 	smem {
@@ -5424,6 +5436,25 @@ 
 			};
 		};
 
+		sram@146bf000 {
+			compatible = "qcom,sm8250-imem", "syscon", "simple-mfd";
+			reg = <0 0x146bf000 0 0x1000>;
+			ranges = <0 0 0x146bf000 0x1000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			mem-dump-table@10 {
+			    compatible = "qcom,qcom-imem-mem-dump-table";
+			    reg = <0x10 0x8>;
+			};
+
+			mem-dump-table-size@724 {
+				compatible = "qcom,qcom-imem-mem-dump-table-size";
+				reg = <0x724 0x8>;
+			};
+		};
+
 		apps_smmu: iommu@15000000 {
 			compatible = "qcom,sm8250-smmu-500", "qcom,smmu-500", "arm,mmu-500";
 			reg = <0 0x15000000 0 0x100000>;