From patchwork Fri Aug 16 07:51:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13765650 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 04097C3DA4A for ; Fri, 16 Aug 2024 07:54:19 +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=pNY+wb1THjo+CnMw7VM5lVjKwdkOwb5ze/davWuQ93Q=; b=p8dX5bq1ztpv9cuXphYlUdsGoM sVBykB+zSWZftGXOWHwpSg6LB/Zoaux+t9xvVeaaF7WtCbkomod5EgZO3aqIeS+q3J9S78sh6fmAu Jg2tG9yh7LssNYbMcDJTVMkNl/2PAtcKI1SRI/OG0GgUKwAi199sgFMWj/WbTMpC1WIkEFbctmXpx zjWap4LkWwDX3S1tOk0n54TomXp3PycieUsOa2H3lUxZJVloyIJEpRArNGNWvY1NaDNu7ey+kaD5Z kC0wu/C5W6izxX4mggujVcQ2SuR1YjQOc7p48cQWUe5DZX9+basaxlWWCqyC/9qzshCgYY1T/ssI3 +Hv1c2eg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1serml-0000000CBOp-1xqS; Fri, 16 Aug 2024 07:54:11 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1serk2-0000000CAb0-2wQO for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 07:51:24 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-428243f928cso12122055e9.3 for ; Fri, 16 Aug 2024 00:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723794680; x=1724399480; 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=pNY+wb1THjo+CnMw7VM5lVjKwdkOwb5ze/davWuQ93Q=; b=DybJK2t78KXyNyWlnc4v+rSnRgEJHT9AyeFar3UOzvq23YJw3dsi+D+TfoEFz2qfJM tt/wDuletIZf6tFwVynfFiDalecIYo69Hq0rgevwCRxKHa0Gl1AQUjEbIpy676Lyvzgt +OuX1AESR1IKcUWlXY2ZFVpHePI7mWpzg/tbbp4bbDhdko469hocmNvMiK5SDQpV03q8 K4b4R+xtqxbs1cqkswS/c/EnVrnTS/QKh69sCKQkI48oIo1Y7DNHHBaQRhEC2IwZGW+f yoLYcIX3C/wD7cCeV9UjzP8GhCnjNeuD/B+nZnYPWT1u9btP7fllTDAkZzMT6egfmyVm 1J6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723794680; x=1724399480; 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=pNY+wb1THjo+CnMw7VM5lVjKwdkOwb5ze/davWuQ93Q=; b=slM/5SxUjRmsSni25WINfIHc090bKn6MpchiU1D+QwS+oLoyxtX8Sw6iMsMID6GLcW HTl0ao+C9p/ZT6mhqGO/hA+flUSzsrgamluJ8KufEKep8VGOKgGfgYn4T6cR4ZUpx/7v H7igAF1bAN2Q/5mok70EMZqz1xeyIzsyiSIQCD9Fjv52C1CPULIlRDEj5y4U2QcOu/NT Jo/3sBwExQIap7NnahIx2Hxfy51vHNNCzl3g9ijDNky+EFemIV2KelqXPT0+mg34xjsp 6k+BKVAkTKfjApCUrHdoce5NDO3T1qYvXbIGwjE9UEsS0ej1E0vHtfBymVOZRx5oDtvv tLLg== X-Forwarded-Encrypted: i=1; AJvYcCUubrHKfku9NvYixWIdjhu07dT/0vT78yJ5/PrI9aYrBRZty7YRa97J0eErO2tx7Qb5XGSF8GZk5l//8rKrOIYSi2fKxCAW3TQBLI+6tNjHYP/YCZI= X-Gm-Message-State: AOJu0YxHPA48ovYmmDhAY46wUQKs3Sv3z+A09KSGq+jN6n2PKUXviFCq E7hdmVwSRB8DH2klwHd5j8u2bl73PYhJZwzMw5F2ra5y/EtF2p4K X-Google-Smtp-Source: AGHT+IHoMO3uR084/TiqjhUtxamfnpPtywMOr7j0FvJycWCXr+USVcWGJpeWl2Dc8mghKV2E22gUHA== X-Received: by 2002:a5d:634b:0:b0:367:f281:260e with SMTP id ffacd0b85a97d-3719431740dmr985335f8f.3.1723794680334; Fri, 16 Aug 2024 00:51:20 -0700 (PDT) Received: from tablet.my.domain ([37.30.8.221]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3718985a6c4sm3026201f8f.52.2024.08.16.00.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 00:51:20 -0700 (PDT) From: Artur Weber Date: Fri, 16 Aug 2024 09:51:00 +0200 Subject: [PATCH RESEND v2 3/6] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection MIME-Version: 1.0 Message-Id: <20240816-midas-audio-tab3-v2-3-48ee7f2293b3@gmail.com> References: <20240816-midas-audio-tab3-v2-0-48ee7f2293b3@gmail.com> In-Reply-To: <20240816-midas-audio-tab3-v2-0-48ee7f2293b3@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=+nFLsCufZiehL/eoxteKF41dGYjzTzQkmxtyml5HKb4=; b=owEBbQKS/ZANAwAKAbO7+KEToFFoAcsmYgBmvwTnD8mC1+GqmOFwbcqhYHG1kNpEk6YJMfvpd XNKhd2qpnWJAjMEAAEKAB0WIQTmYwAOrB3szWrSiQ2zu/ihE6BRaAUCZr8E5wAKCRCzu/ihE6BR aMq6EACX5TK44WyC4yotUx8Uk6fAbxLrKb3R3+UVLasScimI1hY0ykcN+GR5rdVLF3MVfpsug+3 QogmFc3/HFpZAkMa/OJlzaYqeSWzFlkJv4n/3o1yzPAuYNqy7f+uwFvZw9DTD6+psS0thYtca/N eSDHnPTgof6myPwVVVIkc5mzAgQRBiRewu6XES3WHo0YxBBM/HQ1VZPYTAFtTb76xzbLK0GQjK0 IdSvj581xNebmEN6sIEWMvWi4O6hWhlvadWbbXA0CfFlZbnpdFNV5P0OCi3TOsyfc7i4UHQYtUY qyY8DruZbh4eTzhOeHWRT75YAaQZYUfLWxVFSyXvFDVP3iUNzug2tAZn2iWbzaQlNyVdc6d3yqe ImdmCYARXk7Uo6NfolCttxIgfIQ4hXnOJJpXQbE4T2Z5sfbbth9i/3mr3u6zY8DS2Q07GUqka3/ YqOMLsHf2offj3l5ePAacI0WLMJv5fCIoIWF49CGceRlCHm52W7PCzEIijyzhzJEYXUOLguOxXX wwuDoByetpGFhKJjls8Lx8TSWifNvJJMzhWEEybwcPkqAc5tHXqc95a0/v+Twxk2e1+Zb0VOCbv JeJfgN+BflWJasx3WBDf0znA6PDdXFS6687+nmgqOQsIMue7Ml11mBmNssu77CAiZIIzCa43pMQ 2hxnr9dr6Bdt2KQ== 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-20240816_005122_788690_2452CF4F X-CRM114-Status: GOOD ( 10.47 ) 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";