]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection
authorArtur Weber <aweber.kernel@gmail.com>
Fri, 16 Aug 2024 07:51:00 +0000 (09:51 +0200)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 29 Dec 2024 10:05:45 +0000 (11:05 +0100)
Set up headset mic bias regulator and add the necessary properties to
the samsung,midas-audio node to allow for headset jack detection.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Link: https://lore.kernel.org/r/20240816-midas-audio-tab3-v2-3-48ee7f2293b3@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi

index 9bc05961577dca2101418c6ad0ae8e05c76eac61..bbafd4ece5f72e9c522fced8e59d0e747b3427a3 100644 (file)
                regulator-max-microvolt = <2800000>;
        };
 
+       earmic_bias_reg: voltage-regulator-6 {
+               compatible = "regulator-fixed";
+               regulator-name = "EAR_MICBIAS_LDO_2.8V";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               gpio = <&gpm0 0 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        sound: sound {
                compatible = "samsung,midas-audio";
                model = "TAB3";
                mic-bias-supply = <&mic_bias_reg>;
                submic-bias-supply = <&submic_bias_reg>;
 
+               lineout-sel-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
+
+               headset-mic-bias-supply = <&earmic_bias_reg>;
+               headset-detect-gpios = <&gpx0 4 GPIO_ACTIVE_LOW>;
+               headset-key-gpios = <&gpx3 6 GPIO_ACTIVE_LOW>;
+               samsung,headset-4pole-threshold-microvolt = <710 2000>;
+               samsung,headset-button-threshold-microvolt = <0 130 260>;
+               io-channel-names = "headset-detect";
+               io-channels = <&adc 0>;
+
                audio-routing = "HP", "HPOUT1L",
                                "HP", "HPOUT1R",
 
        };
 };
 
+&adc {
+       vdd-supply = <&ldo3_reg>;
+       status = "okay";
+};
+
 &bus_acp {
        devfreq = <&bus_dmc>;
        status = "okay";