Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1112502lqb; Sat, 25 May 2024 06:29:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2whyQsLqdWPaTgMEh29SXEycV7Kma/2Pp+vcP2DI4REfijdUfFhAfD/uFcOGMxw/rAB2QxsbxiIWS2hFg06yMSz2qYbHGn5XihMyOkg== X-Google-Smtp-Source: AGHT+IHDmOIoDYtErv1yz+xO1gvJVNcpO5l0oroiX0zMzHHT0RN5+Xz1L3uoUn17r/+oZaxT4zay X-Received: by 2002:a17:906:2c08:b0:a5c:eafb:5288 with SMTP id a640c23a62f3a-a62642e9bbbmr447917666b.31.1716643790749; Sat, 25 May 2024 06:29:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716643790; cv=pass; d=google.com; s=arc-20160816; b=TnD3+o1sQnmtar9RqT/4qG7+yOgTUdgJrunnWZPG9JOIR8HXx8an2EIL0ysPLxxEtU I0Dyupu695ALcd2GJ68sJMLJQ8w/ej7G83yKnoDEtbwte5BuI2eEjShR01Dg9wsBgfdW CY8qI0a22e9/6f/1wklI/dEZC5rHzGWe3QSBCCent4Jyp2zjN2yM04Dz3aZ9mfM8x9vH UpB+p6t3NDsLOrLvuMZD5PZtK0W0KeiqZ5zjYkKvKQZ+tSTGCrkL5RfRCFtDeNIm4GtD uVm7k+6NeXMmGGcLkdTJIcWGx4ySzdXIvpYZU+BFlpiaIHiizb/BnEHoc20wNKQ7RMlz G1bQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=cUjZKrfisu2MIRRIzFKLBIKTAToYLPq2V2E0DmuWK3M=; fh=VGK/jl11m3LYnWBhEbXflxq+NDIrxG2cLA1V2hXcuss=; b=olYrRgLr1EfQpPIL7p93oBDidJqZSDQeCzGgAOPbynO+cUOK0KEefUmIj35RoOjAQE sjO8yRBUFQ8v6GV6i4y0FzMGyEMqDppVVT8RFvIGqf/7ukifC81RcxD8YVu5cjaTI72f b5rWLa+vFV9/w3HN7drrdgz2xeRDByjY81PZC2tInkALbaf8fEr3fxT3j3uK69QKzTk9 dAUmwyEDNec0459pzLl04HT0kAQhfuvWI82NGz4GkZ29bRb3uXjhmsKwZUEOpTFbe8ir s9MgS0BdN2QOQd6q/EWOJ2TD9Nibgx8Aj82/c/NN2zxj22zaDF1+9AT3+sEWjobgn3BZ 14xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XgszNLrU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189362-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c8053fdsi182452966b.63.2024.05.25.06.29.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 06:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XgszNLrU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189362-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 589941F214B3 for ; Sat, 25 May 2024 13:29:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF11984E12; Sat, 25 May 2024 13:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XgszNLrU" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D40E4A99C; Sat, 25 May 2024 13:28:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716643699; cv=none; b=Ry1x+JVAlumlxGPxnh/9B3OGc2JIzcpEJEJ/s2PyDNx+6o8Ucx/J9T0z4QzMSjfeT+6b4dubUqJa8VKvo8IimyIZI3dpzuaEFtmV/UQxZzP1xVU0MaHgeUpP/UN9A/jbHadTHFW+Ze/zHgUQeMFbw4eeILTssg1Rw+AWqZVgCu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716643699; c=relaxed/simple; bh=hH25eTCdZC3BJgBa3AD+9InewcsW9rj0sd8f9BvAVfs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=V2NI2dj2ENkdbSfeMpcG8aNvDDpQDjNv6Gjc4cOLVXUGq4gcwPXzQllYSsV9bb+qnzFAVcGK/HM2suGHrwulZ/rSmRtyHN9CM/iyaL4NOlWVXM3u0xMAf6wdAS0X9x6aK93/FBCS/Hn4sJJiyCiNwu2ypFsQdPCrA0A341LifOM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XgszNLrU; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a5a4bc9578cso1362985166b.2; Sat, 25 May 2024 06:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716643696; x=1717248496; darn=vger.kernel.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=XgszNLrUYgu5rFIs2oCkNkVu7S3ZznMxu5E607WFRiTVfgk6oyir5UVKATHnc1uWU8 a8PIfSzouY7O/oaI3kRAxaJDw40adoiUXBHiMCOabPI7oDJHkNgz8V6ViiDEj97WvX00 8+AmU3QGF9390bnxO7oatfl0bDCgX4S679hx1QE69Ye1r1wHS7oAl2k+7gTBr/ZE4yv6 KFOk3i5SiCwgiNChFY77WcBhuf+rAQW/KRcNP+79tDcyTMtnMNxr6keoH7rzjOcdpzjr jA7kfQ2wc7K3+NVesiOlUmJQ1ofutU4IHFn8PQbuEEOIpldEG4ZIeRSatkj4NfgPI9EJ YU0Q== 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=W/5sb1/uAQNA1v5vKtMZeXOB3dUBG7D34yn4uQ5ATjvbgbjpZo4qCw7K11Re0MmHE4 bCz3jAv2QEpIoMUwnGesAU6YnPnEgmIOA/gBu8kDpW+bY+RA3kv0qmiG0Vg6rn9YFHDa XtW3L8uXiUtsIe7aoxeIgeC0beWBPyaYxT2qjljkZHnd1QXtXG7AimoTB3pHXIL/cMCV CMH9W/YPnigqBlPKukbMsuyq0Q25Rro+xtGWcFRwB8WzEN96Scw34H6Peuhwyzwp5ATw pdnbbjL5qEUZkVBGfZVsl1rVFu0phJuqDp0pnmCS3Br3TzIkdOBHdey+06+iTq0ASFWl aaZw== X-Forwarded-Encrypted: i=1; AJvYcCUTmoXFZIi9BEKGMmkO++dBlsqZeL6VBKR0eE0GSmNTHhXXUo8daIZy5ARzn6CEDgGL/b2+IlLxpnKcQMBWEcmXBVE2VqPU48BrxYzfdVhkrOsz1ysLIPaMJmMfDAVgHO2kaa2Rk+faLg8tsOPjJl+bQEOQFxH2/4OdqEOoF06W7Dtddw5IMUUtUfAypRb43HgyJ9S/J3jY9UJUg9jgnKzq9CQTo5SXyTY= X-Gm-Message-State: AOJu0YwZdaz1FjpEoPcx48ONIWputVssULQdSi9Zdw1HvCM79+FTX5Qd TAeaKWCVHIX1GOBX0YOkhqHeKejH/JWvrxMSAYb0BqFI05F2sohQf3UTww== 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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= 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"; -- 2.45.1