xref: /freebsd/sys/contrib/device-tree/Bindings/sound/samsung,midas-audio.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,midas-audio.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Samsung Midas audio complex with WM1811 codec
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Sylwester Nawrocki <s.nawrocki@samsung.com>
11c66ec88fSEmmanuel Vadot
12*aa1a8ff2SEmmanuel VadotallOf:
13*aa1a8ff2SEmmanuel Vadot  - $ref: sound-card-common.yaml#
14*aa1a8ff2SEmmanuel Vadot
15c66ec88fSEmmanuel Vadotproperties:
16c66ec88fSEmmanuel Vadot  compatible:
17c66ec88fSEmmanuel Vadot    const: samsung,midas-audio
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadot  cpu:
20c66ec88fSEmmanuel Vadot    type: object
217ef62cebSEmmanuel Vadot    additionalProperties: false
22c66ec88fSEmmanuel Vadot    properties:
23c66ec88fSEmmanuel Vadot      sound-dai:
246be33864SEmmanuel Vadot        maxItems: 1
25c66ec88fSEmmanuel Vadot        description: phandle to the I2S controller
26c66ec88fSEmmanuel Vadot    required:
27c66ec88fSEmmanuel Vadot      - sound-dai
28c66ec88fSEmmanuel Vadot
29c66ec88fSEmmanuel Vadot  codec:
30c66ec88fSEmmanuel Vadot    type: object
317ef62cebSEmmanuel Vadot    additionalProperties: false
32c66ec88fSEmmanuel Vadot    properties:
33c66ec88fSEmmanuel Vadot      sound-dai:
346be33864SEmmanuel Vadot        maxItems: 1
35c66ec88fSEmmanuel Vadot        description: phandle to the WM1811 CODEC
36c66ec88fSEmmanuel Vadot    required:
37c66ec88fSEmmanuel Vadot      - sound-dai
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  samsung,audio-routing:
40*aa1a8ff2SEmmanuel Vadot    deprecated: true
41c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
42c66ec88fSEmmanuel Vadot    description: |
43c66ec88fSEmmanuel Vadot      List of the connections between audio components; each entry is
44c66ec88fSEmmanuel Vadot      a pair of strings, the first being the connection's sink, the second
45c66ec88fSEmmanuel Vadot      being the connection's source; valid names for sources and sinks are
46c66ec88fSEmmanuel Vadot      the WM1811's pins (as documented in its binding), and the jacks
47c66ec88fSEmmanuel Vadot      on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.
48*aa1a8ff2SEmmanuel Vadot      Deprecated, use audio-routing.
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  mic-bias-supply:
51c66ec88fSEmmanuel Vadot    description: Supply for the micbias on the Main microphone
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel Vadot  submic-bias-supply:
54c66ec88fSEmmanuel Vadot    description: Supply for the micbias on the Sub microphone
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot  fm-sel-gpios:
575def4c47SEmmanuel Vadot    maxItems: 1
58c66ec88fSEmmanuel Vadot    description: GPIO pin for FM selection
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadot  lineout-sel-gpios:
615def4c47SEmmanuel Vadot    maxItems: 1
62c66ec88fSEmmanuel Vadot    description: GPIO pin for line out selection
63c66ec88fSEmmanuel Vadot
64c66ec88fSEmmanuel Vadotrequired:
65c66ec88fSEmmanuel Vadot  - compatible
66c66ec88fSEmmanuel Vadot  - cpu
67c66ec88fSEmmanuel Vadot  - codec
68*aa1a8ff2SEmmanuel Vadot  - audio-routing
69c66ec88fSEmmanuel Vadot  - mic-bias-supply
70c66ec88fSEmmanuel Vadot  - submic-bias-supply
71c66ec88fSEmmanuel Vadot
72*aa1a8ff2SEmmanuel VadotunevaluatedProperties: false
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadotexamples:
75c66ec88fSEmmanuel Vadot  - |
76c66ec88fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot    sound {
79c66ec88fSEmmanuel Vadot        compatible = "samsung,midas-audio";
80c66ec88fSEmmanuel Vadot        model = "Midas";
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot        fm-sel-gpios = <&gpaa0 3 GPIO_ACTIVE_HIGH>;
83c66ec88fSEmmanuel Vadot
84c66ec88fSEmmanuel Vadot        mic-bias-supply = <&mic_bias_reg>;
85c66ec88fSEmmanuel Vadot        submic-bias-supply = <&submic_bias_reg>;
86c66ec88fSEmmanuel Vadot
87*aa1a8ff2SEmmanuel Vadot        audio-routing =
88c66ec88fSEmmanuel Vadot                "HP", "HPOUT1L",
89c66ec88fSEmmanuel Vadot                "HP", "HPOUT1R",
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel Vadot                "SPK", "SPKOUTLN",
92c66ec88fSEmmanuel Vadot                "SPK", "SPKOUTLP",
93c66ec88fSEmmanuel Vadot                "SPK", "SPKOUTRN",
94c66ec88fSEmmanuel Vadot                "SPK", "SPKOUTRP",
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot                "RCV", "HPOUT2N",
97c66ec88fSEmmanuel Vadot                "RCV", "HPOUT2P",
98c66ec88fSEmmanuel Vadot
99c66ec88fSEmmanuel Vadot                "IN1LP", "Main Mic",
100c66ec88fSEmmanuel Vadot                "IN1LN", "Main Mic",
101c66ec88fSEmmanuel Vadot                "IN1RP", "Sub Mic",
102c66ec88fSEmmanuel Vadot                "IN1LP", "Sub Mic";
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel Vadot        cpu {
105c66ec88fSEmmanuel Vadot            sound-dai = <&i2s0>;
106c66ec88fSEmmanuel Vadot        };
107c66ec88fSEmmanuel Vadot
108c66ec88fSEmmanuel Vadot        codec {
109c66ec88fSEmmanuel Vadot            sound-dai = <&wm1811>;
110c66ec88fSEmmanuel Vadot        };
111c66ec88fSEmmanuel Vadot
112c66ec88fSEmmanuel Vadot    };
113