From patchwork Sat May 25 13:28:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13674023 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 442E5C25B78 for ; Sat, 25 May 2024 13:28:45 +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=5AmEZeuAvdVFHN3ZsOJiRu6BkzRxOR3JDAUxXg4dhbU=; b=xSw02q+TXuVFfP QyUUqvXyBpxe6MHiHX0vZuzwyGiJK/JexqE4ijntl3WO5nAb/GguUqYaHSoQfLvq3ul9aQ2RoPmUF +7eXPs9bE7eKol2DFlL8INXBCQQqzaoaFn5w6xXI9cMUd7UvyDlbI6iydeu33424UL0QoF+Td4jRr flF1RfZVWHFEmMA5rCij9U4zcEOQGWq81D+8ZgxyAzgCgQXwv+IIy3t6wOwqfwhhkF1wggb+lOz6b 5dS97bLOEWxYRsdz4yL4mwlMgZiFLOQ62j+aBCbehNXsVho9GE6zrqpeU9gFAzcyvezUio2gTASI6 i6Hd17+bH+fWPfNIpUZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sArRn-0000000B4G5-1kIg; Sat, 25 May 2024 13:28:31 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sArRZ-0000000B48W-0O7a for linux-arm-kernel@lists.infradead.org; Sat, 25 May 2024 13:28:19 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a6265d3c488so233236466b.0 for ; Sat, 25 May 2024 06:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716643696; x=1717248496; 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=cUjZKrfisu2MIRRIzFKLBIKTAToYLPq2V2E0DmuWK3M=; b=MSTgPCdOB1iltQmfrwdQ8MGlE8QE2y3MJ5FpTyr17F0xVfoyskVFwPtvljDfGabcRj SEdoJXgHN9pJI2T9e8znIz+nhvmHThwrv4QWVfRmth3NzSbS/FULKMj6TuMg34UT5BW0 4FawUuCUC1envl/X5L4yHzXrNyFA0yUAcPcAOH95FYF/bK3bcJAoJPTuu5G7g9wa2zyu TPprxt6qRonQJ7SDMs9HixbvliXTZ0WMOtJX2aovCj8wUJ3/E9SavSrdjCUVYdmtJgi3 0rBRD5RQrisA3u4rNTgh6Gsy+82aBOT6t2q4/evpCU0gbl8322K2xkSDNXeEu5nRK6Dr ZvkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716643696; x=1717248496; 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=cUjZKrfisu2MIRRIzFKLBIKTAToYLPq2V2E0DmuWK3M=; b=RbWiNH9gaW4rqdruRVH2uSAnx4kysLufrkBA36S+4d3qjZOD2MOy6hvA6E91x4F/lW Qg3m2TTTXvzHdllmcFinzUQf/3nztU5O8GxGCjKzbPHap/b6StXmy1xOJCkceQWKSFUE Ge5xPnsy0PYADfjT2JHjdQs1ja0/uuraBX2dD3vMGA6tamuxyvcYQnD/aaPUT9DKZpQv WFrSUueKlb0DLsmop99D57FrQvmzRsmuGzHmrGFvjpC7sNmef0oQeX7i+p6E1gmh3nZF Bj6QWq4OQpzQkjLcmr4OGDRHbrBjcZtrdTYTxzBI7T7U3sm2Nh7j9MC8CnLwO8p/U2ZK dLMg== X-Forwarded-Encrypted: i=1; AJvYcCVG/3z7FgZutVYy4MZG2Kr510jltdMpOyRu3em/dMrS1jHDMw3Fsv3v0jJEYGcpMZBsMA4QYSjX0ppWCS8KYth+glaTX2tdrWvgm3Q1W07pqrGmquk= X-Gm-Message-State: AOJu0YxpH1MaiU6DmW1dCDjH0Mj4GKRf0Perq5Be5UHUQqU6pRSngn1C ERpZy5pqwdccrvmrfkJsCBHh0xRcskaV/Q57xB/Nbrz91nyyOc1v X-Google-Smtp-Source: AGHT+IHecgBLLiR2XNqDGoawDWaRaibToLWBukY8GFmV6rY0WCbDFPgUt5GIcLfdOSKMc8LBeMskbw== X-Received: by 2002:a17:907:9048:b0:a5a:5bc8:9fcd with SMTP id a640c23a62f3a-a62646d573amr341067966b.43.1716643695688; Sat, 25 May 2024 06:28:15 -0700 (PDT) Received: from hex.my.domain (83.8.128.191.ipv4.supernova.orange.pl. [83.8.128.191]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cda46e1sm251842566b.196.2024.05.25.06.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 06:28:15 -0700 (PDT) From: Artur Weber Date: Sat, 25 May 2024 15:28:11 +0200 Subject: [PATCH v4 7/9] ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection MIME-Version: 1.0 Message-Id: <20240525-midas-wm1811-gpio-jack-v4-7-f488e03bd8c7@gmail.com> References: <20240525-midas-wm1811-gpio-jack-v4-0-f488e03bd8c7@gmail.com> In-Reply-To: <20240525-midas-wm1811-gpio-jack-v4-0-f488e03bd8c7@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=1716643685; l=1934; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=hH25eTCdZC3BJgBa3AD+9InewcsW9rj0sd8f9BvAVfs=; b=8suLwt6PYYGht/gjaVmfd4Bf9bOltHXD8x8FCQuaPn3LrrrQKrPEQ7bht7esAwrg3XIlV6ZH+ Wr93+pTNpjPBik9iZXR4UwXTlgPWDVB5/SEZCqWitcGOvGz9XZyaAEQ 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-20240525_062817_249206_6ABFCD32 X-CRM114-Status: GOOD ( 11.20 ) 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";