dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
Subsystems (3)
Rob Herring
maintainerPATCH 1/1 dt-bindings: dma: snps,dma-spear1340: Fix data{-,_}width schema
'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.
--- .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml +17 -21
@@ -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
Signature · 1 line
2.43.0
Quoted 8 lines · Rob Herring
'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 <[email protected]>--- .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-)
Signature · 1 line
viresh
Quoted 3 lines · Rob Herring
'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.
-Serge(y)
Quoted 83 lines
Signed-off-by Rob Herring <[email protected]>--- .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-)Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml +17
-21@@ -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/uint32Signature · 1 line
2.43.0
Rob Herring
maintainerQuoted 9 lines · Rob Herring
'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 <[email protected]>--- .../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/[email protected]
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.
Andy Shevchenko
reviewerQuoted 1 line · Rob Herring
On Mon, 11 Mar 2024 16:25:22 -0600, Rob Herring wrote:
...
Quoted 1 line
My bot found errors
Well done! :-)
Signature · 2 lines
With Best Regards, Andy Shevchenko
Rob Herring
maintainerQuoted 9 lines · Andy Shevchenko
Quoted 1 line · Rob Herring
On Mon, 11 Mar 2024 16:25:22 -0600, Rob Herring wrote:
...
Quoted 1 line
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
Vinod Koul
maintainerQuoted 3 lines · Rob Herring
'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?
Quoted 81 lines
Signed-off-by Rob Herring <[email protected]>--- .../bindings/dma/snps,dma-spear1340.yaml | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-)Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml +17
-21@@ -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/uint32Signature · 1 line
2.43.0
Signature · 1 line
~Vinod
Vinod Koul
maintainerQuoted 8 lines · Vinod Koul
Quoted 3 lines · Rob Herring
'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
Signature · 1 line
~Vinod
Quoted 5 lines · Rob Herring
'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,
Signature · 1 line
~Vinod