public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Charan Pedumuru <charan.pedumuru@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: 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>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: dma: convert text based binding to json schema
Date: Fri, 2 May 2025 15:57:24 +0530	[thread overview]
Message-ID: <a701201e-c888-40e5-a57b-45ea0416af31@gmail.com> (raw)
In-Reply-To: <20250502-lush-resolute-cheetah-a8ceee@kuoka>


On 02-05-2025 13:28, Krzysztof Kozlowski wrote:
> On Thu, May 01, 2025 at 01:12:36PM GMT, 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`.
>>
> Please use subject prefixes matching the subsystem. You can get them for
> example with 'git log --oneline -- DIRECTORY_OR_FILE' on the directory
> your patch is touching. For bindings, the preferred subjects are
> explained here:
> https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
>
> Missing final nvidia,tegra20-apbdma prefix.


Sure, will update that accordingly.


>
>
>> 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(-)
>>
> ...
>
>> +$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: |
> Do not need '|' unless you need to preserve formatting.
>
>> +  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
>> +
>> +  "#dma-cells":
>> +    description:
>> +      Must be <1>. This dictates the length of DMA specifiers
>> +      in client node's dmas properties.
> Drop description, you are not telling here anything new except
> explaining basically DT syntax.
>
>> +    const: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  reg:
>> +    maxItems: 1
> reg is the second property. Old binding even had it correct.
>
>> +
>> +  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
>> +
>> +required:
>> +  - compatible
>> +  - reg
> And here the order is correct...
>
>> +  - interrupts
>> +  - clocks
> But here different. Keep the same order as in properties.
>
>> +  - resets
>> +  - reset-names
>> +  - "#dma-cells"
>> +
> missing allOf: to dma-controller


The reason, I didn't include dma-controller is the pattern under 
$nodename in dma-controller is not matching with the pattern present in 
dts files.

So, I excluded it.


>
>> +additionalProperties: false
> unevaluatedProperties instead. Just open any other DMA binding.


sure.


>
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> You included this...


I checked the other DMA binding from nvidia, they included the same 
header file. I can change it to irq.h, if required


>
>> +    #include <dt-bindings/reset/tegra186-reset.h>
>> +    dma@6000a000 {
> Doesn't look like correct name. Schema requires specific name.


The dt_binding_check is successful when I included allOf to 
dma-controller and used dma-controller@600 as node name, but when I was 
checking for dtb, the pattern is not matching with the one

inside dma-controller, so I removed allOf and changed the node name in 
examples according to the node present inside the dts file.


>
>> +        compatible = "nvidia,tegra30-apbdma", "nvidia,tegra20-apbdma";
>> +        reg = <0x6000a000 0x1200>;
>> +        interrupts = <0 136 0x04>,
> ... so use it.
>
> Best regards,
> Krzysztof
>
-- 
Best Regards,
Charan.


  reply	other threads:[~2025-05-02 10:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01 13:12 [PATCH] dt-bindings: dma: convert text based binding to json schema Charan Pedumuru
2025-05-02  7:58 ` Krzysztof Kozlowski
2025-05-02 10:27   ` Charan Pedumuru [this message]
2025-05-02 11:37     ` Krzysztof Kozlowski

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=a701201e-c888-40e5-a57b-45ea0416af31@gmail.com \
    --to=charan.pedumuru@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@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