ASoC: samsung: Document DT bindings for Midas sound subsystem

This patch adds documentation of DT biding for the Midas sound complex.
Partially based on the *txt version by Simon Shields <simon@lineageos.org>.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200728131111.14334-1-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Sylwester Nawrocki 2020-07-28 15:11:09 +02:00 committed by Mark Brown
parent 982f4a4134
commit f61d06ae99
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -0,0 +1,108 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Midas audio complex with WM1811 codec
maintainers:
- Sylwester Nawrocki <s.nawrocki@samsung.com>
properties:
compatible:
const: samsung,midas-audio
model:
$ref: /schemas/types.yaml#/definitions/string
description: The user-visible name of this sound complex.
cpu:
type: object
properties:
sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the I2S controller
required:
- sound-dai
codec:
type: object
properties:
sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the WM1811 CODEC
required:
- sound-dai
samsung,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description: |
List of the connections between audio components; each entry is
a pair of strings, the first being the connection's sink, the second
being the connection's source; valid names for sources and sinks are
the WM1811's pins (as documented in its binding), and the jacks
on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.
mic-bias-supply:
description: Supply for the micbias on the Main microphone
submic-bias-supply:
description: Supply for the micbias on the Sub microphone
fm-sel-gpios:
description: GPIO pin for FM selection
lineout-sel-gpios:
description: GPIO pin for line out selection
required:
- compatible
- model
- cpu
- codec
- samsung,audio-routing
- mic-bias-supply
- submic-bias-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
sound {
compatible = "samsung,midas-audio";
model = "Midas";
fm-sel-gpios = <&gpaa0 3 GPIO_ACTIVE_HIGH>;
mic-bias-supply = <&mic_bias_reg>;
submic-bias-supply = <&submic_bias_reg>;
samsung,audio-routing =
"HP", "HPOUT1L",
"HP", "HPOUT1R",
"SPK", "SPKOUTLN",
"SPK", "SPKOUTLP",
"SPK", "SPKOUTRN",
"SPK", "SPKOUTRP",
"RCV", "HPOUT2N",
"RCV", "HPOUT2P",
"IN1LP", "Main Mic",
"IN1LN", "Main Mic",
"IN1RP", "Sub Mic",
"IN1LP", "Sub Mic";
cpu {
sound-dai = <&i2s0>;
};
codec {
sound-dai = <&wm1811>;
};
};