2022-05-03 00:04:14

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v2 0/2] 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(-)

--
2.36.0


2022-05-03 00:15:17

by Nícolas F. R. A. Prado

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

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

Signed-off-by: Nícolas F. R. A. Prado <[email protected]>

---
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(+)

diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
index ec9ddeb6ca2c..c6a92ac8db18 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
@@ -51,6 +51,9 @@ properties:
interrupts:
maxItems: 1

+ memory-region:
+ maxItems: 1
+
required:
- compatible
- reg
--
2.36.0

2022-05-03 00:19:25

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [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.

Signed-off-by: Nícolas F. R. A. Prado <[email protected]>

---

(no changes since v1)

.../devicetree/bindings/remoteproc/mtk,scp.yaml | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
index 823a236242de..ec9ddeb6ca2c 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
@@ -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:
--
2.36.0

Subject: 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:
> On Mon, 02 May 2022 15:24:20 -0400, Nícolas F. R. A. Prado wrote:
>> The SCP co-processor can optionally be passed a reserved memory region
>> to use. Add this property in the dt-binding.
>>
>> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
>>
>> ---
>> 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(+)
>>
>
> Acked-by: Rob Herring <[email protected]>


Reviewed-by: AngeloGioacchino Del Regno <[email protected]>

2022-05-03 16:59:50

by Krzysztof Kozlowski

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

On 02/05/2022 21:24, Nícolas F. R. A. Prado wrote:
> 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.

>
> Also add the missing minItems to the reg property and update the
> description.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
>
> ---
>
> (no changes since v1)
>
> .../devicetree/bindings/remoteproc/mtk,scp.yaml | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> index 823a236242de..ec9ddeb6ca2c 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> @@ -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

Nope.

>
> clocks:
> description:


Best regards,
Krzysztof

2022-05-04 02:04:02

by Rob Herring (Arm)

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

On Mon, 02 May 2022 15:24:20 -0400, N?colas F. R. A. Prado wrote:
> The SCP co-processor can optionally be passed a reserved memory region
> to use. Add this property in the dt-binding.
>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>
>
> ---
> 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(+)
>

Acked-by: Rob Herring <[email protected]>