ARM: tegra: transformers: Update WM8903 sound nodes
authorSvyatoslav Ryhel <clamor95@gmail.com>
Mon, 27 Mar 2023 15:02:18 +0000 (18:02 +0300)
committerThierry Reding <treding@nvidia.com>
Tue, 28 Mar 2023 11:17:43 +0000 (13:17 +0200)
Fix headset detection and use device GPIO microphone detection on WM8903
Transformers.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/tegra20-asus-tf101.dts
arch/arm/boot/dts/tegra30-asus-tf300t.dts
arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi

index 7b2969656ec964a144a02b9617deed2cddc59d0f..3f1da75a273648a5ef44f44cc8baa8af8f1958f3 100644 (file)
                        micdet-delay = <100>;
 
                        gpio-cfg = <
-                               0xffffffff /* don't touch */
-                               0xffffffff /* don't touch */
+                               0x00000600 /* DMIC_LR, output */
+                               0x00000680 /* DMIC_DAT, input */
                                0x00000000 /* Speaker-enable GPIO, output, low */
-                               0x00000400 /* Mic bias current detect */
+                               0xffffffff /* don't touch */
                                0xffffffff /* don't touch */
                        >;
 
                        "Int Spk", "RON",
                        "Int Spk", "LOP",
                        "Int Spk", "LON",
-                       "Mic Jack", "MICBIAS",
-                       "IN1L", "Mic Jack";
+                       "IN2L", "Mic Jack",
+                       "DMICDAT", "Int Mic";
 
                nvidia,i2s-controller = <&tegra_i2s1>;
                nvidia,audio-codec = <&wm8903>;
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
                nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
-               nvidia,headset;
+               nvidia,mic-det-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_LOW>;
+               nvidia,coupled-mic-hp-det;
 
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
                         <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
index 506ae3626731b82a13501ce96da7f67c521c3f8b..970a1f08dc8c3295d63ad9f176fe7c4be7b25c49 100644 (file)
                        micdet-delay = <100>;
 
                        gpio-cfg = <
-                               0xffffffff /* don't touch */
-                               0xffffffff /* don't touch */
+                               0x00000600 /* DMIC_LR, output */
+                               0x00000680 /* DMIC_DAT, input */
                                0x00000000 /* Speaker-enable GPIO, output, low */
                                0xffffffff /* don't touch */
                                0xffffffff /* don't touch */
                        "Int Spk", "RON",
                        "Int Spk", "LOP",
                        "Int Spk", "LON",
-                       "IN1L", "Mic Jack",
                        "IN2L", "Mic Jack",
                        "DMICDAT", "Int Mic";
 
                nvidia,audio-codec = <&wm8903>;
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
-               nvidia,headset;
        };
 };
index 1861b2de2dc3d43b47d151ad3167a5289467fa5c..bdb898ad626229943ab8bfa94702d1ded424de1c 100644 (file)
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
 
-                       spi2_cs1_n_pw2 {
+                       hp_detect {
                                nvidia,pins = "spi2_cs1_n_pw2";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
 
-                       spi2_sck_px2 {
+                       mic_detect {
                                nvidia,pins = "spi2_sck_px2";
                                nvidia,function = "spi2";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
                nvidia,i2s-controller = <&tegra_i2s1>;
 
                nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
-               nvidia,hp-mute-gpios = <&gpio TEGRA_GPIO(X, 2) GPIO_ACTIVE_LOW>;
+               nvidia,mic-det-gpios = <&gpio TEGRA_GPIO(X, 2) GPIO_ACTIVE_LOW>;
+               nvidia,coupled-mic-hp-det;
 
                clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
                         <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,