Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] dt-bindings: npu: rockchip: unwieldy per-compatible if-then-else in 
rknn-core
--

commit 64ea8c4aa2d26a009304ed33c9932abdd0a2a97d
Author: Jiaxing Hu <[email protected]>

dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core

This commit adds the rockchip,rk3576-rknn-core compatible to
rockchip,rk3588-rknn-core.yaml, widening the top-level resource properties
and constraining each SoC variant with an if-then-else block under allOf.

> diff --git 
> a/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml 
> b/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml
> index caca2a4903cd1..3b611b64c8aa0 100644
> --- a/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml
> +++ b/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml

[ ... ]

> @@ -75,7 +83,40 @@ required:
>    - resets
>    - reset-names
>    - npu-supply
> -  - sram-supply
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: rockchip,rk3588-rknn-core
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 4
> +        clock-names:
> +          maxItems: 4
> +        power-domains:
> +          maxItems: 1
> +        resets:
> +          minItems: 2
> +        reset-names:
> +          minItems: 2
> +      required:
> +        - sram-supply
> +    else:
> +      properties:
> +        clocks:
> +          minItems: 6
> +        clock-names:
> +          minItems: 6
> +        power-domains:
> +          minItems: 2
> +        resets:
> +          maxItems: 1
> +        reset-names:
> +          maxItems: 1
> +        sram-supply: false

[Severity: Low]
This isn't a bug, but adding rockchip,rk3576-rknn-core to
rockchip,rk3588-rknn-core.yaml requires loosening the top-level definitions of
clocks, clock-names, power-domains, resets, reset-names, and required, and
then overriding all six properties in the allOf if-then-else block.

Since the two variants differ across most of their resource properties, would
it be cleaner to split rockchip,rk3576-rknn-core into its own binding schema
document rather than adding these per-compatible conditionals?

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=6

Reply via email to