From patchwork Mon Mar 27 15:02:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 1761766 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dubQc+Bh; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PlbgJ6Kccz1yXq for ; Tue, 28 Mar 2023 02:03:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232440AbjC0PDx (ORCPT ); Mon, 27 Mar 2023 11:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbjC0PDt (ORCPT ); Mon, 27 Mar 2023 11:03:49 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C93AB30E9; Mon, 27 Mar 2023 08:03:02 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id y20so11888274lfj.2; Mon, 27 Mar 2023 08:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679929355; 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=2R4nSlYFpaaH1DqF4jj0/gkMQlHMptuPEzO27FqolJo=; b=dubQc+BhyIhjUBjsrxSypFOxYNUAUdqwcqNRv5KT/H7U9kLkCCMwgi60P/Tj+5l4AK PbVARzOcfiC+4NdYIgtzVfIP45ZquR37GxTHP1q5vJeAhACvKRxrOd6vTrgdhHB6sDCo EpYy9jYsqmzci0i4RpmKuPO8WxcxHZw4sGnjElFDi7yMaQzUZfs7JE/9kdf/0JMpjo46 EC/apoUdozU7dunUaC4H+ssmcbVkHFWn4Vx2JBGPSQ2t5CRQwakBnssfe2iW6WtVwnCu HJqdF4sWilSMC9/NqzJ9YYothjf+z/hC4A+HVQNMqOtQxycte7NfNiUXdLZWvUDlKaxr dz8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679929355; 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=2R4nSlYFpaaH1DqF4jj0/gkMQlHMptuPEzO27FqolJo=; b=d4lCsa8Jx/1OHfSKl7PBZFQM573xplQNhTLY4nkjjTGGQJ/8h361Qxlqh4wuIJKfM6 vMiXbP5whUjohzPnj/Lo8v/rZM1OpWRP1k5sbHMC+SoRUNIFtg7qqVRufCYHUJkcZueh vSy4+IXMZ3f3jmD6OR+jz4Z2dGHvQBUlnYZXLlpDsyWXqzfo3kKeWMZai5ijcrYcklvk j2jqlUbx55MfXx4e+TYSCcIsTzXHtZOf7g7MGw9qpd5eeY8Y2EidG0U0YoSqNqza90hK fdhJDJOMisdJmt9dBhLkEpIQhf+3qthzplchWVmdlo0cPa8ZLoYkgkD0/8/biqGKVNrh DStg== X-Gm-Message-State: AAQBX9cbwY0FTygDwp9N1ozpUD4D0eKo66+qRw3t7jXh3iHqiWu7PyCR iyaOD8KNuNhGRALqJpj0oC8= X-Google-Smtp-Source: AKy350a0RulKKfAGKOX/qGSFAiGfDfzbPANsHACrrH2PIPH2ItMZDBxgn44MjP/oEaqzbf7Ar8UTzg== X-Received: by 2002:ac2:51c7:0:b0:4ea:f7be:e06e with SMTP id u7-20020ac251c7000000b004eaf7bee06emr3340230lfm.17.1679929355367; Mon, 27 Mar 2023 08:02:35 -0700 (PDT) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id f4-20020a19ae04000000b0049ad2619becsm4706923lfc.131.2023.03.27.08.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 08:02:35 -0700 (PDT) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v4 1/2] ARM: tegra: transformers: update WM8903 sound nodes Date: Mon, 27 Mar 2023 18:02:18 +0300 Message-Id: <20230327150219.13636-2-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230327150219.13636-1-clamor95@gmail.com> References: <20230327150219.13636-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.1 required=5.0 tests=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=unavailable 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-tegra@vger.kernel.org - fix headset detection in common device tree; - use device GPIO mic detection on wm8903 transformers; Signed-off-by: Svyatoslav Ryhel --- arch/arm/boot/dts/tegra20-asus-tf101.dts | 13 +++++++------ arch/arm/boot/dts/tegra30-asus-tf300t.dts | 6 ++---- .../boot/dts/tegra30-asus-transformer-common.dtsi | 9 +++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts index 7b2969656ec9..3f1da75a2736 100644 --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts @@ -520,10 +520,10 @@ wm8903: audio-codec@1a { 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 */ >; @@ -1184,15 +1184,16 @@ sound { "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>, diff --git a/arch/arm/boot/dts/tegra30-asus-tf300t.dts b/arch/arm/boot/dts/tegra30-asus-tf300t.dts index 506ae3626731..970a1f08dc8c 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300t.dts @@ -128,8 +128,8 @@ wm8903: audio-codec@1a { 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 */ @@ -1023,12 +1023,10 @@ sound { "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; }; }; diff --git a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi index 1861b2de2dc3..bdb898ad6262 100644 --- a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi +++ b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi @@ -558,7 +558,7 @@ spi1_mosi_px4 { nvidia,enable-input = ; }; - spi2_cs1_n_pw2 { + hp_detect { nvidia,pins = "spi2_cs1_n_pw2"; nvidia,function = "spi2"; nvidia,pull = ; @@ -566,10 +566,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>, From patchwork Mon Mar 27 15:02:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 1761767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=aJAMeUSu; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PlbgK5SvTz1yXq for ; Tue, 28 Mar 2023 02:03:57 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232362AbjC0PDx (ORCPT ); Mon, 27 Mar 2023 11:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232153AbjC0PDv (ORCPT ); Mon, 27 Mar 2023 11:03:51 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 021FF3596; Mon, 27 Mar 2023 08:03:03 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id x17so11868704lfu.5; Mon, 27 Mar 2023 08:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679929356; 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=3af7AQ9wLc3osxXyvBrW7r37wpKHewq77ohhLjiNp5I=; b=aJAMeUSuyua/Fa1o+yzjjCi4t7zNAxGXPG0mr4ctDoteRlTqAfsvzt1UmCylvScST+ D53MpZfSCQPDgUc4+h6B7RJD9NS7BV9RdYb6/cn4TGT16+1YttXq8Rye0AiNdP/bI6wF sLW+/u9BtWSxrCwrd9nt1QCeK0N5jhH82sQNgvY20RpccuN9HQlRPXikT8jzUa17mYOd mw18ksCfHZkzth1pn5CNNsc0+mw12AKyd6tYCn9ddyKIVgT1m53d5eVuSdJW2paltwS0 Fh1NNRXw8IlOEsmcFE7+n0Lw1IuKRyOIaybwgKVSBOb7K5BThsbAaPL58VQc6NDK1sqB mZHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679929356; 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=3af7AQ9wLc3osxXyvBrW7r37wpKHewq77ohhLjiNp5I=; b=iSMijXm7selnhKm6hWZu/w/rqkmV1FpSsGpvP7tSsHxqUCz7ciPxy5rCylW27GniVJ lZP+pQYbqhpknw8PHlMWD6+z0skoSdOVp56DExxpbpvHkBfNUpFqF6tT0IpqyO/tgqdV sI5PIim+ThCxNanzmAps1ecUbTBx0g1O+YGD4N5MPqDmNmrDJdTZzZOGkNUkPhz8qvhK FwypytfGa2U9tgUc+CP4ugswi0l/58fnTvLBGeT+Ci/hYYVr/QYA6ljXjiac3GquzVx7 NYA1S6T7kiZ4o1211HB0nV3nSnJguW0tIYw3vUPWmHmE5tuTw86GjpY5IkGlCzsuBpAQ Y3Qg== X-Gm-Message-State: AAQBX9ePnVuG3OGmnpN6cgChieXP4kXWxyo5lOUEQt1BKm4vdiNkUkK2 0muFgeieVl+oJWjfSsAcRDs= X-Google-Smtp-Source: AKy350YAIa8fmdryQsNcyE9xdIj1Y0024oPSK/j0KzOEf8cX+5Lf79GCDkuFHKNiRZfI46m1NUYpWA== X-Received: by 2002:a19:a40a:0:b0:4eb:982:adf with SMTP id q10-20020a19a40a000000b004eb09820adfmr1952941lfc.26.1679929356417; Mon, 27 Mar 2023 08:02:36 -0700 (PDT) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id f4-20020a19ae04000000b0049ad2619becsm4706923lfc.131.2023.03.27.08.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 08:02:36 -0700 (PDT) From: Svyatoslav Ryhel To: Rob Herring , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v4 2/2] ARM: tegra: transformers: bind RT5631 sound nodes Date: Mon, 27 Mar 2023 18:02:19 +0300 Message-Id: <20230327150219.13636-3-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230327150219.13636-1-clamor95@gmail.com> References: <20230327150219.13636-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.1 required=5.0 tests=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=unavailable 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-tegra@vger.kernel.org TF201, TF300TG and TF700T support RT5631 codec. Signed-off-by: Svyatoslav Ryhel --- arch/arm/boot/dts/tegra30-asus-tf201.dts | 17 +++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf300tg.dts | 17 +++++++++++++++++ arch/arm/boot/dts/tegra30-asus-tf700t.dts | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/arch/arm/boot/dts/tegra30-asus-tf201.dts b/arch/arm/boot/dts/tegra30-asus-tf201.dts index 3c2b9e93e028..0406c5a69c12 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf201.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf201.dts @@ -624,4 +624,21 @@ opp-table-emc { /delete-node/ opp-800000000-1300; /delete-node/ opp-900000000-1350; }; + + 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", "Mic Jack", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; diff --git a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts index 573deeafb7ba..4861db8e1e59 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf300tg.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf300tg.dts @@ -1084,4 +1084,21 @@ opp-table-actmon { /delete-node/ opp-800000000; /delete-node/ opp-900000000; }; + + 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", "Mic Jack", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; }; diff --git a/arch/arm/boot/dts/tegra30-asus-tf700t.dts b/arch/arm/boot/dts/tegra30-asus-tf700t.dts index e7fe8c7a7435..efde7dad718a 100644 --- a/arch/arm/boot/dts/tegra30-asus-tf700t.dts +++ b/arch/arm/boot/dts/tegra30-asus-tf700t.dts @@ -820,4 +820,21 @@ 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", "Mic Jack", + "DMIC", "Int Mic"; + + nvidia,audio-codec = <&rt5631>; + }; };