Message ID | 20200824084712.2526079-2-vkoul@kernel.org |
---|---|
State | New |
Headers | show |
Series | [1/3] dt-bindings: dmaengine: Document qcom,gpi dma binding | expand |
On Mon, 24 Aug 2020 14:17:10 +0530, Vinod Koul wrote: > Add devicetree binding documentation for GPI DMA controller > implemented on Qualcomm SoCs > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > --- > .../devicetree/bindings/dma/qcom-gpi.yaml | 87 +++++++++++++++++++ > 1 file changed, 87 insertions(+) > create mode 100644 Documentation/devicetree/bindings/dma/qcom-gpi.yaml > My bot found errors running 'make dt_binding_check' on your patch: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: {'description': 'Event ring transfer size compare to channel transfer ring. Event ring length = ev-factor * transfer ring size', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: 'not' is a required property /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,gpii-mask: {'description': 'Bitmap of supported GPII instances for OS', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,gpii-mask: 'not' is a required property /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,max-num-gpii: {'description': 'Maximum number of GPII instances available', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,max-num-gpii: 'not' is a required property ./Documentation/devicetree/bindings/dma/qcom-gpi.yaml: $id: relative path/filename doesn't match actual path or filename expected: http://devicetree.org/schemas/dma/qcom-gpi.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: ignoring, error in schema: properties: qcom,max-num-gpii warning: no schema found in file: ./Documentation/devicetree/bindings/dma/qcom-gpi.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.example.dt.yaml: example-0: dma@800000:reg:0: [0, 8388608, 0, 393216] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml See https://patchwork.ozlabs.org/patch/1350170 If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date: pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade Please check and re-submit.
Hey Rob, On 24-08-20, 11:40, Rob Herring wrote: > On Mon, 24 Aug 2020 14:17:10 +0530, Vinod Koul wrote: > > Add devicetree binding documentation for GPI DMA controller > > implemented on Qualcomm SoCs > > > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > > --- > > .../devicetree/bindings/dma/qcom-gpi.yaml | 87 +++++++++++++++++++ > > 1 file changed, 87 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/dma/qcom-gpi.yaml > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: {'description': 'Event ring transfer size compare to channel transfer ring. Event ring length = ev-factor * transfer ring size', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: 'not' is a required property Okay updating dt-schema I do see this, now the question is what is this and what does it mean ;-) I am not sure I comprehend the error message. I see this for all the new properties I added as required for this device node > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,gpii-mask: {'description': 'Bitmap of supported GPII instances for OS', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,gpii-mask: 'not' is a required property > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,max-num-gpii: {'description': 'Maximum number of GPII instances available', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,max-num-gpii: 'not' is a required property > > ./Documentation/devicetree/bindings/dma/qcom-gpi.yaml: $id: relative path/filename doesn't match actual path or filename > expected: http://devicetree.org/schemas/dma/qcom-gpi.yaml# > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: ignoring, error in schema: properties: qcom,max-num-gpii > warning: no schema found in file: ./Documentation/devicetree/bindings/dma/qcom-gpi.yaml > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.example.dt.yaml: example-0: dma@800000:reg:0: [0, 8388608, 0, 393216] is too long > From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml > > > See https://patchwork.ozlabs.org/patch/1350170 > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure dt-schema is up to date: > > pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade > > Please check and re-submit.
On 25-08-20, 20:21, Vinod Koul wrote: > Hey Rob, > > On 24-08-20, 11:40, Rob Herring wrote: > > On Mon, 24 Aug 2020 14:17:10 +0530, Vinod Koul wrote: > > > Add devicetree binding documentation for GPI DMA controller > > > implemented on Qualcomm SoCs > > > > > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > > > --- > > > .../devicetree/bindings/dma/qcom-gpi.yaml | 87 +++++++++++++++++++ > > > 1 file changed, 87 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/dma/qcom-gpi.yaml > > > > > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: {'description': 'Event ring transfer size compare to channel transfer ring. Event ring length = ev-factor * transfer ring size', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: 'not' is a required property > > Okay updating dt-schema I do see this, now the question is what is this > and what does it mean ;-) I am not sure I comprehend the error message. > I see this for all the new properties I added as required for this > device node Okay I think I have figured it out, I need to provide ref to /schemas/types.yaml#definitions/uint32 for this to work, which does makes sense to me. qcom,max-num-gpii: $ref: /schemas/types.yaml#definitions/uint32 maxItems: 1 description: Number of GPII instances Looks good to schema tool -- ~Vinod
On Wed, Aug 26, 2020 at 12:32 AM Vinod Koul <vkoul@kernel.org> wrote: > > On 25-08-20, 20:21, Vinod Koul wrote: > > Hey Rob, > > > > On 24-08-20, 11:40, Rob Herring wrote: > > > On Mon, 24 Aug 2020 14:17:10 +0530, Vinod Koul wrote: > > > > Add devicetree binding documentation for GPI DMA controller > > > > implemented on Qualcomm SoCs > > > > > > > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > > > > --- > > > > .../devicetree/bindings/dma/qcom-gpi.yaml | 87 +++++++++++++++++++ > > > > 1 file changed, 87 insertions(+) > > > > create mode 100644 Documentation/devicetree/bindings/dma/qcom-gpi.yaml > > > > > > > > > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > > > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: {'description': 'Event ring transfer size compare to channel transfer ring. Event ring length = ev-factor * transfer ring size', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: 'not' is a required property > > > > Okay updating dt-schema I do see this, now the question is what is this > > and what does it mean ;-) I am not sure I comprehend the error message. > > I see this for all the new properties I added as required for this > > device node > > Okay I think I have figured it out, I need to provide ref to > /schemas/types.yaml#definitions/uint32 for this to work, which does > makes sense to me. > > qcom,max-num-gpii: > $ref: /schemas/types.yaml#definitions/uint32 > maxItems: 1 uint32 is always 1 item, so drop. Is there a max value you can define? Otherwise, up to 2^32 - 1 is valid. > description: > Number of GPII instances > > Looks good to schema tool > > -- > ~Vinod
On 26-08-20, 08:35, Rob Herring wrote: > On Wed, Aug 26, 2020 at 12:32 AM Vinod Koul <vkoul@kernel.org> wrote: > > > > On 25-08-20, 20:21, Vinod Koul wrote: > > > Hey Rob, > > > > > > On 24-08-20, 11:40, Rob Herring wrote: > > > > On Mon, 24 Aug 2020 14:17:10 +0530, Vinod Koul wrote: > > > > > Add devicetree binding documentation for GPI DMA controller > > > > > implemented on Qualcomm SoCs > > > > > > > > > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > > > > > --- > > > > > .../devicetree/bindings/dma/qcom-gpi.yaml | 87 +++++++++++++++++++ > > > > > 1 file changed, 87 insertions(+) > > > > > create mode 100644 Documentation/devicetree/bindings/dma/qcom-gpi.yaml > > > > > > > > > > > > > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > > > > > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: {'description': 'Event ring transfer size compare to channel transfer ring. Event ring length = ev-factor * transfer ring size', 'maxItems': 1} is not valid under any of the given schemas (Possible causes of the failure): > > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/qcom-gpi.yaml: properties:qcom,ev-factor: 'not' is a required property > > > > > > Okay updating dt-schema I do see this, now the question is what is this > > > and what does it mean ;-) I am not sure I comprehend the error message. > > > I see this for all the new properties I added as required for this > > > device node > > > > Okay I think I have figured it out, I need to provide ref to > > /schemas/types.yaml#definitions/uint32 for this to work, which does > > makes sense to me. > > > > qcom,max-num-gpii: > > $ref: /schemas/types.yaml#definitions/uint32 > > maxItems: 1 > > uint32 is always 1 item, so drop. Is there a max value you can define? Sorry not sure I follow, to clarify you mean drop uint32, if so which type to use u8? I can use u8 as max wont be beyond 255. Yes I will define min as well max values too. > Otherwise, up to 2^32 - 1 is valid. I see one more warning given by your bot which I am able to reproduce as well: Documentation/devicetree/bindings/dma/qcom,gpi.example.dt.yaml: example-0: dma-controller@800000:reg:0: [0, 8388608, 0, 393216] is too long So to fix this I added the #address-cells and #size-cells #address-cells = <2>; #size-cells = <2>; reg = <0x0 0x00800000 0x0 0x60000>; But I am getting the warning, what am I doing incorrect -- ~Vinod
diff --git a/Documentation/devicetree/bindings/dma/qcom-gpi.yaml b/Documentation/devicetree/bindings/dma/qcom-gpi.yaml new file mode 100644 index 000000000000..c56d601ad2d6 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/qcom-gpi.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/gpi-dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies Inc GPI DMA controller + +description: | + QCOM GPI DMA controller provides DMA capabilities for + peripheral buses such as I2C, UART, and SPI. + +maintainers: + - Vinod Koul <vkoul@kernel.org> + +allOf: + - $ref: "dma-controller.yaml#" + +properties: + compatible: + enum: + - qcom,gpi-dma + + reg: + maxItems: 1 + + interrupts: + description: + Interrupt lines for each GPII instance + maxItems: 14 + + qcom,max-num-gpii: + description: + Maximum number of GPII instances available + maxItems: 1 + + "#dma-cells": + const: 1 + + qcom,gpii-mask: + description: + Bitmap of supported GPII instances for OS + maxItems: 1 + + qcom,ev-factor: + description: + Event ring transfer size compare to channel transfer ring. Event + ring length = ev-factor * transfer ring size + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - qcom,max-num-gpii + - qcom,gpii-mask + - qcom,ev-factor + - "#dma-cells" + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + gpi_dma0: dma@800000 { + #dma-cells = <5>; + compatible = "qcom,gpi-dma"; + reg = <0 0x00800000 0 0x60000>; + qcom,max-num-gpii = <13>; + qcom,gpii-mask = <0xfa>; + qcom,ev-factor = <2>; + interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>; + }; + +...
Add devicetree binding documentation for GPI DMA controller implemented on Qualcomm SoCs Signed-off-by: Vinod Koul <vkoul@kernel.org> --- .../devicetree/bindings/dma/qcom-gpi.yaml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/qcom-gpi.yaml -- 2.26.2