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