2024-02-07 08:56:40

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH] arm64: dts: qcom: x1e80100-crd: add sound card

Add sound card to X1E80100-CRD board and update DMIC supply.
Full schematics are not available and the limited available parts
suggest that DMIC0-1 use BIAS3 and DMIC2-3 use BIAS1. The DMIC supply
is unknown except one remark for VREG_L1B that it is "used for DMIC if
no WCD".

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

No dependencies: everything was merged.
---
arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 94 ++++++++++++++++++++++-
1 file changed, 93 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
index 12abc9287a75..72b787ce4b20 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
@@ -18,7 +18,7 @@ aliases {
serial0 = &uart21;
};

- audio-codec {
+ wcd938x: audio-codec {
compatible = "qcom,wcd9385-codec";

pinctrl-names = "default";
@@ -48,6 +48,94 @@ chosen {
stdout-path = "serial0:115200n8";
};

+ sound {
+ compatible = "qcom,x1e80100-sndcard";
+ model = "X1E80100-CRD";
+ audio-routing = "WooferLeft IN", "WSA WSA_SPK1 OUT",
+ "TwitterLeft IN", "WSA WSA_SPK2 OUT",
+ "WooferRight IN", "WSA2 WSA_SPK2 OUT",
+ "TwitterRight IN", "WSA2 WSA_SPK2 OUT",
+ "IN1_HPHL", "HPHL_OUT",
+ "IN2_HPHR", "HPHR_OUT",
+ "AMIC2", "MIC BIAS2",
+ "VA DMIC0", "MIC BIAS3",
+ "VA DMIC1", "MIC BIAS3",
+ "VA DMIC2", "MIC BIAS1",
+ "VA DMIC3", "MIC BIAS1",
+ "VA DMIC0", "VA MIC BIAS3",
+ "VA DMIC1", "VA MIC BIAS3",
+ "VA DMIC2", "VA MIC BIAS1",
+ "VA DMIC3", "VA MIC BIAS1",
+ "TX SWR_INPUT1", "ADC2_OUTPUT";
+
+ wcd-playback-dai-link {
+ link-name = "WCD Playback";
+
+ cpu {
+ sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
+ };
+
+ codec {
+ sound-dai = <&wcd938x 0>, <&swr1 0>, <&lpass_rxmacro 0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ wcd-capture-dai-link {
+ link-name = "WCD Capture";
+
+ cpu {
+ sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
+ };
+
+ codec {
+ sound-dai = <&wcd938x 1>, <&swr2 0>, <&lpass_txmacro 0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ wsa-dai-link {
+ link-name = "WSA Playback";
+
+ cpu {
+ sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
+ };
+
+ codec {
+ sound-dai = <&left_woofer>, <&left_tweeter>,
+ <&swr0 0>, <&lpass_wsamacro 0>,
+ <&right_woofer>, <&right_tweeter>,
+ <&swr3 0>, <&lpass_wsa2macro 0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ va-dai-link {
+ link-name = "VA Capture";
+
+ cpu {
+ sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
+ };
+
+ codec {
+ sound-dai = <&lpass_vamacro 0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+ };
+
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";

@@ -494,6 +582,10 @@ spkr_23_sd_n_active: spkr-23-sd-n-active-state {
};
};

+&lpass_vamacro {
+ vdd-micb-supply = <&vreg_l1b_1p8>;
+};
+
&mdss {
status = "okay";
};
--
2.34.1



2024-02-09 21:27:15

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: x1e80100-crd: add sound card

On 7.02.2024 09:56, Krzysztof Kozlowski wrote:
> Add sound card to X1E80100-CRD board and update DMIC supply.
> Full schematics are not available and the limited available parts
> suggest that DMIC0-1 use BIAS3 and DMIC2-3 use BIAS1. The DMIC supply
> is unknown except one remark for VREG_L1B that it is "used for DMIC if
> no WCD".
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---

I have little idea how these things are connected, but brain compiler
says it looks sane..

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2024-02-12 18:25:53

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: x1e80100-crd: add sound card

On 09/02/2024 22:26, Konrad Dybcio wrote:
> On 7.02.2024 09:56, Krzysztof Kozlowski wrote:
>> Add sound card to X1E80100-CRD board and update DMIC supply.
>> Full schematics are not available and the limited available parts
>> suggest that DMIC0-1 use BIAS3 and DMIC2-3 use BIAS1. The DMIC supply
>> is unknown except one remark for VREG_L1B that it is "used for DMIC if
>> no WCD".
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>
>> ---
>
> I have little idea how these things are connected, but brain compiler
> says it looks sane..
>

I managed to get DMICs working (to my surprise!), so I will send v2 with
Rb tag and updates.

Best regards,
Krzysztof