GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / sound / samsung,midas-audio.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Samsung Midas audio complex with WM1811 codec
8
9 maintainers:
10   - Sylwester Nawrocki <s.nawrocki@samsung.com>
11
12 properties:
13   compatible:
14     const: samsung,midas-audio
15
16   model:
17     $ref: /schemas/types.yaml#/definitions/string
18     description: The user-visible name of this sound complex.
19
20   cpu:
21     type: object
22     additionalProperties: false
23     properties:
24       sound-dai:
25         maxItems: 1
26         description: phandle to the I2S controller
27     required:
28       - sound-dai
29
30   codec:
31     type: object
32     additionalProperties: false
33     properties:
34       sound-dai:
35         maxItems: 1
36         description: phandle to the WM1811 CODEC
37     required:
38       - sound-dai
39
40   samsung,audio-routing:
41     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
42     description: |
43       List of the connections between audio components; each entry is
44       a pair of strings, the first being the connection's sink, the second
45       being the connection's source; valid names for sources and sinks are
46       the WM1811's pins (as documented in its binding), and the jacks
47       on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.
48
49   mic-bias-supply:
50     description: Supply for the micbias on the Main microphone
51
52   submic-bias-supply:
53     description: Supply for the micbias on the Sub microphone
54
55   fm-sel-gpios:
56     maxItems: 1
57     description: GPIO pin for FM selection
58
59   lineout-sel-gpios:
60     maxItems: 1
61     description: GPIO pin for line out selection
62
63 required:
64   - compatible
65   - model
66   - cpu
67   - codec
68   - samsung,audio-routing
69   - mic-bias-supply
70   - submic-bias-supply
71
72 additionalProperties: false
73
74 examples:
75   - |
76     #include <dt-bindings/gpio/gpio.h>
77
78     sound {
79         compatible = "samsung,midas-audio";
80         model = "Midas";
81
82         fm-sel-gpios = <&gpaa0 3 GPIO_ACTIVE_HIGH>;
83
84         mic-bias-supply = <&mic_bias_reg>;
85         submic-bias-supply = <&submic_bias_reg>;
86
87         samsung,audio-routing =
88                 "HP", "HPOUT1L",
89                 "HP", "HPOUT1R",
90
91                 "SPK", "SPKOUTLN",
92                 "SPK", "SPKOUTLP",
93                 "SPK", "SPKOUTRN",
94                 "SPK", "SPKOUTRP",
95
96                 "RCV", "HPOUT2N",
97                 "RCV", "HPOUT2P",
98
99                 "IN1LP", "Main Mic",
100                 "IN1LN", "Main Mic",
101                 "IN1RP", "Sub Mic",
102                 "IN1LP", "Sub Mic";
103
104         cpu {
105             sound-dai = <&i2s0>;
106         };
107
108         codec {
109             sound-dai = <&wm1811>;
110         };
111
112     };