xref: /openbmc/linux/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1f61d06aeSSylwester Nawrocki# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2f61d06aeSSylwester Nawrocki%YAML 1.2
3f61d06aeSSylwester Nawrocki---
4f61d06aeSSylwester Nawrocki$id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml#
5f61d06aeSSylwester Nawrocki$schema: http://devicetree.org/meta-schemas/core.yaml#
6f61d06aeSSylwester Nawrocki
7f61d06aeSSylwester Nawrockititle: Samsung Midas audio complex with WM1811 codec
8f61d06aeSSylwester Nawrocki
9f61d06aeSSylwester Nawrockimaintainers:
10f61d06aeSSylwester Nawrocki  - Sylwester Nawrocki <s.nawrocki@samsung.com>
11f61d06aeSSylwester Nawrocki
12*e1d77644SKrzysztof KozlowskiallOf:
13*e1d77644SKrzysztof Kozlowski  - $ref: sound-card-common.yaml#
14*e1d77644SKrzysztof Kozlowski
15f61d06aeSSylwester Nawrockiproperties:
16f61d06aeSSylwester Nawrocki  compatible:
17f61d06aeSSylwester Nawrocki    const: samsung,midas-audio
18f61d06aeSSylwester Nawrocki
19f61d06aeSSylwester Nawrocki  cpu:
20f61d06aeSSylwester Nawrocki    type: object
219e10a1deSRob Herring    additionalProperties: false
22f61d06aeSSylwester Nawrocki    properties:
23f61d06aeSSylwester Nawrocki      sound-dai:
243e7ba1c0SKrzysztof Kozlowski        maxItems: 1
25f61d06aeSSylwester Nawrocki        description: phandle to the I2S controller
26f61d06aeSSylwester Nawrocki    required:
27f61d06aeSSylwester Nawrocki      - sound-dai
28f61d06aeSSylwester Nawrocki
29f61d06aeSSylwester Nawrocki  codec:
30f61d06aeSSylwester Nawrocki    type: object
319e10a1deSRob Herring    additionalProperties: false
32f61d06aeSSylwester Nawrocki    properties:
33f61d06aeSSylwester Nawrocki      sound-dai:
343e7ba1c0SKrzysztof Kozlowski        maxItems: 1
35f61d06aeSSylwester Nawrocki        description: phandle to the WM1811 CODEC
36f61d06aeSSylwester Nawrocki    required:
37f61d06aeSSylwester Nawrocki      - sound-dai
38f61d06aeSSylwester Nawrocki
39f61d06aeSSylwester Nawrocki  samsung,audio-routing:
40*e1d77644SKrzysztof Kozlowski    deprecated: true
41f61d06aeSSylwester Nawrocki    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
42f61d06aeSSylwester Nawrocki    description: |
43f61d06aeSSylwester Nawrocki      List of the connections between audio components; each entry is
44f61d06aeSSylwester Nawrocki      a pair of strings, the first being the connection's sink, the second
45f61d06aeSSylwester Nawrocki      being the connection's source; valid names for sources and sinks are
46f61d06aeSSylwester Nawrocki      the WM1811's pins (as documented in its binding), and the jacks
47f61d06aeSSylwester Nawrocki      on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.
48*e1d77644SKrzysztof Kozlowski      Deprecated, use audio-routing.
49f61d06aeSSylwester Nawrocki
50f61d06aeSSylwester Nawrocki  mic-bias-supply:
51f61d06aeSSylwester Nawrocki    description: Supply for the micbias on the Main microphone
52f61d06aeSSylwester Nawrocki
53f61d06aeSSylwester Nawrocki  submic-bias-supply:
54f61d06aeSSylwester Nawrocki    description: Supply for the micbias on the Sub microphone
55f61d06aeSSylwester Nawrocki
56f61d06aeSSylwester Nawrocki  fm-sel-gpios:
570499220dSRob Herring    maxItems: 1
58f61d06aeSSylwester Nawrocki    description: GPIO pin for FM selection
59f61d06aeSSylwester Nawrocki
60f61d06aeSSylwester Nawrocki  lineout-sel-gpios:
610499220dSRob Herring    maxItems: 1
62f61d06aeSSylwester Nawrocki    description: GPIO pin for line out selection
63f61d06aeSSylwester Nawrocki
64f61d06aeSSylwester Nawrockirequired:
65f61d06aeSSylwester Nawrocki  - compatible
66f61d06aeSSylwester Nawrocki  - cpu
67f61d06aeSSylwester Nawrocki  - codec
68*e1d77644SKrzysztof Kozlowski  - audio-routing
69f61d06aeSSylwester Nawrocki  - mic-bias-supply
70f61d06aeSSylwester Nawrocki  - submic-bias-supply
71f61d06aeSSylwester Nawrocki
72*e1d77644SKrzysztof KozlowskiunevaluatedProperties: false
73f61d06aeSSylwester Nawrocki
74f61d06aeSSylwester Nawrockiexamples:
75f61d06aeSSylwester Nawrocki  - |
76f61d06aeSSylwester Nawrocki    #include <dt-bindings/gpio/gpio.h>
77f61d06aeSSylwester Nawrocki
78f61d06aeSSylwester Nawrocki    sound {
79f61d06aeSSylwester Nawrocki        compatible = "samsung,midas-audio";
80f61d06aeSSylwester Nawrocki        model = "Midas";
81f61d06aeSSylwester Nawrocki
82f61d06aeSSylwester Nawrocki        fm-sel-gpios = <&gpaa0 3 GPIO_ACTIVE_HIGH>;
83f61d06aeSSylwester Nawrocki
84f61d06aeSSylwester Nawrocki        mic-bias-supply = <&mic_bias_reg>;
85f61d06aeSSylwester Nawrocki        submic-bias-supply = <&submic_bias_reg>;
86f61d06aeSSylwester Nawrocki
87*e1d77644SKrzysztof Kozlowski        audio-routing =
88f61d06aeSSylwester Nawrocki                "HP", "HPOUT1L",
89f61d06aeSSylwester Nawrocki                "HP", "HPOUT1R",
90f61d06aeSSylwester Nawrocki
91f61d06aeSSylwester Nawrocki                "SPK", "SPKOUTLN",
92f61d06aeSSylwester Nawrocki                "SPK", "SPKOUTLP",
93f61d06aeSSylwester Nawrocki                "SPK", "SPKOUTRN",
94f61d06aeSSylwester Nawrocki                "SPK", "SPKOUTRP",
95f61d06aeSSylwester Nawrocki
96f61d06aeSSylwester Nawrocki                "RCV", "HPOUT2N",
97f61d06aeSSylwester Nawrocki                "RCV", "HPOUT2P",
98f61d06aeSSylwester Nawrocki
99f61d06aeSSylwester Nawrocki                "IN1LP", "Main Mic",
100f61d06aeSSylwester Nawrocki                "IN1LN", "Main Mic",
101f61d06aeSSylwester Nawrocki                "IN1RP", "Sub Mic",
102f61d06aeSSylwester Nawrocki                "IN1LP", "Sub Mic";
103f61d06aeSSylwester Nawrocki
104f61d06aeSSylwester Nawrocki        cpu {
105f61d06aeSSylwester Nawrocki            sound-dai = <&i2s0>;
106f61d06aeSSylwester Nawrocki        };
107f61d06aeSSylwester Nawrocki
108f61d06aeSSylwester Nawrocki        codec {
109f61d06aeSSylwester Nawrocki            sound-dai = <&wm1811>;
110f61d06aeSSylwester Nawrocki        };
111f61d06aeSSylwester Nawrocki
112f61d06aeSSylwester Nawrocki    };
113