Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema
@ 2024-06-05  0:33 Animesh Agarwal
  2024-06-05  7:07 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Animesh Agarwal @ 2024-06-05  0:33 UTC (permalink / raw)
  Cc: animeshagarwal28, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, dmaengine, devicetree, imx, linux-arm-kernel,
	linux-kernel

Convert the fsl i.MX DMA controller bindings to DT schema. Remove old
and deprecated properties #dma-channels and #dma-requests.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>

---
Changes in v3:
- Changed maximum: 16 back to const: 16 as the device use exactly 16
channels.

Changes in v2:
- Added description for each interrupt item.
- Changed dma-channels: const: 16 to maximum: 16.
- Removed unnecessary '|' character.
- Dropped unused label.
---
 .../devicetree/bindings/dma/fsl,imx-dma.yaml  | 56 +++++++++++++++++++
 .../devicetree/bindings/dma/fsl-imx-dma.txt   | 50 -----------------
 2 files changed, 56 insertions(+), 50 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml
 delete mode 100644 Documentation/devicetree/bindings/dma/fsl-imx-dma.txt

diff --git a/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml b/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml
new file mode 100644
index 000000000000..902a11f65be2
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/fsl,imx-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale Direct Memory Access (DMA) Controller for i.MX
+
+maintainers:
+  - Animesh Agarwal <animeshagarwal28@gmail.com>
+
+allOf:
+  - $ref: dma-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx1-dma
+      - fsl,imx21-dma
+      - fsl,imx27-dma
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: DMA complete interrupt
+      - description: DMA Error interrupt
+    minItems: 1
+
+  "#dma-cells":
+    const: 1
+
+  dma-channels:
+    const: 16
+
+  dma-requests:
+    description: Number of DMA requests supported.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#dma-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    dma-controller@10001000 {
+      compatible = "fsl,imx27-dma";
+      reg = <0x10001000 0x1000>;
+      interrupts = <32 33>;
+      #dma-cells = <1>;
+      dma-channels = <16>;
+    };
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt
deleted file mode 100644
index 1c9929d53727..000000000000
--- a/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-* Freescale Direct Memory Access (DMA) Controller for i.MX
-
-This document will only describe differences to the generic DMA Controller and
-DMA request bindings as described in dma/dma.txt .
-
-* DMA controller
-
-Required properties:
-- compatible : Should be "fsl,<chip>-dma". chip can be imx1, imx21 or imx27
-- reg : Should contain DMA registers location and length
-- interrupts : First item should be DMA interrupt, second one is optional and
-    should contain DMA Error interrupt
-- #dma-cells : Has to be 1. imx-dma does not support anything else.
-
-Optional properties:
-- dma-channels : Number of DMA channels supported. Should be 16.
-- #dma-channels : deprecated
-- dma-requests : Number of DMA requests supported.
-- #dma-requests : deprecated
-
-Example:
-
-	dma: dma@10001000 {
-		compatible = "fsl,imx27-dma";
-		reg = <0x10001000 0x1000>;
-		interrupts = <32 33>;
-		#dma-cells = <1>;
-		dma-channels = <16>;
-	};
-
-
-* DMA client
-
-Clients have to specify the DMA requests with phandles in a list.
-
-Required properties:
-- dmas: List of one or more DMA request specifiers. One DMA request specifier
-    consists of a phandle to the DMA controller followed by the integer
-    specifying the request line.
-- dma-names: List of string identifiers for the DMA requests. For the correct
-    names, have a look at the specific client driver.
-
-Example:
-
-	sdhci1: sdhci@10013000 {
-		...
-		dmas = <&dma 7>;
-		dma-names = "rx-tx";
-		...
-	};
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema
  2024-06-05  0:33 [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema Animesh Agarwal
@ 2024-06-05  7:07 ` Krzysztof Kozlowski
  2024-06-05  7:17   ` Daniel Baluta
  2024-06-05  7:22 ` Krzysztof Kozlowski
  2024-06-07 17:47 ` Vinod Koul
  2 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-05  7:07 UTC (permalink / raw)
  To: Animesh Agarwal
  Cc: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dmaengine, devicetree, imx, linux-arm-kernel, linux-kernel

On 05/06/2024 02:33, Animesh Agarwal wrote:
> Convert the fsl i.MX DMA controller bindings to DT schema. Remove old
> and deprecated properties #dma-channels and #dma-requests.

Where? I see them.

> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> 
> ---
> Changes in v3:
> - Changed maximum: 16 back to const: 16 as the device use exactly 16
> channels.
> 
> Changes in v2:
> - Added description for each interrupt item.
> - Changed dma-channels: const: 16 to maximum: 16.
> - Removed unnecessary '|' character.
> - Dropped unused label.
> ---
>  .../devicetree/bindings/dma/fsl,imx-dma.yaml  | 56 +++++++++++++++++++
>  .../devicetree/bindings/dma/fsl-imx-dma.txt   | 50 -----------------
>  2 files changed, 56 insertions(+), 50 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml
>  delete mode 100644 Documentation/devicetree/bindings/dma/fsl-imx-dma.txt
> 
> diff --git a/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml b/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml
> new file mode 100644
> index 000000000000..902a11f65be2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/fsl,imx-dma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale Direct Memory Access (DMA) Controller for i.MX
> +
> +maintainers:
> +  - Animesh Agarwal <animeshagarwal28@gmail.com>
> +
> +allOf:
> +  - $ref: dma-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - fsl,imx1-dma
> +      - fsl,imx21-dma
> +      - fsl,imx27-dma
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    items:
> +      - description: DMA complete interrupt
> +      - description: DMA Error interrupt
> +    minItems: 1
> +
> +  "#dma-cells":
> +    const: 1
> +
> +  dma-channels:
> +    const: 16
> +
> +  dma-requests:
> +    description: Number of DMA requests supported.

That's confusing. It is supposed to be deprecated.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema
  2024-06-05  7:07 ` Krzysztof Kozlowski
@ 2024-06-05  7:17   ` Daniel Baluta
  2024-06-05  7:22     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Baluta @ 2024-06-05  7:17 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Animesh Agarwal, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, dmaengine, devicetree, imx, linux-arm-kernel,
	linux-kernel

Hi Krzysztof,

On Wed, Jun 5, 2024 at 10:07 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 05/06/2024 02:33, Animesh Agarwal wrote:
> > Convert the fsl i.MX DMA controller bindings to DT schema. Remove old
> > and deprecated properties #dma-channels and #dma-requests.
>
> Where? I see them.

What you see is dma-channels which is the newer properties. We removed
the deprecated ones named '#dma-channels'

See the original txt file:

-- dma-requests : Number of DMA requests supported.
-- #dma-requests : deprecated

Funny or not there were two properties with similar names the only difference
was the '#' at the beginning.

We removed the deprecated property named '#dma-requests'.

 > +
> > +  dma-requests:
> > +    description: Number of DMA requests supported.
>
> That's confusing. It is supposed to be deprecated.

No, this is not deprecated.

The property starting with '#' is deprecated and we removed it from
the yaml file.

For example you can look at this commit:

commit bd1eca7b2c66c53873a0eab84f9f301aca41f33a
Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Date:   Tue May 3 08:54:04 2022 +0200

    dt-bindings: dmaengine: mmp: deprecate '#dma-channels' and '#dma-requests'

    The generic properties, used in most of the drivers and defined in
    generic dma-common DT bindings, are 'dma-channels' and 'dma-requests'.

    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema
  2024-06-05  7:17   ` Daniel Baluta
@ 2024-06-05  7:22     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-05  7:22 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: Animesh Agarwal, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, dmaengine, devicetree, imx, linux-arm-kernel,
	linux-kernel

On 05/06/2024 09:17, Daniel Baluta wrote:
> Hi Krzysztof,
> 
> On Wed, Jun 5, 2024 at 10:07 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 05/06/2024 02:33, Animesh Agarwal wrote:
>>> Convert the fsl i.MX DMA controller bindings to DT schema. Remove old
>>> and deprecated properties #dma-channels and #dma-requests.
>>
>> Where? I see them.
> 
> What you see is dma-channels which is the newer properties. We removed
> the deprecated ones named '#dma-channels'
> 
> See the original txt file:
> 
> -- dma-requests : Number of DMA requests supported.
> -- #dma-requests : deprecated
> 
> Funny or not there were two properties with similar names the only difference
> was the '#' at the beginning.
> 
> We removed the deprecated property named '#dma-requests'.

Oh, I see now, thank you.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema
  2024-06-05  0:33 [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema Animesh Agarwal
  2024-06-05  7:07 ` Krzysztof Kozlowski
@ 2024-06-05  7:22 ` Krzysztof Kozlowski
  2024-06-07 17:47 ` Vinod Koul
  2 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-05  7:22 UTC (permalink / raw)
  To: Animesh Agarwal
  Cc: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dmaengine, devicetree, imx, linux-arm-kernel, linux-kernel

On 05/06/2024 02:33, Animesh Agarwal wrote:
> Convert the fsl i.MX DMA controller bindings to DT schema. Remove old
> and deprecated properties #dma-channels and #dma-requests.
> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> 
> ---


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema
  2024-06-05  0:33 [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema Animesh Agarwal
  2024-06-05  7:07 ` Krzysztof Kozlowski
  2024-06-05  7:22 ` Krzysztof Kozlowski
@ 2024-06-07 17:47 ` Vinod Koul
  2 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2024-06-07 17:47 UTC (permalink / raw)
  To: Animesh Agarwal
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, dmaengine,
	devicetree, imx, linux-arm-kernel, linux-kernel


On Wed, 05 Jun 2024 06:03:49 +0530, Animesh Agarwal wrote:
> Convert the fsl i.MX DMA controller bindings to DT schema. Remove old
> and deprecated properties #dma-channels and #dma-requests.
> 
> 

Applied, thanks!

[1/1] dt-bindings: dma: fsl,imx-dma: Convert to dtschema
      commit: 45a24e40581db95f9c7ee08e0f27874daf7d3e7b

Best regards,
-- 
Vinod Koul <vkoul@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-07 17:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05  0:33 [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema Animesh Agarwal
2024-06-05  7:07 ` Krzysztof Kozlowski
2024-06-05  7:17   ` Daniel Baluta
2024-06-05  7:22     ` Krzysztof Kozlowski
2024-06-05  7:22 ` Krzysztof Kozlowski
2024-06-07 17:47 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox