From patchwork Sat Mar 25 08:20:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 74864 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp297197vqo; Sat, 25 Mar 2023 02:21:09 -0700 (PDT) X-Google-Smtp-Source: AK7set/L7ufk/NX9RqeLTTs465YxJtVDH790yaE5y6fDQbJk6Yrl/EUT6YfIyjgVRJVkO1ihIwyA X-Received: by 2002:a05:6a20:3104:b0:d9:91d2:b81e with SMTP id 4-20020a056a20310400b000d991d2b81emr4671611pzf.62.1679736069663; Sat, 25 Mar 2023 02:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679736069; cv=none; d=google.com; s=arc-20160816; b=VD5kG5sieheXaScIbZzvLb7bleqwVqKfpdr/zHyjQ3SwSiiyyCQ8lcEs1r0EtVB4ea AcQ7dh8XJrbLf3i1vtl/n0UBE05wNEwmN4vC1b3/Js05aP4R7zy5JVklTZ2lP6/seZCY 7cfpu03LNanv/0fMZFyTwjmyq1uAzIM9A9wQ3I6BTrKlXBFRFdhl7HCgQ4I+pt18a4bZ ywJp2FUwuzRvPv4ozh2tzKMdiBxbRVN16DzgdS2rzxa5qR3dSimrOpaJf1JPfE2L2wAM 1LEsvWLojwm7fA4tPEmPA0NmDTjp7pFz8vAk4f1FGXpq/VUkGALWLQkZhMcCdlBUzhDW G0kg== 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=qdYPgJ9kVAY+FX7JFEaDiM/XsHcLyA9JSPLKQoGwx+A=; b=wQZgJgtORURWS9htb3nVywb3wXICPbM5Khh8sTUhGffB3+Dp2f6f2eDnd4c9LO9KNz 0HV0USj74iYQseaT3NuwFYjqJhviB/gCcD0k+ViwbIzZBljEfIwnogObh9PH6PHDAlBM ICQTEH6PGZgizBPkkUPLkIS1awEpwnfEUrRZnDunD8t6Zg3uEnfu6MK6bdqyliJ5sAji hO+68v2H5woJynoa8eDJTjYde37qjUI8rOSQPHBQCdLV9QVcha9d+tpL/0Fc/nWo9RVA wtOkkodcQhyNMPhqODhyBxYX7YEwGg6jnKT8m/8eOr163axOGv1UsFQGqNJkeym3x12i u6Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nyPcGAyW; 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 q2-20020aa78422000000b005941ff7940dsi3361310pfn.203.2023.03.25.02.20.57; Sat, 25 Mar 2023 02:21:09 -0700 (PDT) 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=nyPcGAyW; 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 S231945AbjCYIUg (ORCPT + 99 others); Sat, 25 Mar 2023 04:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231629AbjCYIUc (ORCPT ); Sat, 25 Mar 2023 04:20:32 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36BC616AD9; Sat, 25 Mar 2023 01:20:30 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id j24so3889274wrd.0; Sat, 25 Mar 2023 01:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679732428; 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=qdYPgJ9kVAY+FX7JFEaDiM/XsHcLyA9JSPLKQoGwx+A=; b=nyPcGAyWU/F0iZBJn9zXNBSilQ86Zh80RQERfz9WnwWkTnpdKVgBkQtKAJGhkt7Qtb oMYeY+jlESJdDeRgAx97s44vd+EWMsewp4dZTPjopalYergNhC6jsCpnB6zvjz6G4vum c7P6d4GIkhytu4BzYQXFC62iRu5OcUKCYe3p1b3Y87LfRZPcvIjtVISNbs4BWNtuGDO+ YUhmWfdHaGI3lrO/A54tLrI1XEdVnLc6WvbM5etK6NB4ahtoOx4CrWEUg14z9rYyYYmk K2HHeQPxJb2UD6o8Sk+h+LOSrmG43gYJg9397cxy2ncLgdY8zUDj6GAQBPYfk8lmXfTR Uzlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679732428; 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=qdYPgJ9kVAY+FX7JFEaDiM/XsHcLyA9JSPLKQoGwx+A=; b=j8UpZOPZZXRO6ZhQ/t6TPDjJEapT4VHaUDBGjywJrTtiNxccq7m73OYJbgsdCPqwSn 6jOPO2uITfNtIvaK1j4DVpEB2tINx6RiN3dJY4dIc2HgmKBCDeW78j1Tk93pCjg5Wp7l YFZ26WYz5issd16ZLQ3l4MeoYs/OL7GRe1FZhfV/Vg/lNhmBMyShofdVien2bsw4EggJ 8K5kZQUbkKF4Ftp0JXir+q/la5Xo0/YysGqRN45Ams7WsagLI8GUOl67ELHc/qywwXXC i8JPDdNBJsi6FHtTyh4y4qnt18NXfbjVWweR0kraAi2gYdUAjfKLAsDMPNOqz8Kxu9NH HeIw== X-Gm-Message-State: AAQBX9fogADnF7CY/ePQR786uWxdt1GnlmzuyflvIFwHeNJqWOym//Es 3qoYB20gQdOwFVs7QBHDpCC0I+2Eh/Y= X-Received: by 2002:adf:e7c2:0:b0:2d3:1c7d:a396 with SMTP id e2-20020adfe7c2000000b002d31c7da396mr4345114wrn.68.1679732428688; Sat, 25 Mar 2023 01:20:28 -0700 (PDT) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id n12-20020a5d484c000000b002c59f18674asm20175918wrs.22.2023.03.25.01.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 01:20:28 -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 v3 1/2] ARM: tegra: transformers: update sound nodes Date: Sat, 25 Mar 2023 10:20:10 +0200 Message-Id: <20230325082011.6985-2-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230325082011.6985-1-clamor95@gmail.com> References: <20230325082011.6985-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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761330929057695239?= X-GMAIL-MSGID: =?utf-8?q?1761330929057695239?= - fix headset detection in common device tree; - use GPIO mic detection on wm8903 devices; Signed-off-by: Svyatoslav Ryhel --- arch/arm/boot/dts/tegra20-asus-tf101.dts | 13 +++++++------ arch/arm/boot/dts/tegra30-asus-tf300t.dts | 8 +++----- .../boot/dts/tegra30-asus-transformer-common.dtsi | 9 +++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts index 7b2969656ec9..420481077685 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", + "DMIC", "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..3ef670ca0edb 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"; + "DMIC", "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>,