Devicetree
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: dma: ti,dma-crossbar: Convert to DT schema
@ 2026-07-08 16:32 Bhargav Joshi
  2026-07-12 12:52 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Bhargav Joshi @ 2026-07-08 16:32 UTC (permalink / raw)
  To: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vignesh Raghavendra, Peter Ujfalusi
  Cc: dmaengine, devicetree, linux-kernel, goledhruva, m-chawdhry,
	daniel.baluta, simona.toaca, j.bhargav.u

Convert Texas Instruments DMA Crossbar from text to DT schema.
Modify MAINTAINERS file to correctly point to new yaml file.

Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
Changes in v2:
- Removed the unmatched `ti,omap4430-sdma` compatible string from the
  example block and trim down example
- Restored dropped documentation regarding client dma-cells
  configuration into the top-level description block.
- Updated the MAINTAINERS file to replace the old .txt reference with
  the new .yaml file path.
- Added constraints on its inner tuple dimensions of
  ti,reserved-dma-request-ranges
- Link to v1: https://lore.kernel.org/r/20260708-ti-dma-crossbar-v1-1-f62796428f13@gmail.com
---
 .../bindings/dma/ti,dra7-dma-crossbar.yaml         | 89 ++++++++++++++++++++++
 .../devicetree/bindings/dma/ti-dma-crossbar.txt    | 68 -----------------
 MAINTAINERS                                        |  2 +-
 3 files changed, 90 insertions(+), 69 deletions(-)

diff --git a/Documentation/devicetree/bindings/dma/ti,dra7-dma-crossbar.yaml b/Documentation/devicetree/bindings/dma/ti,dra7-dma-crossbar.yaml
new file mode 100644
index 000000000000..3de4f53797d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ti,dra7-dma-crossbar.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/ti,dra7-dma-crossbar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DMA Crossbar (DMA request router)
+
+maintainers:
+  - Vignesh Raghavendra <vigneshr@ti.com>
+  - Bhargav Joshi <j.bhargav.u@gmail.com>
+
+description:
+  When requesting channel via ti,dra7-dma-crossbar, the DMA client must request
+  the DMA event number as crossbar ID (input to the DMA crossbar). For
+  ti,am335x-edma-crossbar the meaning of parameters of dmas for clients dmas =
+  <&edma_xbar 12 0 1>; where <12> is the DMA request number, <0> is the TC the
+  event should be assigned and <1> is the mux selection for in the crossbar.
+  When mux 0 is used the DMA channel can be requested directly from edma node.
+
+properties:
+  compatible:
+    enum:
+      - ti,dra7-dma-crossbar
+      - ti,am335x-edma-crossbar
+
+  reg:
+    maxItems: 1
+
+  "#dma-cells":
+    minimum: 1
+    maximum: 3
+
+  dma-requests:
+    minimum: 1
+    maximum: 256
+
+  dma-masters:
+    maxItems: 1
+
+  ti,dma-safe-map:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Safe routing value for unused request lines
+
+  ti,reserved-dma-request-ranges:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description:
+      DMA request ranges which should not be used when mapping xbar input to
+      DMA request, they are either allocated to be used by for example the DSP
+      or they are used as memcpy channels in eDMA.
+    items:
+      items:
+        - description: starting DMA request line number
+        - description: number of consecutive lines to reserve
+
+required:
+  - compatible
+  - reg
+  - "#dma-cells"
+  - dma-requests
+  - dma-masters
+
+allOf:
+  - $ref: dma-router.yaml#
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ti,am335x-edma-crossbar
+    then:
+      properties:
+        "#dma-cells":
+          const: 3
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    dma-router@4a002b78 {
+        compatible = "ti,dra7-dma-crossbar";
+        reg = <0x4a002b78 0xfc>;
+        #dma-cells = <1>;
+        dma-requests = <205>;
+        ti,dma-safe-map = <0>;
+        /* Protect the sDMA request ranges: 10-14 and 100-126 */
+        ti,reserved-dma-request-ranges = <10 5>, <100 27>;
+        dma-masters = <&sdma>;
+    };
diff --git a/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt b/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
deleted file mode 100644
index 1f9831540c97..000000000000
--- a/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-Texas Instruments DMA Crossbar (DMA request router)
-
-Required properties:
-- compatible:	"ti,dra7-dma-crossbar" for DRA7xx DMA crossbar
-		"ti,am335x-edma-crossbar" for AM335x and AM437x
-- reg:		Memory map for accessing module
-- #dma-cells:	Should be set to match with the DMA controller's dma-cells
-		for ti,dra7-dma-crossbar and <3> for ti,am335x-edma-crossbar.
-- dma-requests:	Number of DMA requests the crossbar can receive
-- dma-masters:	phandle pointing to the DMA controller
-
-The DMA controller node need to have the following poroperties:
-- dma-requests:	Number of DMA requests the controller can handle
-
-Optional properties:
-- ti,dma-safe-map: Safe routing value for unused request lines
-- ti,reserved-dma-request-ranges: DMA request ranges which should not be used
-		when mapping xbar input to DMA request, they are either
-		allocated to be used by for example the DSP or they are used as
-		memcpy channels in eDMA.
-
-Notes:
-When requesting channel via ti,dra7-dma-crossbar, the DMA client must request
-the DMA event number as crossbar ID (input to the DMA crossbar).
-
-For ti,am335x-edma-crossbar: the meaning of parameters of dmas for clients:
-dmas = <&edma_xbar 12 0 1>; where <12> is the DMA request number, <0> is the TC
-the event should be assigned and <1> is the mux selection for in the crossbar.
-When mux 0 is used the DMA channel can be requested directly from edma node.
-
-Example:
-
-/* DMA controller */
-sdma: dma-controller@4a056000 {
-	compatible = "ti,omap4430-sdma";
-	reg = <0x4a056000 0x1000>;
-	interrupts =	<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
-			<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
-			<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
-			<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
-	#dma-cells = <1>;
-	dma-channels = <32>;
-	dma-requests = <127>;
-};
-
-/* DMA crossbar */
-sdma_xbar: dma-router@4a002b78 {
-	compatible = "ti,dra7-dma-crossbar";
-	reg = <0x4a002b78 0xfc>;
-	#dma-cells = <1>;
-	dma-requests = <205>;
-	ti,dma-safe-map = <0>;
-	/* Protect the sDMA request ranges: 10-14 and 100-126 */
-	ti,reserved-dma-request-ranges = <10 5>, <100 27>;
-	dma-masters = <&sdma>;
-};
-
-/* DMA client */
-uart1: serial@4806a000 {
-	compatible = "ti,omap4-uart";
-	reg = <0x4806a000 0x100>;
-	interrupts-extended = <&gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
-	ti,hwmods = "uart1";
-	clock-frequency = <48000000>;
-	/* Requesting crossbar input 49 and 50 */
-	dmas = <&sdma_xbar 49>, <&sdma_xbar 50>;
-	dma-names = "tx", "rx";
-};
diff --git a/MAINTAINERS b/MAINTAINERS
index f37a81950e25..a4b39e0dc178 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -26710,7 +26710,7 @@ TEXAS INSTRUMENTS DMA DRIVERS
 M:	Vignesh Raghavendra <vigneshr@ti.com>
 L:	dmaengine@vger.kernel.org
 S:	Maintained
-F:	Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
+F:	Documentation/devicetree/bindings/dma/ti,dra7-dma-crossbar.yaml
 F:	Documentation/devicetree/bindings/dma/ti-edma.txt
 F:	Documentation/devicetree/bindings/dma/ti/
 F:	drivers/dma/ti/

---
base-commit: 0e35b9b6ec0ffcc5e23cbdec09f5c622ad532b53
change-id: 20260708-ti-dma-crossbar-ae8411c5d982

Best regards,
-- 
Bhargav


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

* Re: [PATCH v2] dt-bindings: dma: ti,dma-crossbar: Convert to DT schema
  2026-07-08 16:32 [PATCH v2] dt-bindings: dma: ti,dma-crossbar: Convert to DT schema Bhargav Joshi
@ 2026-07-12 12:52 ` Krzysztof Kozlowski
  2026-07-12 16:28   ` Bhargav Joshi
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-12 12:52 UTC (permalink / raw)
  To: Bhargav Joshi
  Cc: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vignesh Raghavendra, Peter Ujfalusi, dmaengine,
	devicetree, linux-kernel, goledhruva, m-chawdhry, daniel.baluta,
	simona.toaca

On Wed, Jul 08, 2026 at 10:02:18PM +0530, Bhargav Joshi wrote:
> +properties:
> +  compatible:
> +    enum:
> +      - ti,dra7-dma-crossbar
> +      - ti,am335x-edma-crossbar
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#dma-cells":
> +    minimum: 1
> +    maximum: 3

That's rather:
  enum: [1, 3]

right?

> +
> +  dma-requests:
> +    minimum: 1
> +    maximum: 256
> +
> +  dma-masters:
> +    maxItems: 1
> +
> +  ti,dma-safe-map:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Safe routing value for unused request lines
> +
> +  ti,reserved-dma-request-ranges:
> +    $ref: /schemas/types.yaml#/definitions/uint32-matrix
> +    description:
> +      DMA request ranges which should not be used when mapping xbar input to
> +      DMA request, they are either allocated to be used by for example the DSP
> +      or they are used as memcpy channels in eDMA.
> +    items:
> +      items:
> +        - description: starting DMA request line number
> +        - description: number of consecutive lines to reserve
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#dma-cells"
> +  - dma-requests
> +  - dma-masters
> +
> +allOf:
> +  - $ref: dma-router.yaml#
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: ti,am335x-edma-crossbar
> +    then:
> +      properties:
> +        "#dma-cells":
> +          const: 3

else:
  properties:
    dma-cels:
      const: 1

      Best regards,
      Krzysztof


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

* Re: [PATCH v2] dt-bindings: dma: ti,dma-crossbar: Convert to DT schema
  2026-07-12 12:52 ` Krzysztof Kozlowski
@ 2026-07-12 16:28   ` Bhargav Joshi
  2026-07-13  5:59     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Bhargav Joshi @ 2026-07-12 16:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vignesh Raghavendra, Peter Ujfalusi, dmaengine,
	devicetree, linux-kernel, goledhruva, m-chawdhry, daniel.baluta,
	simona.toaca

Hi,

On Sun, Jul 12, 2026 at 6:22 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Wed, Jul 08, 2026 at 10:02:18PM +0530, Bhargav Joshi wrote:
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,dra7-dma-crossbar
> > +      - ti,am335x-edma-crossbar
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  "#dma-cells":
> > +    minimum: 1
> > +    maximum: 3
>
> That's rather:
>   enum: [1, 3]
>
> right?
value 2 is required by DRA7 enhanced DMA crossbar (edma_xbar), and it is
used in dra7-l4.dtsi so i think we can keep it unless you specifically
prefer enum: [1, 2, 3]

>
> > +
> > +  dma-requests:
> > +    minimum: 1
> > +    maximum: 256
> > +
> > +  dma-masters:
> > +    maxItems: 1
> > +
> > +  ti,dma-safe-map:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Safe routing value for unused request lines
> > +
> > +  ti,reserved-dma-request-ranges:
> > +    $ref: /schemas/types.yaml#/definitions/uint32-matrix
> > +    description:
> > +      DMA request ranges which should not be used when mapping xbar input to
> > +      DMA request, they are either allocated to be used by for example the DSP
> > +      or they are used as memcpy channels in eDMA.
> > +    items:
> > +      items:
> > +        - description: starting DMA request line number
> > +        - description: number of consecutive lines to reserve
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - "#dma-cells"
> > +  - dma-requests
> > +  - dma-masters
> > +
> > +allOf:
> > +  - $ref: dma-router.yaml#
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: ti,am335x-edma-crossbar
> > +    then:
> > +      properties:
> > +        "#dma-cells":
> > +          const: 3
>
> else:
>   properties:
>     dma-cels:
>       const: 1
Yes but this should be rather,
else:
  properties:
    '#dma-cells':
        enum: [1, 2]
as dra7 doesn't use value 3 but uses 1 and 2, I will add it in next version
>
>       Best regards,
>       Krzysztof
>

Best Regards,
Bhargav

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

* Re: [PATCH v2] dt-bindings: dma: ti,dma-crossbar: Convert to DT schema
  2026-07-12 16:28   ` Bhargav Joshi
@ 2026-07-13  5:59     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-13  5:59 UTC (permalink / raw)
  To: Bhargav Joshi
  Cc: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vignesh Raghavendra, Peter Ujfalusi, dmaengine,
	devicetree, linux-kernel, goledhruva, m-chawdhry, daniel.baluta,
	simona.toaca

On 12/07/2026 18:28, Bhargav Joshi wrote:
> Hi,
> 
> On Sun, Jul 12, 2026 at 6:22 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Wed, Jul 08, 2026 at 10:02:18PM +0530, Bhargav Joshi wrote:
>>> +properties:
>>> +  compatible:
>>> +    enum:
>>> +      - ti,dra7-dma-crossbar
>>> +      - ti,am335x-edma-crossbar
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  "#dma-cells":
>>> +    minimum: 1
>>> +    maximum: 3
>>
>> That's rather:
>>   enum: [1, 3]
>>
>> right?
> value 2 is required by DRA7 enhanced DMA crossbar (edma_xbar), and it is
> used in dra7-l4.dtsi so i think we can keep it unless you specifically
> prefer enum: [1, 2, 3]

I missed that edma device. It is fine.

> 
>>
>>> +
>>> +  dma-requests:
>>> +    minimum: 1
>>> +    maximum: 256
>>> +
>>> +  dma-masters:
>>> +    maxItems: 1
>>> +
>>> +  ti,dma-safe-map:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>> +    description: Safe routing value for unused request lines
>>> +
>>> +  ti,reserved-dma-request-ranges:
>>> +    $ref: /schemas/types.yaml#/definitions/uint32-matrix
>>> +    description:
>>> +      DMA request ranges which should not be used when mapping xbar input to
>>> +      DMA request, they are either allocated to be used by for example the DSP
>>> +      or they are used as memcpy channels in eDMA.
>>> +    items:
>>> +      items:
>>> +        - description: starting DMA request line number
>>> +        - description: number of consecutive lines to reserve
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - "#dma-cells"
>>> +  - dma-requests
>>> +  - dma-masters
>>> +
>>> +allOf:
>>> +  - $ref: dma-router.yaml#
>>> +
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            const: ti,am335x-edma-crossbar
>>> +    then:
>>> +      properties:
>>> +        "#dma-cells":
>>> +          const: 3
>>
>> else:
>>   properties:
>>     dma-cels:
>>       const: 1
> Yes but this should be rather,
> else:
>   properties:
>     '#dma-cells':
>         enum: [1, 2]
> as dra7 doesn't use value 3 but uses 1 and 2, I will add it in next version


Yes


Best regards,
Krzysztof

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

end of thread, other threads:[~2026-07-13  5:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 16:32 [PATCH v2] dt-bindings: dma: ti,dma-crossbar: Convert to DT schema Bhargav Joshi
2026-07-12 12:52 ` Krzysztof Kozlowski
2026-07-12 16:28   ` Bhargav Joshi
2026-07-13  5:59     ` Krzysztof Kozlowski

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