DMA Engine development
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Charan Pedumuru <charan.pedumuru@gmail.com>,
	Vinod Koul <vkoul@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] dt-bindings: dma: nvidia,tegra20-apbdma: convert text based binding to json schema
Date: Thu, 8 May 2025 11:50:47 +0100	[thread overview]
Message-ID: <9bf40c88-7b4d-45ba-946d-19e328be76c2@nvidia.com> (raw)
In-Reply-To: <20250507-nvidea-dma-v4-2-6161a8de376f@gmail.com>



On 07/05/2025 05:57, Charan Pedumuru wrote:
> Update text binding to YAML.
> Changes during conversion:
> - Add a fallback for "nvidia,tegra30-apbdma" as it is
>    compatible with the IP core on "nvidia,tegra20-apbdma".
> - Update examples and include appropriate file directives to resolve
>    errors identified by `dt_binding_check` and `dtbs_check`.
> 
> Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com>
> ---
>   .../bindings/dma/nvidia,tegra20-apbdma.txt         | 44 -----------
>   .../bindings/dma/nvidia,tegra20-apbdma.yaml        | 90 ++++++++++++++++++++++
>   2 files changed, 90 insertions(+), 44 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/nvidia,tegra20-apbdma.txt b/Documentation/devicetree/bindings/dma/nvidia,tegra20-apbdma.txt
> deleted file mode 100644
> index 447fb44e7abeaa7ca3010b9518533e786cce56a8..0000000000000000000000000000000000000000
> --- a/Documentation/devicetree/bindings/dma/nvidia,tegra20-apbdma.txt
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -* NVIDIA Tegra APB DMA controller
> -
> -Required properties:
> -- compatible: Should be "nvidia,<chip>-apbdma"
> -- reg: Should contain DMA registers location and length. This should include
> -  all of the per-channel registers.
> -- interrupts: Should contain all of the per-channel DMA interrupts.
> -- clocks: Must contain one entry, for the module clock.
> -  See ../clocks/clock-bindings.txt for details.
> -- resets : Must contain an entry for each entry in reset-names.
> -  See ../reset/reset.txt for details.
> -- reset-names : Must include the following entries:
> -  - dma
> -- #dma-cells : Must be <1>. This dictates the length of DMA specifiers in
> -  client nodes' dmas properties. The specifier represents the DMA request
> -  select value for the peripheral. For more details, consult the Tegra TRM's
> -  documentation of the APB DMA channel control register REQ_SEL field.
> -
> -Examples:
> -
> -apbdma: dma@6000a000 {
> -	compatible = "nvidia,tegra20-apbdma";
> -	reg = <0x6000a000 0x1200>;
> -	interrupts = < 0 136 0x04
> -		       0 137 0x04
> -		       0 138 0x04
> -		       0 139 0x04
> -		       0 140 0x04
> -		       0 141 0x04
> -		       0 142 0x04
> -		       0 143 0x04
> -		       0 144 0x04
> -		       0 145 0x04
> -		       0 146 0x04
> -		       0 147 0x04
> -		       0 148 0x04
> -		       0 149 0x04
> -		       0 150 0x04
> -		       0 151 0x04 >;
> -	clocks = <&tegra_car 34>;
> -	resets = <&tegra_car 34>;
> -	reset-names = "dma";
> -	#dma-cells = <1>;
> -};
> diff --git a/Documentation/devicetree/bindings/dma/nvidia,tegra20-apbdma.yaml b/Documentation/devicetree/bindings/dma/nvidia,tegra20-apbdma.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..a2ffd5209b3bf3f2171b55351a557a6e2085987d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/nvidia,tegra20-apbdma.yaml
> @@ -0,0 +1,90 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/nvidia,tegra20-apbdma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NVIDIA Tegra APB DMA Controller
> +
> +description:
> +  The NVIDIA Tegra APB DMA controller is a hardware component that
> +  enables direct memory access (DMA) on Tegra systems. It facilitates
> +  data transfer between I/O devices and main memory without constant
> +  CPU intervention.
> +
> +maintainers:
> +  - Jonathan Hunter <jonathanh@nvidia.com>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: nvidia,tegra20-apbdma
> +      - items:
> +          - const: nvidia,tegra30-apbdma
> +          - const: nvidia,tegra20-apbdma
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#dma-cells":
> +    const: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  interrupts:
> +    description:
> +      Should contain all of the per-channel DMA interrupts in
> +      ascending order with respect to the DMA channel index.
> +    minItems: 1
> +    maxItems: 32
> +
> +  resets:
> +    maxItems: 1
> +
> +  reset-names:
> +    const: dma


Krzysztof, given that there is only 1, isn't the preference to remove 
this? I understand that this requires a driver change, but it should not 
break compatibility.

Jon

-- 
nvpublic


  parent reply	other threads:[~2025-05-08 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07  4:57 [PATCH v4 0/2] dt-bindings: dma: nvidia,tegra20-apbdma: Add json schema for text binding Charan Pedumuru
2025-05-07  4:57 ` [PATCH v4 1/2] arm: dts: nvidia: tegra20,30: Rename the apbdma nodename to match with common dma-controller binding Charan Pedumuru
2025-05-08 10:45   ` Jon Hunter
2025-05-08 20:19   ` Thierry Reding
2025-05-07  4:57 ` [PATCH v4 2/2] dt-bindings: dma: nvidia,tegra20-apbdma: convert text based binding to json schema Charan Pedumuru
2025-05-07  5:32   ` Krzysztof Kozlowski
2025-05-08 10:50   ` Jon Hunter [this message]
2025-05-08 20:20   ` Thierry Reding

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=9bf40c88-7b4d-45ba-946d-19e328be76c2@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=charan.pedumuru@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    --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