Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp417207lqo; Wed, 8 May 2024 04:02:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXu3h3+fenmUykM15YPF08zJtaCJff5r7uAMtA2jpO6sKrrcOlzW+yUlp6Dt2apP6YoCyqDBQxXQmlN/AgWNmvKcbyWPhUJNtw80tS/XA== X-Google-Smtp-Source: AGHT+IH0s8XjrW/7s8eyokumZ4dCJvLoWjX8WDEgpPDQ7tff7JvV7ql69Ox74QYylqYhEuBiBl3O X-Received: by 2002:a17:902:e84e:b0:1e3:e259:46c with SMTP id d9443c01a7336-1eeb089be29mr33480265ad.67.1715166166463; Wed, 08 May 2024 04:02:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715166166; cv=pass; d=google.com; s=arc-20160816; b=wkKGJi6kt9j0RWieJUS6XOFkSy/ui6euUg2ucnA0bQOtpodIxDtfidd7xkblfJd0nY 5LWXQKJnRu4EPD2wqya8v12+9Pz+fOhXc2NbaUvkNj9uKEIm2VcxEZ9j18AbQU6YtZnm Ywby39FPxKPVSGFpcXw04zHzFARdjsVA2Ig3Rd7RuW3+LZKBV7Tvh6c8mhhvF8YHway5 t7Bek1yI0RFuksY2yRlx6W735g4MVP15BVJie7+EZ3PAr7DSKAXFO6Bfv/ptqPEESNuA /b715Bg1RZUf39Z8tLmIeZ7SpG22nrVqQDmzJDplnoXUCZZMzfXB8D5tb5wIbPwZlrSF hHqw== 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=bT4moxnFWMX+ROOOxuh3w595mSjqjEQ1yI4SN/pV6pw=; fh=iEMcUD74B3aU8u62mg6wSdxS6s/ZsI3Tvel+Dk/xx5Q=; b=EkUc5onz+PILarw+HyHY2m6cdJU4nwp2AyIOYCqhUMyMaOODtYb48/LI6vcw/jPHrO pq9puBYar4C75dtIP30MWo9cLK/RMhYXIocgVl1plju4wLgQJSEM3jZG/vqWBPq7VXVJ UT02/lhZL3xQF+B4vf9+XFo7nB61ZjLgVtGOm0tk7K1pCPu7aVpnvK+HcVAhUxklHzRA nOauAcvjwpxl5uqBFNpBDLJVNVjjXYQFgkENMw3QAhW28robAwqi6wv7Mh+k1Igv3z4O 6R7tztgtLX/NQW5c84EOX+zGLkUNJf9ACXFtl97AT0j8A5lZM8yFofgt0ndDeDOnV6AB y/6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kM6UwXvN; 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-173098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x8-20020a170902a38800b001ed3793085asi10140340pla.319.2024.05.08.04.02.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 04:02:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kM6UwXvN; 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-173098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173098-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8B6472868DB for ; Wed, 8 May 2024 11:02:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B98382D8E; Wed, 8 May 2024 11:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kM6UwXvN" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 43BD281730; Wed, 8 May 2024 11:01:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715166086; cv=none; b=gSrVSqvXSPL4+ebY9xVowEPN4KlX27jHx0yrpNCjklfr9BGmJD16vojxVIAX1lN8SUmufYNmV614psbr49bIDeCgMZ1n4m9LSkdzu5XMo1IG/ptSqAWF1bVvxnIzWa8OsRNeBnUTuvcmGwE12G2NZ6b35eEbp2Ya6N3LikC+xxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715166086; c=relaxed/simple; bh=x4CRj3HPQjjxV02Uhbn39jzTSMCqAM5BsNr5zZc40mM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OOBL7x1kpd6Gjvw4RjyjYUaV7unkoasMC1/mjAW83t7JbfiRmSQhAnwYtCu4iTcPvvp0EZcsV7/sPYDhK98suTG7uLbq9jw7KJESpSmWts991GZ9WiJmsebdPc3g0jqwjnpZRYsubrKI0q90cI7iaKEfI07PMdh1iTciAcvIk+k= 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=kM6UwXvN; arc=none smtp.client-ip=209.85.218.45 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-f45.google.com with SMTP id a640c23a62f3a-a59a0e4b773so1010678366b.2; Wed, 08 May 2024 04:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715166080; x=1715770880; 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=bT4moxnFWMX+ROOOxuh3w595mSjqjEQ1yI4SN/pV6pw=; b=kM6UwXvNuw5K9E42LlZ/ucjlVwkIt2XzygZVBfDK23EGLoNdVkQGImfNz52x7DalxZ p9hIxofKeMt16xvaB7zJ54I7hhmdXZVHJOvCn1ofjrPYA2v+gVxzDhMdBOu5yHUNYOJT w+UDlR22UjsKkFx5zZ7cPRefCxafWmbAnR/Ttw2kL0udK3NoUkkCyi6Hyem4KSMmOgT7 VcwsYIqyb5RBugNGv92Vmzurx3Mynp8MPmifpQp6vIpKYzYseJ9aNun+irxiC9FMauO5 l0C8GLzkCjM8QEG2cGGLl7TyHbZR1Rp1MMIo4yPi8iSD1XZ/vtHzDajC0pwaZb1FRSNV wlYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715166080; x=1715770880; 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=bT4moxnFWMX+ROOOxuh3w595mSjqjEQ1yI4SN/pV6pw=; b=w3hjt59NFAuSLf4C29UWTA1vAwkQiW3UazyGgaGyM3zkrVqbpVeBOjzqjMciLmrdBx Gjz6uYGpggtCFiJokGZ6Rrq8sHV/zVvPoIc9eQKn/aaX0UP4lBvBqzVUJ3KbtCKqxRoM H8mjwcbgg/WRkE1WFBzjWkQGSb0PdXoQTNTpYuquGnUh33Q2RtdQKk6vrJlAv5cD6syE ocLT7DPmwAUqW1AjDJq8XRhgTTEILIeLEj7pcm1AT9yPAQP5aRWgD9iVgekmEcpbzAJA xpbVok+sk1w+nb2lxEaPEvQQjoVfIAjIJB08R43m1F1RKM9YQWRtnGrxMOcUCKjNyyVk u0jw== X-Forwarded-Encrypted: i=1; AJvYcCXa4rhH+9uOwvehgGCA1jByfs9qlDWfFYeP5FOqTAAsJx7es0Vvtlb9WpYLiCy9qbwqkR2M7rqUVQbPouV7pCtkmI32zrzm9qtMExCzIqMU1zAUC8OwIDLvNtTaI3spPeBibITgfS5jNstGmvIZ/Ds5KLXjbwpe1GjKF70XqZDBdfjSP/IpUgC3Jot7xOX0zV6Of5lA4ksJ5faz/Qj8qtnLuFtry5yzCVM= X-Gm-Message-State: AOJu0Yy+GWUiJw45DYvb/j+crggKEqFG16ndiMcgQrUJs/0J+ti7Xid6 YEA/BlXjYA2VTbl65rZ8AoDBg8RyFZNcJC66DHY1XGhbbkTcAvGa X-Received: by 2002:a50:ab49:0:b0:570:1ea8:c50a with SMTP id 4fb4d7f45d1cf-5731d9cd410mr1935750a12.6.1715166080555; Wed, 08 May 2024 04:01:20 -0700 (PDT) Received: from hex.my.domain (83.8.126.253.ipv4.supernova.orange.pl. [83.8.126.253]) by smtp.gmail.com with ESMTPSA id m6-20020a056402510600b005726b58a436sm7455793edd.30.2024.05.08.04.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 04:01:20 -0700 (PDT) From: Artur Weber Date: Wed, 08 May 2024 12:58:50 +0200 Subject: [PATCH v2 2/7] ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset 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: <20240508-midas-wm1811-gpio-jack-v2-2-b4d36cd02c6e@gmail.com> References: <20240508-midas-wm1811-gpio-jack-v2-0-b4d36cd02c6e@gmail.com> In-Reply-To: <20240508-midas-wm1811-gpio-jack-v2-0-b4d36cd02c6e@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=1715166076; l=2135; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=x4CRj3HPQjjxV02Uhbn39jzTSMCqAM5BsNr5zZc40mM=; b=zsZQ0yeh7zg0Ep6m1GYQPRjfMq2PTI5dByvyZhsHCpPeLOEvFLhyar0/PfAzi8k6j4w1bXraj /eDPEpjzkwMAq1iMHceo6NnRRQvuVdZXpOxSY/0HEXQIzSIoLMG5QuW X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= Some Samsung devices that share the midas-audio driver use a GPIO-based approach to headset jack detection, as opposed to using the built-in jack detection provided by the wm8994 driver. This setup uses two GPIOs (one for jack detection and another for key detection) and an ADC channel for determining the jack type or button pressed. Add DT configuration values that allow for describing these setups. Signed-off-by: Artur Weber --- Changes in v2: - Added vendor prefix to threshold properties - Dropped pipe (|) character from description: field --- .../bindings/sound/samsung,midas-audio.yaml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml index 6ed53dd0bb53..6b760a73e8bf 100644 --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml @@ -64,6 +64,36 @@ properties: maxItems: 1 description: GPIO pin for line out selection + headset-detect-gpios: + maxItems: 1 + description: GPIO for detection of headset insertion + + headset-key-gpios: + maxItems: 1 + description: GPIO for detection of headset key press + + io-channels: + maxItems: 1 + description: IO channel to read micbias voltage for headset detection + + io-channel-names: + const: headset-detect + + samsung,headset-4pole-threshold-microvolt: + minItems: 2 + maxItems: 2 + description: + Array containing minimum and maximum IO channel value for 4-pole + (with microphone/button) headsets. If the IO channel value is + outside of this range, a 3-pole headset is assumed. + + samsung,headset-button-threshold-microvolt: + minItems: 3 + maxItems: 3 + description: + Array of minimum (inclusive) IO channel values for headset button + detection, in order: "Media", "Volume Up" and "Volume Down". + required: - compatible - cpu -- 2.45.0