Skip to content

Commit f8d09d8

Browse files
authored
arm64: dts: qcom: qcs6490-rb3gen2: Add WCD headset playback and record for qcs6490-rb3gen2 industrial mezzanine (#512)
arm64: dts: qcom: qcs6490-rb3gen2: Add WCD headset playback and record for qcs6490-rb3gen2 industrial mezzanine
2 parents d04f5a2 + 91fab76 commit f8d09d8

1 file changed

Lines changed: 132 additions & 0 deletions

File tree

arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,35 @@
66
/dts-v1/;
77
/plugin/;
88
#include <dt-bindings/gpio/gpio.h>
9+
#include <dt-bindings/sound/qcom,q6afe.h>
910
#include <dt-bindings/clock/qcom,gcc-sc7280.h>
1011
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
1112

1213
&{/} {
1314

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+
1438
vreg_0p9: regulator-vreg-0p9 {
1539
compatible = "regulator-fixed";
1640
regulator-name = "VREG_0P9";
@@ -48,6 +72,14 @@
4872
};
4973
};
5074

75+
&lpass_rx_macro {
76+
status = "okay";
77+
};
78+
79+
&lpass_tx_macro {
80+
status = "okay";
81+
};
82+
5183
&pcie0 {
5284
perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>;
5385

@@ -262,6 +294,100 @@
262294
};
263295
};
264296

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+
265391
&tlmm {
266392
pcie0_tc9563_resx_n: pcie0-tc9563-resx-state {
267393
pins = "gpio78";
@@ -301,6 +427,12 @@
301427
output-enable;
302428
};
303429

430+
wcd_default: wcd-reset-n-active-state {
431+
pins = "gpio83";
432+
function = "gpio";
433+
drive-strength = <16>;
434+
bias-disable;
435+
};
304436
};
305437

306438
&wifi {

0 commit comments

Comments
 (0)