summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/sound/qcom,sm8250.yaml
blob: 72ad9ab91832346079ee199c373053de5758cb1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Technologies Inc. SM8250 ASoC sound card driver

maintainers:
  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

description:
  This bindings describes SC8250 SoC based sound cards
  which uses LPASS internal codec for audio.

properties:
  compatible:
    oneOf:
      - const: qcom,sm8250-sndcard
      - const: qcom,qrb5165-rb5-sndcard

  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description:
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source. Valid names could be power supplies,
      MicBias of codec and the jacks on the board.

  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User visible long sound card name

patternProperties:
  ".*-dai-link$":
    description:
      Each subnode represents a dai link. Subnodes of each dai links would be
      cpu/codec dais.

    type: object

    properties:
      link-name:
        description: Indicates dai-link name and PCM stream name.
        $ref: /schemas/types.yaml#/definitions/string
        maxItems: 1

      cpu:
        description: Holds subnode which indicates cpu dai.
        type: object
        properties:
          sound-dai: true

      platform:
        description: Holds subnode which indicates platform dai.
        type: object
        properties:
          sound-dai: true

      codec:
        description: Holds subnode which indicates codec dai.
        type: object
        properties:
          sound-dai: true

    required:
      - link-name
      - cpu

    additionalProperties: false

required:
  - compatible
  - model

additionalProperties: false

examples:

  - |
    #include <dt-bindings/sound/qcom,q6afe.h>
    #include <dt-bindings/sound/qcom,q6asm.h>
    sound {
        compatible = "qcom,qrb5165-rb5-sndcard";
        model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
        audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
                    "SpkrRight IN", "WSA_SPK2 OUT",
                    "VA DMIC0", "vdd-micb",
                    "VA DMIC1", "vdd-micb",
                    "MM_DL1",  "MultiMedia1 Playback",
                    "MM_DL2",  "MultiMedia2 Playback",
                    "MultiMedia3 Capture", "MM_UL3";

        mm1-dai-link {
            link-name = "MultiMedia0";
            cpu {
                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
            };
        };

        mm2-dai-link {
            link-name = "MultiMedia2";
            cpu {
                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
            };
        };

        mm3-dai-link {
            link-name = "MultiMedia3";
            cpu {
                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
            };
        };

        hdmi-dai-link {
            link-name = "HDMI Playback";
            cpu {
                sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
            };

            platform {
                sound-dai = <&q6routing>;
            };

            codec {
                sound-dai = <&lt9611_codec 0>;
            };
        };

        wsa-dai-link {
            link-name = "WSA Playback";
            cpu {
                sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
            };

            platform {
                sound-dai = <&q6routing>;
            };

            codec {
                sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
            };
        };

        va-dai-link {
            link-name = "VA Capture";
            cpu {
                sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
            };

            platform {
                sound-dai = <&q6routing>;
            };

            codec {
                sound-dai = <&vamacro 0>;
            };
        };
    };