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