GNU Linux-libre 5.19-rc6-gnu
[releases.git] / Documentation / devicetree / bindings / sound / samsung,aries-wm8994.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,aries-wm8994.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Samsung Aries audio complex with WM8994 codec
8
9 maintainers:
10   - Jonathan Bakker <xc-racer2@live.ca>
11
12 properties:
13   compatible:
14     enum:
15       # With FM radio and modem master
16       - samsung,aries-wm8994
17       # Without FM radio and modem slave
18       - samsung,fascinate4g-wm8994
19
20   model:
21     $ref: /schemas/types.yaml#/definitions/string
22     description: The user-visible name of this sound complex.
23
24   cpu:
25     type: object
26     properties:
27       sound-dai:
28         minItems: 2
29         maxItems: 2
30         description: |
31           phandles to the I2S controller and bluetooth codec,
32           in that order
33     required:
34       - sound-dai
35
36   codec:
37     type: object
38     properties:
39       sound-dai:
40         maxItems: 1
41         description: phandle to the WM8994 CODEC
42     required:
43       - sound-dai
44
45   samsung,audio-routing:
46     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
47     description: |
48       List of the connections between audio
49       components;  each entry is a pair of strings, the first being the
50       connection's sink, the second being the connection's source;
51       valid names for sources and sinks are the WM8994's pins (as
52       documented in its binding), and the jacks on the board -
53       For samsung,aries-wm8994: HP, SPK, RCV, LINE, Main Mic, Headset Mic,
54       or FM In
55       For samsung,fascinate4g-wm8994: HP, SPK, RCV, LINE, Main Mic,
56       or HeadsetMic
57
58   extcon:
59     description: Extcon phandle for dock detection
60
61   main-micbias-supply:
62     description: Supply for the micbias on the main mic
63
64   headset-micbias-supply:
65     description: Supply for the micbias on the headset mic
66
67   earpath-sel-gpios:
68     maxItems: 1
69     description: GPIO for switching between tv-out and mic paths
70
71   headset-detect-gpios:
72     maxItems: 1
73     description: GPIO for detection of headset insertion
74
75   headset-key-gpios:
76     maxItems: 1
77     description: GPIO for detection of headset key press
78
79   io-channels:
80     maxItems: 1
81     description: IO channel to read micbias voltage for headset detection
82
83   io-channel-names:
84     const: headset-detect
85
86 required:
87   - compatible
88   - model
89   - cpu
90   - codec
91   - samsung,audio-routing
92   - extcon
93   - main-micbias-supply
94   - headset-micbias-supply
95   - earpath-sel-gpios
96   - headset-detect-gpios
97   - headset-key-gpios
98
99 additionalProperties: false
100
101 examples:
102   - |
103     #include <dt-bindings/gpio/gpio.h>
104
105     sound {
106         compatible = "samsung,fascinate4g-wm8994";
107
108         model = "Fascinate4G";
109
110         extcon = <&fsa9480>;
111
112         main-micbias-supply = <&main_micbias_reg>;
113         headset-micbias-supply = <&headset_micbias_reg>;
114
115         earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
116
117         io-channels = <&adc 3>;
118         io-channel-names = "headset-detect";
119         headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
120         headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
121
122         samsung,audio-routing =
123             "HP", "HPOUT1L",
124             "HP", "HPOUT1R",
125
126             "SPK", "SPKOUTLN",
127             "SPK", "SPKOUTLP",
128
129             "RCV", "HPOUT2N",
130             "RCV", "HPOUT2P",
131
132             "LINE", "LINEOUT2N",
133             "LINE", "LINEOUT2P",
134
135             "IN1LP", "Main Mic",
136             "IN1LN", "Main Mic",
137
138             "IN1RP", "Headset Mic",
139             "IN1RN", "Headset Mic";
140
141         pinctrl-names = "default";
142         pinctrl-0 = <&headset_det &earpath_sel>;
143
144         cpu {
145             sound-dai = <&i2s0>, <&bt_codec>;
146         };
147
148         codec {
149             sound-dai = <&wm8994>;
150         };
151     };