From: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
To: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>,
Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alexey Klimov <alexey.klimov@linaro.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
ajay.nandam@oss.qualcomm.com, ajay.nandam@oss.qualcomm.com
Subject: Re: [PATCH v1 1/4] ASoC: dt-bindings: qcom,pm4125-codec: Add the MBHC jack properties
Date: Fri, 16 Oct 2026 12:17:50 +0530 [thread overview]
Message-ID: <b907dea8-d2eb-4237-b316-6d96c81a5b33@oss.qualcomm.com> (raw)
In-Reply-To: <20261015-pm4125_mbhc_support-v1-1-8bc1212db6f7@oss.qualcomm.com>
On 10/15/2026 7:43 PM, Mohammad Rafi Shaik wrote:
> The binding already describes qcom,mbhc-buttons-vthreshold-microvolt,
> but not the rest of the data the MBHC block needs to detect a 3.5mm
> jack, even though wcd_dt_parse_mbhc_data() reads all of it from the
> codec node and the schema has unevaluatedProperties set to false. A
> board that describes its jack is therefore rejected by the schema.
>
> Document the remaining four properties, matching the descriptions used
> for the same properties in qcom,wcd93xx-common.yaml:
>
> - qcom,hphl-jack-type-normally-closed and
> qcom,ground-jack-type-normally-closed describe the board's jack
> switches. The MBHC logic has to know the idle state of the HPHL and
> ground switches to tell an insertion from a removal.
> - qcom,mbhc-headset-vthreshold-microvolt and
> qcom,mbhc-headphone-vthreshold-microvolt are the ADC thresholds that
> separate a headset from a headphone and a headphone from a floating
> jack. They are board specific because they depend on the jack
> wiring and on the microphone bias voltage they are measured against.
>
> All four stay optional, as they are for the wcd93xx codecs: the driver
> derives the thresholds from the microphone bias voltage when they are
> absent and assumes normally open switches, so existing device trees
> keep working unchanged.
>
> Assisted-by: Claude Opus 5
> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> ---
> .../devicetree/bindings/sound/qcom,pm4125-codec.yaml | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/qcom,pm4125-codec.yaml b/Documentation/devicetree/bindings/sound/qcom,pm4125-codec.yaml
> index 6e2f103be..54e5b7607 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,pm4125-codec.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,pm4125-codec.yaml
> @@ -64,6 +64,24 @@ properties:
> minimum: 1800000
> maximum: 2850000
>
> + qcom,hphl-jack-type-normally-closed:
> + description: Indicates that HPHL jack switch type is normally closed
> + type: boolean
> +
> + qcom,ground-jack-type-normally-closed:
> + description: Indicates that Headset Ground switch type is normally closed
> + type: boolean
> +
> + qcom,mbhc-headset-vthreshold-microvolt:
> + description: Voltage threshold value for headset detection
> + minimum: 0
> + maximum: 2850000
> +
> + qcom,mbhc-headphone-vthreshold-microvolt:
> + description: Voltage threshold value for headphone detection
> + minimum: 0
> + maximum: 2850000
> +
> qcom,mbhc-buttons-vthreshold-microvolt:
> description:
> Array of 8 Voltage threshold values corresponding to headset
The binding documents 8 button thresholds, but looking at the PM4125
register definitions I only see threshold registers for BTN0 through
BTN4. The following registers are MICB2_RAMP, MBHC_CTL_1 and MBHC_CTL_2.
Am I missing how thresholds for buttons 5-7 are programmed here, or
should PM4125 only expose 5 button thresholds?
Thanks & Regards
Ajay kumar Nandam
>
next prev parent reply other threads:[~2026-10-16 6:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 14:13 [PATCH 0/4] ASoC: codecs: pm4125: Enable MBHC jack detection Mohammad Rafi Shaik
2026-10-15 14:13 ` [PATCH v1 1/4] ASoC: dt-bindings: qcom,pm4125-codec: Add the MBHC jack properties Mohammad Rafi Shaik
2026-10-16 6:47 ` Ajay Kumar Nandam [this message]
2026-10-15 14:13 ` [PATCH v1 2/4] ASoC: codecs: pm4125: Fix MBHC button threshold programming Mohammad Rafi Shaik
2026-10-15 14:27 ` sashiko-bot
2026-10-15 14:13 ` [PATCH v1 3/4] ASoC: codecs: pm4125: Keep the micbias reference count balanced Mohammad Rafi Shaik
2026-10-15 14:25 ` sashiko-bot
2026-10-15 19:03 ` Mark Brown
2026-10-15 14:13 ` [PATCH v1 4/4] ASoC: codecs: pm4125: Add the MBHC callbacks needed for jack detection Mohammad Rafi Shaik
2026-10-15 14:27 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b907dea8-d2eb-4237-b316-6d96c81a5b33@oss.qualcomm.com \
--to=ajay.nandam@oss.qualcomm.com \
--cc=alexey.klimov@linaro.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox