All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] msm8996: Enable support for MSS and SLPI
@ 2021-09-26 19:06 Yassine Oudjana
  2021-09-26 19:06 ` [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory Yassine Oudjana
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Yassine Oudjana @ 2021-09-26 19:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Ohad Ben-Cohen, Mathieu Poirier,
	Rob Herring
  Cc: Yassine Oudjana, AngeloGioacchino Del Regno, Konrad Dybcio,
	Raffaele Tranquillini, linux-arm-msm, linux-remoteproc,
	devicetree, phone-devel, linux-kernel

This series fixes reserved memory regions, adds a missing power domain
for SLPI in qcom_q6v5_pas, and enables support for MSS and SLPI in DTS.

Changes since v1:
 - Rebase on latest linux-next
 - Rewrite MSS node
 - Enable MSS and SLPI in some devices
Changes since v1 (2/5 remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998):
 - Rename msm8998_adsp_resource to msm8996_adsp_resource
 - Add power domains to slpi_resource_init and use that instead of msm8998_slpi_resource

Yassine Oudjana (5):
  arm64: dts: qcom: msm8996: Revamp reserved memory
  remoteproc: qcom: pas: Use the same init resources for MSM8996 and
    MSM8998
  arm64: dts: qcom: msm8996: Unify smp2p naming
  arm64: dts: qcom: msm8996: Add MSS and SLPI
  arm64: dts: qcom: msm8996-xiaomi-*: Enable MSS and SLPI

 .../dts/qcom/msm8996-sony-xperia-tone.dtsi    |  18 +-
 .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  |  30 ++-
 .../boot/dts/qcom/msm8996-xiaomi-gemini.dts   |   9 +
 .../boot/dts/qcom/msm8996-xiaomi-scorpio.dts  |   9 +
 arch/arm64/boot/dts/qcom/msm8996.dtsi         | 195 ++++++++++++++----
 drivers/remoteproc/qcom_q6v5_pas.c            |  27 +--
 6 files changed, 209 insertions(+), 79 deletions(-)

-- 
2.33.0



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

* [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory
  2021-09-26 19:06 [PATCH v2 0/5] msm8996: Enable support for MSS and SLPI Yassine Oudjana
@ 2021-09-26 19:06 ` Yassine Oudjana
  2021-10-24  3:04   ` Bjorn Andersson
  2022-04-03 19:40   ` Dmitry Baryshkov
  2021-09-26 19:06 ` [PATCH v2 2/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998 Yassine Oudjana
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 15+ messages in thread
From: Yassine Oudjana @ 2021-09-26 19:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Ohad Ben-Cohen, Mathieu Poirier,
	Rob Herring
  Cc: Yassine Oudjana, AngeloGioacchino Del Regno, Konrad Dybcio,
	Raffaele Tranquillini, linux-arm-msm, linux-remoteproc,
	devicetree, phone-devel, linux-kernel

Fix a total overlap between zap_shader_region and slpi_region, and rename
all regions to match the naming convention in other Qualcomm SoC device trees.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
---
 .../dts/qcom/msm8996-sony-xperia-tone.dtsi    | 18 ++++--
 .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 18 +++---
 arch/arm64/boot/dts/qcom/msm8996.dtsi         | 63 ++++++++++---------
 3 files changed, 55 insertions(+), 44 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
index 507396c4d23b..4c26e66f0610 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
@@ -13,9 +13,10 @@
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
 
-/delete-node/ &slpi_region;
-/delete-node/ &venus_region;
-/delete-node/ &zap_shader_region;
+/delete-node/ &adsp_mem;
+/delete-node/ &slpi_mem;
+/delete-node/ &venus_mem;
+/delete-node/ &gpu_mem;
 
 / {
 	qcom,msm-id = <246 0x30001>; /* MSM8996 V3.1 (Final) */
@@ -46,18 +47,23 @@ cont_splash_mem: memory@83401000 {
 			no-map;
 		};
 
-		zap_shader_region: gpu@90400000 {
+		adsp_mem: adsp@8ea00000 {
+			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
+			no-map;
+		};
+
+		gpu_mem: gpu@90400000 {
 			compatible = "shared-dma-pool";
 			reg = <0x0 0x90400000 0x0 0x2000>;
 			no-map;
 		};
 
-		slpi_region: memory@90500000 {
+		slpi_mem: memory@90500000 {
 			reg = <0 0x90500000 0 0xa00000>;
 			no-map;
 		};
 
-		venus_region: memory@90f00000 {
+		venus_mem: memory@90f00000 {
 			reg = <0 0x90f00000 0 0x500000>;
 			no-map;
 		};
diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
index d239b01b8505..a5e7bccadba2 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
@@ -66,32 +66,32 @@ memory@88800000 {
 
 		/* This platform has all PIL regions offset by 0x1400000 */
 		/delete-node/ mpss@88800000;
-		mpss_region: mpss@89c00000 {
+		mpss_mem: mpss@89c00000 {
 			reg = <0x0 0x89c00000 0x0 0x6200000>;
 			no-map;
 		};
 
 		/delete-node/ adsp@8ea00000;
-		adsp_region: adsp@8ea00000 {
+		adsp_mem: adsp@8fe00000 {
 			reg = <0x0 0x8fe00000 0x0 0x1b00000>;
 			no-map;
 		};
 
-		/delete-node/ slpi@90b00000;
-		slpi_region: slpi@91900000 {
+		/delete-node/ slpi@90500000;
+		slpi_mem: slpi@91900000 {
 			reg = <0x0 0x91900000 0x0 0xa00000>;
 			no-map;
 		};
 
-		/delete-node/ gpu@8f200000;
-		zap_shader_region: gpu@92300000 {
+		/delete-node/ gpu@90f00000;
+		gpu_mem: gpu@92300000 {
 			compatible = "shared-dma-pool";
 			reg = <0x0 0x92300000 0x0 0x2000>;
 			no-map;
 		};
 
 		/delete-node/ venus@91000000;
-		venus_region: venus@90400000 {
+		venus_mem: venus@92400000 {
 			reg = <0x0 0x92400000 0x0 0x500000>;
 			no-map;
 		};
@@ -107,7 +107,7 @@ ramoops@92900000 {
 			pmsg-size = <0x40000>;
 		};
 
-		/delete-node/ rmtfs@86700000;
+		/delete-node/ rmtfs;
 		rmtfs@f6c00000 {
 			compatible = "qcom,rmtfs-mem";
 			reg = <0 0xf6c00000 0 0x200000>;
@@ -118,7 +118,7 @@ rmtfs@f6c00000 {
 		};
 
 		/delete-node/ mba@91500000;
-		mba_region: mba@f6f00000 {
+		mba_mem: mba@f6f00000 {
 			reg = <0x0 0xf6f00000 0x0 0x100000>;
 			no-map;
 		};
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index eb3ec5ff46eb..1495fff6ffc9 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -384,60 +384,65 @@ reserved-memory {
 		#size-cells = <2>;
 		ranges;
 
-		mba_region: mba@91500000 {
-			reg = <0x0 0x91500000 0x0 0x200000>;
+		hyp_mem: memory@85800000 {
+			reg = <0x0 0x85800000 0x0 0x600000>;
 			no-map;
 		};
 
-		slpi_region: slpi@90b00000 {
-			reg = <0x0 0x90b00000 0x0 0xa00000>;
+		xbl_mem: memory@85e00000 {
+			reg = <0x0 0x85e00000 0x0 0x200000>;
 			no-map;
 		};
 
-		venus_region: venus@90400000 {
-			reg = <0x0 0x90400000 0x0 0x700000>;
+		smem_mem: smem-mem@86000000 {
+			reg = <0x0 0x86000000 0x0 0x200000>;
 			no-map;
 		};
 
-		adsp_region: adsp@8ea00000 {
-			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
+		tz_mem: memory@86200000 {
+			reg = <0x0 0x86200000 0x0 0x2600000>;
 			no-map;
 		};
 
-		mpss_region: mpss@88800000 {
-			reg = <0x0 0x88800000 0x0 0x6200000>;
+		rmtfs_mem: rmtfs {
+			compatible = "qcom,rmtfs-mem";
+
+			size = <0x0 0x200000>;
+			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
 			no-map;
+
+			qcom,client-id = <1>;
+			qcom,vmid = <15>;
 		};
 
-		smem_mem: smem-mem@86000000 {
-			reg = <0x0 0x86000000 0x0 0x200000>;
+		mpss_mem: mpss@88800000 {
+			reg = <0x0 0x88800000 0x0 0x6200000>;
 			no-map;
 		};
 
-		memory@85800000 {
-			reg = <0x0 0x85800000 0x0 0x800000>;
+		adsp_mem: adsp@8ea00000 {
+			reg = <0x0 0x8ea00000 0x0 0x1b00000>;
 			no-map;
 		};
 
-		memory@86200000 {
-			reg = <0x0 0x86200000 0x0 0x2600000>;
+		slpi_mem: slpi@90500000 {
+			reg = <0x0 0x90500000 0x0 0xa00000>;
 			no-map;
 		};
 
-		rmtfs@86700000 {
-			compatible = "qcom,rmtfs-mem";
-
-			size = <0x0 0x200000>;
-			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
+		gpu_mem: gpu@90f00000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x90f00000 0x0 0x100000>;
 			no-map;
+		};
 
-			qcom,client-id = <1>;
-			qcom,vmid = <15>;
+		venus_mem: venus@91000000 {
+			reg = <0x0 0x91000000 0x0 0x500000>;
+			no-map;
 		};
 
-		zap_shader_region: gpu@8f200000 {
-			compatible = "shared-dma-pool";
-			reg = <0x0 0x90b00000 0x0 0xa00000>;
+		mba_mem: mba@91500000 {
+			reg = <0x0 0x91500000 0x0 0x200000>;
 			no-map;
 		};
 	};
@@ -1013,7 +1018,7 @@ opp-133000000 {
 			};
 
 			zap-shader {
-				memory-region = <&zap_shader_region>;
+				memory-region = <&gpu_mem>;
 			};
 		};
 
@@ -2001,7 +2006,7 @@ venus: video-codec@c00000 {
 				 <&venus_smmu 0x2c>,
 				 <&venus_smmu 0x2d>,
 				 <&venus_smmu 0x31>;
-			memory-region = <&venus_region>;
+			memory-region = <&venus_mem>;
 			status = "disabled";
 
 			video-decoder {
@@ -3008,7 +3013,7 @@ adsp_pil: remoteproc@9300000 {
 			clocks = <&xo_board>;
 			clock-names = "xo";
 
-			memory-region = <&adsp_region>;
+			memory-region = <&adsp_mem>;
 
 			qcom,smem-states = <&smp2p_adsp_out 0>;
 			qcom,smem-state-names = "stop";
-- 
2.33.0



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

* [PATCH v2 2/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998
  2021-09-26 19:06 [PATCH v2 0/5] msm8996: Enable support for MSS and SLPI Yassine Oudjana
  2021-09-26 19:06 ` [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory Yassine Oudjana
@ 2021-09-26 19:06 ` Yassine Oudjana
  2021-09-27 23:13   ` (subset) " Bjorn Andersson
  2021-09-26 19:06 ` [PATCH v2 3/5] arm64: dts: qcom: msm8996: Unify smp2p naming Yassine Oudjana
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Yassine Oudjana @ 2021-09-26 19:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Ohad Ben-Cohen, Mathieu Poirier,
	Rob Herring
  Cc: Yassine Oudjana, AngeloGioacchino Del Regno, Konrad Dybcio,
	Raffaele Tranquillini, linux-arm-msm, linux-remoteproc,
	devicetree, phone-devel, linux-kernel

The resources for MSM8996 are missing power domains, and adding them
makes the resources identical to the MSM8998 ones.
Rename msm8998_adsp_resource to msm8996_adsp_resource then use it
for both chips. Also add power domains to slpi_resource_init and use
it for both chips.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 401b1ec90785..5e862401b66e 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -585,7 +585,7 @@ static const struct adsp_data sm8350_adsp_resource = {
 	.ssctl_id = 0x14,
 };
 
-static const struct adsp_data msm8998_adsp_resource = {
+static const struct adsp_data msm8996_adsp_resource = {
 		.crash_reason_smem = 423,
 		.firmware_name = "adsp.mdt",
 		.pas_id = 1,
@@ -714,6 +714,10 @@ static const struct adsp_data slpi_resource_init = {
 		.pas_id = 12,
 		.has_aggre2_clk = true,
 		.auto_boot = true,
+		.proxy_pd_names = (char*[]){
+			"ssc_cx",
+			NULL
+		},
 		.ssr_name = "dsps",
 		.sysmon_name = "slpi",
 		.ssctl_id = 0x16,
@@ -779,21 +783,6 @@ static const struct adsp_data sm8350_slpi_resource = {
 	.ssctl_id = 0x16,
 };
 
-static const struct adsp_data msm8998_slpi_resource = {
-		.crash_reason_smem = 424,
-		.firmware_name = "slpi.mdt",
-		.pas_id = 12,
-		.has_aggre2_clk = true,
-		.auto_boot = true,
-		.proxy_pd_names = (char*[]){
-			"ssc_cx",
-			NULL
-		},
-		.ssr_name = "dsps",
-		.sysmon_name = "slpi",
-		.ssctl_id = 0x16,
-};
-
 static const struct adsp_data wcss_resource_init = {
 	.crash_reason_smem = 421,
 	.firmware_name = "wcnss.mdt",
@@ -822,10 +811,10 @@ static const struct adsp_data sdx55_mpss_resource = {
 
 static const struct of_device_id adsp_of_match[] = {
 	{ .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
-	{ .compatible = "qcom,msm8996-adsp-pil", .data = &adsp_resource_init},
+	{ .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
 	{ .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init},
-	{ .compatible = "qcom,msm8998-adsp-pas", .data = &msm8998_adsp_resource},
-	{ .compatible = "qcom,msm8998-slpi-pas", .data = &msm8998_slpi_resource},
+	{ .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource},
+	{ .compatible = "qcom,msm8998-slpi-pas", .data = &slpi_resource_init},
 	{ .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
 	{ .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
 	{ .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
-- 
2.33.0



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

* [PATCH v2 3/5] arm64: dts: qcom: msm8996: Unify smp2p naming
  2021-09-26 19:06 [PATCH v2 0/5] msm8996: Enable support for MSS and SLPI Yassine Oudjana
  2021-09-26 19:06 ` [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory Yassine Oudjana
  2021-09-26 19:06 ` [PATCH v2 2/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998 Yassine Oudjana
@ 2021-09-26 19:06 ` Yassine Oudjana
  2022-04-03 19:41   ` Dmitry Baryshkov
  2021-09-26 19:06 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add MSS and SLPI Yassine Oudjana
  2021-09-26 19:06 ` [PATCH v2 5/5] arm64: dts: qcom: msm8996-xiaomi-*: Enable " Yassine Oudjana
  4 siblings, 1 reply; 15+ messages in thread
From: Yassine Oudjana @ 2021-09-26 19:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Ohad Ben-Cohen, Mathieu Poirier,
	Rob Herring
  Cc: Yassine Oudjana, AngeloGioacchino Del Regno, Konrad Dybcio,
	Raffaele Tranquillini, linux-arm-msm, linux-remoteproc,
	devicetree, phone-devel, linux-kernel

Rename smp2p-modem to smp2p-mpss, and make the subnode labels of smp2p_adsp
and smp2p_slpi follow the <name>_smp2p_<out/in> layout.
Also move smp2p_slpi_out above smp2p_slpi_in to make it match mpss and adsp
where master-kernel is the first subnode.

This patch brings no functional change.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 33 ++++++++++++++-------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 1495fff6ffc9..7710ca6f3374 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -518,12 +518,12 @@ smp2p-adsp {
 		qcom,local-pid = <0>;
 		qcom,remote-pid = <2>;
 
-		smp2p_adsp_out: master-kernel {
+		adsp_smp2p_out: master-kernel {
 			qcom,entry-name = "master-kernel";
 			#qcom,smem-state-cells = <1>;
 		};
 
-		smp2p_adsp_in: slave-kernel {
+		adsp_smp2p_in: slave-kernel {
 			qcom,entry-name = "slave-kernel";
 
 			interrupt-controller;
@@ -531,7 +531,7 @@ smp2p_adsp_in: slave-kernel {
 		};
 	};
 
-	smp2p-modem {
+	smp2p-mpss {
 		compatible = "qcom,smp2p";
 		qcom,smem = <435>, <428>;
 
@@ -542,12 +542,12 @@ smp2p-modem {
 		qcom,local-pid = <0>;
 		qcom,remote-pid = <1>;
 
-		modem_smp2p_out: master-kernel {
+		mpss_smp2p_out: master-kernel {
 			qcom,entry-name = "master-kernel";
 			#qcom,smem-state-cells = <1>;
 		};
 
-		modem_smp2p_in: slave-kernel {
+		mpss_smp2p_in: slave-kernel {
 			qcom,entry-name = "slave-kernel";
 
 			interrupt-controller;
@@ -566,16 +566,17 @@ smp2p-slpi {
 		qcom,local-pid = <0>;
 		qcom,remote-pid = <3>;
 
-		smp2p_slpi_in: slave-kernel {
+		slpi_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		slpi_smp2p_in: slave-kernel {
 			qcom,entry-name = "slave-kernel";
+
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
-
-		smp2p_slpi_out: master-kernel {
-			qcom,entry-name = "master-kernel";
-			#qcom,smem-state-cells = <1>;
-		};
 	};
 
 	soc: soc {
@@ -3003,10 +3004,10 @@ adsp_pil: remoteproc@9300000 {
 			reg = <0x09300000 0x80000>;
 
 			interrupts-extended = <&intc 0 162 IRQ_TYPE_EDGE_RISING>,
-					      <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
-					      <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
-					      <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
-					      <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
+					      <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
 			interrupt-names = "wdog", "fatal", "ready",
 					  "handover", "stop-ack";
 
@@ -3015,7 +3016,7 @@ adsp_pil: remoteproc@9300000 {
 
 			memory-region = <&adsp_mem>;
 
-			qcom,smem-states = <&smp2p_adsp_out 0>;
+			qcom,smem-states = <&adsp_smp2p_out 0>;
 			qcom,smem-state-names = "stop";
 
 			power-domains = <&rpmpd MSM8996_VDDCX>;
-- 
2.33.0



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

* [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add MSS and SLPI
  2021-09-26 19:06 [PATCH v2 0/5] msm8996: Enable support for MSS and SLPI Yassine Oudjana
                   ` (2 preceding siblings ...)
  2021-09-26 19:06 ` [PATCH v2 3/5] arm64: dts: qcom: msm8996: Unify smp2p naming Yassine Oudjana
@ 2021-09-26 19:06 ` Yassine Oudjana
  2022-04-03 19:41   ` Dmitry Baryshkov
  2021-09-26 19:06 ` [PATCH v2 5/5] arm64: dts: qcom: msm8996-xiaomi-*: Enable " Yassine Oudjana
  4 siblings, 1 reply; 15+ messages in thread
From: Yassine Oudjana @ 2021-09-26 19:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Ohad Ben-Cohen, Mathieu Poirier,
	Rob Herring
  Cc: Yassine Oudjana, AngeloGioacchino Del Regno, Konrad Dybcio,
	Raffaele Tranquillini, linux-arm-msm, linux-remoteproc,
	devicetree, phone-devel, linux-kernel

Add nodes for the MSS and SLPI remoteprocs.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 99 +++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 7710ca6f3374..1301ffcf588b 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -2103,6 +2103,105 @@ lpass_q6_smmu: iommu@1600000 {
 			clock-names = "iface", "bus";
 		};
 
+		slpi_pil: remoteproc@1c00000 {
+			compatible = "qcom,msm8996-slpi-pil";
+			reg = <0x01c00000 0x4000>;
+
+			interrupts-extended = <&intc 0 390 IRQ_TYPE_EDGE_RISING>,
+					      <&slpi_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&slpi_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&slpi_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&slpi_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog",
+					  "fatal",
+					  "ready",
+					  "handover",
+					  "stop-ack";
+
+			clocks = <&xo_board>,
+				 <&rpmcc RPM_SMD_AGGR2_NOC_CLK>;
+			clock-names = "xo", "aggre2";
+
+			memory-region = <&slpi_mem>;
+
+			qcom,smem-states = <&slpi_smp2p_out 0>;
+			qcom,smem-state-names = "stop";
+
+			power-domains = <&rpmpd MSM8996_VDDSSCX>;
+			power-domain-names = "ssc_cx";
+
+			status = "disabled";
+
+			smd-edge {
+				interrupts = <GIC_SPI 176 IRQ_TYPE_EDGE_RISING>;
+
+				label = "dsps";
+				mboxes = <&apcs_glb 25>;
+				qcom,smd-edge = <3>;
+				qcom,remote-pid = <3>;
+			};
+		};
+
+		mss_pil: remoteproc@2080000 {
+			compatible = "qcom,msm8996-mss-pil";
+			reg = <0x2080000 0x100>,
+			      <0x2180000 0x020>;
+			reg-names = "qdsp6", "rmb";
+
+			interrupts-extended = <&intc 0 448 IRQ_TYPE_EDGE_RISING>,
+					      <&mpss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&mpss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&mpss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&mpss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
+					      <&mpss_smp2p_in 7 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog", "fatal", "ready",
+					  "handover", "stop-ack",
+					  "shutdown-ack";
+
+			clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
+				 <&gcc GCC_MSS_Q6_BIMC_AXI_CLK>,
+				 <&gcc GCC_BOOT_ROM_AHB_CLK>,
+				 <&xo_board>,
+				 <&gcc GCC_MSS_GPLL0_DIV_CLK>,
+				 <&gcc GCC_MSS_SNOC_AXI_CLK>,
+				 <&gcc GCC_MSS_MNOC_BIMC_AXI_CLK>,
+				 <&rpmcc RPM_SMD_PCNOC_CLK>,
+				 <&rpmcc RPM_SMD_QDSS_CLK>;
+			clock-names = "iface", "bus", "mem", "xo", "gpll0_mss",
+				      "snoc_axi", "mnoc_axi", "pnoc", "qdss";
+
+			resets = <&gcc GCC_MSS_RESTART>;
+			reset-names = "mss_restart";
+
+			power-domains = <&rpmpd MSM8996_VDDCX>,
+					<&rpmpd MSM8996_VDDMX>;
+			power-domain-names = "cx", "mx";
+
+			qcom,smem-states = <&mpss_smp2p_out 0>;
+			qcom,smem-state-names = "stop";
+
+			qcom,halt-regs = <&tcsr_mutex_regs 0x23000 0x25000 0x24000>;
+
+			status = "disabled";
+
+			mba {
+				memory-region = <&mba_mem>;
+			};
+
+			mpss {
+				memory-region = <&mpss_mem>;
+			};
+
+			smd-edge {
+				interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>;
+
+				label = "mpss";
+				mboxes = <&apcs_glb 12>;
+				qcom,smd-edge = <0>;
+				qcom,remote-pid = <1>;
+			};
+		};
+
 		stm@3002000 {
 			compatible = "arm,coresight-stm", "arm,primecell";
 			reg = <0x3002000 0x1000>,
-- 
2.33.0



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

* [PATCH v2 5/5] arm64: dts: qcom: msm8996-xiaomi-*: Enable MSS and SLPI
  2021-09-26 19:06 [PATCH v2 0/5] msm8996: Enable support for MSS and SLPI Yassine Oudjana
                   ` (3 preceding siblings ...)
  2021-09-26 19:06 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add MSS and SLPI Yassine Oudjana
@ 2021-09-26 19:06 ` Yassine Oudjana
  2022-04-03 19:41   ` Dmitry Baryshkov
  4 siblings, 1 reply; 15+ messages in thread
From: Yassine Oudjana @ 2021-09-26 19:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Ohad Ben-Cohen, Mathieu Poirier,
	Rob Herring
  Cc: Yassine Oudjana, AngeloGioacchino Del Regno, Konrad Dybcio,
	Raffaele Tranquillini, linux-arm-msm, linux-remoteproc,
	devicetree, phone-devel, linux-kernel

Enable mss_pil and slpi_pil and set their firmware paths.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
---
 arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 12 ++++++++++++
 arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts  |  9 +++++++++
 arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts |  9 +++++++++
 3 files changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
index a5e7bccadba2..863537f504f1 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
@@ -267,6 +267,12 @@ &mmcc {
 	vdd-gfx-supply = <&vdd_gfx>;
 };
 
+&mss_pil {
+	status = "okay";
+
+	pll-supply = <&vreg_l12a_1p8>;
+};
+
 &pcie0 {
 	status = "okay";
 
@@ -291,6 +297,12 @@ &pm8994_resin {
 	linux,code = <KEY_VOLUMEDOWN>;
 };
 
+&slpi_pil {
+	status = "okay";
+
+	px-supply = <&vreg_lvs2a_1p8>;
+};
+
 &usb3 {
 	status = "okay";
 	extcon = <&typec>;
diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
index 77d508e5164a..c0d14bd0f25b 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
+++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
@@ -96,6 +96,11 @@ zap-shader {
 	};
 };
 
+&mss_pil {
+	firmware-name = "qcom/msm8996/gemini/mba.mbn",
+			"qcom/msm8996/gemini/modem.mbn";
+};
+
 &q6asmdai {
 	dai@0 {
 		reg = <0>;
@@ -110,6 +115,10 @@ dai@2 {
 	};
 };
 
+&slpi_pil {
+	firmware-name = "qcom/msm8996/gemini/slpi.mbn";
+};
+
 &sound {
 	compatible = "qcom,apq8096-sndcard";
 	model = "gemini";
diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts
index ea2ca271fe7d..7f1523f66d38 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts
+++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts
@@ -96,6 +96,11 @@ &mdss {
 	status = "disabled";
 };
 
+&mss_pil {
+	firmware-name = "qcom/msm8996/scorpio/mba.mbn",
+			"qcom/msm8996/scorpio/modem.mbn";
+};
+
 &q6asmdai {
 	dai@0 {
 		reg = <0>;
@@ -110,6 +115,10 @@ dai@2 {
 	};
 };
 
+&slpi_pil {
+	firmware-name = "qcom/msm8996/scorpio/slpi.mbn";
+};
+
 &sound {
 	compatible = "qcom,apq8096-sndcard";
 	model = "scorpio";
-- 
2.33.0



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

* Re: (subset) [PATCH v2 2/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998
  2021-09-26 19:06 ` [PATCH v2 2/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998 Yassine Oudjana
@ 2021-09-27 23:13   ` Bjorn Andersson
  0 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2021-09-27 23:13 UTC (permalink / raw)
  To: Rob Herring, Mathieu Poirier, Yassine Oudjana, Andy Gross,
	Ohad Ben-Cohen
  Cc: Raffaele Tranquillini, linux-remoteproc, linux-kernel,
	linux-arm-msm, devicetree, phone-devel, Konrad Dybcio,
	AngeloGioacchino Del Regno

On Sun, 26 Sep 2021 19:06:22 +0000, Yassine Oudjana wrote:
> The resources for MSM8996 are missing power domains, and adding them
> makes the resources identical to the MSM8998 ones.
> Rename msm8998_adsp_resource to msm8996_adsp_resource then use it
> for both chips. Also add power domains to slpi_resource_init and use
> it for both chips.
> 
> 
> [...]

Applied, thanks!

[2/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998
      commit: 0e235460be2e8c9b08e567c839641395a8ca68d9

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

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

* Re: [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory
  2021-09-26 19:06 ` [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory Yassine Oudjana
@ 2021-10-24  3:04   ` Bjorn Andersson
  2021-11-02 23:50     ` Dmitry Baryshkov
  2022-04-03 19:40   ` Dmitry Baryshkov
  1 sibling, 1 reply; 15+ messages in thread
From: Bjorn Andersson @ 2021-10-24  3:04 UTC (permalink / raw)
  To: Yassine Oudjana
  Cc: Andy Gross, Ohad Ben-Cohen, Mathieu Poirier, Rob Herring,
	AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On Sun 26 Sep 14:06 CDT 2021, Yassine Oudjana wrote:

> Fix a total overlap between zap_shader_region and slpi_region, and rename
> all regions to match the naming convention in other Qualcomm SoC device trees.
> 
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>

FYI, I like this series, but I held off applying it because I wanted to
verify that the shuffling of the memory regions works on the existing
8996 boards.

Unfortunately it didn't work, either with or without the shuffling on
the db820c - and I've not found the time to figure out why that is. I
hope to get back to this shortly (or that someone else will figure it
out and provide a tested-by)

Regards,
Bjorn

> ---
>  .../dts/qcom/msm8996-sony-xperia-tone.dtsi    | 18 ++++--
>  .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 18 +++---
>  arch/arm64/boot/dts/qcom/msm8996.dtsi         | 63 ++++++++++---------
>  3 files changed, 55 insertions(+), 44 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
> index 507396c4d23b..4c26e66f0610 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
> @@ -13,9 +13,10 @@
>  #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>  #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
>  
> -/delete-node/ &slpi_region;
> -/delete-node/ &venus_region;
> -/delete-node/ &zap_shader_region;
> +/delete-node/ &adsp_mem;
> +/delete-node/ &slpi_mem;
> +/delete-node/ &venus_mem;
> +/delete-node/ &gpu_mem;
>  
>  / {
>  	qcom,msm-id = <246 0x30001>; /* MSM8996 V3.1 (Final) */
> @@ -46,18 +47,23 @@ cont_splash_mem: memory@83401000 {
>  			no-map;
>  		};
>  
> -		zap_shader_region: gpu@90400000 {
> +		adsp_mem: adsp@8ea00000 {
> +			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
> +			no-map;
> +		};
> +
> +		gpu_mem: gpu@90400000 {
>  			compatible = "shared-dma-pool";
>  			reg = <0x0 0x90400000 0x0 0x2000>;
>  			no-map;
>  		};
>  
> -		slpi_region: memory@90500000 {
> +		slpi_mem: memory@90500000 {
>  			reg = <0 0x90500000 0 0xa00000>;
>  			no-map;
>  		};
>  
> -		venus_region: memory@90f00000 {
> +		venus_mem: memory@90f00000 {
>  			reg = <0 0x90f00000 0 0x500000>;
>  			no-map;
>  		};
> diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> index d239b01b8505..a5e7bccadba2 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> @@ -66,32 +66,32 @@ memory@88800000 {
>  
>  		/* This platform has all PIL regions offset by 0x1400000 */
>  		/delete-node/ mpss@88800000;
> -		mpss_region: mpss@89c00000 {
> +		mpss_mem: mpss@89c00000 {
>  			reg = <0x0 0x89c00000 0x0 0x6200000>;
>  			no-map;
>  		};
>  
>  		/delete-node/ adsp@8ea00000;
> -		adsp_region: adsp@8ea00000 {
> +		adsp_mem: adsp@8fe00000 {
>  			reg = <0x0 0x8fe00000 0x0 0x1b00000>;
>  			no-map;
>  		};
>  
> -		/delete-node/ slpi@90b00000;
> -		slpi_region: slpi@91900000 {
> +		/delete-node/ slpi@90500000;
> +		slpi_mem: slpi@91900000 {
>  			reg = <0x0 0x91900000 0x0 0xa00000>;
>  			no-map;
>  		};
>  
> -		/delete-node/ gpu@8f200000;
> -		zap_shader_region: gpu@92300000 {
> +		/delete-node/ gpu@90f00000;
> +		gpu_mem: gpu@92300000 {
>  			compatible = "shared-dma-pool";
>  			reg = <0x0 0x92300000 0x0 0x2000>;
>  			no-map;
>  		};
>  
>  		/delete-node/ venus@91000000;
> -		venus_region: venus@90400000 {
> +		venus_mem: venus@92400000 {
>  			reg = <0x0 0x92400000 0x0 0x500000>;
>  			no-map;
>  		};
> @@ -107,7 +107,7 @@ ramoops@92900000 {
>  			pmsg-size = <0x40000>;
>  		};
>  
> -		/delete-node/ rmtfs@86700000;
> +		/delete-node/ rmtfs;
>  		rmtfs@f6c00000 {
>  			compatible = "qcom,rmtfs-mem";
>  			reg = <0 0xf6c00000 0 0x200000>;
> @@ -118,7 +118,7 @@ rmtfs@f6c00000 {
>  		};
>  
>  		/delete-node/ mba@91500000;
> -		mba_region: mba@f6f00000 {
> +		mba_mem: mba@f6f00000 {
>  			reg = <0x0 0xf6f00000 0x0 0x100000>;
>  			no-map;
>  		};
> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> index eb3ec5ff46eb..1495fff6ffc9 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> @@ -384,60 +384,65 @@ reserved-memory {
>  		#size-cells = <2>;
>  		ranges;
>  
> -		mba_region: mba@91500000 {
> -			reg = <0x0 0x91500000 0x0 0x200000>;
> +		hyp_mem: memory@85800000 {
> +			reg = <0x0 0x85800000 0x0 0x600000>;
>  			no-map;
>  		};
>  
> -		slpi_region: slpi@90b00000 {
> -			reg = <0x0 0x90b00000 0x0 0xa00000>;
> +		xbl_mem: memory@85e00000 {
> +			reg = <0x0 0x85e00000 0x0 0x200000>;
>  			no-map;
>  		};
>  
> -		venus_region: venus@90400000 {
> -			reg = <0x0 0x90400000 0x0 0x700000>;
> +		smem_mem: smem-mem@86000000 {
> +			reg = <0x0 0x86000000 0x0 0x200000>;
>  			no-map;
>  		};
>  
> -		adsp_region: adsp@8ea00000 {
> -			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
> +		tz_mem: memory@86200000 {
> +			reg = <0x0 0x86200000 0x0 0x2600000>;
>  			no-map;
>  		};
>  
> -		mpss_region: mpss@88800000 {
> -			reg = <0x0 0x88800000 0x0 0x6200000>;
> +		rmtfs_mem: rmtfs {
> +			compatible = "qcom,rmtfs-mem";
> +
> +			size = <0x0 0x200000>;
> +			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
>  			no-map;
> +
> +			qcom,client-id = <1>;
> +			qcom,vmid = <15>;
>  		};
>  
> -		smem_mem: smem-mem@86000000 {
> -			reg = <0x0 0x86000000 0x0 0x200000>;
> +		mpss_mem: mpss@88800000 {
> +			reg = <0x0 0x88800000 0x0 0x6200000>;
>  			no-map;
>  		};
>  
> -		memory@85800000 {
> -			reg = <0x0 0x85800000 0x0 0x800000>;
> +		adsp_mem: adsp@8ea00000 {
> +			reg = <0x0 0x8ea00000 0x0 0x1b00000>;
>  			no-map;
>  		};
>  
> -		memory@86200000 {
> -			reg = <0x0 0x86200000 0x0 0x2600000>;
> +		slpi_mem: slpi@90500000 {
> +			reg = <0x0 0x90500000 0x0 0xa00000>;
>  			no-map;
>  		};
>  
> -		rmtfs@86700000 {
> -			compatible = "qcom,rmtfs-mem";
> -
> -			size = <0x0 0x200000>;
> -			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
> +		gpu_mem: gpu@90f00000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0x0 0x90f00000 0x0 0x100000>;
>  			no-map;
> +		};
>  
> -			qcom,client-id = <1>;
> -			qcom,vmid = <15>;
> +		venus_mem: venus@91000000 {
> +			reg = <0x0 0x91000000 0x0 0x500000>;
> +			no-map;
>  		};
>  
> -		zap_shader_region: gpu@8f200000 {
> -			compatible = "shared-dma-pool";
> -			reg = <0x0 0x90b00000 0x0 0xa00000>;
> +		mba_mem: mba@91500000 {
> +			reg = <0x0 0x91500000 0x0 0x200000>;
>  			no-map;
>  		};
>  	};
> @@ -1013,7 +1018,7 @@ opp-133000000 {
>  			};
>  
>  			zap-shader {
> -				memory-region = <&zap_shader_region>;
> +				memory-region = <&gpu_mem>;
>  			};
>  		};
>  
> @@ -2001,7 +2006,7 @@ venus: video-codec@c00000 {
>  				 <&venus_smmu 0x2c>,
>  				 <&venus_smmu 0x2d>,
>  				 <&venus_smmu 0x31>;
> -			memory-region = <&venus_region>;
> +			memory-region = <&venus_mem>;
>  			status = "disabled";
>  
>  			video-decoder {
> @@ -3008,7 +3013,7 @@ adsp_pil: remoteproc@9300000 {
>  			clocks = <&xo_board>;
>  			clock-names = "xo";
>  
> -			memory-region = <&adsp_region>;
> +			memory-region = <&adsp_mem>;
>  
>  			qcom,smem-states = <&smp2p_adsp_out 0>;
>  			qcom,smem-state-names = "stop";
> -- 
> 2.33.0
> 
> 

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

* Re: [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory
  2021-10-24  3:04   ` Bjorn Andersson
@ 2021-11-02 23:50     ` Dmitry Baryshkov
  2021-11-03  2:42       ` Yassine Oudjana
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2021-11-02 23:50 UTC (permalink / raw)
  To: Bjorn Andersson, Yassine Oudjana
  Cc: Andy Gross, Ohad Ben-Cohen, Mathieu Poirier, Rob Herring,
	AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On 24/10/2021 06:04, Bjorn Andersson wrote:
> On Sun 26 Sep 14:06 CDT 2021, Yassine Oudjana wrote:
> 
>> Fix a total overlap between zap_shader_region and slpi_region, and rename
>> all regions to match the naming convention in other Qualcomm SoC device trees.
>>
>> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
> 
> FYI, I like this series, but I held off applying it because I wanted to
> verify that the shuffling of the memory regions works on the existing
> 8996 boards.
> 
> Unfortunately it didn't work, either with or without the shuffling on
> the db820c - and I've not found the time to figure out why that is. I
> hope to get back to this shortly (or that someone else will figure it
> out and provide a tested-by)

I gave this a test too on my db820c. Usually the board MSS will crash 
after ~0.1 - 0.15 seconds after booting up, then during recovery the 
board will crash/reboot somewhere at the end of q6v5_mss_load() (and 
typically after successful q6v5_rmb_mba_wait() call.

Occasionally (approximately 1 of 20) the MSS will not crash, presenting 
PDS service to the userspace. Even in this state it doesn't seem to be 
able to lock the gps location (but this might be related to the big UART 
mezzanine sitting on top of the board).

Unfortunately there seem to be no SLPI firmware for the db820c, so I can 
not test slpi.

A notice regarding the patchset itself. It looks like pil_q6v5_mss.c 
driver misses mx and cx proxy power domains for the MSS_MSM8996 case.

> 
> Regards,
> Bjorn
> 
>> ---
>>   .../dts/qcom/msm8996-sony-xperia-tone.dtsi    | 18 ++++--
>>   .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 18 +++---
>>   arch/arm64/boot/dts/qcom/msm8996.dtsi         | 63 ++++++++++---------
>>   3 files changed, 55 insertions(+), 44 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
>> index 507396c4d23b..4c26e66f0610 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
>> @@ -13,9 +13,10 @@
>>   #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>>   #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
>>   
>> -/delete-node/ &slpi_region;
>> -/delete-node/ &venus_region;
>> -/delete-node/ &zap_shader_region;
>> +/delete-node/ &adsp_mem;
>> +/delete-node/ &slpi_mem;
>> +/delete-node/ &venus_mem;
>> +/delete-node/ &gpu_mem;
>>   
>>   / {
>>   	qcom,msm-id = <246 0x30001>; /* MSM8996 V3.1 (Final) */
>> @@ -46,18 +47,23 @@ cont_splash_mem: memory@83401000 {
>>   			no-map;
>>   		};
>>   
>> -		zap_shader_region: gpu@90400000 {
>> +		adsp_mem: adsp@8ea00000 {
>> +			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
>> +			no-map;
>> +		};
>> +
>> +		gpu_mem: gpu@90400000 {
>>   			compatible = "shared-dma-pool";
>>   			reg = <0x0 0x90400000 0x0 0x2000>;
>>   			no-map;
>>   		};
>>   
>> -		slpi_region: memory@90500000 {
>> +		slpi_mem: memory@90500000 {
>>   			reg = <0 0x90500000 0 0xa00000>;
>>   			no-map;
>>   		};
>>   
>> -		venus_region: memory@90f00000 {
>> +		venus_mem: memory@90f00000 {
>>   			reg = <0 0x90f00000 0 0x500000>;
>>   			no-map;
>>   		};
>> diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
>> index d239b01b8505..a5e7bccadba2 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
>> @@ -66,32 +66,32 @@ memory@88800000 {
>>   
>>   		/* This platform has all PIL regions offset by 0x1400000 */
>>   		/delete-node/ mpss@88800000;
>> -		mpss_region: mpss@89c00000 {
>> +		mpss_mem: mpss@89c00000 {
>>   			reg = <0x0 0x89c00000 0x0 0x6200000>;
>>   			no-map;
>>   		};
>>   
>>   		/delete-node/ adsp@8ea00000;
>> -		adsp_region: adsp@8ea00000 {
>> +		adsp_mem: adsp@8fe00000 {
>>   			reg = <0x0 0x8fe00000 0x0 0x1b00000>;
>>   			no-map;
>>   		};
>>   
>> -		/delete-node/ slpi@90b00000;
>> -		slpi_region: slpi@91900000 {
>> +		/delete-node/ slpi@90500000;
>> +		slpi_mem: slpi@91900000 {
>>   			reg = <0x0 0x91900000 0x0 0xa00000>;
>>   			no-map;
>>   		};
>>   
>> -		/delete-node/ gpu@8f200000;
>> -		zap_shader_region: gpu@92300000 {
>> +		/delete-node/ gpu@90f00000;
>> +		gpu_mem: gpu@92300000 {
>>   			compatible = "shared-dma-pool";
>>   			reg = <0x0 0x92300000 0x0 0x2000>;
>>   			no-map;
>>   		};
>>   
>>   		/delete-node/ venus@91000000;
>> -		venus_region: venus@90400000 {
>> +		venus_mem: venus@92400000 {
>>   			reg = <0x0 0x92400000 0x0 0x500000>;
>>   			no-map;
>>   		};
>> @@ -107,7 +107,7 @@ ramoops@92900000 {
>>   			pmsg-size = <0x40000>;
>>   		};
>>   
>> -		/delete-node/ rmtfs@86700000;
>> +		/delete-node/ rmtfs;
>>   		rmtfs@f6c00000 {
>>   			compatible = "qcom,rmtfs-mem";
>>   			reg = <0 0xf6c00000 0 0x200000>;
>> @@ -118,7 +118,7 @@ rmtfs@f6c00000 {
>>   		};
>>   
>>   		/delete-node/ mba@91500000;
>> -		mba_region: mba@f6f00000 {
>> +		mba_mem: mba@f6f00000 {
>>   			reg = <0x0 0xf6f00000 0x0 0x100000>;
>>   			no-map;
>>   		};
>> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
>> index eb3ec5ff46eb..1495fff6ffc9 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
>> @@ -384,60 +384,65 @@ reserved-memory {
>>   		#size-cells = <2>;
>>   		ranges;
>>   
>> -		mba_region: mba@91500000 {
>> -			reg = <0x0 0x91500000 0x0 0x200000>;
>> +		hyp_mem: memory@85800000 {
>> +			reg = <0x0 0x85800000 0x0 0x600000>;
>>   			no-map;
>>   		};
>>   
>> -		slpi_region: slpi@90b00000 {
>> -			reg = <0x0 0x90b00000 0x0 0xa00000>;
>> +		xbl_mem: memory@85e00000 {
>> +			reg = <0x0 0x85e00000 0x0 0x200000>;
>>   			no-map;
>>   		};
>>   
>> -		venus_region: venus@90400000 {
>> -			reg = <0x0 0x90400000 0x0 0x700000>;
>> +		smem_mem: smem-mem@86000000 {
>> +			reg = <0x0 0x86000000 0x0 0x200000>;
>>   			no-map;
>>   		};
>>   
>> -		adsp_region: adsp@8ea00000 {
>> -			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
>> +		tz_mem: memory@86200000 {
>> +			reg = <0x0 0x86200000 0x0 0x2600000>;
>>   			no-map;
>>   		};
>>   
>> -		mpss_region: mpss@88800000 {
>> -			reg = <0x0 0x88800000 0x0 0x6200000>;
>> +		rmtfs_mem: rmtfs {
>> +			compatible = "qcom,rmtfs-mem";
>> +
>> +			size = <0x0 0x200000>;
>> +			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
>>   			no-map;
>> +
>> +			qcom,client-id = <1>;
>> +			qcom,vmid = <15>;
>>   		};
>>   
>> -		smem_mem: smem-mem@86000000 {
>> -			reg = <0x0 0x86000000 0x0 0x200000>;
>> +		mpss_mem: mpss@88800000 {
>> +			reg = <0x0 0x88800000 0x0 0x6200000>;
>>   			no-map;
>>   		};
>>   
>> -		memory@85800000 {
>> -			reg = <0x0 0x85800000 0x0 0x800000>;
>> +		adsp_mem: adsp@8ea00000 {
>> +			reg = <0x0 0x8ea00000 0x0 0x1b00000>;
>>   			no-map;
>>   		};
>>   
>> -		memory@86200000 {
>> -			reg = <0x0 0x86200000 0x0 0x2600000>;
>> +		slpi_mem: slpi@90500000 {
>> +			reg = <0x0 0x90500000 0x0 0xa00000>;
>>   			no-map;
>>   		};
>>   
>> -		rmtfs@86700000 {
>> -			compatible = "qcom,rmtfs-mem";
>> -
>> -			size = <0x0 0x200000>;
>> -			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
>> +		gpu_mem: gpu@90f00000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0x0 0x90f00000 0x0 0x100000>;
>>   			no-map;
>> +		};
>>   
>> -			qcom,client-id = <1>;
>> -			qcom,vmid = <15>;
>> +		venus_mem: venus@91000000 {
>> +			reg = <0x0 0x91000000 0x0 0x500000>;
>> +			no-map;
>>   		};
>>   
>> -		zap_shader_region: gpu@8f200000 {
>> -			compatible = "shared-dma-pool";
>> -			reg = <0x0 0x90b00000 0x0 0xa00000>;
>> +		mba_mem: mba@91500000 {
>> +			reg = <0x0 0x91500000 0x0 0x200000>;
>>   			no-map;
>>   		};
>>   	};
>> @@ -1013,7 +1018,7 @@ opp-133000000 {
>>   			};
>>   
>>   			zap-shader {
>> -				memory-region = <&zap_shader_region>;
>> +				memory-region = <&gpu_mem>;
>>   			};
>>   		};
>>   
>> @@ -2001,7 +2006,7 @@ venus: video-codec@c00000 {
>>   				 <&venus_smmu 0x2c>,
>>   				 <&venus_smmu 0x2d>,
>>   				 <&venus_smmu 0x31>;
>> -			memory-region = <&venus_region>;
>> +			memory-region = <&venus_mem>;
>>   			status = "disabled";
>>   
>>   			video-decoder {
>> @@ -3008,7 +3013,7 @@ adsp_pil: remoteproc@9300000 {
>>   			clocks = <&xo_board>;
>>   			clock-names = "xo";
>>   
>> -			memory-region = <&adsp_region>;
>> +			memory-region = <&adsp_mem>;
>>   
>>   			qcom,smem-states = <&smp2p_adsp_out 0>;
>>   			qcom,smem-state-names = "stop";
>> -- 
>> 2.33.0
>>
>>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory
  2021-11-02 23:50     ` Dmitry Baryshkov
@ 2021-11-03  2:42       ` Yassine Oudjana
  2021-11-03 13:55         ` Dmitry Baryshkov
  0 siblings, 1 reply; 15+ messages in thread
From: Yassine Oudjana @ 2021-11-03  2:42 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson
  Cc: Andy Gross, Ohad Ben-Cohen, Mathieu Poirier, Rob Herring,
	AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On Wed, 2021-11-03 at 03:50 +0400, Dmitry Baryshkov wrote:
> On 24/10/2021 06:04, Bjorn Andersson wrote:
> > On Sun 26 Sep 14:06 CDT 2021, Yassine Oudjana wrote:
> > 
> > > Fix a total overlap between zap_shader_region and slpi_region, and rename
> > > all regions to match the naming convention in other Qualcomm SoC device trees.
> > > 
> > > Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
> > 
> > FYI, I like this series, but I held off applying it because I wanted to
> > verify that the shuffling of the memory regions works on the existing
> > 8996 boards.
> > 
> > Unfortunately it didn't work, either with or without the shuffling on
> > the db820c - and I've not found the time to figure out why that is. I
> > hope to get back to this shortly (or that someone else will figure it
> > out and provide a tested-by)
> 
> I gave this a test too on my db820c. Usually the board MSS will crash
> after ~0.1 - 0.15 seconds after booting up, then during recovery the
> board will crash/reboot somewhere at the end of q6v5_mss_load() (and
> typically after successful q6v5_rmb_mba_wait() call.

> Occasionally (approximately 1 of 20) the MSS will not crash, presenting
> PDS service to the userspace. Even in this state it doesn't seem to be
> able to lock the gps location (but this might be related to the big UART
> mezzanine sitting on top of the board).

I've had MSS crash on xiaomi-scorpio too, but far less often. It seemed
like some sort of race condition, as it only happened when ADSP and MSS
were booted at the same time. To workaround this, I delayed loading of
the rmtfs service to leave some time between booting ADSP and MSS.

> 
> Unfortunately there seem to be no SLPI firmware for the db820c, so I can
> not test slpi.
> 
> A notice regarding the patchset itself. It looks like pil_q6v5_mss.c
> driver misses mx and cx proxy power domains for the MSS_MSM8996 case.

I didn't notice that. I guess they stay on and MSS is able to boot
anyway. I'll add them similar to PATCH 2/5.

> 
> > 
> > Regards,
> > Bjorn
> > 
> > > ---
> > >   .../dts/qcom/msm8996-sony-xperia-tone.dtsi    | 18 ++++--
> > >   .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 18 +++---
> > >   arch/arm64/boot/dts/qcom/msm8996.dtsi         | 63 ++++++++++---------
> > >   3 files changed, 55 insertions(+), 44 deletions(-)
> > > 
> > > diff --git a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
> > > index 507396c4d23b..4c26e66f0610 100644
> > > --- a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
> > > @@ -13,9 +13,10 @@
> > >   #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> > >   #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
> > > 
> > > -/delete-node/ &slpi_region;
> > > -/delete-node/ &venus_region;
> > > -/delete-node/ &zap_shader_region;
> > > +/delete-node/ &adsp_mem;
> > > +/delete-node/ &slpi_mem;
> > > +/delete-node/ &venus_mem;
> > > +/delete-node/ &gpu_mem;
> > > 
> > >   / {
> > >   	qcom,msm-id = <246 0x30001>; /* MSM8996 V3.1 (Final) */
> > > @@ -46,18 +47,23 @@ cont_splash_mem: memory@83401000 {
> > >   			no-map;
> > >   		};
> > > 
> > > -		zap_shader_region: gpu@90400000 {
> > > +		adsp_mem: adsp@8ea00000 {
> > > +			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
> > > +			no-map;
> > > +		};
> > > +
> > > +		gpu_mem: gpu@90400000 {
> > >   			compatible = "shared-dma-pool";
> > >   			reg = <0x0 0x90400000 0x0 0x2000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		slpi_region: memory@90500000 {
> > > +		slpi_mem: memory@90500000 {
> > >   			reg = <0 0x90500000 0 0xa00000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		venus_region: memory@90f00000 {
> > > +		venus_mem: memory@90f00000 {
> > >   			reg = <0 0x90f00000 0 0x500000>;
> > >   			no-map;
> > >   		};
> > > diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> > > index d239b01b8505..a5e7bccadba2 100644
> > > --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> > > @@ -66,32 +66,32 @@ memory@88800000 {
> > > 
> > >   		/* This platform has all PIL regions offset by 0x1400000 */
> > >   		/delete-node/ mpss@88800000;
> > > -		mpss_region: mpss@89c00000 {
> > > +		mpss_mem: mpss@89c00000 {
> > >   			reg = <0x0 0x89c00000 0x0 0x6200000>;
> > >   			no-map;
> > >   		};
> > > 
> > >   		/delete-node/ adsp@8ea00000;
> > > -		adsp_region: adsp@8ea00000 {
> > > +		adsp_mem: adsp@8fe00000 {
> > >   			reg = <0x0 0x8fe00000 0x0 0x1b00000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		/delete-node/ slpi@90b00000;
> > > -		slpi_region: slpi@91900000 {
> > > +		/delete-node/ slpi@90500000;
> > > +		slpi_mem: slpi@91900000 {
> > >   			reg = <0x0 0x91900000 0x0 0xa00000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		/delete-node/ gpu@8f200000;
> > > -		zap_shader_region: gpu@92300000 {
> > > +		/delete-node/ gpu@90f00000;
> > > +		gpu_mem: gpu@92300000 {
> > >   			compatible = "shared-dma-pool";
> > >   			reg = <0x0 0x92300000 0x0 0x2000>;
> > >   			no-map;
> > >   		};
> > > 
> > >   		/delete-node/ venus@91000000;
> > > -		venus_region: venus@90400000 {
> > > +		venus_mem: venus@92400000 {
> > >   			reg = <0x0 0x92400000 0x0 0x500000>;
> > >   			no-map;
> > >   		};
> > > @@ -107,7 +107,7 @@ ramoops@92900000 {
> > >   			pmsg-size = <0x40000>;
> > >   		};
> > > 
> > > -		/delete-node/ rmtfs@86700000;
> > > +		/delete-node/ rmtfs;
> > >   		rmtfs@f6c00000 {
> > >   			compatible = "qcom,rmtfs-mem";
> > >   			reg = <0 0xf6c00000 0 0x200000>;
> > > @@ -118,7 +118,7 @@ rmtfs@f6c00000 {
> > >   		};
> > > 
> > >   		/delete-node/ mba@91500000;
> > > -		mba_region: mba@f6f00000 {
> > > +		mba_mem: mba@f6f00000 {
> > >   			reg = <0x0 0xf6f00000 0x0 0x100000>;
> > >   			no-map;
> > >   		};
> > > diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > index eb3ec5ff46eb..1495fff6ffc9 100644
> > > --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > @@ -384,60 +384,65 @@ reserved-memory {
> > >   		#size-cells = <2>;
> > >   		ranges;
> > > 
> > > -		mba_region: mba@91500000 {
> > > -			reg = <0x0 0x91500000 0x0 0x200000>;
> > > +		hyp_mem: memory@85800000 {
> > > +			reg = <0x0 0x85800000 0x0 0x600000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		slpi_region: slpi@90b00000 {
> > > -			reg = <0x0 0x90b00000 0x0 0xa00000>;
> > > +		xbl_mem: memory@85e00000 {
> > > +			reg = <0x0 0x85e00000 0x0 0x200000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		venus_region: venus@90400000 {
> > > -			reg = <0x0 0x90400000 0x0 0x700000>;
> > > +		smem_mem: smem-mem@86000000 {
> > > +			reg = <0x0 0x86000000 0x0 0x200000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		adsp_region: adsp@8ea00000 {
> > > -			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
> > > +		tz_mem: memory@86200000 {
> > > +			reg = <0x0 0x86200000 0x0 0x2600000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		mpss_region: mpss@88800000 {
> > > -			reg = <0x0 0x88800000 0x0 0x6200000>;
> > > +		rmtfs_mem: rmtfs {
> > > +			compatible = "qcom,rmtfs-mem";
> > > +
> > > +			size = <0x0 0x200000>;
> > > +			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
> > >   			no-map;
> > > +
> > > +			qcom,client-id = <1>;
> > > +			qcom,vmid = <15>;
> > >   		};
> > > 
> > > -		smem_mem: smem-mem@86000000 {
> > > -			reg = <0x0 0x86000000 0x0 0x200000>;
> > > +		mpss_mem: mpss@88800000 {
> > > +			reg = <0x0 0x88800000 0x0 0x6200000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		memory@85800000 {
> > > -			reg = <0x0 0x85800000 0x0 0x800000>;
> > > +		adsp_mem: adsp@8ea00000 {
> > > +			reg = <0x0 0x8ea00000 0x0 0x1b00000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		memory@86200000 {
> > > -			reg = <0x0 0x86200000 0x0 0x2600000>;
> > > +		slpi_mem: slpi@90500000 {
> > > +			reg = <0x0 0x90500000 0x0 0xa00000>;
> > >   			no-map;
> > >   		};
> > > 
> > > -		rmtfs@86700000 {
> > > -			compatible = "qcom,rmtfs-mem";
> > > -
> > > -			size = <0x0 0x200000>;
> > > -			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
> > > +		gpu_mem: gpu@90f00000 {
> > > +			compatible = "shared-dma-pool";
> > > +			reg = <0x0 0x90f00000 0x0 0x100000>;
> > >   			no-map;
> > > +		};
> > > 
> > > -			qcom,client-id = <1>;
> > > -			qcom,vmid = <15>;
> > > +		venus_mem: venus@91000000 {
> > > +			reg = <0x0 0x91000000 0x0 0x500000>;
> > > +			no-map;
> > >   		};
> > > 
> > > -		zap_shader_region: gpu@8f200000 {
> > > -			compatible = "shared-dma-pool";
> > > -			reg = <0x0 0x90b00000 0x0 0xa00000>;
> > > +		mba_mem: mba@91500000 {
> > > +			reg = <0x0 0x91500000 0x0 0x200000>;
> > >   			no-map;
> > >   		};
> > >   	};
> > > @@ -1013,7 +1018,7 @@ opp-133000000 {
> > >   			};
> > > 
> > >   			zap-shader {
> > > -				memory-region = <&zap_shader_region>;
> > > +				memory-region = <&gpu_mem>;
> > >   			};
> > >   		};
> > > 
> > > @@ -2001,7 +2006,7 @@ venus: video-codec@c00000 {
> > >   				 <&venus_smmu 0x2c>,
> > >   				 <&venus_smmu 0x2d>,
> > >   				 <&venus_smmu 0x31>;
> > > -			memory-region = <&venus_region>;
> > > +			memory-region = <&venus_mem>;
> > >   			status = "disabled";
> > > 
> > >   			video-decoder {
> > > @@ -3008,7 +3013,7 @@ adsp_pil: remoteproc@9300000 {
> > >   			clocks = <&xo_board>;
> > >   			clock-names = "xo";
> > > 
> > > -			memory-region = <&adsp_region>;
> > > +			memory-region = <&adsp_mem>;
> > > 
> > >   			qcom,smem-states = <&smp2p_adsp_out 0>;
> > >   			qcom,smem-state-names = "stop";
> > > --
> > > 2.33.0
> > > 
> > > 
> 
> 
> --
> With best wishes
> Dmitry




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

* Re: [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory
  2021-11-03  2:42       ` Yassine Oudjana
@ 2021-11-03 13:55         ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2021-11-03 13:55 UTC (permalink / raw)
  To: Yassine Oudjana, Bjorn Andersson
  Cc: Andy Gross, Ohad Ben-Cohen, Mathieu Poirier, Rob Herring,
	AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On 03/11/2021 05:42, Yassine Oudjana wrote:
> On Wed, 2021-11-03 at 03:50 +0400, Dmitry Baryshkov wrote:
>> On 24/10/2021 06:04, Bjorn Andersson wrote:
>>> On Sun 26 Sep 14:06 CDT 2021, Yassine Oudjana wrote:
>>>
>>>> Fix a total overlap between zap_shader_region and slpi_region, and rename
>>>> all regions to match the naming convention in other Qualcomm SoC device trees.
>>>>
>>>> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
>>>
>>> FYI, I like this series, but I held off applying it because I wanted to
>>> verify that the shuffling of the memory regions works on the existing
>>> 8996 boards.
>>>
>>> Unfortunately it didn't work, either with or without the shuffling on
>>> the db820c - and I've not found the time to figure out why that is. I
>>> hope to get back to this shortly (or that someone else will figure it
>>> out and provide a tested-by)
>>
>> I gave this a test too on my db820c. Usually the board MSS will crash
>> after ~0.1 - 0.15 seconds after booting up, then during recovery the
>> board will crash/reboot somewhere at the end of q6v5_mss_load() (and
>> typically after successful q6v5_rmb_mba_wait() call.
> 
>> Occasionally (approximately 1 of 20) the MSS will not crash, presenting
>> PDS service to the userspace. Even in this state it doesn't seem to be
>> able to lock the gps location (but this might be related to the big UART
>> mezzanine sitting on top of the board).
> 
> I've had MSS crash on xiaomi-scorpio too, but far less often. It seemed
> like some sort of race condition, as it only happened when ADSP and MSS
> were booted at the same time. To workaround this, I delayed loading of
> the rmtfs service to leave some time between booting ADSP and MSS.

For the tests to get 1:20 I've disabled ADSP (and WiFi/BT) completely. 
Without that I think I never got MSS to boot successfully. I think this 
is some kind of power/regulators/clock with ADSP and MSS draining too 
much power.

Note to myself: check rmtfs/partitions usage on db820c.

> 
>>
>> Unfortunately there seem to be no SLPI firmware for the db820c, so I can
>> not test slpi.
>>
>> A notice regarding the patchset itself. It looks like pil_q6v5_mss.c
>> driver misses mx and cx proxy power domains for the MSS_MSM8996 case.
> 
> I didn't notice that. I guess they stay on and MSS is able to boot
> anyway. I'll add them similar to PATCH 2/5.

Thanks!

> 
>>
>>>
>>> Regards,
>>> Bjorn
>>>
>>>> ---
>>>>    .../dts/qcom/msm8996-sony-xperia-tone.dtsi    | 18 ++++--
>>>>    .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 18 +++---
>>>>    arch/arm64/boot/dts/qcom/msm8996.dtsi         | 63 ++++++++++---------
>>>>    3 files changed, 55 insertions(+), 44 deletions(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
>>>> index 507396c4d23b..4c26e66f0610 100644
>>>> --- a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
>>>> @@ -13,9 +13,10 @@
>>>>    #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>>>>    #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
>>>>
>>>> -/delete-node/ &slpi_region;
>>>> -/delete-node/ &venus_region;
>>>> -/delete-node/ &zap_shader_region;
>>>> +/delete-node/ &adsp_mem;
>>>> +/delete-node/ &slpi_mem;
>>>> +/delete-node/ &venus_mem;
>>>> +/delete-node/ &gpu_mem;
>>>>
>>>>    / {
>>>>    	qcom,msm-id = <246 0x30001>; /* MSM8996 V3.1 (Final) */
>>>> @@ -46,18 +47,23 @@ cont_splash_mem: memory@83401000 {
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		zap_shader_region: gpu@90400000 {
>>>> +		adsp_mem: adsp@8ea00000 {
>>>> +			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
>>>> +			no-map;
>>>> +		};
>>>> +
>>>> +		gpu_mem: gpu@90400000 {
>>>>    			compatible = "shared-dma-pool";
>>>>    			reg = <0x0 0x90400000 0x0 0x2000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		slpi_region: memory@90500000 {
>>>> +		slpi_mem: memory@90500000 {
>>>>    			reg = <0 0x90500000 0 0xa00000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		venus_region: memory@90f00000 {
>>>> +		venus_mem: memory@90f00000 {
>>>>    			reg = <0 0x90f00000 0 0x500000>;
>>>>    			no-map;
>>>>    		};
>>>> diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
>>>> index d239b01b8505..a5e7bccadba2 100644
>>>> --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
>>>> @@ -66,32 +66,32 @@ memory@88800000 {
>>>>
>>>>    		/* This platform has all PIL regions offset by 0x1400000 */
>>>>    		/delete-node/ mpss@88800000;
>>>> -		mpss_region: mpss@89c00000 {
>>>> +		mpss_mem: mpss@89c00000 {
>>>>    			reg = <0x0 0x89c00000 0x0 0x6200000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>>    		/delete-node/ adsp@8ea00000;
>>>> -		adsp_region: adsp@8ea00000 {
>>>> +		adsp_mem: adsp@8fe00000 {
>>>>    			reg = <0x0 0x8fe00000 0x0 0x1b00000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		/delete-node/ slpi@90b00000;
>>>> -		slpi_region: slpi@91900000 {
>>>> +		/delete-node/ slpi@90500000;
>>>> +		slpi_mem: slpi@91900000 {
>>>>    			reg = <0x0 0x91900000 0x0 0xa00000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		/delete-node/ gpu@8f200000;
>>>> -		zap_shader_region: gpu@92300000 {
>>>> +		/delete-node/ gpu@90f00000;
>>>> +		gpu_mem: gpu@92300000 {
>>>>    			compatible = "shared-dma-pool";
>>>>    			reg = <0x0 0x92300000 0x0 0x2000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>>    		/delete-node/ venus@91000000;
>>>> -		venus_region: venus@90400000 {
>>>> +		venus_mem: venus@92400000 {
>>>>    			reg = <0x0 0x92400000 0x0 0x500000>;
>>>>    			no-map;
>>>>    		};
>>>> @@ -107,7 +107,7 @@ ramoops@92900000 {
>>>>    			pmsg-size = <0x40000>;
>>>>    		};
>>>>
>>>> -		/delete-node/ rmtfs@86700000;
>>>> +		/delete-node/ rmtfs;
>>>>    		rmtfs@f6c00000 {
>>>>    			compatible = "qcom,rmtfs-mem";
>>>>    			reg = <0 0xf6c00000 0 0x200000>;
>>>> @@ -118,7 +118,7 @@ rmtfs@f6c00000 {
>>>>    		};
>>>>
>>>>    		/delete-node/ mba@91500000;
>>>> -		mba_region: mba@f6f00000 {
>>>> +		mba_mem: mba@f6f00000 {
>>>>    			reg = <0x0 0xf6f00000 0x0 0x100000>;
>>>>    			no-map;
>>>>    		};
>>>> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
>>>> index eb3ec5ff46eb..1495fff6ffc9 100644
>>>> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
>>>> @@ -384,60 +384,65 @@ reserved-memory {
>>>>    		#size-cells = <2>;
>>>>    		ranges;
>>>>
>>>> -		mba_region: mba@91500000 {
>>>> -			reg = <0x0 0x91500000 0x0 0x200000>;
>>>> +		hyp_mem: memory@85800000 {
>>>> +			reg = <0x0 0x85800000 0x0 0x600000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		slpi_region: slpi@90b00000 {
>>>> -			reg = <0x0 0x90b00000 0x0 0xa00000>;
>>>> +		xbl_mem: memory@85e00000 {
>>>> +			reg = <0x0 0x85e00000 0x0 0x200000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		venus_region: venus@90400000 {
>>>> -			reg = <0x0 0x90400000 0x0 0x700000>;
>>>> +		smem_mem: smem-mem@86000000 {
>>>> +			reg = <0x0 0x86000000 0x0 0x200000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		adsp_region: adsp@8ea00000 {
>>>> -			reg = <0x0 0x8ea00000 0x0 0x1a00000>;
>>>> +		tz_mem: memory@86200000 {
>>>> +			reg = <0x0 0x86200000 0x0 0x2600000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		mpss_region: mpss@88800000 {
>>>> -			reg = <0x0 0x88800000 0x0 0x6200000>;
>>>> +		rmtfs_mem: rmtfs {
>>>> +			compatible = "qcom,rmtfs-mem";
>>>> +
>>>> +			size = <0x0 0x200000>;
>>>> +			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
>>>>    			no-map;
>>>> +
>>>> +			qcom,client-id = <1>;
>>>> +			qcom,vmid = <15>;
>>>>    		};
>>>>
>>>> -		smem_mem: smem-mem@86000000 {
>>>> -			reg = <0x0 0x86000000 0x0 0x200000>;
>>>> +		mpss_mem: mpss@88800000 {
>>>> +			reg = <0x0 0x88800000 0x0 0x6200000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		memory@85800000 {
>>>> -			reg = <0x0 0x85800000 0x0 0x800000>;
>>>> +		adsp_mem: adsp@8ea00000 {
>>>> +			reg = <0x0 0x8ea00000 0x0 0x1b00000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		memory@86200000 {
>>>> -			reg = <0x0 0x86200000 0x0 0x2600000>;
>>>> +		slpi_mem: slpi@90500000 {
>>>> +			reg = <0x0 0x90500000 0x0 0xa00000>;
>>>>    			no-map;
>>>>    		};
>>>>
>>>> -		rmtfs@86700000 {
>>>> -			compatible = "qcom,rmtfs-mem";
>>>> -
>>>> -			size = <0x0 0x200000>;
>>>> -			alloc-ranges = <0x0 0xa0000000 0x0 0x2000000>;
>>>> +		gpu_mem: gpu@90f00000 {
>>>> +			compatible = "shared-dma-pool";
>>>> +			reg = <0x0 0x90f00000 0x0 0x100000>;
>>>>    			no-map;
>>>> +		};
>>>>
>>>> -			qcom,client-id = <1>;
>>>> -			qcom,vmid = <15>;
>>>> +		venus_mem: venus@91000000 {
>>>> +			reg = <0x0 0x91000000 0x0 0x500000>;
>>>> +			no-map;
>>>>    		};
>>>>
>>>> -		zap_shader_region: gpu@8f200000 {
>>>> -			compatible = "shared-dma-pool";
>>>> -			reg = <0x0 0x90b00000 0x0 0xa00000>;
>>>> +		mba_mem: mba@91500000 {
>>>> +			reg = <0x0 0x91500000 0x0 0x200000>;
>>>>    			no-map;
>>>>    		};
>>>>    	};
>>>> @@ -1013,7 +1018,7 @@ opp-133000000 {
>>>>    			};
>>>>
>>>>    			zap-shader {
>>>> -				memory-region = <&zap_shader_region>;
>>>> +				memory-region = <&gpu_mem>;
>>>>    			};
>>>>    		};
>>>>
>>>> @@ -2001,7 +2006,7 @@ venus: video-codec@c00000 {
>>>>    				 <&venus_smmu 0x2c>,
>>>>    				 <&venus_smmu 0x2d>,
>>>>    				 <&venus_smmu 0x31>;
>>>> -			memory-region = <&venus_region>;
>>>> +			memory-region = <&venus_mem>;
>>>>    			status = "disabled";
>>>>
>>>>    			video-decoder {
>>>> @@ -3008,7 +3013,7 @@ adsp_pil: remoteproc@9300000 {
>>>>    			clocks = <&xo_board>;
>>>>    			clock-names = "xo";
>>>>
>>>> -			memory-region = <&adsp_region>;
>>>> +			memory-region = <&adsp_mem>;
>>>>
>>>>    			qcom,smem-states = <&smp2p_adsp_out 0>;
>>>>    			qcom,smem-state-names = "stop";
>>>> --
>>>> 2.33.0
>>>>
>>>>
>>
>>
>> --
>> With best wishes
>> Dmitry
> 
> 
> 


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory
  2021-09-26 19:06 ` [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory Yassine Oudjana
  2021-10-24  3:04   ` Bjorn Andersson
@ 2022-04-03 19:40   ` Dmitry Baryshkov
  1 sibling, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2022-04-03 19:40 UTC (permalink / raw)
  To: Yassine Oudjana, Andy Gross, Bjorn Andersson, Ohad Ben-Cohen,
	Mathieu Poirier, Rob Herring
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On 26/09/2021 22:06, Yassine Oudjana wrote:
> Fix a total overlap between zap_shader_region and slpi_region, and rename
> all regions to match the naming convention in other Qualcomm SoC device trees.
> 
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>

Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #db820c

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 3/5] arm64: dts: qcom: msm8996: Unify smp2p naming
  2021-09-26 19:06 ` [PATCH v2 3/5] arm64: dts: qcom: msm8996: Unify smp2p naming Yassine Oudjana
@ 2022-04-03 19:41   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2022-04-03 19:41 UTC (permalink / raw)
  To: Yassine Oudjana, Andy Gross, Bjorn Andersson, Ohad Ben-Cohen,
	Mathieu Poirier, Rob Herring
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On 26/09/2021 22:06, Yassine Oudjana wrote:
> Rename smp2p-modem to smp2p-mpss, and make the subnode labels of smp2p_adsp
> and smp2p_slpi follow the <name>_smp2p_<out/in> layout.
> Also move smp2p_slpi_out above smp2p_slpi_in to make it match mpss and adsp
> where master-kernel is the first subnode.
> 
> This patch brings no functional change.
> 
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>

Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #db820c


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add MSS and SLPI
  2021-09-26 19:06 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add MSS and SLPI Yassine Oudjana
@ 2022-04-03 19:41   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2022-04-03 19:41 UTC (permalink / raw)
  To: Yassine Oudjana, Andy Gross, Bjorn Andersson, Ohad Ben-Cohen,
	Mathieu Poirier, Rob Herring
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On 26/09/2021 22:06, Yassine Oudjana wrote:
> Add nodes for the MSS and SLPI remoteprocs.
> 
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>

Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #db820c


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 5/5] arm64: dts: qcom: msm8996-xiaomi-*: Enable MSS and SLPI
  2021-09-26 19:06 ` [PATCH v2 5/5] arm64: dts: qcom: msm8996-xiaomi-*: Enable " Yassine Oudjana
@ 2022-04-03 19:41   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2022-04-03 19:41 UTC (permalink / raw)
  To: Yassine Oudjana, Andy Gross, Bjorn Andersson, Ohad Ben-Cohen,
	Mathieu Poirier, Rob Herring
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Raffaele Tranquillini,
	linux-arm-msm, linux-remoteproc, devicetree, phone-devel,
	linux-kernel

On 26/09/2021 22:06, Yassine Oudjana wrote:
> Enable mss_pil and slpi_pil and set their firmware paths.
> 
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>

Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #db820c


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2022-04-03 19:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-26 19:06 [PATCH v2 0/5] msm8996: Enable support for MSS and SLPI Yassine Oudjana
2021-09-26 19:06 ` [PATCH v2 1/5] arm64: dts: qcom: msm8996: Revamp reserved memory Yassine Oudjana
2021-10-24  3:04   ` Bjorn Andersson
2021-11-02 23:50     ` Dmitry Baryshkov
2021-11-03  2:42       ` Yassine Oudjana
2021-11-03 13:55         ` Dmitry Baryshkov
2022-04-03 19:40   ` Dmitry Baryshkov
2021-09-26 19:06 ` [PATCH v2 2/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998 Yassine Oudjana
2021-09-27 23:13   ` (subset) " Bjorn Andersson
2021-09-26 19:06 ` [PATCH v2 3/5] arm64: dts: qcom: msm8996: Unify smp2p naming Yassine Oudjana
2022-04-03 19:41   ` Dmitry Baryshkov
2021-09-26 19:06 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add MSS and SLPI Yassine Oudjana
2022-04-03 19:41   ` Dmitry Baryshkov
2021-09-26 19:06 ` [PATCH v2 5/5] arm64: dts: qcom: msm8996-xiaomi-*: Enable " Yassine Oudjana
2022-04-03 19:41   ` Dmitry Baryshkov

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.