public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] remoteproc: qcom_q6v5_pas: add support for SM8550 adsp, cdsp & mpss
@ 2022-11-16 10:20 Neil Armstrong
  2022-11-16 10:20 ` [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible Neil Armstrong
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Neil Armstrong @ 2022-11-16 10:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Andy Gross,
	Manivannan Sadhasivam, Amol Maheshwari, Srinivas Kandagatla,
	Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc, Neil Armstrong

This patchsets adds support for the aDSP, cDSP and MPSS found in the
SM8550 SoC.

The aDSP, cDSP and MPSS boot process on SM8550 now requires a secondary
"Devicetree" firmware to be passed along the main Firmware, and the cDSP
a new power domain named "NSP".

In order to satisfy the load & authentication order required by the SM8550
SoC, the following is implemented:
- "Devicetree" firmware request & load in dedicated memory
- Q6V5 prepare
- Power Domain & Clocks enable
- "Devicetree" firmware authentication
- Main firmware load in dedicated memory
- Main firmware authentication
- Q6V5 startup
- "Devicetree" firmware metadata release
- Main metadata release

When booting older platforms, the "Devicetree" steps would be
bypassed and the load & authentication order would still be valid.

To: Andy Gross <agross@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@somainline.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Rob Herring <robh+dt@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
To: Manivannan Sadhasivam <mani@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Amol Maheshwari <amahesh@qti.qualcomm.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-remoteproc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>

---
Abel Vesa (1):
      dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries

Neil Armstrong (3):
      dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible
      remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading
      remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data

 .../devicetree/bindings/misc/qcom,fastrpc.yaml     |   2 +-
 .../devicetree/bindings/remoteproc/qcom,adsp.yaml  |  60 ++++++-
 drivers/remoteproc/qcom_q6v5_pas.c                 | 199 +++++++++++++++++++--
 3 files changed, 246 insertions(+), 15 deletions(-)
---
base-commit: 3c1f24109dfc4fb1a3730ed237e50183c6bb26b3
change-id: 20221114-narmstrong-sm8550-upstream-remoteproc-804f3fbb34bf

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>

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

* [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible
  2022-11-16 10:20 [PATCH 0/4] remoteproc: qcom_q6v5_pas: add support for SM8550 adsp, cdsp & mpss Neil Armstrong
@ 2022-11-16 10:20 ` Neil Armstrong
  2022-11-16 12:28   ` Krzysztof Kozlowski
  2022-11-16 10:20 ` [PATCH 2/4] dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries Neil Armstrong
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Neil Armstrong @ 2022-11-16 10:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Andy Gross,
	Manivannan Sadhasivam, Amol Maheshwari, Srinivas Kandagatla,
	Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc, Neil Armstrong

This documents the compatible for the component used to boot the
aDSP, cDSP and MPSS on the SM8550 SoC.

The SM8550 boot process on SM8550 now requires a secondary "Devicetree"
firmware to be passed along the main Firmware, and the cDSP a new power
domain named "NSP".

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../devicetree/bindings/remoteproc/qcom,adsp.yaml  | 60 +++++++++++++++++++++-
 1 file changed, 59 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
index db9e0f0c2bea..678cb73f10de 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
@@ -55,6 +55,9 @@ properties:
       - qcom,sm8450-cdsp-pas
       - qcom,sm8450-mpss-pas
       - qcom,sm8450-slpi-pas
+      - qcom,sm8550-adsp-pas
+      - qcom,sm8550-cdsp-pas
+      - qcom,sm8550-mpss-pas
 
   reg:
     maxItems: 1
@@ -116,8 +119,13 @@ properties:
     $ref: /schemas/types.yaml#/definitions/string
     description: Firmware name for the Hexagon core
 
+  qcom,dtb-firmware-name:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Devicetree Firmware name for the Hexagon core
+
   memory-region:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
     description: Reference to the reserved-memory for the Hexagon core
 
   qcom,qmp:
@@ -212,6 +220,9 @@ allOf:
               - qcom,sm8450-cdsp-pas
               - qcom,sm8450-slpi-pas
               - qcom,sm8450-mpss-pas
+              - qcom,sm8550-adsp-pas
+              - qcom,sm8550-cdsp-pas
+              - qcom,sm8550-mpss-pas
     then:
       properties:
         clocks:
@@ -327,6 +338,8 @@ allOf:
               - qcom,sm8450-adsp-pas
               - qcom,sm8450-cdsp-pas
               - qcom,sm8450-slpi-pas
+              - qcom,sm8550-adsp-pas
+              - qcom,sm8550-cdsp-pas
     then:
       properties:
         interrupts:
@@ -347,6 +360,7 @@ allOf:
               - qcom,sm8150-mpss-pas
               - qcom,sm8350-mpss-pas
               - qcom,sm8450-mpss-pas
+              - qcom,sm8550-mpss-pas
     then:
       properties:
         interrupts:
@@ -448,6 +462,7 @@ allOf:
               - qcom,sm8150-mpss-pas
               - qcom,sm8350-mpss-pas
               - qcom,sm8450-mpss-pas
+              - qcom,sm8550-mpss-pas
     then:
       properties:
         power-domains:
@@ -475,6 +490,7 @@ allOf:
               - qcom,sm8350-slpi-pas
               - qcom,sm8450-adsp-pas
               - qcom,sm8450-slpi-pas
+              - qcom,sm8550-adsp-pas
     then:
       properties:
         power-domains:
@@ -504,6 +520,25 @@ allOf:
             - const: cx
             - const: mxc
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sm8550-cdsp-pas
+    then:
+      properties:
+        power-domains:
+          items:
+            - description: CX power domain
+            - description: MXC power domain
+            - description: NSP power domain
+        power-domain-names:
+          items:
+            - const: cx
+            - const: mxc
+            - const: nsp
+
   - if:
       properties:
         compatible:
@@ -573,6 +608,29 @@ allOf:
       properties:
         qcom,qmp: false
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sm8550-adsp-pas
+              - qcom,sm8550-cdsp-pas
+              - qcom,sm8550-mpss-pas
+    then:
+      properties:
+        memory-region:
+          minItems: 2
+          description:
+            First entry is a phandle for a reserved memory area that holds
+            the main Firmware for authentication, and second entry a phandle for a
+            reserved memory area that holds the Devicetree Firmware for authentication.
+    else:
+      properties:
+        qcom,dtb-firmware-name: false
+
+        memory-region:
+          maxItems: 1
+
 examples:
   - |
     #include <dt-bindings/clock/qcom,rpmcc.h>

-- 
b4 0.10.1

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

* [PATCH 2/4] dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries
  2022-11-16 10:20 [PATCH 0/4] remoteproc: qcom_q6v5_pas: add support for SM8550 adsp, cdsp & mpss Neil Armstrong
  2022-11-16 10:20 ` [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible Neil Armstrong
@ 2022-11-16 10:20 ` Neil Armstrong
  2022-11-16 12:28   ` Krzysztof Kozlowski
  2022-11-16 10:20 ` [PATCH 3/4] remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading Neil Armstrong
  2022-11-16 10:20 ` [PATCH 4/4] remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data Neil Armstrong
  3 siblings, 1 reply; 11+ messages in thread
From: Neil Armstrong @ 2022-11-16 10:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Andy Gross,
	Manivannan Sadhasivam, Amol Maheshwari, Srinivas Kandagatla,
	Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc, Neil Armstrong

From: Abel Vesa <abel.vesa@linaro.org>

The fastrpc components on the SM8550 SoC can require up to 3 IOMMU
entries, this bumps the maxItems to 3 for this purpose.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
index d7576f8ac94b..1ab9588cdd89 100644
--- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
+++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
@@ -79,7 +79,7 @@ patternProperties:
 
       iommus:
         minItems: 1
-        maxItems: 2
+        maxItems: 3
 
       qcom,nsessions:
         $ref: /schemas/types.yaml#/definitions/uint32

-- 
b4 0.10.1

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

* [PATCH 3/4] remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading
  2022-11-16 10:20 [PATCH 0/4] remoteproc: qcom_q6v5_pas: add support for SM8550 adsp, cdsp & mpss Neil Armstrong
  2022-11-16 10:20 ` [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible Neil Armstrong
  2022-11-16 10:20 ` [PATCH 2/4] dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries Neil Armstrong
@ 2022-11-16 10:20 ` Neil Armstrong
  2022-11-16 10:20 ` [PATCH 4/4] remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data Neil Armstrong
  3 siblings, 0 replies; 11+ messages in thread
From: Neil Armstrong @ 2022-11-16 10:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Andy Gross,
	Manivannan Sadhasivam, Amol Maheshwari, Srinivas Kandagatla,
	Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc, Neil Armstrong

Starting from the SM8550 SoC, starting the aDSP, cDSP and MPSS will
require loading a separate "Devicetree" firmware.

In order to satisfy the load & authentication order required by the SM8550
SoC, the following is implemented:
- "Devicetree" firmware request & load in dedicated memory
- Q6V5 prepare
- Power Domain & Clocks enable
- "Devicetree" firmware authentication
- Main firmware load in dedicated memory
- Main firmware authentication
- Q6V5 startup
- "Devicetree" firmware metadata release
- Main metadata release

When booting older platforms, the "Devicetree" steps would be
bypassed and the load & authentication order would still be valid.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 134 +++++++++++++++++++++++++++++++++----
 1 file changed, 121 insertions(+), 13 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 6afd0941e552..e79a5fcbc986 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -35,7 +35,9 @@
 struct adsp_data {
 	int crash_reason_smem;
 	const char *firmware_name;
+	const char *dtb_firmware_name;
 	int pas_id;
+	int dtb_pas_id;
 	unsigned int minidump_id;
 	bool has_aggre2_clk;
 	bool auto_boot;
@@ -65,20 +67,29 @@ struct qcom_adsp {
 
 	int proxy_pd_count;
 
+	const char *dtb_firmware_name;
 	int pas_id;
+	int dtb_pas_id;
 	unsigned int minidump_id;
 	int crash_reason_smem;
 	bool has_aggre2_clk;
 	bool decrypt_shutdown;
 	const char *info_name;
 
+	const struct firmware *firmware;
+	const struct firmware *dtb_firmware;
+
 	struct completion start_done;
 	struct completion stop_done;
 
 	phys_addr_t mem_phys;
+	phys_addr_t dtb_mem_phys;
 	phys_addr_t mem_reloc;
+	phys_addr_t dtb_mem_reloc;
 	void *mem_region;
+	void *dtb_mem_region;
 	size_t mem_size;
+	size_t dtb_mem_size;
 
 	struct qcom_rproc_glink glink_subdev;
 	struct qcom_rproc_subdev smd_subdev;
@@ -86,6 +97,7 @@ struct qcom_adsp {
 	struct qcom_sysmon *sysmon;
 
 	struct qcom_scm_pas_metadata pas_metadata;
+	struct qcom_scm_pas_metadata dtb_pas_metadata;
 };
 
 static void adsp_minidump(struct rproc *rproc)
@@ -160,6 +172,8 @@ static int adsp_unprepare(struct rproc *rproc)
 	 * here.
 	 */
 	qcom_scm_pas_metadata_release(&adsp->pas_metadata);
+	if (adsp->dtb_pas_id)
+		qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata);
 
 	return 0;
 }
@@ -169,20 +183,40 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw)
 	struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
 	int ret;
 
-	ret = qcom_mdt_pas_init(adsp->dev, fw, rproc->firmware, adsp->pas_id,
-				adsp->mem_phys, &adsp->pas_metadata);
-	if (ret)
-		return ret;
+	/* Store firmware handle to be used in adsp_start() */
+	adsp->firmware = fw;
 
-	ret = qcom_mdt_load_no_init(adsp->dev, fw, rproc->firmware, adsp->pas_id,
-				    adsp->mem_region, adsp->mem_phys, adsp->mem_size,
-				    &adsp->mem_reloc);
-	if (ret)
-		return ret;
+	if (adsp->dtb_pas_id) {
+		ret = request_firmware(&adsp->dtb_firmware, adsp->dtb_firmware_name, adsp->dev);
+		if (ret) {
+			dev_err(adsp->dev, "request_firmware failed for %s: %d\n",
+				adsp->dtb_firmware_name, ret);
+			return ret;
+		}
 
-	qcom_pil_info_store(adsp->info_name, adsp->mem_phys, adsp->mem_size);
+		ret = qcom_mdt_pas_init(adsp->dev, adsp->dtb_firmware, adsp->dtb_firmware_name,
+					adsp->dtb_pas_id, adsp->dtb_mem_phys,
+					&adsp->dtb_pas_metadata);
+		if (ret)
+			goto release_dtb_firmware;
+
+		ret = qcom_mdt_load_no_init(adsp->dev, adsp->dtb_firmware, adsp->dtb_firmware_name,
+					    adsp->dtb_pas_id, adsp->dtb_mem_region,
+					    adsp->dtb_mem_phys, adsp->dtb_mem_size,
+					    &adsp->dtb_mem_reloc);
+		if (ret)
+			goto release_dtb_metadata;
+	}
 
 	return 0;
+
+release_dtb_metadata:
+	qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata);
+
+release_dtb_firmware:
+	release_firmware(adsp->dtb_firmware);
+
+	return ret;
 }
 
 static int adsp_start(struct rproc *rproc)
@@ -218,24 +252,55 @@ static int adsp_start(struct rproc *rproc)
 			goto disable_cx_supply;
 	}
 
+	if (adsp->dtb_pas_id) {
+		ret = qcom_scm_pas_auth_and_reset(adsp->dtb_pas_id);
+		if (ret) {
+			dev_err(adsp->dev,
+				"failed to authenticate dtb image and release reset\n");
+			goto disable_px_supply;
+		}
+	}
+
+	ret = qcom_mdt_pas_init(adsp->dev, adsp->firmware, rproc->firmware, adsp->pas_id,
+				adsp->mem_phys, &adsp->pas_metadata);
+	if (ret)
+		goto disable_px_supply;
+
+	ret = qcom_mdt_load_no_init(adsp->dev, adsp->firmware, rproc->firmware, adsp->pas_id,
+				    adsp->mem_region, adsp->mem_phys, adsp->mem_size,
+				    &adsp->mem_reloc);
+	if (ret)
+		goto release_pas_metadata;
+
+	qcom_pil_info_store(adsp->info_name, adsp->mem_phys, adsp->mem_size);
+
 	ret = qcom_scm_pas_auth_and_reset(adsp->pas_id);
 	if (ret) {
 		dev_err(adsp->dev,
 			"failed to authenticate image and release reset\n");
-		goto disable_px_supply;
+		goto release_pas_metadata;
 	}
 
 	ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
 	if (ret == -ETIMEDOUT) {
 		dev_err(adsp->dev, "start timed out\n");
 		qcom_scm_pas_shutdown(adsp->pas_id);
-		goto disable_px_supply;
+		goto release_pas_metadata;
 	}
 
 	qcom_scm_pas_metadata_release(&adsp->pas_metadata);
+	if (adsp->dtb_pas_id)
+		qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata);
+
+	/* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */
+	adsp->firmware = NULL;
 
 	return 0;
 
+release_pas_metadata:
+	qcom_scm_pas_metadata_release(&adsp->pas_metadata);
+	if (adsp->dtb_pas_id)
+		qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata);
 disable_px_supply:
 	if (adsp->px_supply)
 		regulator_disable(adsp->px_supply);
@@ -251,6 +316,9 @@ static int adsp_start(struct rproc *rproc)
 disable_irqs:
 	qcom_q6v5_unprepare(&adsp->q6v5);
 
+	/* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */
+	adsp->firmware = NULL;
+
 	return ret;
 }
 
@@ -284,6 +352,12 @@ static int adsp_stop(struct rproc *rproc)
 	if (ret)
 		dev_err(adsp->dev, "failed to shutdown: %d\n", ret);
 
+	if (adsp->dtb_pas_id) {
+		ret = qcom_scm_pas_shutdown(adsp->dtb_pas_id);
+		if (ret)
+			dev_err(adsp->dev, "failed to shutdown dtb: %d\n", ret);
+	}
+
 	handover = qcom_q6v5_unprepare(&adsp->q6v5);
 	if (handover)
 		qcom_pas_handover(&adsp->q6v5);
@@ -461,6 +535,28 @@ static int adsp_alloc_memory_region(struct qcom_adsp *adsp)
 		return -EBUSY;
 	}
 
+	if (!adsp->dtb_pas_id)
+		return 0;
+
+	node = of_parse_phandle(adsp->dev->of_node, "memory-region", 1);
+	if (!node) {
+		dev_err(adsp->dev, "no dtb memory-region specified\n");
+		return -EINVAL;
+	}
+
+	ret = of_address_to_resource(node, 0, &r);
+	if (ret)
+		return ret;
+
+	adsp->dtb_mem_phys = adsp->dtb_mem_reloc = r.start;
+	adsp->dtb_mem_size = resource_size(&r);
+	adsp->dtb_mem_region = devm_ioremap_wc(adsp->dev, adsp->dtb_mem_phys, adsp->dtb_mem_size);
+	if (!adsp->dtb_mem_region) {
+		dev_err(adsp->dev, "unable to map dtb memory region: %pa+%zx\n",
+			&r.start, adsp->dtb_mem_size);
+		return -EBUSY;
+	}
+
 	return 0;
 }
 
@@ -469,7 +565,7 @@ static int adsp_probe(struct platform_device *pdev)
 	const struct adsp_data *desc;
 	struct qcom_adsp *adsp;
 	struct rproc *rproc;
-	const char *fw_name;
+	const char *fw_name, *dtb_fw_name = NULL;
 	const struct rproc_ops *ops = &adsp_ops;
 	int ret;
 
@@ -486,6 +582,14 @@ static int adsp_probe(struct platform_device *pdev)
 	if (ret < 0 && ret != -EINVAL)
 		return ret;
 
+	if (desc->dtb_firmware_name) {
+		dtb_fw_name = desc->dtb_firmware_name;
+		ret = of_property_read_string(pdev->dev.of_node, "qcom,dtb-firmware-name",
+					      &dtb_fw_name);
+		if (ret < 0 && ret != -EINVAL)
+			return ret;
+	}
+
 	if (desc->minidump_id)
 		ops = &adsp_minidump_ops;
 
@@ -507,6 +611,10 @@ static int adsp_probe(struct platform_device *pdev)
 	adsp->has_aggre2_clk = desc->has_aggre2_clk;
 	adsp->info_name = desc->sysmon_name;
 	adsp->decrypt_shutdown = desc->decrypt_shutdown;
+	if (dtb_fw_name) {
+		adsp->dtb_firmware_name = dtb_fw_name;
+		adsp->dtb_pas_id = desc->dtb_pas_id;
+	}
 	platform_set_drvdata(pdev, adsp);
 
 	ret = device_init_wakeup(adsp->dev, true);

-- 
b4 0.10.1

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

* [PATCH 4/4] remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data
  2022-11-16 10:20 [PATCH 0/4] remoteproc: qcom_q6v5_pas: add support for SM8550 adsp, cdsp & mpss Neil Armstrong
                   ` (2 preceding siblings ...)
  2022-11-16 10:20 ` [PATCH 3/4] remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading Neil Armstrong
@ 2022-11-16 10:20 ` Neil Armstrong
  3 siblings, 0 replies; 11+ messages in thread
From: Neil Armstrong @ 2022-11-16 10:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Andy Gross,
	Manivannan Sadhasivam, Amol Maheshwari, Srinivas Kandagatla,
	Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc, Neil Armstrong

This adds the compatible & data for the aDSP, cDSP and MPSS found in
the SM8550 SoC.

This platform requires the "Devicetree" firmware to be loaded along the
main firmware.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 65 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index e79a5fcbc986..15e740815da0 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1054,6 +1054,68 @@ static const struct adsp_data sm8450_mpss_resource = {
 	.ssctl_id = 0x12,
 };
 
+static const struct adsp_data sm8550_adsp_resource = {
+	.crash_reason_smem = 423,
+	.firmware_name = "adsp.mdt",
+	.dtb_firmware_name = "adsp_dtb.mdt",
+	.pas_id = 1,
+	.dtb_pas_id = 0x24,
+	.minidump_id = 5,
+	.has_aggre2_clk = false,
+	.auto_boot = false,
+	.proxy_pd_names = (char*[]){
+		"lcx",
+		"lmx",
+		NULL
+	},
+	.load_state = "adsp",
+	.ssr_name = "lpass",
+	.sysmon_name = "adsp",
+	.ssctl_id = 0x14,
+};
+
+static const struct adsp_data sm8550_cdsp_resource = {
+	.crash_reason_smem = 601,
+	.firmware_name = "cdsp.mdt",
+	.dtb_firmware_name = "cdsp_dtb.mdt",
+	.pas_id = 18,
+	.dtb_pas_id = 0x25,
+	.minidump_id = 7,
+	.has_aggre2_clk = false,
+	.auto_boot = false,
+	.proxy_pd_names = (char*[]){
+		"cx",
+		"mxc",
+		"nsp",
+		NULL
+	},
+	.load_state = "cdsp",
+	.ssr_name = "cdsp",
+	.sysmon_name = "cdsp",
+	.ssctl_id = 0x17,
+};
+
+static const struct adsp_data sm8550_mpss_resource = {
+	.crash_reason_smem = 421,
+	.firmware_name = "modem.mdt",
+	.dtb_firmware_name = "modem_dtb.mdt",
+	.pas_id = 4,
+	.dtb_pas_id = 0x26,
+	.minidump_id = 3,
+	.has_aggre2_clk = false,
+	.auto_boot = false,
+	.decrypt_shutdown = true,
+	.proxy_pd_names = (char*[]){
+		"cx",
+		"mss",
+		NULL
+	},
+	.load_state = "modem",
+	.ssr_name = "mpss",
+	.sysmon_name = "modem",
+	.ssctl_id = 0x12,
+};
+
 static const struct of_device_id adsp_of_match[] = {
 	{ .compatible = "qcom,msm8226-adsp-pil", .data = &adsp_resource_init},
 	{ .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
@@ -1094,6 +1156,9 @@ static const struct of_device_id adsp_of_match[] = {
 	{ .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource},
 	{ .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource},
 	{ .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource},
+	{ .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource},
+	{ .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource},
+	{ .compatible = "qcom,sm8550-mpss-pas", .data = &sm8550_mpss_resource},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, adsp_of_match);

-- 
b4 0.10.1

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

* Re: [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible
  2022-11-16 10:20 ` [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible Neil Armstrong
@ 2022-11-16 12:28   ` Krzysztof Kozlowski
  2022-11-16 23:39     ` Rob Herring
  2022-11-17  9:22     ` Neil Armstrong
  0 siblings, 2 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-16 12:28 UTC (permalink / raw)
  To: Neil Armstrong, Krzysztof Kozlowski, Bjorn Andersson,
	Konrad Dybcio, Andy Gross, Manivannan Sadhasivam, Amol Maheshwari,
	Srinivas Kandagatla, Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc

On 16/11/2022 11:20, Neil Armstrong wrote:
> This documents the compatible for the component used to boot the
> aDSP, cDSP and MPSS on the SM8550 SoC.
> 
> The SM8550 boot process on SM8550 now requires a secondary "Devicetree"
> firmware to be passed along the main Firmware, and the cDSP a new power
> domain named "NSP".
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../devicetree/bindings/remoteproc/qcom,adsp.yaml  | 60 +++++++++++++++++++++-
>  1 file changed, 59 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
> index db9e0f0c2bea..678cb73f10de 100644
> --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
> @@ -55,6 +55,9 @@ properties:
>        - qcom,sm8450-cdsp-pas
>        - qcom,sm8450-mpss-pas
>        - qcom,sm8450-slpi-pas
> +      - qcom,sm8550-adsp-pas
> +      - qcom,sm8550-cdsp-pas
> +      - qcom,sm8550-mpss-pas
>  
>    reg:
>      maxItems: 1
> @@ -116,8 +119,13 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/string
>      description: Firmware name for the Hexagon core
>  
> +  qcom,dtb-firmware-name:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Devicetree Firmware name for the Hexagon core

Not sure about this one.

Rob,
Don't we want rather to have multiple items in firmware-name?


> +
>    memory-region:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
>      description: Reference to the reserved-memory for the Hexagon core
>  
>    qcom,qmp:
> @@ -212,6 +220,9 @@ allOf:
>                - qcom,sm8450-cdsp-pas
>                - qcom,sm8450-slpi-pas
>                - qcom,sm8450-mpss-pas
> +              - qcom,sm8550-adsp-pas
> +              - qcom,sm8550-cdsp-pas
> +              - qcom,sm8550-mpss-pas
>      then:
>        properties:
>          clocks:
> @@ -327,6 +338,8 @@ allOf:
>                - qcom,sm8450-adsp-pas
>                - qcom,sm8450-cdsp-pas
>                - qcom,sm8450-slpi-pas
> +              - qcom,sm8550-adsp-pas
> +              - qcom,sm8550-cdsp-pas
>      then:
>        properties:
>          interrupts:
> @@ -347,6 +360,7 @@ allOf:
>                - qcom,sm8150-mpss-pas
>                - qcom,sm8350-mpss-pas
>                - qcom,sm8450-mpss-pas
> +              - qcom,sm8550-mpss-pas
>      then:
>        properties:
>          interrupts:
> @@ -448,6 +462,7 @@ allOf:
>                - qcom,sm8150-mpss-pas
>                - qcom,sm8350-mpss-pas
>                - qcom,sm8450-mpss-pas
> +              - qcom,sm8550-mpss-pas
>      then:
>        properties:
>          power-domains:
> @@ -475,6 +490,7 @@ allOf:
>                - qcom,sm8350-slpi-pas
>                - qcom,sm8450-adsp-pas
>                - qcom,sm8450-slpi-pas
> +              - qcom,sm8550-adsp-pas
>      then:
>        properties:
>          power-domains:
> @@ -504,6 +520,25 @@ allOf:
>              - const: cx
>              - const: mxc
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,sm8550-cdsp-pas
> +    then:
> +      properties:
> +        power-domains:
> +          items:
> +            - description: CX power domain
> +            - description: MXC power domain
> +            - description: NSP power domain
> +        power-domain-names:
> +          items:
> +            - const: cx
> +            - const: mxc
> +            - const: nsp
> +

You also need to update entry for resets. I think it is missing.

>    - if:
>        properties:
>          compatible:
> @@ -573,6 +608,29 @@ allOf:
>        properties:
>          qcom,qmp: false
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,sm8550-adsp-pas
> +              - qcom,sm8550-cdsp-pas
> +              - qcom,sm8550-mpss-pas
> +    then:
> +      properties:
> +        memory-region:
> +          minItems: 2
> +          description:
> +            First entry is a phandle for a reserved memory area that holds
> +            the main Firmware for authentication, and second entry a phandle for a
> +            reserved memory area that holds the Devicetree Firmware for authentication.

Instead of minItems and description:
  items:
    - description: Main Firmware for auth....
    - description: Devicetree Firmware....

> +    else:
> +      properties:
> +        qcom,dtb-firmware-name: false
> +
> +        memory-region:
> +          maxItems: 1
> +

Best regards,
Krzysztof


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

* Re: [PATCH 2/4] dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries
  2022-11-16 10:20 ` [PATCH 2/4] dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries Neil Armstrong
@ 2022-11-16 12:28   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-16 12:28 UTC (permalink / raw)
  To: Neil Armstrong, Krzysztof Kozlowski, Bjorn Andersson,
	Konrad Dybcio, Andy Gross, Manivannan Sadhasivam, Amol Maheshwari,
	Srinivas Kandagatla, Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc

On 16/11/2022 11:20, Neil Armstrong wrote:
> From: Abel Vesa <abel.vesa@linaro.org>
> 
> The fastrpc components on the SM8550 SoC can require up to 3 IOMMU
> entries, this bumps the maxItems to 3 for this purpose.
> 


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

Best regards,
Krzysztof


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

* Re: [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible
  2022-11-16 12:28   ` Krzysztof Kozlowski
@ 2022-11-16 23:39     ` Rob Herring
  2022-11-17  9:02       ` Neil Armstrong
  2022-11-17  9:22     ` Neil Armstrong
  1 sibling, 1 reply; 11+ messages in thread
From: Rob Herring @ 2022-11-16 23:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Neil Armstrong, Krzysztof Kozlowski, Bjorn Andersson,
	Konrad Dybcio, Andy Gross, Manivannan Sadhasivam, Amol Maheshwari,
	Srinivas Kandagatla, Mathieu Poirier, devicetree, Abel Vesa,
	linux-kernel, linux-arm-msm, linux-remoteproc

On Wed, Nov 16, 2022 at 01:28:11PM +0100, Krzysztof Kozlowski wrote:
> On 16/11/2022 11:20, Neil Armstrong wrote:
> > This documents the compatible for the component used to boot the
> > aDSP, cDSP and MPSS on the SM8550 SoC.
> > 
> > The SM8550 boot process on SM8550 now requires a secondary "Devicetree"
> > firmware to be passed along the main Firmware, and the cDSP a new power
> > domain named "NSP".
> > 
> > Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> > ---
> >  .../devicetree/bindings/remoteproc/qcom,adsp.yaml  | 60 +++++++++++++++++++++-
> >  1 file changed, 59 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
> > index db9e0f0c2bea..678cb73f10de 100644
> > --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
> > +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
> > @@ -55,6 +55,9 @@ properties:
> >        - qcom,sm8450-cdsp-pas
> >        - qcom,sm8450-mpss-pas
> >        - qcom,sm8450-slpi-pas
> > +      - qcom,sm8550-adsp-pas
> > +      - qcom,sm8550-cdsp-pas
> > +      - qcom,sm8550-mpss-pas
> >  
> >    reg:
> >      maxItems: 1
> > @@ -116,8 +119,13 @@ properties:
> >      $ref: /schemas/types.yaml#/definitions/string
> >      description: Firmware name for the Hexagon core
> >  
> > +  qcom,dtb-firmware-name:
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    description: Devicetree Firmware name for the Hexagon core
> 
> Not sure about this one.
> 
> Rob,
> Don't we want rather to have multiple items in firmware-name?

Yes, I think we already have that for some users. Should have been 
'firmware-names' I guess but I don't think it's worth dealing with 
another case of handling both (forever).

Rob

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

* Re: [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible
  2022-11-16 23:39     ` Rob Herring
@ 2022-11-17  9:02       ` Neil Armstrong
  0 siblings, 0 replies; 11+ messages in thread
From: Neil Armstrong @ 2022-11-17  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Andy Gross,
	Manivannan Sadhasivam, Amol Maheshwari, Srinivas Kandagatla,
	Mathieu Poirier, devicetree, Abel Vesa, linux-kernel,
	linux-arm-msm, linux-remoteproc

On 17/11/2022 00:39, Rob Herring wrote:
> On Wed, Nov 16, 2022 at 01:28:11PM +0100, Krzysztof Kozlowski wrote:
>> On 16/11/2022 11:20, Neil Armstrong wrote:
>>> This documents the compatible for the component used to boot the
>>> aDSP, cDSP and MPSS on the SM8550 SoC.
>>>
>>> The SM8550 boot process on SM8550 now requires a secondary "Devicetree"
>>> firmware to be passed along the main Firmware, and the cDSP a new power
>>> domain named "NSP".
>>>
>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>> ---
>>>   .../devicetree/bindings/remoteproc/qcom,adsp.yaml  | 60 +++++++++++++++++++++-
>>>   1 file changed, 59 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
>>> index db9e0f0c2bea..678cb73f10de 100644
>>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
>>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
>>> @@ -55,6 +55,9 @@ properties:
>>>         - qcom,sm8450-cdsp-pas
>>>         - qcom,sm8450-mpss-pas
>>>         - qcom,sm8450-slpi-pas
>>> +      - qcom,sm8550-adsp-pas
>>> +      - qcom,sm8550-cdsp-pas
>>> +      - qcom,sm8550-mpss-pas
>>>   
>>>     reg:
>>>       maxItems: 1
>>> @@ -116,8 +119,13 @@ properties:
>>>       $ref: /schemas/types.yaml#/definitions/string
>>>       description: Firmware name for the Hexagon core
>>>   
>>> +  qcom,dtb-firmware-name:
>>> +    $ref: /schemas/types.yaml#/definitions/string
>>> +    description: Devicetree Firmware name for the Hexagon core
>>
>> Not sure about this one.
>>
>> Rob,
>> Don't we want rather to have multiple items in firmware-name?
> 
> Yes, I think we already have that for some users. Should have been
> 'firmware-names' I guess but I don't think it's worth dealing with
> another case of handling both (forever).

I'll be happy to switch to a single property but yeah, firmware-name isn't right
for multiple names...

Anyway, will follow qcom,sc7180-mss-pil.yaml since they already use 2 entries there.

Neil

> 
> Rob


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

* Re: [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible
  2022-11-16 12:28   ` Krzysztof Kozlowski
  2022-11-16 23:39     ` Rob Herring
@ 2022-11-17  9:22     ` Neil Armstrong
  2022-11-17  9:32       ` Krzysztof Kozlowski
  1 sibling, 1 reply; 11+ messages in thread
From: Neil Armstrong @ 2022-11-17  9:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Krzysztof Kozlowski, Bjorn Andersson,
	Konrad Dybcio, Andy Gross, Manivannan Sadhasivam, Amol Maheshwari,
	Srinivas Kandagatla, Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc

On 16/11/2022 13:28, Krzysztof Kozlowski wrote:
> On 16/11/2022 11:20, Neil Armstrong wrote:
>> This documents the compatible for the component used to boot the
>> aDSP, cDSP and MPSS on the SM8550 SoC.
>>
>> The SM8550 boot process on SM8550 now requires a secondary "Devicetree"
>> firmware to be passed along the main Firmware, and the cDSP a new power
>> domain named "NSP".
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>   .../devicetree/bindings/remoteproc/qcom,adsp.yaml  | 60 +++++++++++++++++++++-
>>   1 file changed, 59 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
>> index db9e0f0c2bea..678cb73f10de 100644
>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
>> @@ -55,6 +55,9 @@ properties:
>>         - qcom,sm8450-cdsp-pas
>>         - qcom,sm8450-mpss-pas
>>         - qcom,sm8450-slpi-pas
>> +      - qcom,sm8550-adsp-pas
>> +      - qcom,sm8550-cdsp-pas
>> +      - qcom,sm8550-mpss-pas
>>   
>>     reg:
>>       maxItems: 1
>> @@ -116,8 +119,13 @@ properties:
>>       $ref: /schemas/types.yaml#/definitions/string
>>       description: Firmware name for the Hexagon core
>>   
>> +  qcom,dtb-firmware-name:
>> +    $ref: /schemas/types.yaml#/definitions/string
>> +    description: Devicetree Firmware name for the Hexagon core
> 
> Not sure about this one.
> 
> Rob,
> Don't we want rather to have multiple items in firmware-name?
> 
> 
>> +
>>     memory-region:
>> -    maxItems: 1
>> +    minItems: 1
>> +    maxItems: 2
>>       description: Reference to the reserved-memory for the Hexagon core
>>   
>>     qcom,qmp:
>> @@ -212,6 +220,9 @@ allOf:
>>                 - qcom,sm8450-cdsp-pas
>>                 - qcom,sm8450-slpi-pas
>>                 - qcom,sm8450-mpss-pas
>> +              - qcom,sm8550-adsp-pas
>> +              - qcom,sm8550-cdsp-pas
>> +              - qcom,sm8550-mpss-pas
>>       then:
>>         properties:
>>           clocks:
>> @@ -327,6 +338,8 @@ allOf:
>>                 - qcom,sm8450-adsp-pas
>>                 - qcom,sm8450-cdsp-pas
>>                 - qcom,sm8450-slpi-pas
>> +              - qcom,sm8550-adsp-pas
>> +              - qcom,sm8550-cdsp-pas
>>       then:
>>         properties:
>>           interrupts:
>> @@ -347,6 +360,7 @@ allOf:
>>                 - qcom,sm8150-mpss-pas
>>                 - qcom,sm8350-mpss-pas
>>                 - qcom,sm8450-mpss-pas
>> +              - qcom,sm8550-mpss-pas
>>       then:
>>         properties:
>>           interrupts:
>> @@ -448,6 +462,7 @@ allOf:
>>                 - qcom,sm8150-mpss-pas
>>                 - qcom,sm8350-mpss-pas
>>                 - qcom,sm8450-mpss-pas
>> +              - qcom,sm8550-mpss-pas
>>       then:
>>         properties:
>>           power-domains:
>> @@ -475,6 +490,7 @@ allOf:
>>                 - qcom,sm8350-slpi-pas
>>                 - qcom,sm8450-adsp-pas
>>                 - qcom,sm8450-slpi-pas
>> +              - qcom,sm8550-adsp-pas
>>       then:
>>         properties:
>>           power-domains:
>> @@ -504,6 +520,25 @@ allOf:
>>               - const: cx
>>               - const: mxc
>>   
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - qcom,sm8550-cdsp-pas
>> +    then:
>> +      properties:
>> +        power-domains:
>> +          items:
>> +            - description: CX power domain
>> +            - description: MXC power domain
>> +            - description: NSP power domain
>> +        power-domain-names:
>> +          items:
>> +            - const: cx
>> +            - const: mxc
>> +            - const: nsp
>> +
> 
> You also need to update entry for resets. I think it is missing.

Hmm no, no resets needed for sm8550.

> 
>>     - if:
>>         properties:
>>           compatible:
>> @@ -573,6 +608,29 @@ allOf:
>>         properties:
>>           qcom,qmp: false
>>   
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - qcom,sm8550-adsp-pas
>> +              - qcom,sm8550-cdsp-pas
>> +              - qcom,sm8550-mpss-pas
>> +    then:
>> +      properties:
>> +        memory-region:
>> +          minItems: 2
>> +          description:
>> +            First entry is a phandle for a reserved memory area that holds
>> +            the main Firmware for authentication, and second entry a phandle for a
>> +            reserved memory area that holds the Devicetree Firmware for authentication.
> 
> Instead of minItems and description:
>    items:
>      - description: Main Firmware for auth....
>      - description: Devicetree Firmware....

Ack

> 
>> +    else:
>> +      properties:
>> +        qcom,dtb-firmware-name: false
>> +
>> +        memory-region:
>> +          maxItems: 1
>> +

I'll rebase on top of 20221116155416.164239-1-krzysztof.kozlowski@linaro.org.

Seems I should perhaps add a separate qcom,sm8550-pas.yaml right, or adding the qcom,sm6350-pas.yam would be ok ?

> 
> Best regards,
> Krzysztof
> 

Thanks,
Neil


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

* Re: [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible
  2022-11-17  9:22     ` Neil Armstrong
@ 2022-11-17  9:32       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-17  9:32 UTC (permalink / raw)
  To: neil.armstrong, Krzysztof Kozlowski, Bjorn Andersson,
	Konrad Dybcio, Andy Gross, Manivannan Sadhasivam, Amol Maheshwari,
	Srinivas Kandagatla, Rob Herring, Mathieu Poirier
  Cc: devicetree, Abel Vesa, linux-kernel, linux-arm-msm,
	linux-remoteproc

On 17/11/2022 10:22, Neil Armstrong wrote:
>>>   
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            enum:
>>> +              - qcom,sm8550-cdsp-pas
>>> +    then:
>>> +      properties:
>>> +        power-domains:
>>> +          items:
>>> +            - description: CX power domain
>>> +            - description: MXC power domain
>>> +            - description: NSP power domain
>>> +        power-domain-names:
>>> +          items:
>>> +            - const: cx
>>> +            - const: mxc
>>> +            - const: nsp
>>> +
>>
>> You also need to update entry for resets. I think it is missing.
> 
> Hmm no, no resets needed for sm8550.

Indeed, only few variants update resets. I'll fix them in my cleanup
series. The series conflict with this one here.

https://lore.kernel.org/linux-arm-msm/20221116155416.164239-1-krzysztof.kozlowski@linaro.org/T/#t

> 
>>
>>>     - if:
>>>         properties:
>>>           compatible:
>>> @@ -573,6 +608,29 @@ allOf:
>>>         properties:
>>>           qcom,qmp: false
>>>   
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            enum:
>>> +              - qcom,sm8550-adsp-pas
>>> +              - qcom,sm8550-cdsp-pas
>>> +              - qcom,sm8550-mpss-pas
>>> +    then:
>>> +      properties:
>>> +        memory-region:
>>> +          minItems: 2
>>> +          description:
>>> +            First entry is a phandle for a reserved memory area that holds
>>> +            the main Firmware for authentication, and second entry a phandle for a
>>> +            reserved memory area that holds the Devicetree Firmware for authentication.
>>
>> Instead of minItems and description:
>>    items:
>>      - description: Main Firmware for auth....
>>      - description: Devicetree Firmware....
> 
> Ack
> 
>>
>>> +    else:
>>> +      properties:
>>> +        qcom,dtb-firmware-name: false
>>> +
>>> +        memory-region:
>>> +          maxItems: 1
>>> +
> 
> I'll rebase on top of 20221116155416.164239-1-krzysztof.kozlowski@linaro.org.
> 
> Seems I should perhaps add a separate qcom,sm8550-pas.yaml right, or adding the qcom,sm6350-pas.yam would be ok ?

The clocks and interrupts match qcom,sm8350-pas.yaml, but power domains
and memory region does not, so you need separate qcom,sm8550-pas.yaml file.

Best regards,
Krzysztof


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

end of thread, other threads:[~2022-11-17  9:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16 10:20 [PATCH 0/4] remoteproc: qcom_q6v5_pas: add support for SM8550 adsp, cdsp & mpss Neil Armstrong
2022-11-16 10:20 ` [PATCH 1/4] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible Neil Armstrong
2022-11-16 12:28   ` Krzysztof Kozlowski
2022-11-16 23:39     ` Rob Herring
2022-11-17  9:02       ` Neil Armstrong
2022-11-17  9:22     ` Neil Armstrong
2022-11-17  9:32       ` Krzysztof Kozlowski
2022-11-16 10:20 ` [PATCH 2/4] dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries Neil Armstrong
2022-11-16 12:28   ` Krzysztof Kozlowski
2022-11-16 10:20 ` [PATCH 3/4] remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading Neil Armstrong
2022-11-16 10:20 ` [PATCH 4/4] remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox