[PATCH] dt-bindings: dma: fsl-mxs-dma: Convert MXS DMA to DT schema

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Sat Dec 17 03:05:20 PST 2022


On 17/12/2022 02:07, Marek Vasut wrote:
> Convert the MXS DMA binding to DT schema format using json-schema.
> 
> Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c
> in Linux kernel does not use it, the property contains duplicate array entries
> in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get
> rid of that optional property altogether.
> 
> Update example node names to be standard dma-controller@ ,
> add global interrupt-parent property into example.

Thank you for your patch. There is something to discuss/improve.

> +
> +title: Freescale Direct Memory Access (DMA) Controller from i.MX23/i.MX28
> +
> +maintainers:
> +  - Marek Vasut <marex at denx.de>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - fsl,imx6q-dma-apbh
> +              - fsl,imx6sx-dma-apbh
> +              - fsl,imx7d-dma-apbh
> +          - const: fsl,imx28-dma-apbh
> +      - items:

No need for items here, make it just an enum.

> +          - enum:
> +              - fsl,imx23-dma-apbh
> +              - fsl,imx23-dma-apbx
> +              - fsl,imx28-dma-apbh
> +              - fsl,imx28-dma-apbx
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 4
> +    maxItems: 16
> +
> +  "#dma-cells":
> +    const: 1
> +
> +  dma-channels:
> +    enum: [4, 8, 16]
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#dma-cells"
> +  - dma-channels
> +  - interrupts
> +
> +allOf:
> +  - $ref: dma-controller.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          not:

I think "not:" goes just after "if:". Please double check that it's correct.

Anyway it is easier to have this without negation and you already
enumerate all variants (here and below).


> +            contains:
> +              enum:
> +                - fsl,imx6q-dma-apbh
> +                - fsl,imx6sx-dma-apbh
> +                - fsl,imx7d-dma-apbh
> +                - fsl,imx23-dma-apbx
> +                - fsl,imx28-dma-apbh
> +                - fsl,imx28-dma-apbx
> +    then:
> +      properties:
> +        dma-channels:
> +          const: 8
> +        interrupts:
> +          maxItems: 8

Blank line here, please.

> +  - if:
> +      properties:
> +        compatible:
> +          not:
> +            contains:
> +              enum:
> +                - fsl,imx6q-dma-apbh
> +                - fsl,imx6sx-dma-apbh
> +                - fsl,imx7d-dma-apbh
> +                - fsl,imx23-dma-apbh
> +    then:
> +      properties:
> +        dma-channels:
> +          const: 16
> +        interrupts:
> +          maxItems: 16
> +
> +additionalProperties: false
> +

Best regards,
Krzysztof




More information about the linux-arm-kernel mailing list