diff mbox series

[v3,1/3] media: dt-bindings: media: mediatek: vcodec: Fix clock num not correctly

Message ID 20221201121525.30777-1-yunfei.dong@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/3] media: dt-bindings: media: mediatek: vcodec: Fix clock num not correctly | expand

Commit Message

Yunfei Dong Dec. 1, 2022, 12:15 p.m. UTC
From: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com>

mt8195 and mt8192 have different clock numbers, can't write 'clocks' and
'clock-names' with const value.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
Reference series:
[1]: v5 of this series is presend by Allen-KH Cheng.
     message-id: 20221128143832.25584-4-allen-kh.cheng@mediatek.com
---
 .../bindings/media/mediatek,vcodec-subdev-decoder.yaml   | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Rob Herring (Arm) Dec. 1, 2022, 11:57 p.m. UTC | #1
On Thu, Dec 01, 2022 at 08:15:22PM +0800, Yunfei Dong wrote:
> From: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com>
> 
> mt8195 and mt8192 have different clock numbers, can't write 'clocks' and
> 'clock-names' with const value.
> 
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> ---
> Reference series:
> [1]: v5 of this series is presend by Allen-KH Cheng.
>      message-id: 20221128143832.25584-4-allen-kh.cheng@mediatek.com
> ---
>  .../bindings/media/mediatek,vcodec-subdev-decoder.yaml   | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
> index 7c5b4a91c59b..09781ef02193 100644
> --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
> +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
> @@ -110,15 +110,12 @@ patternProperties:
>            Refer to bindings/iommu/mediatek,iommu.yaml.
>  
>        clocks:
> +        minItems: 1
>          maxItems: 5
>  
>        clock-names:
> -        items:
> -          - const: sel
> -          - const: soc-vdec
> -          - const: soc-lat
> -          - const: vdec
> -          - const: top
> +        minItems: 1
> +        maxItems: 5

Names need to be defined. This is a step backwards.

Rob

>  
>        assigned-clocks:
>          maxItems: 1
> -- 
> 2.18.0
> 
>
AngeloGioacchino Del Regno Dec. 2, 2022, 11:37 a.m. UTC | #2
Il 02/12/22 00:57, Rob Herring ha scritto:
> On Thu, Dec 01, 2022 at 08:15:22PM +0800, Yunfei Dong wrote:
>> From: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com>
>>
>> mt8195 and mt8192 have different clock numbers, can't write 'clocks' and
>> 'clock-names' with const value.
>>
>> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
>> ---
>> Reference series:
>> [1]: v5 of this series is presend by Allen-KH Cheng.
>>       message-id: 20221128143832.25584-4-allen-kh.cheng@mediatek.com
>> ---
>>   .../bindings/media/mediatek,vcodec-subdev-decoder.yaml   | 9 +++------
>>   1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
>> index 7c5b4a91c59b..09781ef02193 100644
>> --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
>> +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
>> @@ -110,15 +110,12 @@ patternProperties:
>>             Refer to bindings/iommu/mediatek,iommu.yaml.
>>   
>>         clocks:
>> +        minItems: 1
>>           maxItems: 5
>>   
>>         clock-names:
>> -        items:
>> -          - const: sel
>> -          - const: soc-vdec
>> -          - const: soc-lat
>> -          - const: vdec
>> -          - const: top
>> +        minItems: 1
>> +        maxItems: 5
> 
> Names need to be defined. This is a step backwards.
> 

I was thinking the same but wanted to wait for someone else's opinion before.

Yunfei, this would be...

- if:
     properties:
       compatible:
         .... mt8192
   then:
      clock-names:
         .... whatever we have

- if:
    properties... blah mt8195
   then:
     clock-names:
         ..... new ones

...you should know already, but I'm just trying to speed up things here.

Cheers,
Angelo

> Rob
> 
>>   
>>         assigned-clocks:
>>           maxItems: 1
>> -- 
>> 2.18.0
>>
>>
Yunfei Dong Dec. 3, 2022, 3:02 a.m. UTC | #3
Hi Angelo,

Thanks for your suggestion.

I already sent patch v4 before your suggestion. Looks the solution is
the same.

Could you please help to review patch v4 again when you are free?

Thanks.

Best Regards,
Yunfei Dong

On Fri, 2022-12-02 at 12:37 +0100, AngeloGioacchino Del Regno wrote:
> Il 02/12/22 00:57, Rob Herring ha scritto:
> > On Thu, Dec 01, 2022 at 08:15:22PM +0800, Yunfei Dong wrote:
> > > From: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com>
> > > 
> > > mt8195 and mt8192 have different clock numbers, can't write
> > > 'clocks' and
> > > 'clock-names' with const value.
> > > 
> > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> > > ---
> > > Reference series:
> > > [1]: v5 of this series is presend by Allen-KH Cheng.
> > >       message-id: 
> > > 20221128143832.25584-4-allen-kh.cheng@mediatek.com
> > > ---
> > >   .../bindings/media/mediatek,vcodec-subdev-decoder.yaml   | 9
> > > +++------
> > >   1 file changed, 3 insertions(+), 6 deletions(-)
> > > 
> > > diff --git
> > > a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-
> > > decoder.yaml
> > > b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-
> > > decoder.yaml
> > > index 7c5b4a91c59b..09781ef02193 100644
> > > --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > > subdev-decoder.yaml
> > > +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > > subdev-decoder.yaml
> > > @@ -110,15 +110,12 @@ patternProperties:
> > >             Refer to bindings/iommu/mediatek,iommu.yaml.
> > >   
> > >         clocks:
> > > +        minItems: 1
> > >           maxItems: 5
> > >   
> > >         clock-names:
> > > -        items:
> > > -          - const: sel
> > > -          - const: soc-vdec
> > > -          - const: soc-lat
> > > -          - const: vdec
> > > -          - const: top
> > > +        minItems: 1
> > > +        maxItems: 5
> > 
> > Names need to be defined. This is a step backwards.
> > 
> 
> I was thinking the same but wanted to wait for someone else's opinion
> before.
> 
> Yunfei, this would be...
> 
> - if:
>      properties:
>        compatible:
>          .... mt8192
>    then:
>       clock-names:
>          .... whatever we have
> 
> - if:
>     properties... blah mt8195
>    then:
>      clock-names:
>          ..... new ones
> 
> ...you should know already, but I'm just trying to speed up things
> here.
> 
> Cheers,
> Angelo
> 
> > Rob
> > 
> > >   
> > >         assigned-clocks:
> > >           maxItems: 1
> > > -- 
> > > 2.18.0
> > > 
> > > 
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
index 7c5b4a91c59b..09781ef02193 100644
--- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
@@ -110,15 +110,12 @@  patternProperties:
           Refer to bindings/iommu/mediatek,iommu.yaml.
 
       clocks:
+        minItems: 1
         maxItems: 5
 
       clock-names:
-        items:
-          - const: sel
-          - const: soc-vdec
-          - const: soc-lat
-          - const: vdec
-          - const: top
+        minItems: 1
+        maxItems: 5
 
       assigned-clocks:
         maxItems: 1