Skip to contentSkip to conversation

MSM8996 DT Support for ADSP PIL

PATCH Superseded Sarangdhar Joshi 2 participants 7 messages Oct 20, 2016 – Oct 21, 2016

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover MSM8996 DT Support for ADSP PIL

Add various device tree nodes to lay the groundwork for Qualcomm ADSP Peripheral Image Loader.

Sorry, I didn't send any cover letter for v1.

Changes since v1:
- Move hwlock DT node under root (/) (Bjorn and Andy)
- Rename smp2p-adsp to adsp-smp2p (Bjorn)
- Remove interrupt-parent property from node (Bjorn)

Bjorn Andersson (1):
arm64: dts: msm8996: Add SMEM DT nodes

Sarangdhar Joshi (3):
arm64: dts: msm8996: Add SMEM reserve-memory node
arm64: dts: msm8996: Add reserve-memory nodes
arm64: dts: msm8996: Add SMP2P and APCS nodes

 arch/arm64/boot/dts/qcom/msm8996.dtsi | 84 +++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

PATCH v2 1/4 arm64: dts: msm8996: Add SMEM reserve-memory node

Add DT node to carveout memory for shared memory region.

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +11 -0
index d6da223..36216ae 100644
@@ -31,6 +31,17 @@
 		reg = <0 0 0 0>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		smem_mem: smem-mem at 86000000 {
+			reg = <0x0 0x86000000 0x0 0x200000>;
+			no-map;
+		};
+	};
+
 	cpus {
 		#address-cells = <2>;
 		#size-cells = <0>;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#2 lore raw

PATCH v2 2/4 arm64: dts: msm8996: Add reserve-memory nodes

In reply to Sarangdhar Joshi

Add reserve-memory nodes required for Qualcomm
Peripheral Image Loaders

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +25 -0
index 36216ae..949b096 100644
@@ -36,6 +36,31 @@
 		#size-cells = <2>;
 		ranges;
 
+		mba_region: mba at 91500000 {
+			reg = <0x0 0x91500000 0x0 0x200000>;
+			no-map;
+		};
+
+		slpi_region: slpi at 90b00000 {
+			reg = <0x0 0x90b00000 0xa00000>;
+			no-map;
+		};
+
+		venus_region: venus at 90400000 {
+			reg = <0x0 0x90400000 0x0 0x700000>;
+			no-map;
+		};
+
+		adsp_region: adsp at 8ea00000 {
+			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
+			no-map;
+		};
+
+		mpss_region: mpss at 88800000 {
+			reg = <0x0 0x88800000 0x0 0x6200000>;
+			no-map;
+		};
+
 		smem_mem: smem-mem at 86000000 {
 			reg = <0x0 0x86000000 0x0 0x200000>;
 			no-map;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#3 lore raw

PATCH v2 3/4 arm64: dts: msm8996: Add SMEM DT nodes

In reply to Sarangdhar Joshi

From: Bjorn Andersson <[email protected]>

Add SMEM and TCSR DT nodes on MSM8996.

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +19 -0
index 949b096..abc1089 100644
@@ -164,17 +164,36 @@
 
 	};
 
+	tcsr_mutex: hwlock {
+		compatible = "qcom,tcsr-mutex";
+		syscon = <&tcsr_mutex_regs 0 0x1000>;
+		#hwlock-cells = <1>;
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";
 	};
 
+	smem {
+		compatible = "qcom,smem";
+
+		memory-region = <&smem_mem>;
+
+		hwlocks = <&tcsr_mutex 3>;
+	};
+
 	soc: soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0 0 0 0xffffffff>;
 		compatible = "simple-bus";
 
+		tcsr_mutex_regs: syscon at 740000 {
+			compatible = "syscon";
+			reg = <0x740000 0x20000>;
+		};
+
 		intc: interrupt-controller at 9bc0000 {
 			compatible = "arm,gic-v3";
 			#interrupt-cells = <3>;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#4 lore raw

Re: [PATCH v2 3/4] arm64: dts: msm8996: Add SMEM DT nodes

Quoted 25 lines · Sarangdhar Joshi

From: Bjorn Andersson <[email protected]>

Add SMEM and TCSR DT nodes on MSM8996.

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +6 -0
index 949b096..abc1089 100644
@@ -164,17 +164,36 @@
 
 	};
 
+	tcsr_mutex: hwlock {
+		compatible = "qcom,tcsr-mutex";
+		syscon = <&tcsr_mutex_regs 0 0x1000>;
+		#hwlock-cells = <1>;
+	};
+
 	psci {

arch/arm64/boot/dts/qcom/msm8996.dtsi line 183

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8996.dtsi +6 -0
 		compatible = "arm,psci-1.0";
 		method = "smc";
 	};
 
+	smem {
+		compatible = "qcom,smem";
+
+		memory-region = <&smem_mem>;
+
+		hwlocks = <&tcsr_mutex 3>;

Super nitpick: Is there a reason we have newlines between everything in this node? This node is the only one that isn't consistent.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#5 lore raw

Re: [PATCH v2 3/4] arm64: dts: msm8996: Add SMEM DT nodes

Quoted 30 lines · Stephen Boyd
Quoted 29 lines · Sarangdhar Joshi

From: Bjorn Andersson <[email protected]>

Add SMEM and TCSR DT nodes on MSM8996.

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +6 -0
index 949b096..abc1089 100644
@@ -164,17 +164,36 @@
 
 	};
 
+	tcsr_mutex: hwlock {
+		compatible = "qcom,tcsr-mutex";
+		syscon = <&tcsr_mutex_regs 0 0x1000>;
+		#hwlock-cells = <1>;
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";
 	};
 
Quoted 10 lines

arch/arm64/boot/dts/qcom/msm8996.dtsi line 183

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8996.dtsi +6 -0
+	smem {
+		compatible = "qcom,smem";
+
+		memory-region = <&smem_mem>;
+
+		hwlocks = <&tcsr_mutex 3>;

Super nitpick: Is there a reason we have newlines between everything in this node? This node is the only one that isn't consistent.

Thanks, will do that. I think I just missed updating this node from original patchset.

Quoted 1 line
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#6 lore raw

PATCH v2 4/4 arm64: dts: msm8996: Add SMP2P and APCS nodes

In reply to Sarangdhar Joshi

Add SMP2P and APCS DT nodes required for Qualcomm ADSP Peripheral Image Loader.

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +29 -0
index abc1089..26c4827 100644
@@ -175,6 +175,30 @@
 		method = "smc";
 	};
 
+	adsp-smp2p {
+		compatible = "qcom,smp2p";
+		qcom,smem = <443>, <429>;
+
+		interrupts = <0 158 IRQ_TYPE_EDGE_RISING>;
+
+		qcom,ipc = <&apcs 16 10>;
+
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <2>;
+
+		adsp_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,state-cells = <1>;
+		};
+
+		adsp_smp2p_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
 	smem {
 		compatible = "qcom,smem";
 
@@ -205,6 +229,11 @@
 			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		apcs: syscon at 9820000 {
+			compatible = "syscon";
+			reg = <0x9820000 0x1000>;
+		};
+
 		gcc: clock-controller at 300000 {
 			compatible = "qcom,gcc-msm8996";
 			#clock-cells = <1>;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project