Re: [PATCH v1 1/4] ASoC: dt-bindings: qcom,pm4125-codec: Add the MBHC jack properties

From: Ajay Kumar Nandam

Date: Fri Oct 16 2026 - 02:51:41 EST




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@xxxxxxxxxxxxxxxx>
---
.../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