Linux-Devicetree Archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP
@ 2024-05-22 12:08 Bartosz Golaszewski
  2024-05-22 12:08 ` [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p " Bartosz Golaszewski
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 12:08 UTC (permalink / raw
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

Add DT bindings, relevant DT defines, DTS nodes and driver changes
required to enable the remoteprocs on sa8775p.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (1):
      arm64: dts: qcom: sa8775p-ride: enable remoteprocs

Tengfei Fan (4):
      dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p ADSP, CDSP and GPDSP
      dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients
      remoteproc: qcom_q6v5_pas: Add support for SA8775p ADSP, CDSP and GPDSP
      arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes

 .../bindings/remoteproc/qcom,sm8550-pas.yaml       |  76 ++++-
 arch/arm64/boot/dts/qcom/sa8775p-ride.dts          |  25 ++
 arch/arm64/boot/dts/qcom/sa8775p.dtsi              | 332 +++++++++++++++++++++
 drivers/remoteproc/qcom_q6v5_pas.c                 |  92 ++++++
 include/dt-bindings/mailbox/qcom-ipcc.h            |   2 +
 5 files changed, 526 insertions(+), 1 deletion(-)
---
base-commit: 124cfbcd6d185d4f50be02d5f5afe61578916773
change-id: 20240507-topic-lemans-iot-remoteproc-6647b50281e2

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


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

* [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p ADSP, CDSP and GPDSP
  2024-05-22 12:08 [PATCH 0/5] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP Bartosz Golaszewski
@ 2024-05-22 12:08 ` Bartosz Golaszewski
  2024-05-22 12:42   ` neil.armstrong
  2024-05-22 12:08 ` [PATCH 2/5] dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients Bartosz Golaszewski
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 12:08 UTC (permalink / raw
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

From: Tengfei Fan <quic_tengfan@quicinc.com>

Document the compatibles for the components used to boot the ADSP, CDSP0,
CDSP1, GPDSP0 and GPDSP1 on the SA8775p SoC.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 .../bindings/remoteproc/qcom,sm8550-pas.yaml       | 76 +++++++++++++++++++++-
 1 file changed, 75 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
index 73fda7565cd1..9d3a862c39e1 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
@@ -16,6 +16,11 @@ description:
 properties:
   compatible:
     enum:
+      - qcom,sa8775p-adsp-pas
+      - qcom,sa8775p-cdsp0-pas
+      - qcom,sa8775p-cdsp1-pas
+      - qcom,sa8775p-gpdsp0-pas
+      - qcom,sa8775p-gpdsp1-pas
       - qcom,sm8550-adsp-pas
       - qcom,sm8550-cdsp-pas
       - qcom,sm8550-mpss-pas
@@ -44,12 +49,13 @@ properties:
 
   firmware-name:
     $ref: /schemas/types.yaml#/definitions/string-array
+    minItems: 1
     items:
       - description: Firmware name of the Hexagon core
       - description: Firmware name of the Hexagon Devicetree
 
   memory-region:
-    minItems: 2
+    minItems: 1
     items:
       - description: Memory region for main Firmware authentication
       - description: Memory region for Devicetree Firmware authentication
@@ -81,6 +87,21 @@ allOf:
           maxItems: 5
         memory-region:
           maxItems: 2
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sa8775p-adsp-pas
+            - qcom,sa8775p-cdsp0-pas
+            - qcom,sa8775p-cdsp1-pas
+            - qcom,sa8775p-gpdsp0-pas
+            - qcom,sa8775p-gpdsp1-pas
+    then:
+      properties:
+        interrupts:
+          maxItems: 5
+        interrupt-names:
+          maxItems: 5
   - if:
       properties:
         compatible:
@@ -128,6 +149,7 @@ allOf:
       properties:
         compatible:
           enum:
+            - qcom,sa8775p-adsp-pas
             - qcom,sm8550-adsp-pas
             - qcom,sm8650-adsp-pas
             - qcom,x1e80100-adsp-pas
@@ -177,6 +199,58 @@ allOf:
             - const: cx
             - const: mxc
             - const: nsp
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sa8775p-cdsp-pas
+    then:
+      properties:
+        power-domains:
+          items:
+            - description: CX power domain
+            - description: MXC power domain
+            - description: NSP0 power domain
+        power-domain-names:
+          items:
+            - const: cx
+            - const: mxc
+            - const: nsp0
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sa8775p-cdsp1-pas
+    then:
+      properties:
+        power-domains:
+          items:
+            - description: CX power domain
+            - description: MXC power domain
+            - description: NSP1 power domain
+        power-domain-names:
+          items:
+            - const: cx
+            - const: mxc
+            - const: nsp1
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sa8775p-gpdsp0-pas
+            - qcom,sa8775p-gpdsp1-pas
+    then:
+      properties:
+        power-domains:
+          items:
+            - description: CX power domain
+            - description: MXC power domain
+        power-domain-names:
+          items:
+            - const: cx
+            - const: mxc
 
 unevaluatedProperties: false
 

-- 
2.43.0


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

* [PATCH 2/5] dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients
  2024-05-22 12:08 [PATCH 0/5] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP Bartosz Golaszewski
  2024-05-22 12:08 ` [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p " Bartosz Golaszewski
@ 2024-05-22 12:08 ` Bartosz Golaszewski
  2024-05-22 14:21   ` Krzysztof Kozlowski
  2024-05-22 12:08 ` [PATCH 3/5] remoteproc: qcom_q6v5_pas: Add support for SA8775p ADSP, CDSP and GPDSP Bartosz Golaszewski
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 12:08 UTC (permalink / raw
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

From: Tengfei Fan <quic_tengfan@quicinc.com>

Add GPDSP0 and GPDSP1 clients for SA8775p platform.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 include/dt-bindings/mailbox/qcom-ipcc.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/dt-bindings/mailbox/qcom-ipcc.h b/include/dt-bindings/mailbox/qcom-ipcc.h
index fbfa3febc66d..fd85a79381b3 100644
--- a/include/dt-bindings/mailbox/qcom-ipcc.h
+++ b/include/dt-bindings/mailbox/qcom-ipcc.h
@@ -33,5 +33,7 @@
 #define IPCC_CLIENT_NSP1		18
 #define IPCC_CLIENT_TME			23
 #define IPCC_CLIENT_WPSS		24
+#define IPCC_CLIENT_GPDSP0		31
+#define IPCC_CLIENT_GPDSP1		32
 
 #endif

-- 
2.43.0


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

* [PATCH 3/5] remoteproc: qcom_q6v5_pas: Add support for SA8775p ADSP, CDSP and GPDSP
  2024-05-22 12:08 [PATCH 0/5] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP Bartosz Golaszewski
  2024-05-22 12:08 ` [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p " Bartosz Golaszewski
  2024-05-22 12:08 ` [PATCH 2/5] dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients Bartosz Golaszewski
@ 2024-05-22 12:08 ` Bartosz Golaszewski
  2024-05-22 12:08 ` [PATCH 4/5] arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes Bartosz Golaszewski
  2024-05-22 12:08 ` [PATCH 5/5] arm64: dts: qcom: sa8775p-ride: enable remoteprocs Bartosz Golaszewski
  4 siblings, 0 replies; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 12:08 UTC (permalink / raw
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

From: Tengfei Fan <quic_tengfan@quicinc.com>

Add support for PIL loading on ADSP, CDSP0, CDSP1, GPDSP0 and GPDSP1 on
SA8775p SoCs.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 92 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 54d8005d40a3..16053aa99298 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -820,6 +820,23 @@ static const struct adsp_data adsp_resource_init = {
 	.ssctl_id = 0x14,
 };
 
+static const struct adsp_data sa8775p_adsp_resource = {
+	.crash_reason_smem = 423,
+	.firmware_name = "adsp.mdt",
+	.pas_id = 1,
+	.minidump_id = 5,
+	.auto_boot = true,
+	.proxy_pd_names = (char*[]){
+		"lcx",
+		"lmx",
+		NULL
+	},
+	.load_state = "adsp",
+	.ssr_name = "lpass",
+	.sysmon_name = "adsp",
+	.ssctl_id = 0x14,
+};
+
 static const struct adsp_data sdm845_adsp_resource_init = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
@@ -933,6 +950,42 @@ static const struct adsp_data cdsp_resource_init = {
 	.ssctl_id = 0x17,
 };
 
+static const struct adsp_data sa8775p_cdsp0_resource = {
+	.crash_reason_smem = 601,
+	.firmware_name = "cdsp0.mdt",
+	.pas_id = 18,
+	.minidump_id = 7,
+	.auto_boot = true,
+	.proxy_pd_names = (char*[]){
+		"cx",
+		"mxc",
+		"nsp0",
+		NULL
+	},
+	.load_state = "cdsp",
+	.ssr_name = "cdsp",
+	.sysmon_name = "cdsp",
+	.ssctl_id = 0x17,
+};
+
+static const struct adsp_data sa8775p_cdsp1_resource = {
+	.crash_reason_smem = 633,
+	.firmware_name = "cdsp1.mdt",
+	.pas_id = 30,
+	.minidump_id = 20,
+	.auto_boot = true,
+	.proxy_pd_names = (char*[]){
+		"cx",
+		"mxc",
+		"nsp1",
+		NULL
+	},
+	.load_state = "nsp",
+	.ssr_name = "cdsp1",
+	.sysmon_name = "cdsp1",
+	.ssctl_id = 0x20,
+};
+
 static const struct adsp_data sdm845_cdsp_resource_init = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
@@ -1074,6 +1127,40 @@ static const struct adsp_data sm8350_cdsp_resource = {
 	.ssctl_id = 0x17,
 };
 
+static const struct adsp_data sa8775p_gpdsp0_resource = {
+	.crash_reason_smem = 640,
+	.firmware_name = "gpdsp0.mdt",
+	.pas_id = 39,
+	.minidump_id = 21,
+	.auto_boot = true,
+	.proxy_pd_names = (char*[]){
+		"cx",
+		"mxc",
+		NULL
+	},
+	.load_state = "gpdsp0",
+	.ssr_name = "gpdsp0",
+	.sysmon_name = "gpdsp0",
+	.ssctl_id = 0x21,
+};
+
+static const struct adsp_data sa8775p_gpdsp1_resource = {
+	.crash_reason_smem = 641,
+	.firmware_name = "gpdsp1.mdt",
+	.pas_id = 40,
+	.minidump_id = 22,
+	.auto_boot = true,
+	.proxy_pd_names = (char*[]){
+		"cx",
+		"mxc",
+		NULL
+	},
+	.load_state = "gpdsp1",
+	.ssr_name = "gpdsp1",
+	.sysmon_name = "gpdsp1",
+	.ssctl_id = 0x22,
+};
+
 static const struct adsp_data mpss_resource_init = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
@@ -1315,6 +1402,11 @@ static const struct of_device_id adsp_of_match[] = {
 	{ .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 },
+	{ .compatible = "qcom,sa8775p-adsp-pas", .data = &sa8775p_adsp_resource},
+	{ .compatible = "qcom,sa8775p-cdsp0-pas", .data = &sa8775p_cdsp0_resource},
+	{ .compatible = "qcom,sa8775p-cdsp1-pas", .data = &sa8775p_cdsp1_resource},
+	{ .compatible = "qcom,sa8775p-gpdsp0-pas", .data = &sa8775p_gpdsp0_resource},
+	{ .compatible = "qcom,sa8775p-gpdsp1-pas", .data = &sa8775p_gpdsp1_resource},
 	{ .compatible = "qcom,sc7180-adsp-pas", .data = &sm8250_adsp_resource},
 	{ .compatible = "qcom,sc7180-mpss-pas", .data = &mpss_resource_init},
 	{ .compatible = "qcom,sc7280-adsp-pas", .data = &sm8350_adsp_resource},

-- 
2.43.0


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

* [PATCH 4/5] arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes
  2024-05-22 12:08 [PATCH 0/5] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2024-05-22 12:08 ` [PATCH 3/5] remoteproc: qcom_q6v5_pas: Add support for SA8775p ADSP, CDSP and GPDSP Bartosz Golaszewski
@ 2024-05-22 12:08 ` Bartosz Golaszewski
  2024-05-22 12:08 ` [PATCH 5/5] arm64: dts: qcom: sa8775p-ride: enable remoteprocs Bartosz Golaszewski
  4 siblings, 0 replies; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 12:08 UTC (permalink / raw
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

From: Tengfei Fan <quic_tengfan@quicinc.com>

Add nodes for remoteprocs: ADSP, CDSP0, CDSP1, GPDSP0 and GPDSP1 for
SA8775p SoCs.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sa8775p.dtsi | 332 ++++++++++++++++++++++++++++++++++
 1 file changed, 332 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 31de73594839..5c0b61a5624b 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -10,6 +10,7 @@
 #include <dt-bindings/clock/qcom,sa8775p-gpucc.h>
 #include <dt-bindings/interconnect/qcom,sa8775p-rpmh.h>
 #include <dt-bindings/mailbox/qcom-ipcc.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
 
@@ -544,6 +545,121 @@ cpucp_fw_mem: cpucp-fw@db200000 {
 		};
 	};
 
+	smp2p-adsp {
+		compatible = "qcom,smp2p";
+		qcom,smem = <443>, <429>;
+		interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+					     IPCC_MPROC_SIGNAL_SMP2P
+					     IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&ipcc IPCC_CLIENT_LPASS IPCC_MPROC_SIGNAL_SMP2P>;
+
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <2>;
+
+		smp2p_adsp_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		smp2p_adsp_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-cdsp0 {
+		compatible = "qcom,smp2p";
+		qcom,smem = <94>, <432>;
+		interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
+					     IPCC_MPROC_SIGNAL_SMP2P
+					     IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&ipcc IPCC_CLIENT_CDSP IPCC_MPROC_SIGNAL_SMP2P>;
+
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <5>;
+
+		smp2p_cdsp0_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		smp2p_cdsp0_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-cdsp1 {
+		compatible = "qcom,smp2p";
+		qcom,smem = <617>, <616>;
+		interrupts-extended = <&ipcc IPCC_CLIENT_NSP1
+					     IPCC_MPROC_SIGNAL_SMP2P
+					     IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&ipcc IPCC_CLIENT_NSP1 IPCC_MPROC_SIGNAL_SMP2P>;
+
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <12>;
+
+		smp2p_cdsp1_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		smp2p_cdsp1_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-gpdsp0 {
+		compatible = "qcom,smp2p";
+		qcom,smem = <617>, <616>;
+		interrupts-extended = <&ipcc IPCC_CLIENT_GPDSP0
+					     IPCC_MPROC_SIGNAL_SMP2P
+					     IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&ipcc IPCC_CLIENT_GPDSP0 IPCC_MPROC_SIGNAL_SMP2P>;
+
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <17>;
+
+		smp2p_gpdsp0_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		smp2p_gpdsp0_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-gpdsp1 {
+		compatible = "qcom,smp2p";
+		qcom,smem = <617>, <616>;
+		interrupts-extended = <&ipcc IPCC_CLIENT_GPDSP1
+					     IPCC_MPROC_SIGNAL_SMP2P
+					     IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&ipcc IPCC_CLIENT_GPDSP1 IPCC_MPROC_SIGNAL_SMP2P>;
+
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <18>;
+
+		smp2p_gpdsp1_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		smp2p_gpdsp1_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
 	soc: soc@0 {
 		compatible = "simple-bus";
 		#address-cells = <2>;
@@ -2479,6 +2595,92 @@ cpufreq_hw: cpufreq@18591000 {
 			#freq-domain-cells = <1>;
 		};
 
+		remoteproc_gpdsp0: remoteproc@20c00000 {
+			compatible = "qcom,sa8775p-gpdsp0-pas";
+			reg = <0x0 0x20c00000 0x0 0x10000>;
+
+			interrupts-extended = <&intc GIC_SPI 768 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_gpdsp0_in 0 0>,
+					      <&smp2p_gpdsp0_in 2 0>,
+					      <&smp2p_gpdsp0_in 1 0>,
+					      <&smp2p_gpdsp0_in 3 0>;
+			interrupt-names = "wdog", "fatal", "ready",
+					  "handover", "stop-ack";
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "xo";
+
+			power-domains = <&rpmhpd RPMHPD_CX>,
+					<&rpmhpd RPMHPD_MXC>;
+			power-domain-names = "cx", "mxc";
+
+			interconnects = <&gpdsp_anoc MASTER_DSP0 0
+					 &config_noc SLAVE_CLK_CTL 0>;
+
+			memory-region = <&pil_gdsp0_mem>;
+
+			qcom,qmp = <&aoss_qmp>;
+
+			qcom,smem-states = <&smp2p_gpdsp0_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			glink-edge {
+				interrupts-extended = <&ipcc IPCC_CLIENT_GPDSP0
+							     IPCC_MPROC_SIGNAL_GLINK_QMP
+							     IRQ_TYPE_EDGE_RISING>;
+				mboxes = <&ipcc IPCC_CLIENT_GPDSP0
+						IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+				label = "gpdsp0";
+				qcom,remote-pid = <17>;
+			};
+		};
+
+		remoteproc_gpdsp1: remoteproc@21c00000 {
+			compatible = "qcom,sa8775p-gpdsp1-pas";
+			reg = <0x0 0x21c00000 0x0 0x10000>;
+
+			interrupts-extended = <&intc GIC_SPI 624 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_gpdsp1_in 0 0>,
+					      <&smp2p_gpdsp1_in 2 0>,
+					      <&smp2p_gpdsp1_in 1 0>,
+					      <&smp2p_gpdsp1_in 3 0>;
+			interrupt-names = "wdog", "fatal", "ready",
+					  "handover", "stop-ack";
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "xo";
+
+			power-domains = <&rpmhpd RPMHPD_CX>,
+					<&rpmhpd RPMHPD_MXC>;
+			power-domain-names = "cx", "mxc";
+
+			interconnects = <&gpdsp_anoc MASTER_DSP1 0
+					 &config_noc SLAVE_CLK_CTL 0>;
+
+			memory-region = <&pil_gdsp1_mem>;
+
+			qcom,qmp = <&aoss_qmp>;
+
+			qcom,smem-states = <&smp2p_gpdsp1_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			glink-edge {
+				interrupts-extended = <&ipcc IPCC_CLIENT_GPDSP1
+							     IPCC_MPROC_SIGNAL_GLINK_QMP
+							     IRQ_TYPE_EDGE_RISING>;
+				mboxes = <&ipcc IPCC_CLIENT_GPDSP1
+						IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+				label = "gpdsp1";
+				qcom,remote-pid = <18>;
+			};
+		};
+
 		ethernet1: ethernet@23000000 {
 			compatible = "qcom,sa8775p-ethqos";
 			reg = <0x0 0x23000000 0x0 0x10000>,
@@ -2546,6 +2748,136 @@ ethernet0: ethernet@23040000 {
 
 			status = "disabled";
 		};
+
+		remoteproc_cdsp0: remoteproc@26300000 {
+			compatible = "qcom,sa8775p-cdsp0-pas";
+			reg = <0x0 0x26300000 0x0 0x10000>;
+
+			interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp0_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp0_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp0_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp0_in 3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog", "fatal", "ready",
+					  "handover", "stop-ack";
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "xo";
+
+			power-domains = <&rpmhpd RPMHPD_CX>,
+					<&rpmhpd RPMHPD_MXC>,
+					<&rpmhpd RPMHPD_NSP0>;
+			power-domain-names = "cx", "mxc", "nsp0";
+
+			interconnects = <&nspa_noc MASTER_CDSP_PROC 0
+					 &mc_virt SLAVE_EBI1 0>;
+
+			memory-region = <&pil_cdsp0_mem>;
+
+			qcom,qmp = <&aoss_qmp>;
+
+			qcom,smem-states = <&smp2p_cdsp0_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			glink-edge {
+				interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
+							     IPCC_MPROC_SIGNAL_GLINK_QMP
+							     IRQ_TYPE_EDGE_RISING>;
+				mboxes = <&ipcc IPCC_CLIENT_CDSP
+						IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+				label = "cdsp";
+				qcom,remote-pid = <5>;
+			};
+		};
+
+		remoteproc_cdsp1: remoteproc@2a300000 {
+			compatible = "qcom,sa8775p-cdsp1-pas";
+			reg = <0x0 0x2A300000 0x0 0x10000>;
+
+			interrupts-extended = <&intc GIC_SPI 798 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp1_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp1_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp1_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_cdsp1_in 3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog", "fatal", "ready",
+					  "handover", "stop-ack";
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "xo";
+
+			power-domains = <&rpmhpd RPMHPD_CX>,
+					<&rpmhpd RPMHPD_MXC>,
+					<&rpmhpd RPMHPD_NSP1>;
+			power-domain-names = "cx", "mxc", "nsp1";
+
+			interconnects = <&nspb_noc MASTER_CDSP_PROC_B 0
+					 &mc_virt SLAVE_EBI1 0>;
+
+			memory-region = <&pil_cdsp1_mem>;
+
+			qcom,qmp = <&aoss_qmp>;
+
+			qcom,smem-states = <&smp2p_cdsp1_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			glink-edge {
+				interrupts-extended = <&ipcc IPCC_CLIENT_NSP1
+							     IPCC_MPROC_SIGNAL_GLINK_QMP
+							     IRQ_TYPE_EDGE_RISING>;
+				mboxes = <&ipcc IPCC_CLIENT_NSP1
+						IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+				label = "cdsp1";
+				qcom,remote-pid = <12>;
+			};
+		};
+
+		remoteproc_adsp: remoteproc@30000000 {
+			compatible = "qcom,sa8775p-adsp-pas";
+			reg = <0x0 0x30000000 0x0 0x100>;
+
+			interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog", "fatal", "ready", "handover",
+					  "stop-ack";
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "xo";
+
+			power-domains = <&rpmhpd RPMHPD_LCX>,
+					<&rpmhpd RPMHPD_LMX>;
+			power-domain-names = "lcx", "lmx";
+
+			interconnects = <&lpass_ag_noc MASTER_LPASS_PROC 0 &mc_virt SLAVE_EBI1 0>;
+
+			memory-region = <&pil_adsp_mem>;
+
+			qcom,qmp = <&aoss_qmp>;
+
+			qcom,smem-states = <&smp2p_adsp_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			remoteproc_adsp_glink: glink-edge {
+				interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+							     IPCC_MPROC_SIGNAL_GLINK_QMP
+							     IRQ_TYPE_EDGE_RISING>;
+				mboxes = <&ipcc IPCC_CLIENT_LPASS
+						IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+				label = "lpass";
+				qcom,remote-pid = <2>;
+			};
+		};
 	};
 
 	thermal-zones {

-- 
2.43.0


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

* [PATCH 5/5] arm64: dts: qcom: sa8775p-ride: enable remoteprocs
  2024-05-22 12:08 [PATCH 0/5] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP Bartosz Golaszewski
                   ` (3 preceding siblings ...)
  2024-05-22 12:08 ` [PATCH 4/5] arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes Bartosz Golaszewski
@ 2024-05-22 12:08 ` Bartosz Golaszewski
  4 siblings, 0 replies; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 12:08 UTC (permalink / raw
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Enable all remoteproc nodes on the sa8775p-ride board and point to the
appropriate firmware files.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index 26ad05bd3b3f..071fcaf09364 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -727,6 +727,31 @@ &pcie1_phy {
 	status = "okay";
 };
 
+&remoteproc_adsp {
+	firmware-name = "qcom/sa8775p/adsp.mbn";
+	status = "okay";
+};
+
+&remoteproc_cdsp0 {
+	firmware-name = "qcom/sa8775p/cdsp0.mbn";
+	status = "okay";
+};
+
+&remoteproc_cdsp1 {
+	firmware-name = "qcom/sa8775p/cdsp1.mbn";
+	status = "okay";
+};
+
+&remoteproc_gpdsp0 {
+	firmware-name = "qcom/sa8775p/gpdsp0.mbn";
+	status = "okay";
+};
+
+&remoteproc_gpdsp1 {
+	firmware-name = "qcom/sa8775p/gpdsp1.mbn";
+	status = "okay";
+};
+
 &uart10 {
 	compatible = "qcom,geni-debug-uart";
 	pinctrl-0 = <&qup_uart10_default>;

-- 
2.43.0


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

* Re: [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p ADSP, CDSP and GPDSP
  2024-05-22 12:08 ` [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p " Bartosz Golaszewski
@ 2024-05-22 12:42   ` neil.armstrong
  2024-05-22 13:04     ` Bartosz Golaszewski
  0 siblings, 1 reply; 12+ messages in thread
From: neil.armstrong @ 2024-05-22 12:42 UTC (permalink / raw
  To: Bartosz Golaszewski, Bjorn Andersson, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

On 22/05/2024 14:08, Bartosz Golaszewski wrote:
> From: Tengfei Fan <quic_tengfan@quicinc.com>
> 
> Document the compatibles for the components used to boot the ADSP, CDSP0,
> CDSP1, GPDSP0 and GPDSP1 on the SA8775p SoC.
> 
> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>   .../bindings/remoteproc/qcom,sm8550-pas.yaml       | 76 +++++++++++++++++++++-
>   1 file changed, 75 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> index 73fda7565cd1..9d3a862c39e1 100644
> --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> @@ -16,6 +16,11 @@ description:
>   properties:
>     compatible:
>       enum:
> +      - qcom,sa8775p-adsp-pas
> +      - qcom,sa8775p-cdsp0-pas
> +      - qcom,sa8775p-cdsp1-pas
> +      - qcom,sa8775p-gpdsp0-pas
> +      - qcom,sa8775p-gpdsp1-pas
>         - qcom,sm8550-adsp-pas
>         - qcom,sm8550-cdsp-pas
>         - qcom,sm8550-mpss-pas
> @@ -44,12 +49,13 @@ properties:
>   
>     firmware-name:
>       $ref: /schemas/types.yaml#/definitions/string-array
> +    minItems: 1

This will allow a single firmware name for all compatible,
which is wrong

>       items:
>         - description: Firmware name of the Hexagon core
>         - description: Firmware name of the Hexagon Devicetree
>   
>     memory-region:
> -    minItems: 2
> +    minItems: 1

Same here

>       items:
>         - description: Memory region for main Firmware authentication
>         - description: Memory region for Devicetree Firmware authentication
> @@ -81,6 +87,21 @@ allOf:
>             maxItems: 5
>           memory-region:
>             maxItems: 2
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - qcom,sa8775p-adsp-pas
> +            - qcom,sa8775p-cdsp0-pas
> +            - qcom,sa8775p-cdsp1-pas
> +            - qcom,sa8775p-gpdsp0-pas
> +            - qcom,sa8775p-gpdsp1-pas
> +    then:
> +      properties:
> +        interrupts:
> +          maxItems: 5
> +        interrupt-names:
> +          maxItems: 5
>     - if:
>         properties:
>           compatible:
> @@ -128,6 +149,7 @@ allOf:
>         properties:
>           compatible:
>             enum:
> +            - qcom,sa8775p-adsp-pas
>               - qcom,sm8550-adsp-pas
>               - qcom,sm8650-adsp-pas
>               - qcom,x1e80100-adsp-pas
> @@ -177,6 +199,58 @@ allOf:
>               - const: cx
>               - const: mxc
>               - const: nsp
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - qcom,sa8775p-cdsp-pas
> +    then:
> +      properties:
> +        power-domains:
> +          items:
> +            - description: CX power domain
> +            - description: MXC power domain
> +            - description: NSP0 power domain
> +        power-domain-names:
> +          items:
> +            - const: cx
> +            - const: mxc
> +            - const: nsp0
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - qcom,sa8775p-cdsp1-pas
> +    then:
> +      properties:
> +        power-domains:
> +          items:
> +            - description: CX power domain
> +            - description: MXC power domain
> +            - description: NSP1 power domain
> +        power-domain-names:
> +          items:
> +            - const: cx
> +            - const: mxc
> +            - const: nsp1
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - qcom,sa8775p-gpdsp0-pas
> +            - qcom,sa8775p-gpdsp1-pas
> +    then:
> +      properties:
> +        power-domains:
> +          items:
> +            - description: CX power domain
> +            - description: MXC power domain
> +        power-domain-names:
> +          items:
> +            - const: cx
> +            - const: mxc
>   
>   unevaluatedProperties: false
>   
> 


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

* Re: [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p ADSP, CDSP and GPDSP
  2024-05-22 12:42   ` neil.armstrong
@ 2024-05-22 13:04     ` Bartosz Golaszewski
  2024-05-22 13:06       ` neil.armstrong
  0 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 13:04 UTC (permalink / raw
  To: neil.armstrong
  Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar, Bartosz Golaszewski,
	linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Tengfei Fan, Srini Kandagatla, Alex Elder

On Wed, May 22, 2024 at 2:42 PM <neil.armstrong@linaro.org> wrote:
>
> On 22/05/2024 14:08, Bartosz Golaszewski wrote:
> > From: Tengfei Fan <quic_tengfan@quicinc.com>
> >
> > Document the compatibles for the components used to boot the ADSP, CDSP0,
> > CDSP1, GPDSP0 and GPDSP1 on the SA8775p SoC.
> >
> > Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> > Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> >   .../bindings/remoteproc/qcom,sm8550-pas.yaml       | 76 +++++++++++++++++++++-
> >   1 file changed, 75 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> > index 73fda7565cd1..9d3a862c39e1 100644
> > --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> > +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> > @@ -16,6 +16,11 @@ description:
> >   properties:
> >     compatible:
> >       enum:
> > +      - qcom,sa8775p-adsp-pas
> > +      - qcom,sa8775p-cdsp0-pas
> > +      - qcom,sa8775p-cdsp1-pas
> > +      - qcom,sa8775p-gpdsp0-pas
> > +      - qcom,sa8775p-gpdsp1-pas
> >         - qcom,sm8550-adsp-pas
> >         - qcom,sm8550-cdsp-pas
> >         - qcom,sm8550-mpss-pas
> > @@ -44,12 +49,13 @@ properties:
> >
> >     firmware-name:
> >       $ref: /schemas/types.yaml#/definitions/string-array
> > +    minItems: 1
>
> This will allow a single firmware name for all compatible,
> which is wrong
>

So increasing the limit from the default under allOf doesn't seem to
work, should I instead keep this and make the lower limit stricter for
all other models?

Bart

> >       items:
> >         - description: Firmware name of the Hexagon core
> >         - description: Firmware name of the Hexagon Devicetree
> >
> >     memory-region:
> > -    minItems: 2
> > +    minItems: 1
>
> Same here
>
> >       items:
> >         - description: Memory region for main Firmware authentication
> >         - description: Memory region for Devicetree Firmware authentication
> > @@ -81,6 +87,21 @@ allOf:
> >             maxItems: 5
> >           memory-region:
> >             maxItems: 2
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          enum:
> > +            - qcom,sa8775p-adsp-pas
> > +            - qcom,sa8775p-cdsp0-pas
> > +            - qcom,sa8775p-cdsp1-pas
> > +            - qcom,sa8775p-gpdsp0-pas
> > +            - qcom,sa8775p-gpdsp1-pas
> > +    then:
> > +      properties:
> > +        interrupts:
> > +          maxItems: 5
> > +        interrupt-names:
> > +          maxItems: 5
> >     - if:
> >         properties:
> >           compatible:
> > @@ -128,6 +149,7 @@ allOf:
> >         properties:
> >           compatible:
> >             enum:
> > +            - qcom,sa8775p-adsp-pas
> >               - qcom,sm8550-adsp-pas
> >               - qcom,sm8650-adsp-pas
> >               - qcom,x1e80100-adsp-pas
> > @@ -177,6 +199,58 @@ allOf:
> >               - const: cx
> >               - const: mxc
> >               - const: nsp
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          enum:
> > +            - qcom,sa8775p-cdsp-pas
> > +    then:
> > +      properties:
> > +        power-domains:
> > +          items:
> > +            - description: CX power domain
> > +            - description: MXC power domain
> > +            - description: NSP0 power domain
> > +        power-domain-names:
> > +          items:
> > +            - const: cx
> > +            - const: mxc
> > +            - const: nsp0
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          enum:
> > +            - qcom,sa8775p-cdsp1-pas
> > +    then:
> > +      properties:
> > +        power-domains:
> > +          items:
> > +            - description: CX power domain
> > +            - description: MXC power domain
> > +            - description: NSP1 power domain
> > +        power-domain-names:
> > +          items:
> > +            - const: cx
> > +            - const: mxc
> > +            - const: nsp1
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          enum:
> > +            - qcom,sa8775p-gpdsp0-pas
> > +            - qcom,sa8775p-gpdsp1-pas
> > +    then:
> > +      properties:
> > +        power-domains:
> > +          items:
> > +            - description: CX power domain
> > +            - description: MXC power domain
> > +        power-domain-names:
> > +          items:
> > +            - const: cx
> > +            - const: mxc
> >
> >   unevaluatedProperties: false
> >
> >
>

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

* Re: [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p ADSP, CDSP and GPDSP
  2024-05-22 13:04     ` Bartosz Golaszewski
@ 2024-05-22 13:06       ` neil.armstrong
  2024-05-22 13:08         ` Bartosz Golaszewski
  0 siblings, 1 reply; 12+ messages in thread
From: neil.armstrong @ 2024-05-22 13:06 UTC (permalink / raw
  To: Bartosz Golaszewski
  Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar, Bartosz Golaszewski,
	linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Tengfei Fan, Srini Kandagatla, Alex Elder

On 22/05/2024 15:04, Bartosz Golaszewski wrote:
> On Wed, May 22, 2024 at 2:42 PM <neil.armstrong@linaro.org> wrote:
>>
>> On 22/05/2024 14:08, Bartosz Golaszewski wrote:
>>> From: Tengfei Fan <quic_tengfan@quicinc.com>
>>>
>>> Document the compatibles for the components used to boot the ADSP, CDSP0,
>>> CDSP1, GPDSP0 and GPDSP1 on the SA8775p SoC.
>>>
>>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>>> Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>> ---
>>>    .../bindings/remoteproc/qcom,sm8550-pas.yaml       | 76 +++++++++++++++++++++-
>>>    1 file changed, 75 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
>>> index 73fda7565cd1..9d3a862c39e1 100644
>>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
>>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
>>> @@ -16,6 +16,11 @@ description:
>>>    properties:
>>>      compatible:
>>>        enum:
>>> +      - qcom,sa8775p-adsp-pas
>>> +      - qcom,sa8775p-cdsp0-pas
>>> +      - qcom,sa8775p-cdsp1-pas
>>> +      - qcom,sa8775p-gpdsp0-pas
>>> +      - qcom,sa8775p-gpdsp1-pas
>>>          - qcom,sm8550-adsp-pas
>>>          - qcom,sm8550-cdsp-pas
>>>          - qcom,sm8550-mpss-pas
>>> @@ -44,12 +49,13 @@ properties:
>>>
>>>      firmware-name:
>>>        $ref: /schemas/types.yaml#/definitions/string-array
>>> +    minItems: 1
>>
>> This will allow a single firmware name for all compatible,
>> which is wrong
>>
> 
> So increasing the limit from the default under allOf doesn't seem to
> work, should I instead keep this and make the lower limit stricter for
> all other models?

Yes add minItems in all the allOf:if: and add the missing allOf:if: for
the new compatibles to set the minItems, same for memory-region.

Or you may simply spin off a new yaml, this one is getting quite large.

Neil

> 
> Bart
> 
>>>        items:
>>>          - description: Firmware name of the Hexagon core
>>>          - description: Firmware name of the Hexagon Devicetree
>>>
>>>      memory-region:
>>> -    minItems: 2
>>> +    minItems: 1
>>
>> Same here
>>
>>>        items:
>>>          - description: Memory region for main Firmware authentication
>>>          - description: Memory region for Devicetree Firmware authentication
>>> @@ -81,6 +87,21 @@ allOf:
>>>              maxItems: 5
>>>            memory-region:
>>>              maxItems: 2
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          enum:
>>> +            - qcom,sa8775p-adsp-pas
>>> +            - qcom,sa8775p-cdsp0-pas
>>> +            - qcom,sa8775p-cdsp1-pas
>>> +            - qcom,sa8775p-gpdsp0-pas
>>> +            - qcom,sa8775p-gpdsp1-pas
>>> +    then:
>>> +      properties:
>>> +        interrupts:
>>> +          maxItems: 5
>>> +        interrupt-names:
>>> +          maxItems: 5
>>>      - if:
>>>          properties:
>>>            compatible:
>>> @@ -128,6 +149,7 @@ allOf:
>>>          properties:
>>>            compatible:
>>>              enum:
>>> +            - qcom,sa8775p-adsp-pas
>>>                - qcom,sm8550-adsp-pas
>>>                - qcom,sm8650-adsp-pas
>>>                - qcom,x1e80100-adsp-pas
>>> @@ -177,6 +199,58 @@ allOf:
>>>                - const: cx
>>>                - const: mxc
>>>                - const: nsp
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          enum:
>>> +            - qcom,sa8775p-cdsp-pas
>>> +    then:
>>> +      properties:
>>> +        power-domains:
>>> +          items:
>>> +            - description: CX power domain
>>> +            - description: MXC power domain
>>> +            - description: NSP0 power domain
>>> +        power-domain-names:
>>> +          items:
>>> +            - const: cx
>>> +            - const: mxc
>>> +            - const: nsp0
>>> +
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          enum:
>>> +            - qcom,sa8775p-cdsp1-pas
>>> +    then:
>>> +      properties:
>>> +        power-domains:
>>> +          items:
>>> +            - description: CX power domain
>>> +            - description: MXC power domain
>>> +            - description: NSP1 power domain
>>> +        power-domain-names:
>>> +          items:
>>> +            - const: cx
>>> +            - const: mxc
>>> +            - const: nsp1
>>> +
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          enum:
>>> +            - qcom,sa8775p-gpdsp0-pas
>>> +            - qcom,sa8775p-gpdsp1-pas
>>> +    then:
>>> +      properties:
>>> +        power-domains:
>>> +          items:
>>> +            - description: CX power domain
>>> +            - description: MXC power domain
>>> +        power-domain-names:
>>> +          items:
>>> +            - const: cx
>>> +            - const: mxc
>>>
>>>    unevaluatedProperties: false
>>>
>>>
>>


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

* Re: [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p ADSP, CDSP and GPDSP
  2024-05-22 13:06       ` neil.armstrong
@ 2024-05-22 13:08         ` Bartosz Golaszewski
  2024-05-29 14:31           ` Konrad Dybcio
  0 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2024-05-22 13:08 UTC (permalink / raw
  To: neil.armstrong
  Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar, Bartosz Golaszewski,
	linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Tengfei Fan, Srini Kandagatla, Alex Elder

On Wed, May 22, 2024 at 3:06 PM <neil.armstrong@linaro.org> wrote:
>
> On 22/05/2024 15:04, Bartosz Golaszewski wrote:
> > On Wed, May 22, 2024 at 2:42 PM <neil.armstrong@linaro.org> wrote:
> >>
> >> On 22/05/2024 14:08, Bartosz Golaszewski wrote:
> >>> From: Tengfei Fan <quic_tengfan@quicinc.com>
> >>>
> >>> Document the compatibles for the components used to boot the ADSP, CDSP0,
> >>> CDSP1, GPDSP0 and GPDSP1 on the SA8775p SoC.
> >>>
> >>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> >>> Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >>> ---
> >>>    .../bindings/remoteproc/qcom,sm8550-pas.yaml       | 76 +++++++++++++++++++++-
> >>>    1 file changed, 75 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> >>> index 73fda7565cd1..9d3a862c39e1 100644
> >>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> >>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
> >>> @@ -16,6 +16,11 @@ description:
> >>>    properties:
> >>>      compatible:
> >>>        enum:
> >>> +      - qcom,sa8775p-adsp-pas
> >>> +      - qcom,sa8775p-cdsp0-pas
> >>> +      - qcom,sa8775p-cdsp1-pas
> >>> +      - qcom,sa8775p-gpdsp0-pas
> >>> +      - qcom,sa8775p-gpdsp1-pas
> >>>          - qcom,sm8550-adsp-pas
> >>>          - qcom,sm8550-cdsp-pas
> >>>          - qcom,sm8550-mpss-pas
> >>> @@ -44,12 +49,13 @@ properties:
> >>>
> >>>      firmware-name:
> >>>        $ref: /schemas/types.yaml#/definitions/string-array
> >>> +    minItems: 1
> >>
> >> This will allow a single firmware name for all compatible,
> >> which is wrong
> >>
> >
> > So increasing the limit from the default under allOf doesn't seem to
> > work, should I instead keep this and make the lower limit stricter for
> > all other models?
>
> Yes add minItems in all the allOf:if: and add the missing allOf:if: for
> the new compatibles to set the minItems, same for memory-region.
>
> Or you may simply spin off a new yaml, this one is getting quite large.
>

Yeah, maybe that's a better idea.

Bart

> Neil
>
> >
> > Bart
> >
> >>>        items:
> >>>          - description: Firmware name of the Hexagon core
> >>>          - description: Firmware name of the Hexagon Devicetree
> >>>
> >>>      memory-region:
> >>> -    minItems: 2
> >>> +    minItems: 1
> >>
> >> Same here
> >>
> >>>        items:
> >>>          - description: Memory region for main Firmware authentication
> >>>          - description: Memory region for Devicetree Firmware authentication
> >>> @@ -81,6 +87,21 @@ allOf:
> >>>              maxItems: 5
> >>>            memory-region:
> >>>              maxItems: 2
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          enum:
> >>> +            - qcom,sa8775p-adsp-pas
> >>> +            - qcom,sa8775p-cdsp0-pas
> >>> +            - qcom,sa8775p-cdsp1-pas
> >>> +            - qcom,sa8775p-gpdsp0-pas
> >>> +            - qcom,sa8775p-gpdsp1-pas
> >>> +    then:
> >>> +      properties:
> >>> +        interrupts:
> >>> +          maxItems: 5
> >>> +        interrupt-names:
> >>> +          maxItems: 5
> >>>      - if:
> >>>          properties:
> >>>            compatible:
> >>> @@ -128,6 +149,7 @@ allOf:
> >>>          properties:
> >>>            compatible:
> >>>              enum:
> >>> +            - qcom,sa8775p-adsp-pas
> >>>                - qcom,sm8550-adsp-pas
> >>>                - qcom,sm8650-adsp-pas
> >>>                - qcom,x1e80100-adsp-pas
> >>> @@ -177,6 +199,58 @@ allOf:
> >>>                - const: cx
> >>>                - const: mxc
> >>>                - const: nsp
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          enum:
> >>> +            - qcom,sa8775p-cdsp-pas
> >>> +    then:
> >>> +      properties:
> >>> +        power-domains:
> >>> +          items:
> >>> +            - description: CX power domain
> >>> +            - description: MXC power domain
> >>> +            - description: NSP0 power domain
> >>> +        power-domain-names:
> >>> +          items:
> >>> +            - const: cx
> >>> +            - const: mxc
> >>> +            - const: nsp0
> >>> +
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          enum:
> >>> +            - qcom,sa8775p-cdsp1-pas
> >>> +    then:
> >>> +      properties:
> >>> +        power-domains:
> >>> +          items:
> >>> +            - description: CX power domain
> >>> +            - description: MXC power domain
> >>> +            - description: NSP1 power domain
> >>> +        power-domain-names:
> >>> +          items:
> >>> +            - const: cx
> >>> +            - const: mxc
> >>> +            - const: nsp1
> >>> +
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          enum:
> >>> +            - qcom,sa8775p-gpdsp0-pas
> >>> +            - qcom,sa8775p-gpdsp1-pas
> >>> +    then:
> >>> +      properties:
> >>> +        power-domains:
> >>> +          items:
> >>> +            - description: CX power domain
> >>> +            - description: MXC power domain
> >>> +        power-domain-names:
> >>> +          items:
> >>> +            - const: cx
> >>> +            - const: mxc
> >>>
> >>>    unevaluatedProperties: false
> >>>
> >>>
> >>
>

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

* Re: [PATCH 2/5] dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients
  2024-05-22 12:08 ` [PATCH 2/5] dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients Bartosz Golaszewski
@ 2024-05-22 14:21   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-22 14:21 UTC (permalink / raw
  To: Bartosz Golaszewski, Bjorn Andersson, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
	Manivannan Sadhasivam, Jassi Brar
  Cc: Bartosz Golaszewski, linux-arm-msm, linux-remoteproc, devicetree,
	linux-kernel, Tengfei Fan, Srini Kandagatla, Alex Elder

On 22/05/2024 14:08, Bartosz Golaszewski wrote:
> From: Tengfei Fan <quic_tengfan@quicinc.com>
> 
> Add GPDSP0 and GPDSP1 clients for SA8775p platform.
> 
> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p ADSP, CDSP and GPDSP
  2024-05-22 13:08         ` Bartosz Golaszewski
@ 2024-05-29 14:31           ` Konrad Dybcio
  0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2024-05-29 14:31 UTC (permalink / raw
  To: Bartosz Golaszewski, neil.armstrong
  Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	Jassi Brar, Bartosz Golaszewski, linux-arm-msm, linux-remoteproc,
	devicetree, linux-kernel, Tengfei Fan, Srini Kandagatla,
	Alex Elder

On 22.05.2024 3:08 PM, Bartosz Golaszewski wrote:
> On Wed, May 22, 2024 at 3:06 PM <neil.armstrong@linaro.org> wrote:
>>
>> On 22/05/2024 15:04, Bartosz Golaszewski wrote:
>>> On Wed, May 22, 2024 at 2:42 PM <neil.armstrong@linaro.org> wrote:
>>>>
>>>> On 22/05/2024 14:08, Bartosz Golaszewski wrote:
>>>>> From: Tengfei Fan <quic_tengfan@quicinc.com>
>>>>>
>>>>> Document the compatibles for the components used to boot the ADSP, CDSP0,
>>>>> CDSP1, GPDSP0 and GPDSP1 on the SA8775p SoC.
>>>>>
>>>>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>>>>> Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>>> ---
>>>>>    .../bindings/remoteproc/qcom,sm8550-pas.yaml       | 76 +++++++++++++++++++++-
>>>>>    1 file changed, 75 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
>>>>> index 73fda7565cd1..9d3a862c39e1 100644
>>>>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
>>>>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
>>>>> @@ -16,6 +16,11 @@ description:
>>>>>    properties:
>>>>>      compatible:
>>>>>        enum:
>>>>> +      - qcom,sa8775p-adsp-pas
>>>>> +      - qcom,sa8775p-cdsp0-pas
>>>>> +      - qcom,sa8775p-cdsp1-pas
>>>>> +      - qcom,sa8775p-gpdsp0-pas
>>>>> +      - qcom,sa8775p-gpdsp1-pas
>>>>>          - qcom,sm8550-adsp-pas
>>>>>          - qcom,sm8550-cdsp-pas
>>>>>          - qcom,sm8550-mpss-pas
>>>>> @@ -44,12 +49,13 @@ properties:
>>>>>
>>>>>      firmware-name:
>>>>>        $ref: /schemas/types.yaml#/definitions/string-array
>>>>> +    minItems: 1
>>>>
>>>> This will allow a single firmware name for all compatible,
>>>> which is wrong
>>>>
>>>
>>> So increasing the limit from the default under allOf doesn't seem to
>>> work, should I instead keep this and make the lower limit stricter for
>>> all other models?
>>
>> Yes add minItems in all the allOf:if: and add the missing allOf:if: for
>> the new compatibles to set the minItems, same for memory-region.
>>
>> Or you may simply spin off a new yaml, this one is getting quite large.
>>
> 
> Yeah, maybe that's a better idea.

+ if you get rid of the 0/1 in "nsp0/nsp1" you save a couple more lines

Konrad

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

end of thread, other threads:[~2024-05-29 14:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 12:08 [PATCH 0/5] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP Bartosz Golaszewski
2024-05-22 12:08 ` [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: Document the SA8775p " Bartosz Golaszewski
2024-05-22 12:42   ` neil.armstrong
2024-05-22 13:04     ` Bartosz Golaszewski
2024-05-22 13:06       ` neil.armstrong
2024-05-22 13:08         ` Bartosz Golaszewski
2024-05-29 14:31           ` Konrad Dybcio
2024-05-22 12:08 ` [PATCH 2/5] dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients Bartosz Golaszewski
2024-05-22 14:21   ` Krzysztof Kozlowski
2024-05-22 12:08 ` [PATCH 3/5] remoteproc: qcom_q6v5_pas: Add support for SA8775p ADSP, CDSP and GPDSP Bartosz Golaszewski
2024-05-22 12:08 ` [PATCH 4/5] arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes Bartosz Golaszewski
2024-05-22 12:08 ` [PATCH 5/5] arm64: dts: qcom: sa8775p-ride: enable remoteprocs Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).