xref: /freebsd-src/sys/contrib/device-tree/Bindings/sound/serial-midi.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2d5b0e70fSEmmanuel Vadot
3d5b0e70fSEmmanuel Vadot%YAML 1.2
4d5b0e70fSEmmanuel Vadot---
5d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/serial-midi.yaml#
6d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7d5b0e70fSEmmanuel Vadot
8d5b0e70fSEmmanuel Vadottitle: Generic Serial MIDI Interface
9d5b0e70fSEmmanuel Vadot
10d5b0e70fSEmmanuel Vadotmaintainers:
11d5b0e70fSEmmanuel Vadot  - Daniel Kaehn <kaehndan@gmail.com>
12d5b0e70fSEmmanuel Vadot
13d5b0e70fSEmmanuel Vadotdescription:
14d5b0e70fSEmmanuel Vadot  Generic MIDI interface using a serial device. This denotes that a serial device is
15d5b0e70fSEmmanuel Vadot  dedicated to MIDI communication, either to an external MIDI device through a DIN5
16d5b0e70fSEmmanuel Vadot  or other connector, or to a known hardwired MIDI controller. This device must be a
17d5b0e70fSEmmanuel Vadot  child node of a serial node.
18d5b0e70fSEmmanuel Vadot
19d5b0e70fSEmmanuel Vadot  Can only be set to use standard baud rates corresponding to supported rates of the
20d5b0e70fSEmmanuel Vadot  parent serial device. If the standard MIDI baud of 31.25 kBaud is needed
21d5b0e70fSEmmanuel Vadot  (as would be the case if interfacing with arbitrary external MIDI devices),
22d5b0e70fSEmmanuel Vadot  configure the clocks of the parent serial device so that a requested baud of 38.4 kBaud
23aa1a8ff2SEmmanuel Vadot  results in the standard MIDI baud rate, and set the 'current-speed' property to 38400 (default)
24d5b0e70fSEmmanuel Vadot
25*b2d2a78aSEmmanuel VadotallOf:
26*b2d2a78aSEmmanuel Vadot  - $ref: /schemas/serial/serial-peripheral-props.yaml#
27*b2d2a78aSEmmanuel Vadot
28d5b0e70fSEmmanuel Vadotproperties:
29d5b0e70fSEmmanuel Vadot  compatible:
30d5b0e70fSEmmanuel Vadot    const: serial-midi
31d5b0e70fSEmmanuel Vadot
32d5b0e70fSEmmanuel Vadot  current-speed:
33d5b0e70fSEmmanuel Vadot    description: Baudrate to set the serial port to when this MIDI device is opened.
34d5b0e70fSEmmanuel Vadot    default: 38400
35d5b0e70fSEmmanuel Vadot
36d5b0e70fSEmmanuel Vadotrequired:
37d5b0e70fSEmmanuel Vadot  - compatible
38d5b0e70fSEmmanuel Vadot
39d5b0e70fSEmmanuel VadotadditionalProperties: false
40d5b0e70fSEmmanuel Vadot
41d5b0e70fSEmmanuel Vadotexamples:
42d5b0e70fSEmmanuel Vadot  - |
43d5b0e70fSEmmanuel Vadot    serial {
44d5b0e70fSEmmanuel Vadot        midi {
45d5b0e70fSEmmanuel Vadot            compatible = "serial-midi";
46d5b0e70fSEmmanuel Vadot        };
47d5b0e70fSEmmanuel Vadot    };
48d5b0e70fSEmmanuel Vadot  - |
49d5b0e70fSEmmanuel Vadot    serial {
50d5b0e70fSEmmanuel Vadot        midi {
51d5b0e70fSEmmanuel Vadot            compatible = "serial-midi";
52d5b0e70fSEmmanuel Vadot            current-speed = <115200>;
53d5b0e70fSEmmanuel Vadot        };
54d5b0e70fSEmmanuel Vadot    };
55