Skip to contentSkip to conversation

Mediatek SCP dt-binding tweaks

PATCH Superseded Nícolas F. R. A. Prado 4 participants 6 messages May 2, 2022 – May 3, 2022

Subsystems (3)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover Mediatek SCP dt-binding tweaks

Two simple patches for the Mediatek SCP dt-binding. The first fixes the reg/reg-names property while the second adds a new optional memory-region property.

v1: https://lore.kernel.org/all/[email protected]

Changes in v2:
- Dropped type and description from memory-region since it's a well-known property
- Set memory-region maxItems to 1

Nícolas F. R. A. Prado (2):
dt-bindings: remoteproc: mediatek: Fix optional reg-names for mtk,scp
dt-bindings: remoteproc: mediatek: Add optional memory-region to
mtk,scp

 .../devicetree/bindings/remoteproc/mtk,scp.yaml   | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
2.36.0
#1 lore raw

PATCH v2 1/2 dt-bindings: remoteproc: mediatek: Fix optional reg-names for mtk,scp

The SCP has three memory regions: sram, l1tcm and cfg. Only sram is required, the other two are optional. Fix the dt-binding so that the optional regions can be omitted and passed in any order.

Also add the missing minItems to the reg property and update the description.

---

(no changes since v1)

 .../devicetree/bindings/remoteproc/mtk,scp.yaml      | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml +9 -3
index 823a236242de..ec9ddeb6ca2c 100644
@@ -24,14 +24,20 @@ properties:
   reg:
     description:
       Should contain the address ranges for memory regions SRAM, CFG, and
-      L1TCM.
+      L1TCM. Only SRAM is required, while CFG and L1TCM are optional.
+    minItems: 1
     maxItems: 3
 
   reg-names:
+    minItems: 1
     items:
       - const: sram
-      - const: cfg
-      - const: l1tcm
+      - enum:
+          - l1tcm
+          - cfg
+      - enum:
+          - l1tcm
+          - cfg
 
   clocks:
     description:
Signature · 1 line
2.36.0
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: remoteproc: mediatek: Fix optional reg-names for mtk,scp

Quoted 3 lines · Nícolas F. R. A. Prado

The SCP has three memory regions: sram, l1tcm and cfg. Only sram is required, the other two are optional. Fix the dt-binding so that the optional regions can be omitted and passed in any order.

I commented for v1 - order is strict, so no for this change.

Quoted 28 lines

Also add the missing minItems to the reg property and update the description.

---

(no changes since v1)

 .../devicetree/bindings/remoteproc/mtk,scp.yaml      | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml +3 -1
index 823a236242de..ec9ddeb6ca2c 100644
@@ -24,14 +24,20 @@ properties:
   reg:
     description:
       Should contain the address ranges for memory regions SRAM, CFG, and
-      L1TCM.
+      L1TCM. Only SRAM is required, while CFG and L1TCM are optional.
+    minItems: 1
     maxItems: 3
 
   reg-names:
+    minItems: 1

Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml properties: · line 40

Quoted 10 lines
Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml +6 -2
     items:
       - const: sram
-      - const: cfg
-      - const: l1tcm
+      - enum:
+          - l1tcm
+          - cfg
+      - enum:
+          - l1tcm
+          - cfg

Nope.

Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml properties: · line 43

Quoted 3 lines
Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml +0 -0
   clocks:
     description:

Best regards,
Krzysztof

#3 lore raw

PATCH v2 2/2 dt-bindings: remoteproc: mediatek: Add optional memory-region to mtk,scp

In reply to Nícolas F. R. A. Prado

The SCP co-processor can optionally be passed a reserved memory region to use. Add this property in the dt-binding.

---
I left out Angelo's R-b since of the 3 lines in the patch from v1, only 1 is left.

Changes in v2:
- Dropped type and description since it's a well-known property
- Set maxItems to 1

 Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml +3 -0
index ec9ddeb6ca2c..c6a92ac8db18 100644
@@ -51,6 +51,9 @@ properties:
   interrupts:
     maxItems: 1
 
+  memory-region:
+    maxItems: 1
+
 required:
   - compatible
   - reg
Signature · 1 line
2.36.0
maintainer Acked-by on v2 2/2
#4 lore raw

Re: [PATCH v2 2/2] dt-bindings: remoteproc: mediatek: Add optional memory-region to mtk,scp

Quoted 9 lines · Nícolas F. R. A. Prado

The SCP co-processor can optionally be passed a reserved memory region to use. Add this property in the dt-binding.

---
I left out Angelo's R-b since of the 3 lines in the patch from v1, only 1 is left.

Quoted 7 lines

Changes in v2:
- Dropped type and description since it's a well-known property
- Set maxItems to 1

 Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 3 +++
 1 file changed, 3 insertions(+)
maintainer Reviewed-by
#5 lore raw

Re: [PATCH v2 2/2] dt-bindings: remoteproc: mediatek: Add optional memory-region to mtk,scp

Il 03/05/22 16:16, Rob Herring ha scritto:

Quoted 14 lines · Nícolas F. R. A. Prado
Quoted 13 lines

The SCP co-processor can optionally be passed a reserved memory region to use. Add this property in the dt-binding.

---
I left out Angelo's R-b since of the 3 lines in the patch from v1, only 1 is left.

Changes in v2:
- Dropped type and description since it's a well-known property
- Set maxItems to 1

Quoted 5 lines
Quoted 3 lines
  Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 3 +++
  1 file changed, 3 insertions(+)