|
6 | 6 | /dts-v1/; |
7 | 7 | /plugin/; |
8 | 8 | #include <dt-bindings/gpio/gpio.h> |
| 9 | +#include <dt-bindings/sound/qcom,q6afe.h> |
9 | 10 | #include <dt-bindings/clock/qcom,gcc-sc7280.h> |
10 | 11 | #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> |
11 | 12 |
|
12 | 13 | &{/} { |
13 | 14 |
|
| 15 | + wcd9370: audio-codec { |
| 16 | + compatible = "qcom,wcd9370-codec"; |
| 17 | + |
| 18 | + pinctrl-0 = <&wcd_default>; |
| 19 | + pinctrl-names = "default"; |
| 20 | + |
| 21 | + reset-gpios = <&tlmm 83 GPIO_ACTIVE_LOW>; |
| 22 | + vdd-buck-supply = <&vph_pwr>; |
| 23 | + vdd-rxtx-supply = <&vph_pwr>; |
| 24 | + vdd-px-supply = <&vph_pwr>; |
| 25 | + vdd-mic-bias-supply = <&vph_pwr>; |
| 26 | + qcom,micbias1-microvolt = <1800000>; |
| 27 | + qcom,micbias2-microvolt = <1800000>; |
| 28 | + qcom,micbias3-microvolt = <1800000>; |
| 29 | + qcom,micbias4-microvolt = <1800000>; |
| 30 | + qcom,hphl-jack-type-normally-closed = <1>; |
| 31 | + qcom,ground-jack-type-normally-closed = <1>; |
| 32 | + qcom,rx-device = <&wcd937x_rx>; |
| 33 | + qcom,tx-device = <&wcd937x_tx>; |
| 34 | + |
| 35 | + #sound-dai-cells = <1>; |
| 36 | + }; |
| 37 | + |
14 | 38 | vreg_0p9: regulator-vreg-0p9 { |
15 | 39 | compatible = "regulator-fixed"; |
16 | 40 | regulator-name = "VREG_0P9"; |
|
48 | 72 | }; |
49 | 73 | }; |
50 | 74 |
|
| 75 | +&lpass_rx_macro { |
| 76 | + status = "okay"; |
| 77 | +}; |
| 78 | + |
| 79 | +&lpass_tx_macro { |
| 80 | + status = "okay"; |
| 81 | +}; |
| 82 | + |
51 | 83 | &pcie0 { |
52 | 84 | perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; |
53 | 85 |
|
|
262 | 294 | }; |
263 | 295 | }; |
264 | 296 |
|
| 297 | +&sound { |
| 298 | + model = "qcs6490-rb3gen2-ia-snd-card"; |
| 299 | + audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT", |
| 300 | + "SpkrRight IN", "WSA_SPK2 OUT", |
| 301 | + "IN1_HPHL", "HPHL_OUT", |
| 302 | + "IN2_HPHR", "HPHR_OUT", |
| 303 | + "AMIC2", "MIC BIAS2", |
| 304 | + "TX SWR_ADC1", "ADC2_OUTPUT", |
| 305 | + "VA DMIC0", "vdd-micb", |
| 306 | + "VA DMIC1", "vdd-micb", |
| 307 | + "VA DMIC2", "vdd-micb", |
| 308 | + "VA DMIC3", "vdd-micb"; |
| 309 | + |
| 310 | + wcd-capture-dai-link { |
| 311 | + link-name = "WCD Capture"; |
| 312 | + |
| 313 | + codec { |
| 314 | + sound-dai = <&wcd9370 1>, <&swr1 0>, <&lpass_tx_macro 0>; |
| 315 | + }; |
| 316 | + |
| 317 | + cpu { |
| 318 | + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>; |
| 319 | + }; |
| 320 | + |
| 321 | + platform { |
| 322 | + sound-dai = <&q6apm>; |
| 323 | + }; |
| 324 | + }; |
| 325 | + |
| 326 | + wcd-playback-dai-link { |
| 327 | + link-name = "WCD Playback"; |
| 328 | + |
| 329 | + codec { |
| 330 | + sound-dai = <&wcd9370 0>, <&swr0 0>, <&lpass_rx_macro 0>; |
| 331 | + }; |
| 332 | + |
| 333 | + cpu { |
| 334 | + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>; |
| 335 | + }; |
| 336 | + |
| 337 | + platform { |
| 338 | + sound-dai = <&q6apm>; |
| 339 | + }; |
| 340 | + }; |
| 341 | +}; |
| 342 | + |
| 343 | +&swr0 { |
| 344 | + status = "okay"; |
| 345 | + |
| 346 | + wcd937x_rx: codec@0,4 { |
| 347 | + compatible = "sdw20217010a00"; |
| 348 | + reg = <0 4>; |
| 349 | + |
| 350 | + /* |
| 351 | + * WCD9370 RX Port 1 (HPH_L/R) <==> SWR1 Port 1 (HPH_L/R) |
| 352 | + * WCD9370 RX Port 2 (CLSH) <==> SWR1 Port 2 (CLSH) |
| 353 | + * WCD9370 RX Port 3 (COMP_L/R) <==> SWR1 Port 3 (COMP_L/R) |
| 354 | + * WCD9370 RX Port 4 (LO) <==> SWR1 Port 4 (LO) |
| 355 | + * WCD9370 RX Port 5 (DSD_L/R) <==> SWR1 Port 5 (DSD) |
| 356 | + */ |
| 357 | + qcom,rx-port-mapping = <1 2 3 4 5>; |
| 358 | + |
| 359 | + /* |
| 360 | + * Static channels mapping between slave and master rx port channels. |
| 361 | + * In the order of slave port channels, which is |
| 362 | + * hph_l, hph_r, clsh, comp_l, comp_r, lo, dsd_r, dsd_l. |
| 363 | + */ |
| 364 | + qcom,rx-channel-mapping = /bits/ 8 <1 2 1 1 2 1 1 2>; |
| 365 | + }; |
| 366 | +}; |
| 367 | + |
| 368 | +&swr1 { |
| 369 | + status = "okay"; |
| 370 | + wcd937x_tx: codec@0,3 { |
| 371 | + compatible = "sdw20217010a00"; |
| 372 | + reg = <0 3>; |
| 373 | + |
| 374 | + /* |
| 375 | + * WCD9370 TX Port 1 (ADC1) <=> SWR2 Port 2 |
| 376 | + * WCD9370 TX Port 2 (ADC2, 3) <=> SWR2 Port 2 |
| 377 | + * WCD9370 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3 |
| 378 | + * WCD9370 TX Port 4 (DMIC4,5,6,7) <=> SWR2 Port 4 |
| 379 | + */ |
| 380 | + qcom,tx-port-mapping = <1 1 2 3>; |
| 381 | + |
| 382 | + /* |
| 383 | + * Static channel mapping between slave and master tx port channels. |
| 384 | + * In the order of slave port channels which is adc1, adc2, adc3, |
| 385 | + * mic0, dmic1, mbhc, dmic2, dmic3, dmci4, dmic5, dmic6, dmic7. |
| 386 | + */ |
| 387 | + qcom,tx-channel-mapping = /bits/ 8 <1 2 1 1 2 3 3 4 1 2 3 4>; |
| 388 | + }; |
| 389 | +}; |
| 390 | + |
265 | 391 | &tlmm { |
266 | 392 | pcie0_tc9563_resx_n: pcie0-tc9563-resx-state { |
267 | 393 | pins = "gpio78"; |
|
301 | 427 | output-enable; |
302 | 428 | }; |
303 | 429 |
|
| 430 | + wcd_default: wcd-reset-n-active-state { |
| 431 | + pins = "gpio83"; |
| 432 | + function = "gpio"; |
| 433 | + drive-strength = <16>; |
| 434 | + bias-disable; |
| 435 | + }; |
304 | 436 | }; |
305 | 437 |
|
306 | 438 | &wifi { |
|
0 commit comments