[PATCH v9 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder

sashiko-bot at kernel.org sashiko-bot at kernel.org
Mon Sep 14 01:18:30 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Incomplete schema validation constraints for `interrupts` and `interrupt-names`
--

commit 783cc9cba9c938896ba8c6cfc5dc0ca5686d85fb
Author: Zhentao Guo <zhentao.guo at amlogic.com>

media: dt-bindings: Add Amlogic V4L2 video decoder

Describe the initial support for the V4L2 stateless video decoder driver
used with the Amlogic S4 (S805X2) platform.

> diff --git a/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
> new file mode 100644
> index 0000000000000..d350b3e68a389
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml

> [ ... ]

> +  reg-names:
> +    items:
> +      - const: dos
> +      - const: dmc
> +
> +  interrupts:
> +    maxItems: 2

[Severity: Medium]
Does the interrupts property also need minItems: 2? Since maxItems: 2
implicitly allows minItems: 1, the schema allows a single interrupt.

However, the driver explicitly requests index 1. A device tree with a single
interrupt will pass schema validation but cause driver initialization to fail
at runtime.

> +
> +  interrupt-names:
> +    items:
> +      - const: core_hvdec
> +      - const: core_vdec

> [ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - power-domains
> +  - power-domain-names
> +  - resets
> +  - amlogic,canvas
> +  - amlogic,secure-monitor

[Severity: Medium]
Is interrupt-names intentionally omitted from the required list?

Other properties like reg-names and clock-names are required. Omitting
interrupt-names makes it optional, which fails to enforce explicit hardware
description for multiple interrupts.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/clock/amlogic,s4-pll-clkc.h>
> +    #include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h>
> +    #include <dt-bindings/power/meson-s4-power.h>
> +    #include <dt-bindings/reset/amlogic,meson-s4-reset.h>
> +    video-codec at fe320000 {
> +      compatible = "amlogic,s4-vdec";
> +      reg = <0xfe320000 0x10000>,
> +            <0xfe036000 0x20>;
> +      reg-names = "dos",
> +                  "dmc";
> +      interrupts = <GIC_SPI 91 IRQ_TYPE_EDGE_RISING>,
> +                   <GIC_SPI 92 IRQ_TYPE_EDGE_RISING>;
> +      clocks = <&clkc_periphs CLKID_DOS>,
> +               <&clkc_periphs CLKID_VDEC_SEL>,
> +               <&clkc_periphs CLKID_HEVCF_SEL>;

[Severity: Medium]
Should interrupt-names be included in this example? Omitting it provides
an incomplete template for device tree authors.

> +      clock-names = "dos",
> +                    "core_v",
> +                    "core_h";
> +      power-domains = <&pwrc PWRC_S4_DOS_VDEC_ID>,
> +                      <&pwrc PWRC_S4_DOS_HEVC_ID>;
> +      power-domain-names = "dos_v",
> +                           "dos_h";
> +      resets = <&reset RESET_DOS>;
> +      amlogic,canvas = <&canvas>;
> +      amlogic,secure-monitor = <&sm>;
> +    };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-b4-s4-vdec-upstream-v9-0-72fdb0d71b02@amlogic.com?part=3



More information about the linux-amlogic mailing list