xref: /linux/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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
30  clocks:
31    minItems: 1
32    maxItems: 3
33    description:
34      Base PLL clocks of audio susbsytem, used to configure base clock
35      frequencies for different audio use-cases.
36
37patternProperties:
38  "^dai-link-[0-9]+$":
39    type: object
40    additionalProperties: false
41    description: |-
42      dai-link child nodes:
43        Container for dai-link level properties and the CODEC sub-nodes.
44        There should be at least one (and probably more) subnode of this type
45
46    properties:
47      dai-format:
48        $ref: /schemas/types.yaml#/definitions/string
49        enum: [ i2s, left-j, dsp_a ]
50
51      mclk-fs:
52        $ref: /schemas/types.yaml#/definitions/uint32
53        description: |-
54          Multiplication factor between the frame rate and master clock
55          rate
56
57      sound-dai:
58        maxItems: 1
59        description: phandle of the CPU DAI
60
61    patternProperties:
62      "^codec(-[0-9]+)?$":
63        type: object
64        additionalProperties: false
65        description: |-
66          Codecs:
67          dai-link representing backend links should have at least one subnode.
68          One subnode for each codec of the dai-link. dai-link representing
69          frontend links have no codec, therefore have no subnodes
70
71        properties:
72          sound-dai:
73            maxItems: 1
74            description: phandle of the codec DAI
75
76        required:
77          - sound-dai
78
79    required:
80      - sound-dai
81
82required:
83  - model
84  - dai-link-0
85
86unevaluatedProperties: false
87
88examples:
89  - |
90    sound {
91        compatible = "amlogic,gx-sound-card";
92        model = "GXL-ACME-S905X-FOO";
93        audio-aux-devs = <&amp>;
94        audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback";
95
96        dai-link-0 {
97               sound-dai = <&i2s_fifo>;
98        };
99
100        dai-link-1 {
101                sound-dai = <&i2s_encoder>;
102                dai-format = "i2s";
103                mclk-fs = <256>;
104
105                codec-0 {
106                        sound-dai = <&codec0>;
107                };
108
109                codec-1 {
110                        sound-dai = <&codec1>;
111                };
112        };
113    };
114