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