[PATCH v2 2/3] Documentation: of: Document audio graph bindings

From: Jean-Francois Moine
Date: Wed Jan 21 2015 - 14:33:10 EST


This patch adds a document describing common OF bindings for audio devices.

Signed-off-by: Jean-Francois Moine <moinejf@xxxxxxx>
---
.../devicetree/bindings/sound/audio-interfaces.txt | 101 +++++++++++++++++++++
1 file changed, 101 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/audio-interfaces.txt

diff --git a/Documentation/devicetree/bindings/sound/audio-interfaces.txt b/Documentation/devicetree/bindings/sound/audio-interfaces.txt
new file mode 100644
index 0000000..4eddb3f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-interfaces.txt
@@ -0,0 +1,101 @@
+Common bindings for audio device graphs
+
+The graph of the audio ports follows the common binding for device graphs
+defined in Documentation/devicetree/bindings/graph.txt.
+
+Here are described only the audio specific properties.
+
+Port required properties:
+
+- port-type: "i2s" or "spdif"
+
+Port optional property:
+
+- reg: numeric value which defines how the port is wired to the device.
+ This value depends on the device. Usually, it is the content
+ of the device register which controls the audio pins.
+
+Port required nodes:
+
+- at least one 'endpoint' node must be specified.
+
+
+Example:
+
+The board contains an audio controller with two outputs:
+- the S/PDIF output is connected to two devices:
+ - a S/PDIF optical output
+ - a HDMI transmitter.
+- the I2S output is connected to an other audio input of the HDMI transmitter.
+
+ /* audio controller */
+ &audio1 {
+ status = "okay";
+ ...
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* S/PDIF output */
+ port@0 {
+ port-type = "spdif";
+ audio1_spdif0: endpoint@0 {
+ remote-endpoint = <&spdif_out>;
+ };
+ audio1_spdif1: endpoint@1 {
+ remote-endpoint = <&tda998x_spdif>;
+ };
+ };
+
+ /* I2S output */
+ port@1 {
+ port-type = "i2s";
+ audio1_i2s: endpoint {
+ remote-endpoint = <&tda998x_i2s>;
+ };
+ };
+ };
+
+ /* optical output */
+ spdif_codec: spdif-codec {
+ ...
+ port {
+ port-type = "spdif";
+ spdif_out: endpoint {
+ remote-endpoint = <&audio1_spdif0>;
+ };
+ };
+ };
+
+ /* HDMI transmitter */
+ hdmi: hdmi-encoder {
+ ...
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* video input */
+ port@230145 {
+ port-type = "rgb";
+ reg = <0x230145>;
+ hdmi_0: endpoint {
+ remote-endpoint = <&lcd0_0>;
+ };
+ };
+
+ /* audio input I2S on AP1 */
+ port@3 {
+ port-type = "i2s";
+ reg = <0x03>;
+ tda998x_i2s: endpoint {
+ remote-endpoint = <&audio1_i2s>;
+ };
+ };
+
+ /* audio input S/PDIF on AP2 */
+ port@4 {
+ port-type = "spdif";
+ reg = <0x04>;
+ tda998x_spdif: endpoint {
+ remote-endpoint = <&audio1_spdif1>;
+ };
+ };
+ };
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/