summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
blob: d1816dd061cf008109c09f44ec957b9ab9bef540 (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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/imx-audio-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP i.MX audio sound card.

maintainers:
  - Shengjiu Wang <shengjiu.wang@nxp.com>

properties:
  compatible:
    enum:
      - fsl,imx-audio-card

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

  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.

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

      format:
        description: audio format.
        items:
          enum:
            - i2s
            - dsp_b

      dai-tdm-slot-num:
        description: see tdm-slot.txt.
        $ref: /schemas/types.yaml#/definitions/uint32

      dai-tdm-slot-width:
        description: see tdm-slot.txt.
        $ref: /schemas/types.yaml#/definitions/uint32

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

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

      fsl,mclk-equal-bclk:
        description: Indicates mclk can be equal to bclk, especially for sai interface
        $ref: /schemas/types.yaml#/definitions/flag

    required:
      - link-name
      - cpu

    additionalProperties: false

required:
  - compatible
  - model

additionalProperties: false

examples:
  - |
    sound-ak4458 {
        compatible = "fsl,imx-audio-card";
        model = "ak4458-audio";
        pri-dai-link {
            link-name = "akcodec";
            format = "i2s";
            fsl,mclk-equal-bclk;
            cpu {
                 sound-dai = <&sai1>;
            };
            codec {
                 sound-dai = <&ak4458_1>, <&ak4458_2>;
            };
        };
        fe-dai-link {
            link-name = "HiFi-ASRC-FE";
            format = "i2s";
            cpu {
                sound-dai = <&easrc>;
            };
        };
        be-dai-link {
            link-name = "HiFi-ASRC-BE";
            format = "dsp_b";
            dai-tdm-slot-num = <8>;
            dai-tdm-slot-width = <32>;
            fsl,mclk-equal-bclk;
            cpu {
                sound-dai = <&sai1>;
            };
            codec {
                sound-dai = <&ak4458_1>, <&ak4458_2>;
            };
        };
    };