| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/sound/mt8186-mt6366-da7219-max98357.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Mediatek MT8186 with MT6366, DA7219 and MAX98357 ASoC sound card driver |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Jiaxin Yu <[email protected]> |
| 11 |
|
| 12 |
description: |
| 13 |
This binding describes the MT8186 sound card. |
| 14 |
|
| 15 |
allOf: |
| 16 |
- $ref: sound-card-common.yaml# |
| 17 |
|
| 18 |
properties: |
| 19 |
compatible: |
| 20 |
enum: |
| 21 |
- mediatek,mt8186-mt6366-da7219-max98357-sound |
| 22 |
|
| 23 |
audio-routing: |
| 24 |
$ref: /schemas/types.yaml#/definitions/non-unique-string-array |
| 25 |
description: |
| 26 |
A list of the connections between audio components. Each entry is a |
| 27 |
pair of strings, the first being the connection's sink, the second |
| 28 |
being the connection's source. |
| 29 |
Valid names could be the input or output widgets of audio components, |
| 30 |
power supplies, MicBias of codec and the software switch. |
| 31 |
minItems: 2 |
| 32 |
items: |
| 33 |
enum: |
| 34 |
# Sinks |
| 35 |
- HDMI1 |
| 36 |
- Headphones |
| 37 |
- Line Out |
| 38 |
- MIC |
| 39 |
- Speakers |
| 40 |
|
| 41 |
# Sources |
| 42 |
- Headset Mic |
| 43 |
- HPL |
| 44 |
- HPR |
| 45 |
- Speaker |
| 46 |
- TX |
| 47 |
|
| 48 |
mediatek,platform: |
| 49 |
$ref: /schemas/types.yaml#/definitions/phandle |
| 50 |
description: The phandle of MT8186 ASoC platform. |
| 51 |
|
| 52 |
headset-codec: |
| 53 |
type: object |
| 54 |
deprecated: true |
| 55 |
additionalProperties: false |
| 56 |
properties: |
| 57 |
sound-dai: |
| 58 |
maxItems: 1 |
| 59 |
required: |
| 60 |
- sound-dai |
| 61 |
|
| 62 |
playback-codecs: |
| 63 |
type: object |
| 64 |
deprecated: true |
| 65 |
additionalProperties: false |
| 66 |
properties: |
| 67 |
sound-dai: |
| 68 |
items: |
| 69 |
- description: phandle of dp codec |
| 70 |
- description: phandle of l channel speaker codec |
| 71 |
- description: phandle of r channel speaker codec |
| 72 |
minItems: 2 |
| 73 |
required: |
| 74 |
- sound-dai |
| 75 |
|
| 76 |
mediatek,adsp: |
| 77 |
$ref: /schemas/types.yaml#/definitions/phandle |
| 78 |
description: The phandle of MT8186 ADSP platform. |
| 79 |
|
| 80 |
mediatek,dai-link: |
| 81 |
$ref: /schemas/types.yaml#/definitions/string-array |
| 82 |
description: |
| 83 |
A list of the desired dai-links in the sound card. Each entry is a |
| 84 |
name defined in the machine driver. |
| 85 |
|
| 86 |
patternProperties: |
| 87 |
".*-dai-link$": |
| 88 |
type: object |
| 89 |
additionalProperties: false |
| 90 |
description: |
| 91 |
Container for dai-link level properties and CODEC sub-nodes. |
| 92 |
|
| 93 |
properties: |
| 94 |
link-name: |
| 95 |
description: Indicates dai-link name and PCM stream name |
| 96 |
items: |
| 97 |
enum: |
| 98 |
- I2S0 |
| 99 |
- I2S1 |
| 100 |
- I2S2 |
| 101 |
- I2S3 |
| 102 |
|
| 103 |
codec: |
| 104 |
description: Holds subnode which indicates codec dai. |
| 105 |
type: object |
| 106 |
additionalProperties: false |
| 107 |
properties: |
| 108 |
sound-dai: |
| 109 |
minItems: 1 |
| 110 |
maxItems: 2 |
| 111 |
required: |
| 112 |
- sound-dai |
| 113 |
|
| 114 |
dai-format: |
| 115 |
description: audio format |
| 116 |
items: |
| 117 |
enum: |
| 118 |
- i2s |
| 119 |
- right_j |
| 120 |
- left_j |
| 121 |
- dsp_a |
| 122 |
- dsp_b |
| 123 |
|
| 124 |
mediatek,clk-provider: |
| 125 |
$ref: /schemas/types.yaml#/definitions/string |
| 126 |
description: Indicates dai-link clock master. |
| 127 |
enum: |
| 128 |
- cpu |
| 129 |
- codec |
| 130 |
|
| 131 |
required: |
| 132 |
- link-name |
| 133 |
|
| 134 |
unevaluatedProperties: false |
| 135 |
|
| 136 |
required: |
| 137 |
- compatible |
| 138 |
- mediatek,platform |
| 139 |
|
| 140 |
# Disallow legacy properties if xxx-dai-link nodes are specified |
| 141 |
if: |
| 142 |
not: |
| 143 |
patternProperties: |
| 144 |
".*-dai-link$": false |
| 145 |
then: |
| 146 |
properties: |
| 147 |
headset-codec: false |
| 148 |
speaker-codecs: false |
| 149 |
|
| 150 |
examples: |
| 151 |
- | |
| 152 |
|
| 153 |
sound: mt8186-sound { |
| 154 |
compatible = "mediatek,mt8186-mt6366-da7219-max98357-sound"; |
| 155 |
model = "mt8186_da7219_m98357"; |
| 156 |
pinctrl-names = "aud_clk_mosi_off", |
| 157 |
"aud_clk_mosi_on"; |
| 158 |
pinctrl-0 = <&aud_clk_mosi_off>; |
| 159 |
pinctrl-1 = <&aud_clk_mosi_on>; |
| 160 |
mediatek,platform = <&afe>; |
| 161 |
|
| 162 |
audio-routing = |
| 163 |
"Headphones", "HPL", |
| 164 |
"Headphones", "HPR", |
| 165 |
"MIC", "Headset Mic", |
| 166 |
"Speakers", "Speaker", |
| 167 |
"HDMI1", "TX"; |
| 168 |
|
| 169 |
hs-playback-dai-link { |
| 170 |
link-name = "I2S0"; |
| 171 |
dai-format = "i2s"; |
| 172 |
mediatek,clk-provider = "cpu"; |
| 173 |
codec { |
| 174 |
sound-dai = <&da7219>; |
| 175 |
}; |
| 176 |
}; |
| 177 |
|
| 178 |
hs-capture-dai-link { |
| 179 |
link-name = "I2S1"; |
| 180 |
dai-format = "i2s"; |
| 181 |
mediatek,clk-provider = "cpu"; |
| 182 |
codec { |
| 183 |
sound-dai = <&da7219>; |
| 184 |
}; |
| 185 |
}; |
| 186 |
|
| 187 |
spk-dp-playback-dai-link { |
| 188 |
link-name = "I2S3"; |
| 189 |
dai-format = "i2s"; |
| 190 |
mediatek,clk-provider = "cpu"; |
| 191 |
codec { |
| 192 |
sound-dai = <&anx_bridge_dp>, <&max98357a>; |
| 193 |
}; |
| 194 |
}; |
| 195 |
}; |
| 196 |
|
| 197 |
... |