Devicetree
 help / color / mirror / Atom feed
From: Eduard Bostina <egbostina@gmail.com>
To: Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, Eduard Bostina <egbostina@gmail.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>
Cc: daniel.baluta@nxp.com, simona.toaca@nxp.com,
	goledhruva@gmail.com, m-chawdhry@ti.com
Subject: [PATCH] dt-bindings: sound: Convert TI OMAP2+ McBSP to DT schema
Date: Wed, 22 Jul 2026 17:16:54 +0000	[thread overview]
Message-ID: <20260722171654.298557-1-egbostina@gmail.com> (raw)

Convert the Texas Instruments OMAP2+ McBSP (Multi-Channel Buffered
Serial Port) bindings to DT schema.

During the conversion, the following updates were made:
- Documented the 'clocks', 'clock-names', 'dmas', 'dma-names',
  '#sound-dai-cells' and 'port' properties, which are used by the
  boards but were missing from the old text binding.
- Added 'dma' to the 'reg-names' enum, which the boards use alongside
  'mpu' and 'sidetone'.
- Changed 'ti,hwmods' to a string array of up to two entries, as some
  boards pass both the base and sidetone hwmods.
- Made 'ti,hwmods' optional to resolve dtbs_check warnings. Modern OMAP
  platforms no longer provide this property, while older platforms still
  use it.
- Made 'ti,buffer-size' optional, as it only applies to OMAP2430 and
  newer SoCs.

Signed-off-by: Eduard Bostina <egbostina@gmail.com>
---
 .../devicetree/bindings/sound/omap-mcbsp.txt  |  36 -------
 .../bindings/sound/ti,omap2-mcbsp.yaml        | 101 ++++++++++++++++++
 2 files changed, 101 insertions(+), 36 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/omap-mcbsp.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ti,omap2-mcbsp.yaml

diff --git a/Documentation/devicetree/bindings/sound/omap-mcbsp.txt b/Documentation/devicetree/bindings/sound/omap-mcbsp.txt
deleted file mode 100644
index ae8bf703ce7a..000000000000
--- a/Documentation/devicetree/bindings/sound/omap-mcbsp.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-* Texas Instruments OMAP2+ McBSP module
-
-Required properties:
-- compatible: "ti,omap2420-mcbsp" for McBSP on OMAP2420
-	      "ti,omap2430-mcbsp" for McBSP on OMAP2430
-	      "ti,omap3-mcbsp" for McBSP on OMAP3
-	      "ti,omap4-mcbsp" for McBSP on OMAP4 and newer SoC
-- reg: Register location and size, for OMAP4+ as an array:
-       <MPU access base address, size>,
-       <L3 interconnect address, size>;
-- reg-names: Array of strings associated with the address space
-- interrupts: Interrupt numbers for the McBSP port, as an array in case the
-	      McBSP IP have more interrupt lines:
-	<OCP compliant irq>,
-	<TX irq>,
-	<RX irq>;
-- interrupt-names: Array of strings associated with the interrupt numbers
-- ti,buffer-size: Size of the FIFO on the port (OMAP2430 and newer SoC)
-- ti,hwmods: Name of the hwmod associated to the McBSP port
-
-Example:
-
-mcbsp2: mcbsp@49022000 {
-	compatible = "ti,omap3-mcbsp";
-	reg = <0x49022000 0xff>,
-	      <0x49028000 0xff>;
-	reg-names = "mpu", "sidetone";
-	interrupts = <0 17 0x4>, /* OCP compliant interrupt */
-		     <0 62 0x4>, /* TX interrupt */
-		     <0 63 0x4>, /* RX interrupt */
-		     <0 4 0x4>;  /* Sidetone */
-	interrupt-names = "common", "tx", "rx", "sidetone";
-	interrupt-parent = <&intc>;
-	ti,buffer-size = <1280>;
-	ti,hwmods = "mcbsp2";
-};
diff --git a/Documentation/devicetree/bindings/sound/ti,omap2-mcbsp.yaml b/Documentation/devicetree/bindings/sound/ti,omap2-mcbsp.yaml
new file mode 100644
index 000000000000..17cd66460620
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ti,omap2-mcbsp.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ti,omap2-mcbsp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments OMAP2+ McBSP
+
+maintainers:
+  - Eduard Bostina <egbostina@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - ti,omap2420-mcbsp
+      - ti,omap2430-mcbsp
+      - ti,omap3-mcbsp
+      - ti,omap4-mcbsp
+
+  reg:
+    minItems: 1
+    maxItems: 2
+    description: |
+      Register location and size. For OMAP4+ it may be an array containing:
+      - MPU access base address
+      - L3 interconnect address (or sidetone)
+
+  reg-names:
+    minItems: 1
+    maxItems: 2
+    items:
+      enum: [mpu, sidetone, dma]
+
+  interrupts:
+    minItems: 1
+    maxItems: 4
+
+  interrupt-names:
+    minItems: 1
+    maxItems: 4
+    items:
+      enum: [common, tx, rx, sidetone]
+
+  ti,buffer-size:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Size of the FIFO on the port (OMAP2430 and newer SoCs).
+
+  ti,hwmods:
+    $ref: /schemas/types.yaml#/definitions/string-array
+    minItems: 1
+    maxItems: 2
+    description: Name of the hwmod(s) associated with the McBSP port.
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    maxItems: 2
+
+  dmas:
+    minItems: 1
+    maxItems: 2
+
+  dma-names:
+    minItems: 1
+    maxItems: 2
+
+  "#sound-dai-cells":
+    const: 0
+
+  port:
+    $ref: /schemas/sound/audio-graph-port.yaml#
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - interrupt-names
+
+additionalProperties: false
+
+examples:
+  - |
+    mcbsp@49022000 {
+        compatible = "ti,omap3-mcbsp";
+        reg = <0x49022000 0xff>,
+              <0x49028000 0xff>;
+        reg-names = "mpu", "sidetone";
+        interrupts = <0 17 0x4>, /* OCP compliant */
+                     <0 62 0x4>, /* TX */
+                     <0 63 0x4>, /* RX */
+                     <0 4 0x4>;  /* Sidetone */
+        interrupt-names = "common", "tx", "rx", "sidetone";
+        interrupt-parent = <&intc>;
+        ti,buffer-size = <1280>;
+        ti,hwmods = "mcbsp2";
+    };

-- 
2.43.0


             reply	other threads:[~2026-07-22 17:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 17:16 Eduard Bostina [this message]
2026-07-22 17:25 ` [PATCH] dt-bindings: sound: Convert TI OMAP2+ McBSP to DT schema sashiko-bot

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=20260722171654.298557-1-egbostina@gmail.com \
    --to=egbostina@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=goledhruva@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=m-chawdhry@ti.com \
    --cc=robh@kernel.org \
    --cc=simona.toaca@nxp.com \
    /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