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
7title: Audio Graph Card 'port'
8
9maintainers:
10  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
11
12select: false
13
14allOf:
15  - $ref: /schemas/graph.yaml#/$defs/port-base
16
17properties:
18  prefix:
19    description: "device name prefix"
20    $ref: /schemas/types.yaml#/definitions/string
21  convert-rate:
22    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
23  convert-channels:
24    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
25  convert-sample-format:
26    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
27
28patternProperties:
29  "^endpoint(@[0-9a-f]+)?":
30    $ref: /schemas/graph.yaml#/$defs/endpoint-base
31    unevaluatedProperties: false
32
33    properties:
34      mclk-fs:
35        description: |
36          Multiplication factor between stream rate and codec mclk.
37          When defined, mclk-fs property defined in dai-link sub nodes are
38          ignored.
39        $ref: /schemas/types.yaml#/definitions/uint32
40      frame-inversion:
41        description: dai-link uses frame clock inversion
42        $ref: /schemas/types.yaml#/definitions/flag
43      bitclock-inversion:
44        description: dai-link uses bit clock inversion
45        $ref: /schemas/types.yaml#/definitions/flag
46      frame-master:
47        description: Indicates dai-link frame master.
48        oneOf:
49          - $ref: /schemas/types.yaml#/definitions/flag
50          - $ref: /schemas/types.yaml#/definitions/phandle
51      bitclock-master:
52        description: Indicates dai-link bit clock master
53        oneOf:
54          - $ref: /schemas/types.yaml#/definitions/flag
55          - $ref: /schemas/types.yaml#/definitions/phandle
56
57      dai-format:
58        description: audio format.
59        items:
60          enum:
61            - i2s
62            - right_j
63            - left_j
64            - dsp_a
65            - dsp_b
66            - ac97
67            - pdm
68            - msb
69            - lsb
70      convert-rate:
71        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
72      convert-channels:
73        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
74      convert-sample-format:
75        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
76
77      dai-tdm-slot-num:
78        description: Number of slots in use.
79        $ref: /schemas/types.yaml#/definitions/uint32
80      dai-tdm-slot-width:
81        description: Width in bits for each slot.
82        $ref: /schemas/types.yaml#/definitions/uint32
83      dai-tdm-slot-width-map:
84        description: Mapping of sample widths to slot widths. For hardware
85          that cannot support a fixed slot width or a slot width always
86          equal to sample width. A matrix of one or more 3-tuples.
87        $ref: /schemas/types.yaml#/definitions/uint32-matrix
88        items:
89          items:
90            -
91              description: Sample width in bits
92              minimum: 8
93              maximum: 64
94            -
95              description: Slot width in bits
96              minimum: 8
97              maximum: 256
98            -
99              description: Slot count
100              minimum: 1
101              maximum: 64
102
103additionalProperties: true
104