From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
On Lenovo ThinkPad T14s, the headset is connected via a HiFi Switch to
support CTIA and OMTP headsets. This switch is used to minimise pop and
click during headset type switching.
Enable the regulator required to power this switch along with wiring up
gpio that control the headset switching.
Without this, headset audio will be very noisy and might see headset
detection errors.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
---
.../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
index b2c2347f54fa..f39c51c809e8 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
@@ -22,7 +22,7 @@ / {
wcd938x: audio-codec {
compatible = "qcom,wcd9385-codec";
- pinctrl-0 = <&wcd_default>;
+ pinctrl-0 = <&wcd_default>, <&us_euro_hs_sel>;
pinctrl-names = "default";
qcom,micbias1-microvolt = <1800000>;
@@ -36,11 +36,13 @@ wcd938x: audio-codec {
qcom,tx-device = <&wcd_tx>;
reset-gpios = <&tlmm 191 GPIO_ACTIVE_LOW>;
+ us-euro-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
vdd-buck-supply = <&vreg_l15b_1p8>;
vdd-rxtx-supply = <&vreg_l15b_1p8>;
vdd-io-supply = <&vreg_l15b_1p8>;
vdd-mic-bias-supply = <&vreg_bob1>;
+ vdd-hp-switch-supply = <&vreg_l16b_2p5>;
#sound-dai-cells = <1>;
};
@@ -367,6 +369,13 @@ vreg_l15b_1p8: ldo15 {
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
+ vreg_l16b_2p5: ldo16 {
+ regulator-name = "vreg_l6b_2p5";
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <2504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
vreg_l17b_2p5: ldo17 {
regulator-name = "vreg_l17b_2p5";
regulator-min-microvolt = <2504000>;
@@ -942,6 +951,13 @@ int-n-pins {
};
};
+ us_euro_hs_sel: us-euro-hs-sel-state {
+ pins = "gpio68";
+ function = "gpio";
+ bias-pull-down;
+ drive-strength = <2>;
+ };
+
kybd_default: kybd-default-state {
pins = "gpio67";
function = "gpio";
--
2.39.5
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]