Linux 6.7-rc7
[linux-modified.git] / Documentation / devicetree / bindings / sound / audio-graph-port.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/audio-graph-port.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Audio Graph Card 'port'
8
9 maintainers:
10   - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
11
12 select: false
13
14 definitions:
15   port-base:
16     allOf:
17       - $ref: /schemas/graph.yaml#/$defs/port-base
18       - $ref: /schemas/sound/dai-params.yaml#
19     properties:
20       mclk-fs:
21         $ref: simple-card.yaml#/definitions/mclk-fs
22
23   endpoint-base:
24     allOf:
25       - $ref: /schemas/graph.yaml#/$defs/endpoint-base
26       - $ref: /schemas/sound/dai-params.yaml#
27     properties:
28       mclk-fs:
29         $ref: simple-card.yaml#/definitions/mclk-fs
30       frame-inversion:
31         description: dai-link uses frame clock inversion
32         $ref: /schemas/types.yaml#/definitions/flag
33       bitclock-inversion:
34         description: dai-link uses bit clock inversion
35         $ref: /schemas/types.yaml#/definitions/flag
36       frame-master:
37         description: Indicates dai-link frame master.
38         oneOf:
39           - $ref: /schemas/types.yaml#/definitions/flag
40           - $ref: /schemas/types.yaml#/definitions/phandle
41       bitclock-master:
42         description: Indicates dai-link bit clock master
43         oneOf:
44           - $ref: /schemas/types.yaml#/definitions/flag
45           - $ref: /schemas/types.yaml#/definitions/phandle
46       clocks:
47         description: Indicates system clock
48         $ref: /schemas/types.yaml#/definitions/phandle
49       system-clock-frequency:
50         $ref: simple-card.yaml#/definitions/system-clock-frequency
51       system-clock-direction-out:
52         $ref: simple-card.yaml#/definitions/system-clock-direction-out
53       system-clock-fixed:
54         $ref: simple-card.yaml#/definitions/system-clock-fixed
55
56       dai-format:
57         description: audio format.
58         items:
59           enum:
60             - i2s
61             - right_j
62             - left_j
63             - dsp_a
64             - dsp_b
65             - ac97
66             - pdm
67             - msb
68             - lsb
69
70       dai-tdm-slot-num:
71         description: Number of slots in use.
72         $ref: /schemas/types.yaml#/definitions/uint32
73       dai-tdm-slot-width:
74         description: Width in bits for each slot.
75         $ref: /schemas/types.yaml#/definitions/uint32
76       dai-tdm-slot-width-map:
77         description: Mapping of sample widths to slot widths. For hardware
78           that cannot support a fixed slot width or a slot width always
79           equal to sample width. A matrix of one or more 3-tuples.
80         $ref: /schemas/types.yaml#/definitions/uint32-matrix
81         items:
82           items:
83             -
84               description: Sample width in bits
85               minimum: 8
86               maximum: 64
87             -
88               description: Slot width in bits
89               minimum: 8
90               maximum: 256
91             -
92               description: Slot count
93               minimum: 1
94               maximum: 64
95
96   ports:
97     $ref: "#/definitions/port-base"
98     unevaluatedProperties: false
99     patternProperties:
100       "^port(@[0-9a-f]+)?$":
101         $ref: "#/definitions/port-base"
102         unevaluatedProperties: false
103         patternProperties:
104           "^endpoint(@[0-9a-f]+)?":
105             $ref: "#/definitions/endpoint-base"
106             unevaluatedProperties: false
107
108 allOf:
109   - $ref: "#/definitions/port-base"
110
111 patternProperties:
112   "^endpoint(@[0-9a-f]+)?":
113     $ref: "#/definitions/endpoint-base"
114     unevaluatedProperties: false
115
116 additionalProperties: true