From patchwork Sun May 19 08:17:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13667819 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 1F38AC25B75 for ; Sun, 19 May 2024 08:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :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=SWY06hrm5bjbKCr6hQAB0nhBd8shTfSndJlLbFUA+sg=; b=NJ864vCT0Nj1Ib VHS9ynnTmXiOQwT7Rpr6k9h66GQ6+mqocLZrryv6QYUU0q7Sp+5RryNGR2QuqqBqN207hNE8wDL+I 9cEoGAr1OJdNG19sG8/LbrGJyZ2oUJgCzl1z7HK4bj4TTlKeybYJimdjmKij8URaNOTveClcI+DIW YzqEItSOzrLe4thxL39zp4QZdQysEpU3lOD9UyyfFb8dpP/b4t5UFW9WY5jOnyg++HiyY4nDZhUTh 8pC9lxC2B3J4bw/VhbMb6gj+RVpX9fok1kn0HNEiLaNjwQ6HqRMUd0iwlR/gj7Y4TmctKDdo8RnvO GR/2PFdSNQ2UG92pkwbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s8bkZ-0000000Bd2M-10WF; Sun, 19 May 2024 08:18:35 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s8bkJ-0000000BcsJ-0sWx for linux-arm-kernel@lists.infradead.org; Sun, 19 May 2024 08:18:21 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a5a2c05006aso333256566b.0 for ; Sun, 19 May 2024 01:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716106697; x=1716711497; 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=JckYzcWe8w+0grZPS9NysF8GgHh7PfoFNUhYz6cHvfw=; b=fzfREvy3qekVus7Uh6Gq8RC7qpXPxDY22FSHz3bSl8XLa0Oc3930bjLoewwdWU5u9q aqJmVkvfQ+izOpeFkvDkoMaPwsnt9KnH0fD7I/lFUWNYHqeGLtOiq2WI8r38fc+cQP49 zatwfR8FrPeD0rpEnI1OBVrWtVs96CUszAaDTrqeqUeeHZY4/fZALVedtIkZViyMZvHW nK3KbrBtycJw+nPu7WYF0VQa1Uxjebw4CUCJHJY/MvnbKlOTnaFJQSy2yk7GZ5kohuiP +afpfLZpBU3M2u1lWfHOqEXrezeyTTflICoumwMH9siv++SKpGD0G/e0RrN+V2qqz2/a +VhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716106697; x=1716711497; 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=JckYzcWe8w+0grZPS9NysF8GgHh7PfoFNUhYz6cHvfw=; b=lGksRU68A0oqN+SGlwQKY9bLUIVGUa9HNttSl1AJkiqxMGee9CJHtHNO2EwMxJTBSu AG33UBKBMyinEAm7QRvBZaQ7Ex2opnjU6U2q6pGMZeQnE9EJT9FAnPHOva9slhAsNcJy +Z6hx3DGmVZoWwM/F8Qa2s+RP2vRqr4x6ov7UAsNQBI6mwlZPck9EldZEKHnyMfZROyz Sjpc7yG7JdJgxbu+WqkilKpNP3uJUe3zn3E6FOdoq3h3VxUgjpS9fmqMcrtKAQEjoEfO MQ3Rm2RcJYAPwM879RC3pjdRV8NlnaDD8tup5LFEMUCDE+L7oxvozXvTaND+HeNnSro0 u8Lg== X-Forwarded-Encrypted: i=1; AJvYcCUZkJ6uoUx+AvimOPo8jnYJd3qleSGkNOs8pAQEmGD08vof91mHyb/YIRmn2c5bR4qMiK4ffEliDzd0C2fPmaqWgDDvEHhjFjd8mC2jSlIYBl9ehHQ= X-Gm-Message-State: AOJu0YyC5grGe6lfKhGJ9PYdM1wYiUi2IlE5CRzlylb+N2BG4QIUSyIk aT7WzbLHJJO+YMkihYYZGGgn9fDGcq8Fgf+uOHfJrdRlp3jlt+6g X-Google-Smtp-Source: AGHT+IG3SMaDBws1fzIkcPLAJz7n7Ag6C6la0lbxW02ImT03Ca69NZo4TJd0EVoTiNb4ZOsqOYvl9w== X-Received: by 2002:a50:d6c3:0:b0:575:a0c:4b8c with SMTP id 4fb4d7f45d1cf-5750a0c4c71mr7898781a12.38.1716106696840; Sun, 19 May 2024 01:18:16 -0700 (PDT) Received: from hex.my.domain (83.8.125.62.ipv4.supernova.orange.pl. [83.8.125.62]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c34e5ccsm13698518a12.95.2024.05.19.01.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 01:18:16 -0700 (PDT) From: Artur Weber Date: Sun, 19 May 2024 10:17:52 +0200 Subject: [PATCH v3 6/8] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection MIME-Version: 1.0 Message-Id: <20240519-midas-wm1811-gpio-jack-v3-6-0c1736144c0e@gmail.com> References: <20240519-midas-wm1811-gpio-jack-v3-0-0c1736144c0e@gmail.com> In-Reply-To: <20240519-midas-wm1811-gpio-jack-v3-0-0c1736144c0e@gmail.com> To: Sylwester Nawrocki , Krzysztof Kozlowski Cc: Liam Girdwood , Mark Brown , Rob Herring , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Alim Akhtar , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Artur Weber X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716106686; l=1934; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=7ghoUuP1F66lo5lQILjtg4IgiT6Z0TAcd0jCIemjWlQ=; b=7uG1N3oCFSVcHBgOu630Zb3pi3zaKhxy6TMe+0DPNU1zBvvLFKsgdfN4Ck4LNGhnW0CpYcgRE mdzyO/Ha9ITAAd84jXijoFHaM9QleQPYATtna13/I/VA3AuPupxCnTk X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240519_011819_350068_B3F86966 X-CRM114-Status: GOOD ( 11.30 ) 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: - Added headset mic bias regulator - Added samsung prefix to threshold properties - Dropped wm1811 config changes --- 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 e5254e32aa8f..8dc81112172c 100644 --- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi @@ -294,11 +294,30 @@ 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>; + headset-mic-bias-supply = <&earmic_bias_reg>; + + lineout-sel-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>; + + 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", @@ -345,6 +364,11 @@ wlan_pwrseq: sdhci3-pwrseq { }; }; +&adc { + vdd-supply = <&ldo3_reg>; + status = "okay"; +}; + &bus_acp { devfreq = <&bus_dmc>; status = "okay";