Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: dt-bindings: qcom,apq8016-sbc-sndcard: move to separate binding

The APQ8016 SBC and MSM8916 QDSP6 sound cards are a bit different from
others: they have additional IO muxing address space and pin control.
Move them to separate schema, so the original qcom,sm8250.yaml will be
easier to manage. New schema is going to grow for other platforms
having more of IO muxing address spaces.

Cc: Adam Skladowski <a39.skl@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240723083300.35605-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
8716bd24 6024f342

+205 -137
+205
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.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/qcom,apq8016-sbc-sndcard.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm APQ8016 and similar sound cards 8 + 9 + maintainers: 10 + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 + - Stephan Gerhold <stephan@gerhold.net> 12 + 13 + properties: 14 + compatible: 15 + enum: 16 + - qcom,apq8016-sbc-sndcard 17 + - qcom,msm8916-qdsp6-sndcard 18 + 19 + reg: 20 + items: 21 + - description: Microphone I/O mux register address 22 + - description: Speaker I/O mux register address 23 + 24 + reg-names: 25 + items: 26 + - const: mic-iomux 27 + - const: spkr-iomux 28 + 29 + audio-routing: 30 + $ref: /schemas/types.yaml#/definitions/non-unique-string-array 31 + description: 32 + A list of the connections between audio components. Each entry is a 33 + pair of strings, the first being the connection's sink, the second 34 + being the connection's source. Valid names could be power supplies, 35 + MicBias of codec and the jacks on the board. 36 + 37 + aux-devs: 38 + $ref: /schemas/types.yaml#/definitions/phandle-array 39 + description: | 40 + List of phandles pointing to auxiliary devices, such 41 + as amplifiers, to be added to the sound card. 42 + 43 + model: 44 + $ref: /schemas/types.yaml#/definitions/string 45 + description: User visible long sound card name 46 + 47 + pin-switches: 48 + description: List of widget names for which pin switches should be created. 49 + $ref: /schemas/types.yaml#/definitions/string-array 50 + 51 + widgets: 52 + description: User specified audio sound widgets. 53 + $ref: /schemas/types.yaml#/definitions/non-unique-string-array 54 + 55 + patternProperties: 56 + ".*-dai-link$": 57 + description: 58 + Each subnode represents a dai link. Subnodes of each dai links would be 59 + cpu/codec dais. 60 + 61 + type: object 62 + 63 + properties: 64 + link-name: 65 + description: Indicates dai-link name and PCM stream name. 66 + $ref: /schemas/types.yaml#/definitions/string 67 + maxItems: 1 68 + 69 + cpu: 70 + description: Holds subnode which indicates cpu dai. 71 + type: object 72 + additionalProperties: false 73 + 74 + properties: 75 + sound-dai: 76 + maxItems: 1 77 + 78 + platform: 79 + description: Holds subnode which indicates platform dai. 80 + type: object 81 + additionalProperties: false 82 + 83 + properties: 84 + sound-dai: 85 + maxItems: 1 86 + 87 + codec: 88 + description: Holds subnode which indicates codec dai. 89 + type: object 90 + additionalProperties: false 91 + 92 + properties: 93 + sound-dai: 94 + minItems: 1 95 + maxItems: 8 96 + 97 + required: 98 + - link-name 99 + - cpu 100 + 101 + additionalProperties: false 102 + 103 + required: 104 + - compatible 105 + - reg 106 + - reg-names 107 + - model 108 + 109 + additionalProperties: false 110 + 111 + examples: 112 + - | 113 + #include <dt-bindings/sound/qcom,lpass.h> 114 + sound@7702000 { 115 + compatible = "qcom,apq8016-sbc-sndcard"; 116 + reg = <0x07702000 0x4>, <0x07702004 0x4>; 117 + reg-names = "mic-iomux", "spkr-iomux"; 118 + 119 + model = "DB410c"; 120 + audio-routing = 121 + "AMIC2", "MIC BIAS Internal2", 122 + "AMIC3", "MIC BIAS External1"; 123 + 124 + pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>; 125 + pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>; 126 + pinctrl-names = "default", "sleep"; 127 + 128 + quaternary-dai-link { 129 + link-name = "ADV7533"; 130 + cpu { 131 + sound-dai = <&lpass MI2S_QUATERNARY>; 132 + }; 133 + codec { 134 + sound-dai = <&adv_bridge 0>; 135 + }; 136 + }; 137 + 138 + primary-dai-link { 139 + link-name = "WCD"; 140 + cpu { 141 + sound-dai = <&lpass MI2S_PRIMARY>; 142 + }; 143 + codec { 144 + sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 145 + }; 146 + }; 147 + 148 + tertiary-dai-link { 149 + link-name = "WCD-Capture"; 150 + cpu { 151 + sound-dai = <&lpass MI2S_TERTIARY>; 152 + }; 153 + codec { 154 + sound-dai = <&lpass_codec 1>, <&wcd_codec 1>; 155 + }; 156 + }; 157 + }; 158 + 159 + - | 160 + #include <dt-bindings/sound/qcom,q6afe.h> 161 + #include <dt-bindings/sound/qcom,q6asm.h> 162 + sound@7702000 { 163 + compatible = "qcom,msm8916-qdsp6-sndcard"; 164 + reg = <0x07702000 0x4>, <0x07702004 0x4>; 165 + reg-names = "mic-iomux", "spkr-iomux"; 166 + 167 + model = "msm8916"; 168 + widgets = 169 + "Speaker", "Speaker", 170 + "Headphone", "Headphones"; 171 + pin-switches = "Speaker"; 172 + audio-routing = 173 + "Speaker", "Speaker Amp OUT", 174 + "Speaker Amp IN", "HPH_R", 175 + "Headphones", "HPH_L", 176 + "Headphones", "HPH_R", 177 + "AMIC1", "MIC BIAS Internal1", 178 + "AMIC2", "MIC BIAS Internal2", 179 + "AMIC3", "MIC BIAS Internal3"; 180 + aux-devs = <&speaker_amp>; 181 + 182 + pinctrl-names = "default", "sleep"; 183 + pinctrl-0 = <&cdc_pdm_lines_act>; 184 + pinctrl-1 = <&cdc_pdm_lines_sus>; 185 + 186 + mm1-dai-link { 187 + link-name = "MultiMedia1"; 188 + cpu { 189 + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 190 + }; 191 + }; 192 + 193 + primary-dai-link { 194 + link-name = "Primary MI2S"; 195 + cpu { 196 + sound-dai = <&q6afedai PRIMARY_MI2S_RX>; 197 + }; 198 + platform { 199 + sound-dai = <&q6routing>; 200 + }; 201 + codec { 202 + sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 203 + }; 204 + }; 205 + };
-137
Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
··· 27 27 - qcom,sm8650-sndcard 28 28 - const: qcom,sm8450-sndcard 29 29 - enum: 30 - - qcom,apq8016-sbc-sndcard 31 30 - qcom,apq8096-sndcard 32 - - qcom,msm8916-qdsp6-sndcard 33 31 - qcom,qcm6490-idp-sndcard 34 32 - qcom,qcs6490-rb3gen2-sndcard 35 33 - qcom,qrb5165-rb5-sndcard ··· 55 57 model: 56 58 $ref: /schemas/types.yaml#/definitions/string 57 59 description: User visible long sound card name 58 - 59 - pin-switches: 60 - description: List of widget names for which pin switches should be created. 61 - $ref: /schemas/types.yaml#/definitions/string-array 62 - 63 - widgets: 64 - description: User specified audio sound widgets. 65 - $ref: /schemas/types.yaml#/definitions/non-unique-string-array 66 - 67 - # Only valid for some compatibles (see allOf if below) 68 - reg: true 69 - reg-names: true 70 60 71 61 patternProperties: 72 62 ".*-dai-link$": ··· 107 121 required: 108 122 - compatible 109 123 - model 110 - 111 - allOf: 112 - - if: 113 - properties: 114 - compatible: 115 - contains: 116 - enum: 117 - - qcom,apq8016-sbc-sndcard 118 - - qcom,msm8916-qdsp6-sndcard 119 - then: 120 - properties: 121 - reg: 122 - items: 123 - - description: Microphone I/O mux register address 124 - - description: Speaker I/O mux register address 125 - reg-names: 126 - items: 127 - - const: mic-iomux 128 - - const: spkr-iomux 129 - required: 130 - - compatible 131 - - model 132 - - reg 133 - - reg-names 134 - else: 135 - properties: 136 - reg: false 137 - reg-names: false 138 124 139 125 additionalProperties: false 140 126 ··· 186 228 187 229 codec { 188 230 sound-dai = <&vamacro 0>; 189 - }; 190 - }; 191 - }; 192 - 193 - - | 194 - #include <dt-bindings/sound/qcom,lpass.h> 195 - sound@7702000 { 196 - compatible = "qcom,apq8016-sbc-sndcard"; 197 - reg = <0x07702000 0x4>, <0x07702004 0x4>; 198 - reg-names = "mic-iomux", "spkr-iomux"; 199 - 200 - model = "DB410c"; 201 - audio-routing = 202 - "AMIC2", "MIC BIAS Internal2", 203 - "AMIC3", "MIC BIAS External1"; 204 - 205 - pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>; 206 - pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>; 207 - pinctrl-names = "default", "sleep"; 208 - 209 - quaternary-dai-link { 210 - link-name = "ADV7533"; 211 - cpu { 212 - sound-dai = <&lpass MI2S_QUATERNARY>; 213 - }; 214 - codec { 215 - sound-dai = <&adv_bridge 0>; 216 - }; 217 - }; 218 - 219 - primary-dai-link { 220 - link-name = "WCD"; 221 - cpu { 222 - sound-dai = <&lpass MI2S_PRIMARY>; 223 - }; 224 - codec { 225 - sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 226 - }; 227 - }; 228 - 229 - tertiary-dai-link { 230 - link-name = "WCD-Capture"; 231 - cpu { 232 - sound-dai = <&lpass MI2S_TERTIARY>; 233 - }; 234 - codec { 235 - sound-dai = <&lpass_codec 1>, <&wcd_codec 1>; 236 - }; 237 - }; 238 - }; 239 - 240 - - | 241 - #include <dt-bindings/sound/qcom,q6afe.h> 242 - #include <dt-bindings/sound/qcom,q6asm.h> 243 - sound@7702000 { 244 - compatible = "qcom,msm8916-qdsp6-sndcard"; 245 - reg = <0x07702000 0x4>, <0x07702004 0x4>; 246 - reg-names = "mic-iomux", "spkr-iomux"; 247 - 248 - model = "msm8916"; 249 - widgets = 250 - "Speaker", "Speaker", 251 - "Headphone", "Headphones"; 252 - pin-switches = "Speaker"; 253 - audio-routing = 254 - "Speaker", "Speaker Amp OUT", 255 - "Speaker Amp IN", "HPH_R", 256 - "Headphones", "HPH_L", 257 - "Headphones", "HPH_R", 258 - "AMIC1", "MIC BIAS Internal1", 259 - "AMIC2", "MIC BIAS Internal2", 260 - "AMIC3", "MIC BIAS Internal3"; 261 - aux-devs = <&speaker_amp>; 262 - 263 - pinctrl-names = "default", "sleep"; 264 - pinctrl-0 = <&cdc_pdm_lines_act>; 265 - pinctrl-1 = <&cdc_pdm_lines_sus>; 266 - 267 - mm1-dai-link { 268 - link-name = "MultiMedia1"; 269 - cpu { 270 - sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 271 - }; 272 - }; 273 - 274 - primary-dai-link { 275 - link-name = "Primary MI2S"; 276 - cpu { 277 - sound-dai = <&q6afedai PRIMARY_MI2S_RX>; 278 - }; 279 - platform { 280 - sound-dai = <&q6routing>; 281 - }; 282 - codec { 283 - sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 284 231 }; 285 232 }; 286 233 };