devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Kaehn <kaehndan@gmail.com>
To: tiwai@suse.com, robh@kernel.org
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	Daniel Kaehn <kaehndan@gmail.com>
Subject: [PATCH v5 1/2] dt-bindings: sound: Add generic serial MIDI device
Date: Mon,  2 May 2022 10:04:03 -0500	[thread overview]
Message-ID: <20220502150404.20295-2-kaehndan@gmail.com> (raw)
In-Reply-To: <20220502150404.20295-1-kaehndan@gmail.com>

Adds dt-binding for a Generic MIDI Interface using a serial device.

Signed-off-by: Daniel Kaehn <kaehndan@gmail.com>
---
 .../devicetree/bindings/sound/serialmidi.yaml | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/serialmidi.yaml

diff --git a/Documentation/devicetree/bindings/sound/serialmidi.yaml b/Documentation/devicetree/bindings/sound/serialmidi.yaml
new file mode 100644
index 000000000000..06a894e1b91d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/serialmidi.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/serialmidi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic Serial MIDI Interface
+
+maintainers:
+  - Daniel Kaehn <kaehndan@gmail.com>
+
+description: 
+  Generic MIDI interface using a serial device. This denotes that a serial device is
+  dedicated to MIDI communication, either to an external MIDI device through a DIN5
+  or other connector, or to a known hardwired MIDI controller. This device must be a
+  child node of a serial node.
+
+  Can only be set to use standard baud rates corresponding to supported rates of the
+  parent serial device. If the standard MIDI baud of 31.25 kBaud is needed 
+  (as would be the case if interfacing with arbitrary external MIDI devices),
+  configure the clocks of the parent serial device so that a requested baud of 38.4 kBaud
+  resuts in the standard MIDI baud rate, and set the 'current-speed' property to 38400.
+
+properties:
+  compatible:
+    const: serialmidi
+
+  current-speed:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Baudrate to set the serial port to when this MIDI device is opened.
+      If not specified, the parent serial device is allowed to use its default baud.
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    serial {
+        midi {
+            compatible = "serialmidi";
+            current-speed = <38400>;
+        };
+    };
-- 
2.33.0


  reply	other threads:[~2022-05-02 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 15:04 [PATCH v5 0/2] Add generic serial MIDI driver using serial bus API Daniel Kaehn
2022-05-02 15:04 ` Daniel Kaehn [this message]
2022-05-03 18:33   ` [PATCH v5 1/2] dt-bindings: sound: Add generic serial MIDI device Rob Herring
2022-05-02 15:04 ` [PATCH v5 2/2] Add generic serial MIDI driver using serial bus API Daniel Kaehn
2022-05-03 19:10   ` Rob Herring
2022-05-04 14:02     ` Daniel Kaehn

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=20220502150404.20295-2-kaehndan@gmail.com \
    --to=kaehndan@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).