xref: /freebsd/sys/contrib/device-tree/Bindings/sound/samsung,aries-wm8994.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/samsung,aries-wm8994.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Samsung Aries audio complex with WM8994 codec
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Jonathan Bakker <xc-racer2@live.ca>
11c66ec88fSEmmanuel Vadot
12*aa1a8ff2SEmmanuel VadotallOf:
13*aa1a8ff2SEmmanuel Vadot  - $ref: sound-card-common.yaml#
14*aa1a8ff2SEmmanuel Vadot
15c66ec88fSEmmanuel Vadotproperties:
16c66ec88fSEmmanuel Vadot  compatible:
176be33864SEmmanuel Vadot    enum:
186be33864SEmmanuel Vadot      # With FM radio and modem master
196be33864SEmmanuel Vadot      - samsung,aries-wm8994
206be33864SEmmanuel Vadot      # Without FM radio and modem slave
216be33864SEmmanuel Vadot      - samsung,fascinate4g-wm8994
22c66ec88fSEmmanuel Vadot
23c66ec88fSEmmanuel Vadot  cpu:
24c66ec88fSEmmanuel Vadot    type: object
257ef62cebSEmmanuel Vadot    additionalProperties: false
26c66ec88fSEmmanuel Vadot    properties:
27c66ec88fSEmmanuel Vadot      sound-dai:
28c66ec88fSEmmanuel Vadot        minItems: 2
29c66ec88fSEmmanuel Vadot        maxItems: 2
30c66ec88fSEmmanuel Vadot        description: |
31c66ec88fSEmmanuel Vadot          phandles to the I2S controller and bluetooth codec,
32c66ec88fSEmmanuel Vadot          in that order
33c9ccf3a3SEmmanuel Vadot    required:
34c9ccf3a3SEmmanuel Vadot      - sound-dai
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot  codec:
377ef62cebSEmmanuel Vadot    additionalProperties: false
38c66ec88fSEmmanuel Vadot    type: object
39c66ec88fSEmmanuel Vadot    properties:
40c66ec88fSEmmanuel Vadot      sound-dai:
41c9ccf3a3SEmmanuel Vadot        maxItems: 1
42c66ec88fSEmmanuel Vadot        description: phandle to the WM8994 CODEC
43c9ccf3a3SEmmanuel Vadot    required:
44c9ccf3a3SEmmanuel Vadot      - sound-dai
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadot  samsung,audio-routing:
47c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
48*aa1a8ff2SEmmanuel Vadot    deprecated: true
49c66ec88fSEmmanuel Vadot    description: |
50c66ec88fSEmmanuel Vadot      List of the connections between audio
51c66ec88fSEmmanuel Vadot      components;  each entry is a pair of strings, the first being the
52c66ec88fSEmmanuel Vadot      connection's sink, the second being the connection's source;
53c66ec88fSEmmanuel Vadot      valid names for sources and sinks are the WM8994's pins (as
54c66ec88fSEmmanuel Vadot      documented in its binding), and the jacks on the board -
55c66ec88fSEmmanuel Vadot      For samsung,aries-wm8994: HP, SPK, RCV, LINE, Main Mic, Headset Mic,
56c66ec88fSEmmanuel Vadot      or FM In
57c66ec88fSEmmanuel Vadot      For samsung,fascinate4g-wm8994: HP, SPK, RCV, LINE, Main Mic,
58c66ec88fSEmmanuel Vadot      or HeadsetMic
59*aa1a8ff2SEmmanuel Vadot      Deprecated, use audio-routing.
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadot  extcon:
62c66ec88fSEmmanuel Vadot    description: Extcon phandle for dock detection
63c66ec88fSEmmanuel Vadot
64c66ec88fSEmmanuel Vadot  main-micbias-supply:
65c66ec88fSEmmanuel Vadot    description: Supply for the micbias on the main mic
66c66ec88fSEmmanuel Vadot
67c66ec88fSEmmanuel Vadot  headset-micbias-supply:
68c66ec88fSEmmanuel Vadot    description: Supply for the micbias on the headset mic
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel Vadot  earpath-sel-gpios:
715def4c47SEmmanuel Vadot    maxItems: 1
72c66ec88fSEmmanuel Vadot    description: GPIO for switching between tv-out and mic paths
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadot  headset-detect-gpios:
755def4c47SEmmanuel Vadot    maxItems: 1
76c66ec88fSEmmanuel Vadot    description: GPIO for detection of headset insertion
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot  headset-key-gpios:
795def4c47SEmmanuel Vadot    maxItems: 1
80c66ec88fSEmmanuel Vadot    description: GPIO for detection of headset key press
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot  io-channels:
83c66ec88fSEmmanuel Vadot    maxItems: 1
84c66ec88fSEmmanuel Vadot    description: IO channel to read micbias voltage for headset detection
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot  io-channel-names:
87c66ec88fSEmmanuel Vadot    const: headset-detect
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadotrequired:
90c66ec88fSEmmanuel Vadot  - compatible
91c66ec88fSEmmanuel Vadot  - cpu
92c66ec88fSEmmanuel Vadot  - codec
93*aa1a8ff2SEmmanuel Vadot  - audio-routing
94c66ec88fSEmmanuel Vadot  - extcon
95c66ec88fSEmmanuel Vadot  - main-micbias-supply
96c66ec88fSEmmanuel Vadot  - headset-micbias-supply
97c66ec88fSEmmanuel Vadot  - earpath-sel-gpios
98c66ec88fSEmmanuel Vadot  - headset-detect-gpios
99c66ec88fSEmmanuel Vadot  - headset-key-gpios
100c66ec88fSEmmanuel Vadot
101*aa1a8ff2SEmmanuel VadotunevaluatedProperties: false
102c66ec88fSEmmanuel Vadot
103c66ec88fSEmmanuel Vadotexamples:
104c66ec88fSEmmanuel Vadot  - |
105c66ec88fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
106c66ec88fSEmmanuel Vadot
107c66ec88fSEmmanuel Vadot    sound {
108c66ec88fSEmmanuel Vadot        compatible = "samsung,fascinate4g-wm8994";
109c66ec88fSEmmanuel Vadot
110c66ec88fSEmmanuel Vadot        model = "Fascinate4G";
111c66ec88fSEmmanuel Vadot
112c66ec88fSEmmanuel Vadot        extcon = <&fsa9480>;
113c66ec88fSEmmanuel Vadot
114c66ec88fSEmmanuel Vadot        main-micbias-supply = <&main_micbias_reg>;
115c66ec88fSEmmanuel Vadot        headset-micbias-supply = <&headset_micbias_reg>;
116c66ec88fSEmmanuel Vadot
117c66ec88fSEmmanuel Vadot        earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot        io-channels = <&adc 3>;
120c66ec88fSEmmanuel Vadot        io-channel-names = "headset-detect";
121c66ec88fSEmmanuel Vadot        headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
122c66ec88fSEmmanuel Vadot        headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
123c66ec88fSEmmanuel Vadot
124*aa1a8ff2SEmmanuel Vadot        audio-routing =
125c66ec88fSEmmanuel Vadot            "HP", "HPOUT1L",
126c66ec88fSEmmanuel Vadot            "HP", "HPOUT1R",
127c66ec88fSEmmanuel Vadot
128c66ec88fSEmmanuel Vadot            "SPK", "SPKOUTLN",
129c66ec88fSEmmanuel Vadot            "SPK", "SPKOUTLP",
130c66ec88fSEmmanuel Vadot
131c66ec88fSEmmanuel Vadot            "RCV", "HPOUT2N",
132c66ec88fSEmmanuel Vadot            "RCV", "HPOUT2P",
133c66ec88fSEmmanuel Vadot
134c66ec88fSEmmanuel Vadot            "LINE", "LINEOUT2N",
135c66ec88fSEmmanuel Vadot            "LINE", "LINEOUT2P",
136c66ec88fSEmmanuel Vadot
137c66ec88fSEmmanuel Vadot            "IN1LP", "Main Mic",
138c66ec88fSEmmanuel Vadot            "IN1LN", "Main Mic",
139c66ec88fSEmmanuel Vadot
140c66ec88fSEmmanuel Vadot            "IN1RP", "Headset Mic",
141c66ec88fSEmmanuel Vadot            "IN1RN", "Headset Mic";
142c66ec88fSEmmanuel Vadot
143c66ec88fSEmmanuel Vadot        pinctrl-names = "default";
144c66ec88fSEmmanuel Vadot        pinctrl-0 = <&headset_det &earpath_sel>;
145c66ec88fSEmmanuel Vadot
146c66ec88fSEmmanuel Vadot        cpu {
147c66ec88fSEmmanuel Vadot            sound-dai = <&i2s0>, <&bt_codec>;
148c66ec88fSEmmanuel Vadot        };
149c66ec88fSEmmanuel Vadot
150c66ec88fSEmmanuel Vadot        codec {
151c66ec88fSEmmanuel Vadot            sound-dai = <&wm8994>;
152c66ec88fSEmmanuel Vadot        };
153c66ec88fSEmmanuel Vadot    };
154