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