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