[PATCH v2 4/5] dt-bindings: hwlock: sun6i: Add a64 compatible string

Bastian Germann posted 5 patches 2 years, 6 months ago
[PATCH v2 4/5] dt-bindings: hwlock: sun6i: Add a64 compatible string
Posted by Bastian Germann 2 years, 6 months ago
Add an allwinner,sun50i-a64-hwspinlock compatible string to the device
tree binding. The A31 and A64 have compatible hwspinlocks.

Signed-off-by: Bastian Germann <bage@debian.org>
---
 .../bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
index 6cdfe22deb3c..281c285282a1 100644
--- a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
+++ b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
@@ -15,7 +15,9 @@ description:
 
 properties:
   compatible:
-    const: allwinner,sun6i-a31-hwspinlock
+    items:
+      - const: allwinner,sun6i-a31-hwspinlock
+      - const: allwinner,sun50i-a64-hwspinlock
 
   reg:
     maxItems: 1
-- 
2.39.1
Re: [PATCH v2 4/5] dt-bindings: hwlock: sun6i: Add a64 compatible string
Posted by Krzysztof Kozlowski 2 years, 6 months ago
On 15/02/2023 21:37, Bastian Germann wrote:
> Add an allwinner,sun50i-a64-hwspinlock compatible string to the device
> tree binding. The A31 and A64 have compatible hwspinlocks.
> 
> Signed-off-by: Bastian Germann <bage@debian.org>
> ---
>  .../bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml       | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
> index 6cdfe22deb3c..281c285282a1 100644
> --- a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
> +++ b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
> @@ -15,7 +15,9 @@ description:
>  
>  properties:
>    compatible:
> -    const: allwinner,sun6i-a31-hwspinlock
> +    items:
> +      - const: allwinner,sun6i-a31-hwspinlock
> +      - const: allwinner,sun50i-a64-hwspinlock

Does not look like you tested the DTS against bindings. Please run `make
dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
for instructions).

That's my template answer. More detailed:

Please test that your DTS changes always pass your binding changes. The
above looks reversed with your DTS, thus if you tested DTS, you would
see errors. Expecting that existing in-kernel DTS passes dtbs_check is a
bit too much (although Samsung Exynos is almost there!), but at least
new code could not introduce new errors.

Best regards,
Krzysztof
Re: [PATCH v2 4/5] dt-bindings: hwlock: sun6i: Add a64 compatible string
Posted by Rob Herring 2 years, 6 months ago
On Wed, 15 Feb 2023 21:37:09 +0100, Bastian Germann wrote:
> Add an allwinner,sun50i-a64-hwspinlock compatible string to the device
> tree binding. The A31 and A64 have compatible hwspinlocks.
> 
> Signed-off-by: Bastian Germann <bage@debian.org>
> ---
>  .../bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml       | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

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/hwlock/allwinner,sun6i-a31-hwspinlock.example.dtb: hwlock@1c18000: compatible: ['allwinner,sun6i-a31-hwspinlock'] is too short
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230215203711.6293-5-bage@debian.org

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.
Re: [PATCH v2 4/5] dt-bindings: hwlock: sun6i: Add a64 compatible string
Posted by Andre Przywara 2 years, 6 months ago
On Wed, 15 Feb 2023 21:37:09 +0100
Bastian Germann <bage@debian.org> wrote:

> Add an allwinner,sun50i-a64-hwspinlock compatible string to the device
> tree binding. The A31 and A64 have compatible hwspinlocks.
> 
> Signed-off-by: Bastian Germann <bage@debian.org>
> ---
>  .../bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml       | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
> index 6cdfe22deb3c..281c285282a1 100644
> --- a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
> +++ b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
> @@ -15,7 +15,9 @@ description:
>  
>  properties:
>    compatible:
> -    const: allwinner,sun6i-a31-hwspinlock
> +    items:
> +      - const: allwinner,sun6i-a31-hwspinlock
> +      - const: allwinner,sun50i-a64-hwspinlock

So this would not allow the previous single compatible string, which I
think we should preserve?
You can check out other bindings (like allwinner,sun6i-a31-spi.yaml) to
get an idea of how this could be written.

Cheers,
Andre


>  
>    reg:
>      maxItems: 1