media: dt-bindings: mediatek,vcodec-subdev-decoder: Fix child node if/then schemas
Subsystems (4)
Rob Herring (Arm)
maintainerPATCH 1/1 media: dt-bindings: mediatek,vcodec-subdev-decoder: Fix child node if/then schemas
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.
--- .../media/mediatek,vcodec-subdev-decoder.yaml | 77 ++++++++----------- 1 file changed, 31 insertions(+), 46 deletions(-)
Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml +31 -46
@@ -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:
Signature · 1 line
2.53.0
Rob Herring
maintainerQuoted 11 lines · Rob Herring (Arm)
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.
Quoted 8 lines
Fixes 3fbf1eac01b5 ("media: dt-bindings: media: mediatek: vcodec: Adds decoder dt-bindings for lat soc")Fixes 355e9472ccb0 ("media: dt-bindings: media: mediatek: vcodec: adapt to the 'clock-names' of different platforms")Signed-off-by Rob Herring (Arm) <[email protected]>--- .../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.
Quoted 107 lines
Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml +31
-46@@ -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:Signature · 1 line
2.53.0