devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Durai Manickam KR <durai.manickamkr@microchip.com>
Cc: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Tudor Ambarus <tudor.ambarus@linaro.org>,
	dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: dma: convert atmel-dma.txt to YAML
Date: Thu, 15 Feb 2024 19:27:52 +0000	[thread overview]
Message-ID: <20240215-broken-emu-64a6dabc43e2@spud> (raw)
In-Reply-To: <20240215-dmac-v1-1-8f1c6f031c98@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 5505 bytes --]

On Thu, Feb 15, 2024 at 04:15:44PM +0530, Durai Manickam KR wrote:
> Added a description, required properties and appropriate compatibles
> for all the SoCs that are supported by microchip.
> 
> Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
> ---
>  .../devicetree/bindings/dma/atmel-dma.txt          | 42 -------------
>  .../bindings/dma/microchip,at91-dma.yaml           | 71 ++++++++++++++++++++++
>  2 files changed, 71 insertions(+), 42 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/atmel-dma.txt b/Documentation/devicetree/bindings/dma/atmel-dma.txt
> deleted file mode 100644
> index f69bcf5a6343..000000000000
> --- a/Documentation/devicetree/bindings/dma/atmel-dma.txt
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -* Atmel Direct Memory Access Controller (DMA)
> -
> -Required properties:
> -- compatible: Should be "atmel,<chip>-dma".
> -- reg: Should contain DMA registers location and length.
> -- interrupts: Should contain DMA interrupt.
> -- #dma-cells: Must be <2>, used to represent the number of integer cells in
> -the dmas property of client devices.
> -
> -Example:
> -
> -dma0: dma@ffffec00 {
> -	compatible = "atmel,at91sam9g45-dma";
> -	reg = <0xffffec00 0x200>;
> -	interrupts = <21>;
> -	#dma-cells = <2>;
> -};
> -
> -DMA clients connected to the Atmel DMA controller must use the format
> -described in the dma.txt file, using a three-cell specifier for each channel:
> -a phandle plus two integer cells.
> -The three cells in order are:
> -
> -1. A phandle pointing to the DMA controller.
> -2. The memory interface (16 most significant bits), the peripheral interface
> -(16 less significant bits).
> -3. Parameters for the at91 DMA configuration register which are device
> -dependent:
> -  - bit 7-0: peripheral identifier for the hardware handshaking interface. The
> -  identifier can be different for tx and rx.
> -  - bit 11-8: FIFO configuration. 0 for half FIFO, 1 for ALAP, 2 for ASAP.
> -
> -Example:
> -
> -i2c0@i2c@f8010000 {
> -	compatible = "atmel,at91sam9x5-i2c";
> -	reg = <0xf8010000 0x100>;
> -	interrupts = <9 4 6>;
> -	dmas = <&dma0 1 7>,
> -	       <&dma0 1 8>;
> -	dma-names = "tx", "rx";
> -};
> diff --git a/Documentation/devicetree/bindings/dma/microchip,at91-dma.yaml b/Documentation/devicetree/bindings/dma/microchip,at91-dma.yaml
> new file mode 100644
> index 000000000000..a0a582902e4d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/microchip,at91-dma.yaml

Filename matching the compatible please.

> @@ -0,0 +1,71 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/microchip,at91-dma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel Direct Memory Access Controller (DMA)
> +
> +maintainers:
> +  - Ludovic Desroches <ludovic.desroches@microchip.com>
> +  - Tudor Ambarus <tudor.ambarus@linaro.org>
> +
> +description: |

The | is not needed.

> +  The Atmel Direct Memory Access Controller (DMAC) transfers data from a source
> +  peripheral to a destination peripheral over one or more AMBA buses. One channel
> +  is required for each source/destination pair. In the most basic configuration,
> +  the DMAC has one master interface and one channel. The master interface reads
> +  the data from a source and writes it to a destination. Two AMBA transfers are
> +  required for each DMAC data transfer. This is also known as a dual-access transfer.
> +  The DMAC is programmed via the APB interface.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - enum:
> +          - atmel,at91sam9g45-dma
> +          - atmel,at91sam9rl-dma
> +  reg:
> +    description: Should contain DMA registers location and length.

Drop the description from these common properties.

> +    maxItems: 1
> +
> +  interrupts:
> +    description: Should contain the DMA interrupts associated to the DMA channels.
> +    maxItems: 1
> +
> +  "#dma-cells":
> +    description:
> +      Must be <2>, used to represent the number of integer cells in the dmas
> +      property of client devices.

You've lost the description of how these cells work, which is somewhat
unique and needs to be preserved.
This is the only property that needs a description.

> +    const: 2
> +
> +  clocks:
> +    description: Should contain a clock specifier for each entry in clock-names.
> +    maxItems: 1
> +
> +  clock-names:
> +    description: Should contain the clock of the DMA controller.
> +    const: dma_clk

This is a new addition? You should call out in the commit message wat
you've added that was not in th text binding.

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - "#dma-cells"
> +  - clocks
> +  - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    dma0: dma-controller@ffffec00 {

Drop the label, its not used.

Thanks,
Conor.

> +            compatible = "atmel,at91sam9g45-dma";
> +            reg = <0xffffec00 0x200>;
> +            interrupts = <21>;
> +            #dma-cells = <2>;
> +            clocks = <&pmc 2 20>;
> +            clock-names = "dma_clk";
> +    };
> +
> +...
> 
> ---
> base-commit: 7e90b5c295ec1e47c8ad865429f046970c549a66
> change-id: 20240214-dmac-5f48fd7f3b9d
> 
> Best regards,
> -- 
> Durai Manickam KR <durai.manickamkr@microchip.com>
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2024-02-15 19:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 10:45 [PATCH] dt-bindings: dma: convert atmel-dma.txt to YAML Durai Manickam KR
2024-02-15 19:27 ` Conor Dooley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240215-broken-emu-64a6dabc43e2@spud \
    --to=conor@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=durai.manickamkr@microchip.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).