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,tm2.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung Exynos5433 TM2(E) audio complex with WM5110 codec
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11  - Sylwester Nawrocki <s.nawrocki@samsung.com>
12
13allOf:
14  - $ref: sound-card-common.yaml#
15
16properties:
17  compatible:
18    const: samsung,tm2-audio
19
20  audio-amplifier:
21    description: Phandle to the MAX98504 amplifier.
22    $ref: /schemas/types.yaml#/definitions/phandle
23
24  audio-codec:
25    description: Phandles to the codecs.
26    $ref: /schemas/types.yaml#/definitions/phandle-array
27    items:
28      - description: Phandle to the WM5110 audio codec.
29      - description: Phandle to the HDMI transmitter node.
30
31  samsung,audio-routing:
32    description: |
33      List of the connections between audio components; each entry is
34      a pair of strings, the first being the connection's sink, the second
35      being the connection's source; valid names for sources and sinks are the
36      WM5110's and MAX98504's pins and the jacks on the board: HP, SPK, Main
37      Mic, Sub Mic, Third Mic, Headset Mic.
38      Deprecated, use audio-routing.
39    deprecated: true
40    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
41
42  i2s-controller:
43    description: Phandles to the I2S controllers.
44    $ref: /schemas/types.yaml#/definitions/phandle-array
45    items:
46      - description: Phandle to I2S0.
47      - description: Phandle to I2S1.
48
49  mic-bias-gpios:
50    description: GPIO pin that enables the Main Mic bias regulator.
51
52required:
53  - compatible
54  - audio-amplifier
55  - audio-codec
56  - audio-routing
57  - i2s-controller
58  - mic-bias-gpios
59
60unevaluatedProperties: false
61
62examples:
63  - |
64    #include <dt-bindings/gpio/gpio.h>
65
66    sound {
67        compatible = "samsung,tm2-audio";
68        audio-codec = <&wm5110>, <&hdmi>;
69        i2s-controller = <&i2s0 0>, <&i2s1 0>;
70        audio-amplifier = <&max98504>;
71        mic-bias-gpios = <&gpr3 2 GPIO_ACTIVE_HIGH>;
72        model = "wm5110";
73        audio-routing = "HP", "HPOUT1L",
74                                "HP", "HPOUT1R",
75                                "SPK", "SPKOUT",
76                                "SPKOUT", "HPOUT2L",
77                                "SPKOUT", "HPOUT2R",
78                                "RCV", "HPOUT3L",
79                                "RCV", "HPOUT3R";
80    };
81