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