Commit de66b345 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Mark Brown

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: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: default avatarDamien Riegel <damien.riegel@savoirfairelinux.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e269998d
......@@ -31,9 +31,22 @@ Required properties
- vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node.
- vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node.
- vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node.
Optional Properties:
- qcom,mbhc-vthreshold-low: Array of 5 threshold voltages in mV for 5 buttons
detection on headset when the mbhc is powered up
by internal current source, this is a low power.
- qcom,mbhc-vthreshold-high: Array of 5 thresold voltages in mV for 5 buttons
detection on headset when mbhc is powered up
from micbias.
- qcom,micbias-lvl: Voltage (mV) for Mic Bias
- qcom,hphl-jack-type-normally-open: boolean, present if hphl pin on jack is a
NO (Normally Open). If not specified, then
its assumed that hphl pin on jack is NC
(Normally Closed).
- qcom,gnd-jack-type-normally-open: boolean, present if gnd pin on jack is
NO (Normally Open). If not specified, then
its assumed that gnd pin on jack is NC
(Normally Closed).
- qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor
connected.
- qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor
......@@ -49,6 +62,8 @@ spmi_bus {
reg-names = "pmic-codec-core";
clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
clock-names = "mclk";
qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
interrupt-parent = <&spmi_bus>;
interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
<0x1 0xf0 0x1 IRQ_TYPE_NONE>,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment