[PATCH 13/38] dt-bindings: remoteproc: mediatek: Remove l1tcm MMIO from MT8188 dual

AngeloGioacchino Del Regno posted 38 patches 1 month, 2 weeks ago
[PATCH 13/38] dt-bindings: remoteproc: mediatek: Remove l1tcm MMIO from MT8188 dual
Posted by AngeloGioacchino Del Regno 1 month, 2 weeks ago
Even though the MT8188 SoC's Dual-Core SCP IP is practically the
same as the one found on MT8195, it doesn't have a dedicated L1
TCM and relies only on SRAM.

Set reg/reg-names minItems to 1 globally and override it in all of
the conditionals for the SoCs that require more, and then split
the mt8195/8188 conditionals to allow specifying only the cfg MMIO
on MT8188.

Fixes: 91e0d560b9fd ("dt-bindings: remoteproc: mediatek: Support MT8188 dual-core SCP")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../bindings/remoteproc/mtk,scp.yaml          | 23 ++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
index adc6b3f36fde..6818a6052be0 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
@@ -28,11 +28,11 @@ properties:
     description:
       Should contain the address ranges for memory regions SRAM, CFG, and,
       on some platforms, L1TCM.
-    minItems: 2
+    minItems: 1
     maxItems: 3
 
   reg-names:
-    minItems: 2
+    minItems: 1
     maxItems: 3
 
   clocks:
@@ -171,8 +171,10 @@ allOf:
     then:
       properties:
         reg:
+          minItems: 2
           maxItems: 2
         reg-names:
+          minItems: 2
           items:
             - const: sram
             - const: cfg
@@ -185,8 +187,10 @@ allOf:
     then:
       properties:
         reg:
+          minItems: 2
           maxItems: 3
         reg-names:
+          minItems: 2
           items:
             - const: sram
             - const: cfg
@@ -196,12 +200,25 @@ allOf:
         compatible:
           enum:
             - mediatek,mt8188-scp-dual
+    then:
+      properties:
+        reg:
+          minItems: 1
+        reg-names:
+          minItems: 1
+          items:
+            - const: cfg
+  - if:
+      properties:
+        compatible:
+          enum:
             - mediatek,mt8195-scp-dual
     then:
       properties:
         reg:
-          maxItems: 2
+          minItems: 2
         reg-names:
+          minItems: 2
           items:
             - const: cfg
             - const: l1tcm
-- 
2.50.1
Re: [PATCH 13/38] dt-bindings: remoteproc: mediatek: Remove l1tcm MMIO from MT8188 dual
Posted by Rob Herring (Arm) 1 month, 2 weeks ago
On Thu, 24 Jul 2025 10:38:49 +0200, AngeloGioacchino Del Regno wrote:
> Even though the MT8188 SoC's Dual-Core SCP IP is practically the
> same as the one found on MT8195, it doesn't have a dedicated L1
> TCM and relies only on SRAM.
> 
> Set reg/reg-names minItems to 1 globally and override it in all of
> the conditionals for the SoCs that require more, and then split
> the mt8195/8188 conditionals to allow specifying only the cfg MMIO
> on MT8188.
> 
> Fixes: 91e0d560b9fd ("dt-bindings: remoteproc: mediatek: Support MT8188 dual-core SCP")
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
>  .../bindings/remoteproc/mtk,scp.yaml          | 23 ++++++++++++++++---
>  1 file changed, 20 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml: allOf:1:then:properties:reg-names: 'oneOf' conditional failed, one must be fixed:
	[{'const': 'sram'}, {'const': 'cfg'}] is too long
	[{'const': 'sram'}, {'const': 'cfg'}] is too short
	False schema does not allow 2
	1 was expected
	hint: "minItems" is only needed if less than the "items" list length
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml: allOf:3:then:properties:reg-names: 'oneOf' conditional failed, one must be fixed:
	[{'const': 'cfg'}] is too short
	False schema does not allow 1
	hint: "minItems" is only needed if less than the "items" list length
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml: allOf:4:then:properties:reg-names: 'oneOf' conditional failed, one must be fixed:
	[{'const': 'cfg'}, {'const': 'l1tcm'}] is too long
	[{'const': 'cfg'}, {'const': 'l1tcm'}] is too short
	False schema does not allow 2
	1 was expected
	hint: "minItems" is only needed if less than the "items" list length
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250724083914.61351-14-angelogioacchino.delregno@collabora.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.