From patchwork Wed Mar 8 07:34:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 66062 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp194803wrd; Tue, 7 Mar 2023 23:49:34 -0800 (PST) X-Google-Smtp-Source: AK7set/zustC1ZzyxMluFrOVw17EYP+EVq4qXiBNlYj4GZdsmwdj02eRn5/Fh8y69gIA1Cxy/Pqw X-Received: by 2002:a17:906:ce39:b0:8aa:f2f2:7543 with SMTP id sd25-20020a170906ce3900b008aaf2f27543mr17186289ejb.29.1678261774147; Tue, 07 Mar 2023 23:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678261774; cv=none; d=google.com; s=arc-20160816; b=vsIjwRuFiVDfnEVac8gYlJL3OmpxPCrC7BkgHegViKyQBYYepNWMALQGSrvvbvyPxs /ArXANrrQwAiqsjOOqkLT3PBE7sJn3f1WevENPbXqcGsokbTVyu9342FQcUrwKoh5FS4 sFzjCCvMxTQgoEnUwIhQyL113VxQK9DSHuYeR5z/W1+NCOKyMEAqec9YtkT2lRQVsviQ 7RgmDHk2yVyyd4938KdjwAJCkbOBYc97JaHiZ5BznWBusKxhJ69xJTgeQmLA1VM5BY08 0+VMROwILtWAlKiGSZVU8cYjHtCwBMvQ3T/jYnxtE8yhXLP07rM/ULWtTS3LyJZYhWJv ftZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Sw6Zqne2z7YifJ5cyYa9t+wWI0sG16wXBTs6NvHN/Wk=; b=avCFRP5vyQaXJUwgvbw4RcsRVCJlAtDlfOrTcEJuGIwrCsp4KRA4WbSA2IyaUOqfcv OnuSCUwSo/5l+Ndic4mxoUIuO2HS2XKK5g6DlM/8mNuKeoVOxhUPYbrIN3BpMYVGQ2TN g55H0UcSAHRdMiKW8e1l6p6wyZ9RzwMlyqEJ19+U5fGAlV7kWnfFJyk/oCmp/ARvCqSx XTX1b19AmkcgxIeQ954E9w8o/2FPef0bpCD4gfNuKGoq8+g1Yr9i3bENELAP0+is/XmV an8gj6JrQQEiuz7FGPNjVGkIwBMVhpN6DLX46bdZGCiN2xHYA/EakHNK2PfDddbiNA1X erTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=H5ySkeSB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lj9-20020a170906f9c900b008d77c083937si2052779ejb.907.2023.03.07.23.49.08; Tue, 07 Mar 2023 23:49:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=H5ySkeSB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbjCHHfz (ORCPT + 99 others); Wed, 8 Mar 2023 02:35:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbjCHHfg (ORCPT ); Wed, 8 Mar 2023 02:35:36 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CCF72FCF4; Tue, 7 Mar 2023 23:35:28 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id k10so38121569edk.13; Tue, 07 Mar 2023 23:35:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678260926; 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=Sw6Zqne2z7YifJ5cyYa9t+wWI0sG16wXBTs6NvHN/Wk=; b=H5ySkeSBojKDLn9ziiQj/VN4R2TuGi3ptHrTGL5+4i5PLSHGhULRP4wKjh2za4ih0y f4ul79eEQClRwZ4ZnKbVfwJUnpet0B35mxxMelxp6jDpC+F4dGVRnRVk5keB25zkY/TJ DUnZM2M/Wa2cCVSY7KugZ4vC8fjO0wgOM6qWfcdkSuwqvw9FI/VP50LK5Bt0nTsDmCxm MqJmGjbOOg9OWnn4l4Vkq4K2ubOnb+Jv2KjkiHhX1UE38IH5XF0QQppUFdvIZI1zAd+I d1+CKSOIrsozHV55AVae1y4wcT7iN0iLucKtsptcPlfd7+Zxc1ULkF/DuceLxJHQR7td 2UwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678260926; 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=Sw6Zqne2z7YifJ5cyYa9t+wWI0sG16wXBTs6NvHN/Wk=; b=XdgiyQ7vlT/qfTPAVjbw7rGJEhSJuKz6JAwAsgSJLNJUs1vo9gZ0jPHAMpzkAQVYYN GL0/HSv2WcPls0/l83ubblpaecyMN+P7Tb+9qKOcMnyjgsmeRzOw7WFS8p48BMOjaWm5 TicDFTcg6076GKmKr9FVVEPniMkAbOueWz74ECQpDGa2QmmglsOt/JoBjacXEalmFx2A DWrVkPycRtgUNjJr6qeNs256CID4eLa5ys23a5Q8/KaMjUVZxbxZc7yRF8W4OXkCpKNr 0LcjOWi0xg7BglsAco4qLR60epg0C+9ctF+8aJrpZDdHh6U/jA8wr9e7NSywjiBayIgf aabA== X-Gm-Message-State: AO0yUKWQmEL3/7V1QqmfZqV/E6ED+qm1m7upWFznZ0pRcqn9REh2O0e9 DZApzJAA3jMSm2H4FT1l/zo= X-Received: by 2002:a17:906:b007:b0:8aa:c038:974c with SMTP id v7-20020a170906b00700b008aac038974cmr16145441ejy.54.1678260926392; Tue, 07 Mar 2023 23:35:26 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id h15-20020a1709062dcf00b008dffda52d71sm7051880eji.124.2023.03.07.23.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 23:35:26 -0800 (PST) From: Svyatoslav Ryhel To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Jaroslav Kysela , Takashi Iwai , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko 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 Subject: [PATCH v2 3/8] ARM: tegra: transformers: update sound nodes Date: Wed, 8 Mar 2023 09:34:57 +0200 Message-Id: <20230308073502.5421-4-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230308073502.5421-1-clamor95@gmail.com> References: <20230308073502.5421-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759785017812488745?= X-GMAIL-MSGID: =?utf-8?q?1759785017812488745?= - 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 | 7 ++++--- arch/arm/boot/dts/tegra30-asus-tf300t.dts | 5 ++--- arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts index c39ddb462ad0..4ed50b8300b1 100644 --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts @@ -1179,15 +1179,16 @@ sound { "Int Spk", "RON", "Int Spk", "LOP", "Int Spk", "LON", - "Mic Jack", "MICBIAS", - "IN1L", "Mic Jack"; + "IN1L", "Int Mic", + "IN2L", "Headset 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>, 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-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>,