diff mbox series

dt-bindings: media: mtk-vcodec: Adds encoder power domain property

Message ID 20220420073440.31649-1-irui.wang@mediatek.com (mailing list archive)
State New, archived
Headers show
Series dt-bindings: media: mtk-vcodec: Adds encoder power domain property | expand

Commit Message

Irui Wang April 20, 2022, 7:34 a.m. UTC
Adds encoder power domain property

Signed-off-by: Irui Wang <irui.wang@mediatek.com>
---
 .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rob Herring (Arm) April 20, 2022, 1:29 p.m. UTC | #1
On Wed, 20 Apr 2022 15:34:39 +0800, Irui Wang wrote:
> Adds encoder power domain property
> 
> Signed-off-by: Irui Wang <irui.wang@mediatek.com>
> ---
>  .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


vcodec@18002000: 'mediatek,larb' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
	arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

vcodec@18002000: 'power-domains' is a required property
	arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
	arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

vcodec@19002000: 'mediatek,larb' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
	arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

vcodec@19002000: 'power-domains' is a required property
	arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
	arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
	arch/arm64/boot/dts/mediatek/mt8173-evb.dtb
Rob Herring (Arm) April 26, 2022, 8:37 p.m. UTC | #2
On Wed, Apr 20, 2022 at 03:34:39PM +0800, Irui Wang wrote:
> Adds encoder power domain property

Why? You can't add new, required properties as that breaks compatibility 
with existing DTs.

> 
> Signed-off-by: Irui Wang <irui.wang@mediatek.com>
> ---
>  .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
> index deb5b657a2d5..3c069c965992 100644
> --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
> +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
> @@ -41,6 +41,9 @@ properties:
>  
>    assigned-clock-parents: true
>  
> +  power-domains:
> +    maxItems: 1
> +
>    iommus:
>      minItems: 1
>      maxItems: 32
> @@ -72,6 +75,7 @@ required:
>    - iommus
>    - assigned-clocks
>    - assigned-clock-parents
> +  - power-domains
>  
>  allOf:
>    - if:
> @@ -132,6 +136,7 @@ examples:
>      #include <dt-bindings/clock/mt8173-clk.h>
>      #include <dt-bindings/memory/mt8173-larb-port.h>
>      #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/power/mt8173-power.h>
>  
>      vcodec_enc_avc: vcodec@18002000 {
>        compatible = "mediatek,mt8173-vcodec-enc";
> @@ -153,6 +158,7 @@ examples:
>        clock-names = "venc_sel";
>        assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>;
>        assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL>;
> +      power-domains = <&scpsys MT8173_POWER_DOMAIN_VENC>;
>      };
>  
>      vcodec_enc_vp8: vcodec@19002000 {
> @@ -173,4 +179,5 @@ examples:
>        clock-names = "venc_lt_sel";
>        assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
>        assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>;
> +      power-domains = <&scpsys MT8173_POWER_DOMAIN_VENC_LT>;
>      };
> -- 
> 2.18.0
> 
>
Irui Wang April 27, 2022, 2:55 a.m. UTC | #3
Dear Rob,

Thanks for reviewing.

On Tue, 2022-04-26 at 15:37 -0500, Rob Herring wrote:
> On Wed, Apr 20, 2022 at 03:34:39PM +0800, Irui Wang wrote:
> > Adds encoder power domain property
> 
> Why? You can't add new, required properties as that breaks
> compatibility 
> with existing DTs.
We will use the "power-domains" property in new DTs, and we will get a
"make dtbs_check" warning if we don't add the "power-domains" in yaml,
so we add it, but should not be a "required property", we will send a
new version for it.

And another series patch will fix the "dtbs_check"(mediatek,larb) you
mentioned before:
https://patchwork.kernel.org/project/linux-mediatek/list/?series=633993

Thanks
Best Regards

> 
> > 
> > Signed-off-by: Irui Wang <irui.wang@mediatek.com>
> > ---
> >  .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 7
> > +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > encoder.yaml
> > b/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > encoder.yaml
> > index deb5b657a2d5..3c069c965992 100644
> > --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > encoder.yaml
> > +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > encoder.yaml
> > @@ -41,6 +41,9 @@ properties:
> >  
> >    assigned-clock-parents: true
> >  
> > +  power-domains:
> > +    maxItems: 1
> > +
> >    iommus:
> >      minItems: 1
> >      maxItems: 32
> > @@ -72,6 +75,7 @@ required:
> >    - iommus
> >    - assigned-clocks
> >    - assigned-clock-parents
> > +  - power-domains
> >  
> >  allOf:
> >    - if:
> > @@ -132,6 +136,7 @@ examples:
> >      #include <dt-bindings/clock/mt8173-clk.h>
> >      #include <dt-bindings/memory/mt8173-larb-port.h>
> >      #include <dt-bindings/interrupt-controller/irq.h>
> > +    #include <dt-bindings/power/mt8173-power.h>
> >  
> >      vcodec_enc_avc: vcodec@18002000 {
> >        compatible = "mediatek,mt8173-vcodec-enc";
> > @@ -153,6 +158,7 @@ examples:
> >        clock-names = "venc_sel";
> >        assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>;
> >        assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL>;
> > +      power-domains = <&scpsys MT8173_POWER_DOMAIN_VENC>;
> >      };
> >  
> >      vcodec_enc_vp8: vcodec@19002000 {
> > @@ -173,4 +179,5 @@ examples:
> >        clock-names = "venc_lt_sel";
> >        assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
> >        assigned-clock-parents = <&topckgen
> > CLK_TOP_VCODECPLL_370P5>;
> > +      power-domains = <&scpsys MT8173_POWER_DOMAIN_VENC_LT>;
> >      };
> > -- 
> > 2.18.0
> > 
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
index deb5b657a2d5..3c069c965992 100644
--- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
@@ -41,6 +41,9 @@  properties:
 
   assigned-clock-parents: true
 
+  power-domains:
+    maxItems: 1
+
   iommus:
     minItems: 1
     maxItems: 32
@@ -72,6 +75,7 @@  required:
   - iommus
   - assigned-clocks
   - assigned-clock-parents
+  - power-domains
 
 allOf:
   - if:
@@ -132,6 +136,7 @@  examples:
     #include <dt-bindings/clock/mt8173-clk.h>
     #include <dt-bindings/memory/mt8173-larb-port.h>
     #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/power/mt8173-power.h>
 
     vcodec_enc_avc: vcodec@18002000 {
       compatible = "mediatek,mt8173-vcodec-enc";
@@ -153,6 +158,7 @@  examples:
       clock-names = "venc_sel";
       assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>;
       assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL>;
+      power-domains = <&scpsys MT8173_POWER_DOMAIN_VENC>;
     };
 
     vcodec_enc_vp8: vcodec@19002000 {
@@ -173,4 +179,5 @@  examples:
       clock-names = "venc_lt_sel";
       assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
       assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>;
+      power-domains = <&scpsys MT8173_POWER_DOMAIN_VENC_LT>;
     };