Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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 |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 22 | playback-only: |
| 23 | description: port connection used only for playback |
| 24 | $ref: /schemas/types.yaml#/definitions/flag |
| 25 | capture-only: |
| 26 | description: port connection used only for capture |
| 27 | $ref: /schemas/types.yaml#/definitions/flag |
Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 28 | link-trigger-order: |
| 29 | description: trigger order for both start/stop |
| 30 | $ref: /schemas/types.yaml#/definitions/uint32-array |
| 31 | link-trigger-order-start: |
| 32 | description: trigger order for start |
| 33 | $ref: /schemas/types.yaml#/definitions/uint32-array |
| 34 | link-trigger-order-stop: |
| 35 | description: trigger order for stop |
| 36 | $ref: /schemas/types.yaml#/definitions/uint32-array |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 37 | |
| 38 | endpoint-base: |
| 39 | allOf: |
| 40 | - $ref: /schemas/graph.yaml#/$defs/endpoint-base |
| 41 | - $ref: /schemas/sound/dai-params.yaml# |
| 42 | properties: |
| 43 | mclk-fs: |
| 44 | $ref: simple-card.yaml#/definitions/mclk-fs |
| 45 | frame-inversion: |
| 46 | description: dai-link uses frame clock inversion |
| 47 | $ref: /schemas/types.yaml#/definitions/flag |
| 48 | bitclock-inversion: |
| 49 | description: dai-link uses bit clock inversion |
| 50 | $ref: /schemas/types.yaml#/definitions/flag |
| 51 | frame-master: |
| 52 | description: Indicates dai-link frame master. |
| 53 | oneOf: |
| 54 | - $ref: /schemas/types.yaml#/definitions/flag |
| 55 | - $ref: /schemas/types.yaml#/definitions/phandle |
| 56 | bitclock-master: |
| 57 | description: Indicates dai-link bit clock master |
| 58 | oneOf: |
| 59 | - $ref: /schemas/types.yaml#/definitions/flag |
| 60 | - $ref: /schemas/types.yaml#/definitions/phandle |
| 61 | clocks: |
| 62 | description: Indicates system clock |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 63 | maxItems: 1 |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 64 | system-clock-frequency: |
| 65 | $ref: simple-card.yaml#/definitions/system-clock-frequency |
| 66 | system-clock-direction-out: |
| 67 | $ref: simple-card.yaml#/definitions/system-clock-direction-out |
| 68 | system-clock-fixed: |
| 69 | $ref: simple-card.yaml#/definitions/system-clock-fixed |
| 70 | |
| 71 | dai-format: |
| 72 | description: audio format. |
| 73 | items: |
| 74 | enum: |
| 75 | - i2s |
| 76 | - right_j |
| 77 | - left_j |
| 78 | - dsp_a |
| 79 | - dsp_b |
| 80 | - ac97 |
| 81 | - pdm |
| 82 | - msb |
| 83 | - lsb |
| 84 | |
| 85 | dai-tdm-slot-num: |
| 86 | description: Number of slots in use. |
| 87 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 88 | dai-tdm-slot-width: |
| 89 | description: Width in bits for each slot. |
| 90 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 91 | dai-tdm-slot-width-map: |
| 92 | description: Mapping of sample widths to slot widths. For hardware |
| 93 | that cannot support a fixed slot width or a slot width always |
| 94 | equal to sample width. A matrix of one or more 3-tuples. |
| 95 | $ref: /schemas/types.yaml#/definitions/uint32-matrix |
| 96 | items: |
| 97 | items: |
| 98 | - |
| 99 | description: Sample width in bits |
| 100 | minimum: 8 |
| 101 | maximum: 64 |
| 102 | - |
| 103 | description: Slot width in bits |
| 104 | minimum: 8 |
| 105 | maximum: 256 |
| 106 | - |
| 107 | description: Slot count |
| 108 | minimum: 1 |
| 109 | maximum: 64 |
| 110 | |
| 111 | ports: |
| 112 | $ref: "#/definitions/port-base" |
| 113 | unevaluatedProperties: false |
| 114 | patternProperties: |
| 115 | "^port(@[0-9a-f]+)?$": |
| 116 | $ref: "#/definitions/port-base" |
| 117 | unevaluatedProperties: false |
| 118 | patternProperties: |
| 119 | "^endpoint(@[0-9a-f]+)?": |
| 120 | $ref: "#/definitions/endpoint-base" |
| 121 | unevaluatedProperties: false |
| 122 | |
| 123 | allOf: |
| 124 | - $ref: "#/definitions/port-base" |
| 125 | |
| 126 | patternProperties: |
| 127 | "^endpoint(@[0-9a-f]+)?": |
| 128 | $ref: "#/definitions/endpoint-base" |
| 129 | unevaluatedProperties: false |
| 130 | |
| 131 | additionalProperties: true |