diff mbox series

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

Message ID 20240123165831.970023-17-avromanov@salutedevices.com (mailing list archive)
State Superseded
Headers show
Series Support more Amlogic SoC families in crypto driver | expand

Commit Message

Alexey Romanov Jan. 23, 2024, 4:58 p.m. UTC
Now we can use crypto driver at G12A/G12B/S4/A1/SM1/AXG.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
---
 .../bindings/crypto/amlogic,gxl-crypto.yaml   | 31 ++++++++++++++++---
 1 file changed, 27 insertions(+), 4 deletions(-)

Comments

Rob Herring (Arm) Jan. 23, 2024, 6:37 p.m. UTC | #1
On Tue, 23 Jan 2024 19:58:27 +0300, Alexey Romanov wrote:
> Now we can use crypto driver at G12A/G12B/S4/A1/SM1/AXG.
> 
> Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
> ---
>  .../bindings/crypto/amlogic,gxl-crypto.yaml   | 31 ++++++++++++++++---
>  1 file changed, 27 insertions(+), 4 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.example.dtb: crypto-engine@c883e000: compatible: 'oneOf' conditional failed, one must be fixed:
	['amlogic,gxl-crypto'] is too short
	'amlogic,gxl-crypto' is not one of ['amlogic,g12a-crypto', 'amlogic,s4-crypto', 'amlogic,a1-crypto']
	from schema $id: http://devicetree.org/schemas/crypto/amlogic,gxl-crypto.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240123165831.970023-17-avromanov@salutedevices.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Krzysztof Kozlowski Jan. 24, 2024, 7:22 a.m. UTC | #2
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@salutedevices.com>
> ---
>  .../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
diff mbox series

Patch

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:
+          - enum:
+              - amlogic,g12a-crypto
+              - amlogic,s4-crypto
+              - amlogic,a1-crypto
+      - items:
+          - const: amlogic,gxl-crypto
+          - const: amlogic,axg-crypto
 
   reg:
     maxItems: 1
@@ -32,8 +39,24 @@  required:
   - compatible
   - reg
   - interrupts
-  - clocks
-  - clock-names
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - amlogic,gxl-crypto
+then:
+  required:
+    - clocks
+    - clock-names
+  properties:
+    interrupts:
+      maxItems: 2
+else:
+  properties:
+    interrupts:
+      maxItems: 1
 
 additionalProperties: false