Re: [PATCH v2 16/20] dt-bindings: crypto: meson: add new compatibles

From: Krzysztof Kozlowski
Date: Wed Jan 24 2024 - 02:22:45 EST


On 23/01/2024 17:58, Alexey Romanov wrote:
> Now we can use crypto driver at G12A/G12B/S4/A1/SM1/AXG.
>
> Signed-off-by: Alexey Romanov <avromanov@xxxxxxxxxxxxxxxxx>
> ---
> .../bindings/crypto/amlogic,gxl-crypto.yaml | 31 ++++++++++++++++---
> 1 file changed, 27 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml b/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml
> index 948e11ebe4ee..a7145b126a06 100644
> --- a/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml
> +++ b/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml
> @@ -11,8 +11,15 @@ maintainers:
>
> properties:
> compatible:
> - items:
> - - const: amlogic,gxl-crypto
> + oneOf:
> + - items:

That's just enum.

> + - enum:
> + - amlogic,g12a-crypto
> + - amlogic,s4-crypto
> + - amlogic,a1-crypto
> + - items:
> + - const: amlogic,gxl-crypto
> + - const: amlogic,axg-crypto

This is neither explained nor correct. You just affected all DTS.

>
> reg:
> maxItems: 1
> @@ -32,8 +39,24 @@ required:
> - compatible
> - reg
> - interrupts
> - - clocks
> - - clock-names
> +
> +if:

Missing allOf

> + properties:
> + compatible:
> + contains:
> + enum:
> + - amlogic,gxl-crypto
> +then:
> + required:
> + - clocks
> + - clock-names

Why? Also not explained.

Entire patch was not tested and it unexpectedly affects/changes existing
bindings without explanation in commit msg.



Best regards,
Krzysztof