Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: dt-bindings: mediatek,vcodec-subdev-decoder: Fix child node if/then schemas
@ 2026-10-19 21:24 Rob Herring (Arm)
  2026-11-19 19:10 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2026-10-19 21:24 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Hans Verkuil, Chen-Yu Tsai,
	Allen-KH Cheng
  Cc: Kyrie Wu, linux-media, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

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@kernel.org>
---
 .../media/mediatek,vcodec-subdev-decoder.yaml | 77 ++++++++-----------
 1 file changed, 31 insertions(+), 46 deletions(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: dt-bindings: mediatek,vcodec-subdev-decoder: Fix child node if/then schemas
  2026-10-19 21:24 [PATCH] media: dt-bindings: mediatek,vcodec-subdev-decoder: Fix child node if/then schemas Rob Herring (Arm)
@ 2026-11-19 19:10 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2026-11-19 19:10 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Hans Verkuil, Chen-Yu Tsai,
	Allen-KH Cheng
  Cc: Kyrie Wu, linux-media, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

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@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
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 21:24 [PATCH] media: dt-bindings: mediatek,vcodec-subdev-decoder: Fix child node if/then schemas Rob Herring (Arm)
2026-11-19 19:10 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox