Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1849111lqo; Sun, 19 May 2024 01:19:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUASAOxV7xBbOjzTbEgW8XRmfFWay2XnCK0pJAyqU2hcMQHRxetuAhwTdbUv04ybQmO4XoFH8/bW1bF7z2YI6nvzll2bZKQwagIiBRFtA== X-Google-Smtp-Source: AGHT+IGYf/vqubXgamFy9nOqcabq1XM5qgcvA6UxFS3wkIopUcQfLwjPt1bqxiV+Fhlh65lrEOJb X-Received: by 2002:a05:6e02:13a2:b0:36c:51bf:8796 with SMTP id e9e14a558f8ab-36cc26b3807mr299381925ab.1.1716106788267; Sun, 19 May 2024 01:19:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716106788; cv=pass; d=google.com; s=arc-20160816; b=UlNDI3VcR3pAYKfGMlJTvYP34lracB4A+s0QNIqC5Mml1qd8RV1g0hN444CgqTkiny QpCfxMkIkAvKeDfZifTZW+6MD7V2Wdv0MGuxbeI4dJzbSMOu+treneZLdpU2Sybt1yr7 mKcdN50XGIwzTpIEfE0hwwRc9+vYjmJ5EbB5Xu/RdOJv4ye4+WcJ0TTFU8rt6hAkytYs P4qYHFk/ssQFvPqcuq2/6MXaiOD4Vehrr69nxtFzqZ2axtSItQICFbKReRfuvOeW0cAf hr+6E3PLRx4NAU6IxshxIClwFIQKEwQWtG/oaWtaVbeAiXv7HXFZ/UnWfMXQSNdRMj9X XvnA== 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=JckYzcWe8w+0grZPS9NysF8GgHh7PfoFNUhYz6cHvfw=; fh=Ofs1K+cqZBH4itDya6CpADdc7BPeNUT9bBrJrOYlmDY=; b=XlUBBqyQX7TFR01gkYFYWb6ZXsNRGWUhKWxCKYe9TPTHrV73f4Z5ZGIGW06cu2FbE2 uYLe0kIG1ZIzK6fTBW8h/qwrF09xL+AjVsRyHkMu8/wB1c4m+x+FqinXXgv5uYUQox1/ 4l003iNCXjoMCZheOHuxZd5YmEPvNM+l8oguBci+EilKQKxE8xjiMmf9wH2FaQCQ2i5D eu9G+aVoKxepRv9AqCB1Qq9X+/pxhcZcfqmZjDZMXD9H8SKBapP4EGMlRlrT8TT0PipP OcXK1oMHP+ie6D/ZNMUE+e6yARGSgbfMUAKI6MD42eiftAD6Rq6Rs3aAPOqa0DJT0/Sy fxOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H1h0p4XB; 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-183058-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-634119043a9si20203668a12.597.2024.05.19.01.19.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 01:19:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183058-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H1h0p4XB; 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-183058-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183058-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 66092B20D38 for ; Sun, 19 May 2024 08:19:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F5E04595B; Sun, 19 May 2024 08:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H1h0p4XB" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 75ECB3D963; Sun, 19 May 2024 08:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716106700; cv=none; b=EdYoOCTW4rDnzwwPL1FQFEw9uRB/6wXxPmhmagEkdMLmJC5ZHWVlSt3Cuk++lOtCwmHxNpV9rWH3JVI+WulE44SRIDE+qQ1GJ05bwVbpcTKHvLjpHpd7Obh7F9qMKwhQHzeMn/k+ib8BjbRe4q4W08AkzGxuBrZHy/3teEMEbNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716106700; c=relaxed/simple; bh=7ghoUuP1F66lo5lQILjtg4IgiT6Z0TAcd0jCIemjWlQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g3TtaEoGpfreASYpsdHVx72mkai6nnVqtacLOyPpB0fvxBv/x94EDM7uuzdORHJxz0OC6iSilBW8w7yALuVY18ITg2AdDjBxC6nnT6Vb4ZzSlnNCeztL/vJoJjfZ2iQPY/c8TLO7VOvT++0ZUGdrOLY9IqcDwy4aFlsEPbZ2+Jg= 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=H1h0p4XB; arc=none smtp.client-ip=209.85.218.49 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-f49.google.com with SMTP id a640c23a62f3a-a5cec2c2981so208299266b.1; 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=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=JckYzcWe8w+0grZPS9NysF8GgHh7PfoFNUhYz6cHvfw=; b=H1h0p4XBxiNofg1ggcgytmaeiSBfgw2PhYaWYml0HgJu6trRrXgnEbcQL0k6CDeJF7 fFqSLTPmX4qWrPA1HjJ/kiom5LRwRD3Rj+/kAB5s8OUzt7REamEunaSRIM5JPHf3z4F4 oyYNpyxszY7gsUPbXZpbwRaLzLmuF0D8ietD7CkQg1XJL4vwsxwFoS+7UEcw3TRfj+1j lFwKDhterjfrEf2iTtawFODLQiXXXCg58nikT1U/azYxVDXYZA8DFnW+grgJ6OY6kd+2 VngjxktqS6iLfxH8KU4kGB4dwqwdRhwDyvY8bU0Mtr0CGuXnkuZEben7narGJRqLS/IG F3zg== 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=mnSQ6dXGNO1bJ0lZFgyneF+gQ181YU0RmEh7ssu6gAcV5SfMUjq6Dunm0wRHmc7o9B FQbtHeWq95HyOv52chS9PUUCOnO4mVv+8QfeIUx9L6M+t//SHc55AkLo+zUQJGw+dLot cPHDrXiz/eOZXQ1g1lYo2EAldVNSiM20970yf2Atlcf/7g0Qm9STmVVHO8izj/B0o/wp EZ66O1S1pBaGR771IH5U2Josn/gK/WAEmCGrCMQmE5uxAseg+IMZCn+kgJWiaLPJRA0Q j1dpF9e369z7cDy5hzPe39xOSpRbA+DMaA9/XFxoezuV/Qx01cSCzqdSqefTQLOMnmoo XSMQ== X-Forwarded-Encrypted: i=1; AJvYcCV/QdNOLTBLhraeWwItmkp8Y4PF+5JePubt+qLcxhoExiw7HNZq07LKyzFg+3eHVUXDWSxsgTLHABIZ+wOwIMoAJmC3bYo/ZJnIo0or/tkRg8AMfzdZssLnoEVOZTqJEQRGJa/XiiEXIwaHx9mBXYBltufOEn72KxOJ2ghoCnTivIgku5CO50AZM134MZhPPbYoKZvUxCHjD4bt2B9qVh4emVrO2HUxQlg= X-Gm-Message-State: AOJu0YxSY5EBfTIEfiVtiFbGJW5Qk1L0x/v2S5DaSFhaRmeJRiYQ7HsB CiR+gGAMQ2wCbOj+3PEIqJR5BRleaMjfoEKM5ALKzqnBXGWks5ul 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 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: <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= 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.0