From patchwork Tue Feb 21 18:32:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 655410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06D0BC61DA3 for ; Tue, 21 Feb 2023 18:40:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C18D8EEA; Tue, 21 Feb 2023 19:39:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C18D8EEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677004837; bh=XDIVABp6eKs2mHx64i1RqbuGLljQnHQeH0qXYLsu3NA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=koRA/bQ6/k4UZ8Udg3Ph5ZS73Bc3oSqZEWA6v9AZKOXorBOXnEG2/VpYh/Et0ualK ecc22hsPfljZYZiQORmiYxAX4sF+dWphICsI58YakKRyT4c7dpxMYdTHOUlK+t+Yyj V1oEf/e4jL7ZtaIwPKwKcvtYb065Gkwf3ffzO6NQ= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CF284F805AC; Tue, 21 Feb 2023 19:37:03 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F37AF802DB; Tue, 21 Feb 2023 19:32:54 +0100 (CET) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 62AC3F80125 for ; Tue, 21 Feb 2023 19:32:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 62AC3F80125 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ZLcktQw2 Received: by mail-ed1-x52d.google.com with SMTP id b12so20977306edd.4 for ; Tue, 21 Feb 2023 10:32:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E6kk1KEQ/IVeQbAn9G08dCn7f0VBqM2RVSZE4nU8tG8=; b=ZLcktQw2yWXCWMLb+r8k3efgMJdd79CTAIDnmVywqDznjLEw7xRrl+1MN5bg3O9APj rxgt1EBGlzVHpz2UKl91tl9NqLvKa8ZN8onCQC0xPgxACvaPaRT2dG0OisdIPFfDegwe HPlqUrtQXwINZYZXwaWsVr64ce43UOrB/JyyrJ7isp/56MEvMArY/wOmTfbYiGGxvwll QcAwvI9570rgvn8J76VKSf3V9m1ttMHrCwH69JeLOdrePrwvoZYHsJNMl/fyKmV89mpn RLwy5dmrX5ezd85Uey7M786lydd2/IFPLkNgI3HbIyNm5dIStee4ktUKPnj2XKqoqH+W XE8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E6kk1KEQ/IVeQbAn9G08dCn7f0VBqM2RVSZE4nU8tG8=; b=FFWRfFeFfHeTO/neA1XziBj/i3ZJ7vki9mFYvtxARqilETP+UQ+1xQjd+dKCdIIajv OrKaWe7V8t73Ncb/9T52HdOdqy3kmmd7mV9UBJh+LWEIsa5bxkuLQZEGzjfPuwxVfThj hzdRB6PASD4ftslZfDGNqV5RUK/QPFqJOFmqjchJ2RbiFDnBWos1cZPuRxqetuQ1yWWG 16nUazBMeZXDDcqZtZUcA7z8VzeYFrYPJVGzyItlXhwpCagg7wMTMihBxS8pJkLLDibs brPyrqd6Cqu6x20qJJA82EYZnOEOBwR+piwHu/1shxpdf9SuC0QWY4GWZgVxmEFpqjMu igvw== X-Gm-Message-State: AO0yUKV26kajrbaUqsseJvji6WMNPy5q5rXhD8rPxS6S5qs9w20Diqbm 0tSXRoQH2V0abXfBDCoW8Afqy2nbdOrWnw== X-Google-Smtp-Source: AK7set/E+SxHoaq2fIGnYaXslbfvlnMH0WhFAMr8EmmsfbBnfuTToK9OvYA29COaSsoBwpvFXPsCfA== X-Received: by 2002:aa7:c908:0:b0:4af:502b:4437 with SMTP id b8-20020aa7c908000000b004af502b4437mr4090015edt.34.1677004351477; Tue, 21 Feb 2023 10:32:31 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id i3-20020a50c3c3000000b004af5aa16fcasm169102edf.66.2023.02.21.10.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:32:31 -0800 (PST) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Subject: [PATCH v1 07/10] ARM: tegra: transformers: update bindings of sound graph Date: Tue, 21 Feb 2023 20:32:08 +0200 Message-Id: <20230221183211.21964-8-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230221183211.21964-1-clamor95@gmail.com> References: <20230221183211.21964-1-clamor95@gmail.com> MIME-Version: 1.0 X-MailFrom: clamor95@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: ZZMWY6JS32LBY7EL2W2QFVETRAFEASQW X-Message-ID-Hash: ZZMWY6JS32LBY7EL2W2QFVETRAFEASQW X-Mailman-Approved-At: Tue, 21 Feb 2023 18:36:40 +0000 CC: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - fix headset detection in common device tree; - diverge control and detect elements for mic; - use GPIO mic detection on wm8903 devices; Signed-off-by: Svyatoslav Ryhel --- arch/arm/boot/dts/tegra20-asus-tf101.dts | 8 +++++--- arch/arm/boot/dts/tegra30-asus-tf201.dts | 17 +++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf300t.dts | 5 ++--- arch/arm/boot/dts/tegra30-asus-tf300tg.dts | 17 +++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf700t.dts | 17 +++++++++++++++++ .../dts/tegra30-asus-transformer-common.dtsi | 9 +++++---- arch/arm/boot/dts/tegra30-pegatron-chagall.dts | 2 +- 7 files changed, 64 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts index c39ddb462ad0..8d0613567e82 100644 --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts @@ -1179,15 +1179,17 @@ sound { "Int Spk", "RON", "Int Spk", "LOP", "Int Spk", "LON", - "Mic Jack", "MICBIAS", - "IN1L", "Mic Jack"; + "IN1L", "Headset Mic", + "IN2L", "Headset Mic", + "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_HIGH>; + nvidia,coupled-mic-hp-det; clocks = <&tegra_car TEGRA20_CLK_PLL_A>, <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, diff --git a/arch/arm/boot/dts/tegra30-asus-tf201.dts b/arch/arm/boot/dts/tegra30-asus-tf201.dts index 315c6dc068c5..47865deeb88a 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf201.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf201.dts @@ -605,6 +605,23 @@ haptic-feedback { enable-gpios = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_HIGH>; vcc-supply = <&vdd_3v3_sys>; }; + + sound { + compatible = "asus,tegra-audio-rt5631-tf201", + "nvidia,tegra-audio-rt5631"; + nvidia,model = "Asus Transformer Prime TF201 RT5631"; + + nvidia,audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "Int Spk", "SPOL", + "Int Spk", "SPOR", + "MIC1", "MIC Bias1", + "MIC Bias1", "Headset Mic", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; &emc_icc_dvfs_opp_table { diff --git a/arch/arm/boot/dts/tegra30-asus-tf300t.dts b/arch/arm/boot/dts/tegra30-asus-tf300t.dts index f47434871a5c..78f78cca337a 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300t.dts @@ -1011,13 +1011,12 @@ sound { "Int Spk", "RON", "Int Spk", "LOP", "Int Spk", "LON", - "IN1L", "Mic Jack", - "IN2L", "Mic Jack", + "IN1L", "Headset Mic", + "IN2L", "Headset Mic", "DMICDAT", "Int Mic"; nvidia,audio-codec = <&wm8903>; nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>; - nvidia,headset; }; }; diff --git a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts index 96345f821c3d..82c51e177a70 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts @@ -1072,6 +1072,23 @@ timing-667000000 { display-panel { compatible = "innolux,g101ice-l01"; }; + + sound { + compatible = "asus,tegra-audio-rt5631-tf300tg", + "nvidia,tegra-audio-rt5631"; + nvidia,model = "Asus Transformer Pad TF300TG RT5631"; + + nvidia,audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "Int Spk", "SPOL", + "Int Spk", "SPOR", + "MIC1", "MIC Bias1", + "MIC Bias1", "Headset Mic", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; &emc_icc_dvfs_opp_table { diff --git a/arch/arm/boot/dts/tegra30-asus-tf700t.dts b/arch/arm/boot/dts/tegra30-asus-tf700t.dts index 1a331dec3cfe..766225ebdeab 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf700t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf700t.dts @@ -812,6 +812,23 @@ vdd_1v2_mipi: regulator-mipi { enable-active-high; vin-supply = <&vdd_3v3_sys>; }; + + sound { + compatible = "asus,tegra-audio-rt5631-tf700t", + "nvidia,tegra-audio-rt5631"; + nvidia,model = "Asus Transformer Infinity TF700T RT5631"; + + nvidia,audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR", + "Int Spk", "SPOL", + "Int Spk", "SPOR", + "MIC1", "MIC Bias1", + "MIC Bias1", "Headset Mic", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; &emc_icc_dvfs_opp_table { diff --git a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi index 08ea9cb32d0e..42dae0f4759e 100644 --- a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi +++ b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi @@ -550,7 +550,7 @@ spi1_mosi_px4 { nvidia,enable-input = ; }; - spi2_cs1_n_pw2 { + hp_detect { nvidia,pins = "spi2_cs1_n_pw2"; nvidia,function = "spi2"; nvidia,pull = ; @@ -558,10 +558,10 @@ spi2_cs1_n_pw2 { nvidia,enable-input = ; }; - spi2_sck_px2 { + mic_detect { nvidia,pins = "spi2_sck_px2"; nvidia,function = "spi2"; - nvidia,pull = ; + nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; @@ -1674,7 +1674,8 @@ sound { 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>, diff --git a/arch/arm/boot/dts/tegra30-pegatron-chagall.dts b/arch/arm/boot/dts/tegra30-pegatron-chagall.dts index d9408a90653a..6e24b095713b 100644 --- a/arch/arm/boot/dts/tegra30-pegatron-chagall.dts +++ b/arch/arm/boot/dts/tegra30-pegatron-chagall.dts @@ -2731,7 +2731,7 @@ sound { "Int Spk", "RON", "Int Spk", "LOP", "Int Spk", "LON", - "IN1R", "Mic Jack", + "IN1R", "Headset Mic", "DMICDAT", "Int Mic"; nvidia,i2s-controller = <&tegra_i2s1>;