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

Nícolas F. R. A. Prado nfraprado at collabora.com
Tue May 3 10:58:46 PDT 2022


On Tue, May 03, 2022 at 02:19:39PM +0200, Krzysztof Kozlowski wrote:
> On 29/04/2022 23:11, 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.
> 
> No, cannot be 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 <nfraprado at collabora.com>
> > 
> > ---
> > 
> >  .../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
> 
> This allows them in any combination which is not what we want. If both
> are optional and both can appear, then last should be a const:l1tcm.

Hi Krzysztof,

yes, that's the case. I'll update it in v3 then.

Thanks,
Nícolas

> 
> Best regards,
> Krzysztof



More information about the Linux-mediatek mailing list