From patchwork Thu Jul 25 10:40:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13741758 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DC35EC3DA49 for ; Thu, 25 Jul 2024 10:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6jgZAm73Hf/bhFqyp8PoWdCzqWnz2LzHMQrAjO6S6u8=; b=kUKPgWBIgJFFWXRj2OYGmKfL/G jBz+wWXNVr3RihtAOvuoXFNpVfJK0eLNBWb3NabPeKdHSvIOh+4SJqfkkVZHs3Iwbr+hBGSisdNz6 pXNxsd8oQTJRc7lKWhawbnCiCfwASD4F/FbpSLSr/jiDp8kaASI8EdQhrtBNqlD5E1taiJnFvhU4J H2cJofcZnMIfs/vQ5l9gXWXRTZ3IIAnV95P91l8qIy1aeCXms36Bmx7BVwhxs4ADfqlYa+fy1I6NT px6NsM901S8Bh2CCpoOTj9YX/rVBrEilqajK+0tmgtokklKflu6WOH2Tve12Tii07Q/dWnGl9QfQE UJWpXa6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWvvL-00000000ewX-2idu; Thu, 25 Jul 2024 10:42:15 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWvtw-00000000eU1-2Zom for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2024 10:40:50 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a7a9a7af0d0so51227566b.3 for ; Thu, 25 Jul 2024 03:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721904046; x=1722508846; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=6jgZAm73Hf/bhFqyp8PoWdCzqWnz2LzHMQrAjO6S6u8=; b=m92JZGonQ1+rYenkn+hglOvjq7eh9m9U7Ynvt/DIT6Tjkx8jDi+ikaep1ocwQG7ZDQ DDW7AiLEyabqOhOxjSAcavK92BQsajIPm8RmM4DAiKlxN1nhJGQFtXRmQCE+7kalKke1 th7Dk3CAVheLO8RMdBprLQTmwZhORBg+djK3C10fZnuWDpEAdMsBiYxcAJUAig7uJSrR C0r+nAXiiNYXudwk4XJvp7GdhMjWc7BJSQuY0oqCKZcMqUq7zNLHcw5TAJLlyAS19OMs O5qUW2/zxgITksoSBC13Qy0IPI6EG16cTumliW+t+egXVvILZLNnf3am56X5ir9r1O1h 5i+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721904046; x=1722508846; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6jgZAm73Hf/bhFqyp8PoWdCzqWnz2LzHMQrAjO6S6u8=; b=QZGBIb9LXWGt19emtp/mG8tMIY+rxh+Sk04q2xOyvxOhlEIfkM0vUc9iom1jfpSrvv curVlMENbKCiUEcT49eWc+rhwr7971Byk3clkIMLeLuk0RHKpCBLLRXUrpxa/NkvClaP X4rmtbJtMCR9kmiIAr0YA8+JIs+/NuqC3IHiItO39a8Zu5As2K1Babb4Z/t3VBvKKNFC Vsi0KeRHEJ88xYDFVBqKea6UJRsfQTNjwdlAKe1T/eXJijVPYr1fkvhotjnmb9Op4Z5g Lg0x9mLNAE4Qrlwph2F52IBbMBRv5XAiFVpJ9IZ3ryvSsqOdnhFSJKM3BWs3r2s8NQse 8l3Q== X-Forwarded-Encrypted: i=1; AJvYcCVsVvNWpBO/1xlgMCDdKI1xNZl+6PEzy12U9G2sb+l2tFXJPeJemWid8C61PS1Uh1c/7X9hemokKHwkknPKaCCyWJjqlgCFD3ag9NBBR2Sm3+Ks3UA= X-Gm-Message-State: AOJu0YxorGaqkp6V2LCPspVjSkLXWuZMWDLSmZ2V/2RQ5dn8LG8MKE2V CYMOgBZOoQhesuYVAZIgE2izJeWpQZaY9KKeZsZUbGhf7WQuFEJl X-Google-Smtp-Source: AGHT+IGovJSsZSFuA3Rq17j+OMkIEqicFAzp2LhAj97sWOxPvJ5mqgOjmYbaykRF1W4HiOM0VjAsiA== X-Received: by 2002:a17:907:318a:b0:a7a:a33e:47b5 with SMTP id a640c23a62f3a-a7acb9b7230mr120125566b.69.1721904046538; Thu, 25 Jul 2024 03:40:46 -0700 (PDT) Received: from tablet.my.domain (83.25.114.69.ipv4.supernova.orange.pl. [83.25.114.69]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab23d56sm58342066b.38.2024.07.25.03.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 03:40:46 -0700 (PDT) From: Artur Weber Date: Thu, 25 Jul 2024 12:40:37 +0200 Subject: [PATCH v2 3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection MIME-Version: 1.0 Message-Id: <20240725-midas-audio-tab3-v2-3-dbc055c27879@gmail.com> References: <20240725-midas-audio-tab3-v2-0-dbc055c27879@gmail.com> In-Reply-To: <20240725-midas-audio-tab3-v2-0-dbc055c27879@gmail.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Artur Weber X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1894; i=aweber.kernel@gmail.com; h=from:subject:message-id; bh=GMcA/CSZ2AnnqzHK3pWs0min7yshm+f3JahQWfU+ihQ=; b=owEBbQKS/ZANAwAKAbO7+KEToFFoAcsmYgBmoiuoa1y6zAZghDGX5n5/kjHDjOkdleE4d6VW9 MNmqhpGxGmJAjMEAAEKAB0WIQTmYwAOrB3szWrSiQ2zu/ihE6BRaAUCZqIrqAAKCRCzu/ihE6BR aOxRD/9hAoKjY6o689I2hWMx51UiaLiHANSV1D4QZtTyRJEgFD3qpVpxqD3AcUx/801XjwvsIXq 00/9B/gR3i3SiSwK+hduFutC2wb0bdxodLGGcMWIfnNzjGFTN/KCuSe+sZoe25Rh/cFvsWNLWX1 +gv4KezzrPiIDvI3R4AwXIHnwkZ+gpNxQQyMuJNP6wNjh8H1Hs9ew0778etASf2itDcj8eME2VQ jmHoDRs21JiN4YrihRB55REl8QlLqK3FqJ/LbtZmKFoW33QcUY7FPID08AGGV4Q+BIjmclQAw1E /S7tqFGiZ7gI3JGjEs3USUCZwzBtA8cRSMFq+H3pZU2W5IFagHV9q9nwWJCB9TDxIk9AKgNv8qx wBmMqnEgK+8I42k/KdjbIz0CU5QNzbVEb6szGD6UCKl0LzP6iKcVPMTUYVAI9q/itAEAaxwFNEj WC1fA7FWvqJJe5VJ2B1NHO+9kMS1LfwK1gAcXDjru8InSBWqEMuu8cyexm66GWpVrli3pVrwyfk 5L/MZv0FT+fH3/8PuR6I0HhDS9X7WiZFJczmCV4vEwbu7DvIO1ejuqx08dZ0AsJZJVnZJmWaWJe G4dtFJAU2IJtZrYf7cMQdjr05HeZYeGlASY9BDVgD5NHn7MkrJaiRNCtFM9/86aHJCKPBhu7njI CyMvpywuh5Iiw2Q== X-Developer-Key: i=aweber.kernel@gmail.com; a=openpgp; fpr=E663000EAC1DECCD6AD2890DB3BBF8A113A05168 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_034048_695961_21BA5C2A X-CRM114-Status: GOOD ( 10.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Set up headset mic bias regulator and add the necessary properties to the samsung,midas-audio node to allow for headset jack detection. Signed-off-by: Artur Weber --- Changes in v2: - Move headset-mic-bias-supply property next to other headset properties --- arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi index 9bc05961577d..bbafd4ece5f7 100644 --- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi @@ -300,12 +300,31 @@ submic_bias_reg: voltage-regulator-5 { regulator-max-microvolt = <2800000>; }; + earmic_bias_reg: voltage-regulator-6 { + compatible = "regulator-fixed"; + regulator-name = "EAR_MICBIAS_LDO_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + gpio = <&gpm0 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + sound: sound { compatible = "samsung,midas-audio"; model = "TAB3"; mic-bias-supply = <&mic_bias_reg>; submic-bias-supply = <&submic_bias_reg>; + lineout-sel-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>; + + headset-mic-bias-supply = <&earmic_bias_reg>; + headset-detect-gpios = <&gpx0 4 GPIO_ACTIVE_LOW>; + headset-key-gpios = <&gpx3 6 GPIO_ACTIVE_LOW>; + samsung,headset-4pole-threshold-microvolt = <710 2000>; + samsung,headset-button-threshold-microvolt = <0 130 260>; + io-channel-names = "headset-detect"; + io-channels = <&adc 0>; + audio-routing = "HP", "HPOUT1L", "HP", "HPOUT1R", @@ -351,6 +370,11 @@ wlan_pwrseq: sdhci3-pwrseq { }; }; +&adc { + vdd-supply = <&ldo3_reg>; + status = "okay"; +}; + &bus_acp { devfreq = <&bus_dmc>; status = "okay";