* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-03-11 22:25 [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema Rob Herring
@ 2024-03-12 6:04 ` Viresh Kumar
2024-03-12 9:28 ` Serge Semin
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Viresh Kumar @ 2024-03-12 6:04 UTC (permalink / raw)
To: Rob Herring
Cc: Viresh Kumar, Andy Shevchenko, Vinod Koul, Krzysztof Kozlowski,
Conor Dooley, dmaengine, devicetree, linux-kernel
On 11-03-24, 16:25, Rob Herring wrote:
> 'data-width' and 'data_width' properties are defined as arrays, but the
> schema is defined as a matrix. That works currently since everything gets
> decoded in to matrices, but that is internal to dtschema and could change.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++----------
> 1 file changed, 17 insertions(+), 21 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-03-11 22:25 [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema Rob Herring
2024-03-12 6:04 ` Viresh Kumar
@ 2024-03-12 9:28 ` Serge Semin
2024-03-12 13:49 ` Rob Herring
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Serge Semin @ 2024-03-12 9:28 UTC (permalink / raw)
To: Rob Herring
Cc: Viresh Kumar, Andy Shevchenko, Vinod Koul, Krzysztof Kozlowski,
Conor Dooley, dmaengine, devicetree, linux-kernel
On Mon, Mar 11, 2024 at 04:25:22PM -0600, Rob Herring wrote:
> 'data-width' and 'data_width' properties are defined as arrays, but the
> schema is defined as a matrix. That works currently since everything gets
> decoded in to matrices, but that is internal to dtschema and could change.
Can't remember now why I didn't implement that that way initially.
Probably because something didn't work back then during the
DT-bindings check procedure. Anyway thanks for fixing the schema.
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
-Serge(y)
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++----------
> 1 file changed, 17 insertions(+), 21 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml b/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml
> index 5da8291a7de0..7b0ff4afcaa1 100644
> --- a/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml
> +++ b/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml
> @@ -93,10 +93,9 @@ properties:
> data-width:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> description: Data bus width per each DMA master in bytes.
> + maxItems: 4
> items:
> - maxItems: 4
> - items:
> - enum: [4, 8, 16, 32]
> + enum: [4, 8, 16, 32]
>
> data_width:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> @@ -106,28 +105,26 @@ properties:
> deprecated. It' usage is discouraged in favor of data-width one. Moreover
> the property incorrectly permits to define data-bus width of 8 and 16
> bits, which is impossible in accordance with DW DMAC IP-core data book.
> + maxItems: 4
> items:
> - maxItems: 4
> - items:
> - enum:
> - - 0 # 8 bits
> - - 1 # 16 bits
> - - 2 # 32 bits
> - - 3 # 64 bits
> - - 4 # 128 bits
> - - 5 # 256 bits
> - default: 0
> + enum:
> + - 0 # 8 bits
> + - 1 # 16 bits
> + - 2 # 32 bits
> + - 3 # 64 bits
> + - 4 # 128 bits
> + - 5 # 256 bits
> + default: 0
>
> multi-block:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> description: |
> LLP-based multi-block transfer supported by hardware per
> each DMA channel.
> + maxItems: 8
> items:
> - maxItems: 8
> - items:
> - enum: [0, 1]
> - default: 1
> + enum: [0, 1]
> + default: 1
>
> snps,max-burst-len:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> @@ -138,11 +135,10 @@ properties:
> will be from 1 to max-burst-len words. It's an array property with one
> cell per channel in the units determined by the value set in the
> CTLx.SRC_TR_WIDTH/CTLx.DST_TR_WIDTH fields (data width).
> + maxItems: 8
> items:
> - maxItems: 8
> - items:
> - enum: [4, 8, 16, 32, 64, 128, 256]
> - default: 256
> + enum: [4, 8, 16, 32, 64, 128, 256]
> + default: 256
>
> snps,dma-protection-control:
> $ref: /schemas/types.yaml#/definitions/uint32
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-03-11 22:25 [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema Rob Herring
2024-03-12 6:04 ` Viresh Kumar
2024-03-12 9:28 ` Serge Semin
@ 2024-03-12 13:49 ` Rob Herring
2024-03-12 15:33 ` Andy Shevchenko
2024-04-07 13:04 ` Vinod Koul
2024-04-07 16:39 ` Vinod Koul
4 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2024-03-12 13:49 UTC (permalink / raw)
To: Rob Herring
Cc: Conor Dooley, Krzysztof Kozlowski, Viresh Kumar, devicetree,
Vinod Koul, Andy Shevchenko, linux-kernel, dmaengine
On Mon, 11 Mar 2024 16:25:22 -0600, Rob Herring wrote:
> 'data-width' and 'data_width' properties are defined as arrays, but the
> schema is defined as a matrix. That works currently since everything gets
> decoded in to matrices, but that is internal to dtschema and could change.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++----------
> 1 file changed, 17 insertions(+), 21 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/dma/snps,dma-spear1340.example.dtb: dma-controller@fc000000: data-width:0: [8, 8] is too short
from schema $id: http://devicetree.org/schemas/dma/snps,dma-spear1340.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/dma/snps,dma-spear1340.example.dtb: dma-controller@fc000000: Unevaluated properties are not allowed ('data-width' was unexpected)
from schema $id: http://devicetree.org/schemas/dma/snps,dma-spear1340.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240311222522.1939951-1-robh@kernel.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.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-03-12 13:49 ` Rob Herring
@ 2024-03-12 15:33 ` Andy Shevchenko
2024-03-12 17:16 ` Rob Herring
0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2024-03-12 15:33 UTC (permalink / raw)
To: Rob Herring
Cc: Conor Dooley, Krzysztof Kozlowski, Viresh Kumar, devicetree,
Vinod Koul, linux-kernel, dmaengine
On Tue, Mar 12, 2024 at 07:49:05AM -0600, Rob Herring wrote:
> On Mon, 11 Mar 2024 16:25:22 -0600, Rob Herring wrote:
...
> My bot found errors
Well done! :-)
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-03-12 15:33 ` Andy Shevchenko
@ 2024-03-12 17:16 ` Rob Herring
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2024-03-12 17:16 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Conor Dooley, Krzysztof Kozlowski, Viresh Kumar, devicetree,
Vinod Koul, linux-kernel, dmaengine
On Tue, Mar 12, 2024 at 9:33 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Mar 12, 2024 at 07:49:05AM -0600, Rob Herring wrote:
> > On Mon, 11 Mar 2024 16:25:22 -0600, Rob Herring wrote:
>
> ...
>
> > My bot found errors
>
> Well done! :-)
Thanks. I was testing locally with some pending dtschema changes while
the bot uses the current 'main' branch.
A 'minItems: 1' here should fix this, but I need to look into why the
current schema doesn't have that problem. I wouldn't expect a
difference.
Rob
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-03-11 22:25 [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema Rob Herring
` (2 preceding siblings ...)
2024-03-12 13:49 ` Rob Herring
@ 2024-04-07 13:04 ` Vinod Koul
2024-04-07 13:05 ` Vinod Koul
2024-04-07 16:39 ` Vinod Koul
4 siblings, 1 reply; 9+ messages in thread
From: Vinod Koul @ 2024-04-07 13:04 UTC (permalink / raw)
To: Rob Herring
Cc: Viresh Kumar, Andy Shevchenko, Krzysztof Kozlowski, Conor Dooley,
dmaengine, devicetree, linux-kernel
On 11-03-24, 16:25, Rob Herring wrote:
> 'data-width' and 'data_width' properties are defined as arrays, but the
> schema is defined as a matrix. That works currently since everything gets
> decoded in to matrices, but that is internal to dtschema and could change.
This fails to apply on dmaengine/next.
Can you please rebase?
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++----------
> 1 file changed, 17 insertions(+), 21 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml b/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml
> index 5da8291a7de0..7b0ff4afcaa1 100644
> --- a/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml
> +++ b/Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml
> @@ -93,10 +93,9 @@ properties:
> data-width:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> description: Data bus width per each DMA master in bytes.
> + maxItems: 4
> items:
> - maxItems: 4
> - items:
> - enum: [4, 8, 16, 32]
> + enum: [4, 8, 16, 32]
>
> data_width:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> @@ -106,28 +105,26 @@ properties:
> deprecated. It' usage is discouraged in favor of data-width one. Moreover
> the property incorrectly permits to define data-bus width of 8 and 16
> bits, which is impossible in accordance with DW DMAC IP-core data book.
> + maxItems: 4
> items:
> - maxItems: 4
> - items:
> - enum:
> - - 0 # 8 bits
> - - 1 # 16 bits
> - - 2 # 32 bits
> - - 3 # 64 bits
> - - 4 # 128 bits
> - - 5 # 256 bits
> - default: 0
> + enum:
> + - 0 # 8 bits
> + - 1 # 16 bits
> + - 2 # 32 bits
> + - 3 # 64 bits
> + - 4 # 128 bits
> + - 5 # 256 bits
> + default: 0
>
> multi-block:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> description: |
> LLP-based multi-block transfer supported by hardware per
> each DMA channel.
> + maxItems: 8
> items:
> - maxItems: 8
> - items:
> - enum: [0, 1]
> - default: 1
> + enum: [0, 1]
> + default: 1
>
> snps,max-burst-len:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> @@ -138,11 +135,10 @@ properties:
> will be from 1 to max-burst-len words. It's an array property with one
> cell per channel in the units determined by the value set in the
> CTLx.SRC_TR_WIDTH/CTLx.DST_TR_WIDTH fields (data width).
> + maxItems: 8
> items:
> - maxItems: 8
> - items:
> - enum: [4, 8, 16, 32, 64, 128, 256]
> - default: 256
> + enum: [4, 8, 16, 32, 64, 128, 256]
> + default: 256
>
> snps,dma-protection-control:
> $ref: /schemas/types.yaml#/definitions/uint32
> --
> 2.43.0
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-04-07 13:04 ` Vinod Koul
@ 2024-04-07 13:05 ` Vinod Koul
0 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2024-04-07 13:05 UTC (permalink / raw)
To: Rob Herring
Cc: Viresh Kumar, Andy Shevchenko, Krzysztof Kozlowski, Conor Dooley,
dmaengine, devicetree, linux-kernel
On 07-04-24, 18:34, Vinod Koul wrote:
> On 11-03-24, 16:25, Rob Herring wrote:
> > 'data-width' and 'data_width' properties are defined as arrays, but the
> > schema is defined as a matrix. That works currently since everything gets
> > decoded in to matrices, but that is internal to dtschema and could change.
>
> This fails to apply on dmaengine/next.
>
> Can you please rebase?
Never mind, the v2 worked just fine
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
2024-03-11 22:25 [PATCH] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema Rob Herring
` (3 preceding siblings ...)
2024-04-07 13:04 ` Vinod Koul
@ 2024-04-07 16:39 ` Vinod Koul
4 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2024-04-07 16:39 UTC (permalink / raw)
To: Viresh Kumar, Andy Shevchenko, Krzysztof Kozlowski, Conor Dooley,
Rob Herring
Cc: dmaengine, devicetree, linux-kernel
On Mon, 11 Mar 2024 16:25:22 -0600, Rob Herring wrote:
> 'data-width' and 'data_width' properties are defined as arrays, but the
> schema is defined as a matrix. That works currently since everything gets
> decoded in to matrices, but that is internal to dtschema and could change.
>
>
Applied, thanks!
[1/1] dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
commit: 7eccb5a5b224be42431c8087c9c9e016636ff3b5
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread