[PATCH v10 3/6] media: dt-bindings: Add Amlogic V4L2 video decoder
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Sep 24 01:01:56 PDT 2026
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] dt-bindings: amlogic,s4-vdec: missing interrupt-names in required list and example
- [Low] dt-bindings: amlogic,s4-vdec: unbounded array properties missing maxItems
--
commit ea1e1b5dce46c139b8fcb208da9bf35c4469463a
Author: Zhentao Guo <zhentao.guo at amlogic.com>
media: dt-bindings: Add Amlogic V4L2 video decoder
Add bindings for Amlogic hardware decoder accelerator.
> 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..751043c3d9ccf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vdec.yaml
> @@ -0,0 +1,114 @@
[ ... ]
> +properties:
> + compatible:
> + const: amlogic,s4-vdec
> +
> + reg:
> + minItems: 2
[Severity: Low]
Should the reg property include a maxItems: 2 limit?
Since the reg-names property strictly enforces exactly 2 entries via its
items list, omitting maxItems: 2 allows the schema to incorrectly pass
validation for device trees with 3 or more entries.
> +
> + reg-names:
> + items:
> + - const: dos
> + - const: dmc
> +
> + interrupts:
> + minItems: 2
[Severity: Low]
Is a maxItems: 2 limit missing for the interrupts property?
Since the interrupt-names property strictly enforces exactly 2 entries,
omitting maxItems: 2 allows device trees with 3 or more entries to pass schema
validation.
> +
> + interrupt-names:
> + items:
> + - const: hvdec
> + - const: vdec
> +
[ ... ]
> + power-domains:
> + minItems: 2
[Severity: Low]
Should the power-domains property specify a maxItems: 2 limit?
Since the power-domain-names property strictly enforces exactly 2 entries,
omitting maxItems: 2 allows device trees with 3 or more entries to pass
validation.
> +
> + power-domain-names:
> + items:
> + - const: vdec
> + - const: hvdec
[ ... ]
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - interrupts
> + - clocks
> + - clock-names
> + - power-domains
> + - power-domain-names
> + - resets
> + - amlogic,canvas
> + - amlogic,secure-monitor
[Severity: Low]
Should interrupt-names be included in this required list?
The interrupt-names property is defined with exactly two items but is
omitted here. Since all other -names properties (reg-names, clock-names,
power-domain-names) are explicitly required, this omission allows incomplete
device tree nodes to pass schema validation.
> +
> +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>;
[Severity: Low]
Should the device tree example include interrupt-names?
The example fails to provide interrupt-names, which reflects the omission in
the required list and results in an incomplete DT node.
> + clocks = <&clkc_periphs CLKID_DOS>,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260924-b4-s4-vdec-upstream-v10-0-1289303a58a4@amlogic.com?part=3
More information about the linux-amlogic
mailing list