[PATCH] media: dt-bindings: mediatek,vcodec-subdev-decoder: Fix child node if/then schemas

Rob Herring robh at kernel.org
Thu Nov 19 11:10:55 PST 2026


On Mon, Oct 19, 2026 at 04:24:29PM -0500, Rob Herring (Arm) wrote:
> The if/then schemas in mediatek,vcodec-subdev-decoder are all at the
> wrong level as they apply to child nodes. The clock-names schemas
> applies to the parent node, but the clock-names properties are in the
> child nodes. Move the clock-names definitions to the child node
> clock-names property. This exposes that the MT8186 clocks are not
> documented, so add them as well.
> 
> The interrupts if/then schema is never true as the parent compatible
> will never match the child compatible. The subschema also belongs in the
> child node.
> 
> Fixes: 3fbf1eac01b5 ("media: dt-bindings: media: mediatek: vcodec: Adds decoder dt-bindings for lat soc")
> Closes: https://sashiko.dev/#/bug/linux-5ab90035-1914-412f-8310-097fb05bda15
> Fixes: 355e9472ccb0 ("media: dt-bindings: media: mediatek: vcodec: adapt to the 'clock-names' of different platforms")
> Closes: https://sashiko.dev/#/bug/linux-caa6adb1-38de-4889-9517-2beede7c8f96
> Signed-off-by: Rob Herring (Arm) <robh at kernel.org>
> ---
>  .../media/mediatek,vcodec-subdev-decoder.yaml | 77 ++++++++-----------
>  1 file changed, 31 insertions(+), 46 deletions(-)

Ping! This one needs to be applied before 2 other series posted.

> 
> diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
> index d1d209cbbd43..6033ecffd707 100644
> --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
> +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml
> @@ -135,8 +135,26 @@ patternProperties:
>          maxItems: 5
>  
>        clock-names:
> -        minItems: 4
> -        maxItems: 5
> +        oneOf:
> +          - description: MT8186 clocks
> +            items:
> +              - const: vdec-sel
> +              - const: vdec-soc-vdec
> +              - const: vdec
> +              - const: vdec-top
> +          - description: MT8192 clocks
> +            items:
> +              - const: sel
> +              - const: soc-vdec
> +              - const: soc-lat
> +              - const: vdec
> +              - const: top
> +          - description: MT8195 clocks
> +            items:
> +              - const: sel
> +              - const: vdec
> +              - const: lat
> +              - const: top
>  
>        assigned-clocks:
>          maxItems: 1
> @@ -159,6 +177,17 @@ patternProperties:
>  
>      additionalProperties: false
>  
> +    if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - mediatek,mtk-vcodec-core
> +              - mediatek,mtk-vcodec-lat
> +    then:
> +      required:
> +        - interrupts
> +
>  required:
>    - compatible
>    - reg
> @@ -166,50 +195,6 @@ required:
>    - mediatek,scp
>    - ranges
>  
> -if:
> -  properties:
> -    compatible:
> -      contains:
> -        enum:
> -          - mediatek,mtk-vcodec-core
> -          - mediatek,mtk-vcodec-lat
> -
> -then:
> -  required:
> -    - interrupts
> -
> -allOf:
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - mediatek,mt8192-vcodec-dec
> -    then:
> -      properties:
> -        clock-names:
> -          items:
> -            - const: sel
> -            - const: soc-vdec
> -            - const: soc-lat
> -            - const: vdec
> -            - const: top
> -
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - mediatek,mt8195-vcodec-dec
> -    then:
> -      properties:
> -        clock-names:
> -          items:
> -            - const: sel
> -            - const: vdec
> -            - const: lat
> -            - const: top
> -
>  additionalProperties: false
>  
>  examples:
> -- 
> 2.53.0
> 
> 



More information about the Linux-mediatek mailing list