diff mbox series

[v3,1/2] dt-bindings: remoteproc: mediatek: Make l1tcm reg optional for mtk,scp

Message ID 20220503211114.2656099-2-nfraprado@collabora.com (mailing list archive)
State Superseded
Headers show
Series Mediatek SCP dt-binding tweaks | expand

Commit Message

Nícolas F. R. A. Prado May 3, 2022, 9:11 p.m. UTC
The SCP has three memory regions: sram, cfg and l1tcm. While the first
two are required, l1tcm is optional. Fix the dt-binding so that it can
be omitted and update the description. This gets rid of dtbs_check
warnings for devicetrees where the l1tcm reg is missing like mt8183.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

Changes in v3:
- Made the cfg reg required again. After looking again into the mtk-scp
  driver, only l1tcm is optional.
- Added mention that a dtbs_check warning gets fixed by patch in commit
  message.

 Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

AngeloGioacchino Del Regno May 4, 2022, 8:21 a.m. UTC | #1
Il 03/05/22 23:11, Nícolas F. R. A. Prado ha scritto:
> The SCP has three memory regions: sram, cfg and l1tcm. While the first
> two are required, l1tcm is optional. Fix the dt-binding so that it can
> be omitted and update the description. This gets rid of dtbs_check
> warnings for devicetrees where the l1tcm reg is missing like mt8183.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> 
> ---
> 
> Changes in v3:
> - Made the cfg reg required again. After looking again into the mtk-scp
>    driver, only l1tcm is optional.
> - Added mention that a dtbs_check warning gets fixed by patch in commit
>    message.
> 
>   Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> index 823a236242de..eeea84379a1e 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> @@ -23,11 +23,13 @@ properties:
>   
>     reg:
>       description:
> -      Should contain the address ranges for memory regions SRAM, CFG, and
> -      L1TCM.
> +      Should contain the address ranges for memory regions SRAM, CFG, and,
> +      optionally, L1TCM.
> +    minItems: 2
>       maxItems: 3
>   
>     reg-names:
> +    minItems: 2
>       items:
>         - const: sram
>         - const: cfg
Krzysztof Kozlowski May 5, 2022, 9:13 a.m. UTC | #2
On 03/05/2022 23:11, Nícolas F. R. A. Prado wrote:
> The SCP has three memory regions: sram, cfg and l1tcm. While the first
> two are required, l1tcm is optional. Fix the dt-binding so that it can
> be omitted and update the description. This gets rid of dtbs_check
> warnings for devicetrees where the l1tcm reg is missing like mt8183.

Please add "if:then:" for this case (need to put all ifs in allOf). I
understand that l1tcm is optional *only* on mt8183.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
index 823a236242de..eeea84379a1e 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
@@ -23,11 +23,13 @@  properties:
 
   reg:
     description:
-      Should contain the address ranges for memory regions SRAM, CFG, and
-      L1TCM.
+      Should contain the address ranges for memory regions SRAM, CFG, and,
+      optionally, L1TCM.
+    minItems: 2
     maxItems: 3
 
   reg-names:
+    minItems: 2
     items:
       - const: sram
       - const: cfg