xref: /linux/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml (revision 01db99b272318da75a1aa5a81f75adb9d32f676e)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/amlogic,gx-sound-card.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Amlogic GX sound card
8
9maintainers:
10  - Jerome Brunet <jbrunet@baylibre.com>
11
12allOf:
13  - $ref: sound-card-common.yaml#
14
15properties:
16  compatible:
17    items:
18      - const: amlogic,gx-sound-card
19
20  audio-aux-devs:
21    $ref: /schemas/types.yaml#/definitions/phandle-array
22    description: list of auxiliary devices
23
24  audio-widgets:
25    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
26    description: |-
27      A list off component DAPM widget. Each entry is a pair of strings,
28      the first being the widget type, the second being the widget name
29
30patternProperties:
31  "^dai-link-[0-9]+$":
32    type: object
33    additionalProperties: false
34    description: |-
35      dai-link child nodes:
36        Container for dai-link level properties and the CODEC sub-nodes.
37        There should be at least one (and probably more) subnode of this type
38
39    properties:
40      dai-format:
41        $ref: /schemas/types.yaml#/definitions/string
42        enum: [ i2s, left-j, dsp_a ]
43
44      mclk-fs:
45        $ref: /schemas/types.yaml#/definitions/uint32
46        description: |-
47          Multiplication factor between the frame rate and master clock
48          rate
49
50      sound-dai:
51        maxItems: 1
52        description: phandle of the CPU DAI
53
54    patternProperties:
55      "^codec(-[0-9]+)?$":
56        type: object
57        additionalProperties: false
58        description: |-
59          Codecs:
60          dai-link representing backend links should have at least one subnode.
61          One subnode for each codec of the dai-link. dai-link representing
62          frontend links have no codec, therefore have no subnodes
63
64        properties:
65          sound-dai:
66            maxItems: 1
67            description: phandle of the codec DAI
68
69        required:
70          - sound-dai
71
72    required:
73      - sound-dai
74
75required:
76  - model
77  - dai-link-0
78
79unevaluatedProperties: false
80
81examples:
82  - |
83    sound {
84        compatible = "amlogic,gx-sound-card";
85        model = "GXL-ACME-S905X-FOO";
86        audio-aux-devs = <&amp>;
87        audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback";
88
89        dai-link-0 {
90               sound-dai = <&i2s_fifo>;
91        };
92
93        dai-link-1 {
94                sound-dai = <&i2s_encoder>;
95                dai-format = "i2s";
96                mclk-fs = <256>;
97
98                codec-0 {
99                        sound-dai = <&codec0>;
100                };
101
102                codec-1 {
103                        sound-dai = <&codec1>;
104                };
105        };
106    };
107