Skip to content

Commit de66b34

Browse files
Srinivas-Kandagatlabroonie
authored andcommitted
ASoC: codecs: msm8916-wcd-analog: add MBHC support
MBHC (MultiButton Headset Control) support is available in pm8921 in two blocks, one to detect mechanical headset insertion and removal and other block to support headset type detection and 5 button detection and othe features like impedance calculation. This patch adds support to: 1> Support to NC and NO type of headset Jacks. 2> Mechanical insertion and detection of headset jack. 3> Detect a 3 pole Headphone and a 4 pole Headset. 4> Detect 5 buttons. Tested it on DB410c with Audio Mezz board with 4 pole and 3 pole headset/headphones. Signed-off-by: Srinivas Kandagatla <[email protected]> Tested-by: Damien Riegel <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent e269998 commit de66b34

File tree

2 files changed

+388
-2
lines changed

2 files changed

+388
-2
lines changed

Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,22 @@ Required properties
3131
- vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node.
3232
- vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node.
3333
- vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node.
34-
3534
Optional Properties:
35+
- qcom,mbhc-vthreshold-low: Array of 5 threshold voltages in mV for 5 buttons
36+
detection on headset when the mbhc is powered up
37+
by internal current source, this is a low power.
38+
- qcom,mbhc-vthreshold-high: Array of 5 thresold voltages in mV for 5 buttons
39+
detection on headset when mbhc is powered up
40+
from micbias.
3641
- qcom,micbias-lvl: Voltage (mV) for Mic Bias
42+
- qcom,hphl-jack-type-normally-open: boolean, present if hphl pin on jack is a
43+
NO (Normally Open). If not specified, then
44+
its assumed that hphl pin on jack is NC
45+
(Normally Closed).
46+
- qcom,gnd-jack-type-normally-open: boolean, present if gnd pin on jack is
47+
NO (Normally Open). If not specified, then
48+
its assumed that gnd pin on jack is NC
49+
(Normally Closed).
3750
- qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor
3851
connected.
3952
- qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor
@@ -49,6 +62,8 @@ spmi_bus {
4962
reg-names = "pmic-codec-core";
5063
clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
5164
clock-names = "mclk";
65+
qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
66+
qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
5267
interrupt-parent = <&spmi_bus>;
5368
interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
5469
<0x1 0xf0 0x1 IRQ_TYPE_NONE>,

0 commit comments

Comments
 (0)