xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,msm8916-wcd-analog.txt (revision dd41de95a84d979615a2ef11df6850622bf6184e)
1msm8916 analog audio CODEC
2
3Bindings for codec Analog IP which is integrated in pmic pm8916,
4
5## Bindings for codec core on pmic:
6
7Required properties
8 - compatible = "qcom,pm8916-wcd-analog-codec";
9 - reg: represents the slave base address provided to the peripheral.
10 - interrupts: List of interrupts in given SPMI peripheral.
11 - interrupt-names: Names specified to above list of interrupts in same
12		    order. List of supported interrupt names are:
13  "cdc_spk_cnp_int" - Speaker click and pop interrupt.
14  "cdc_spk_clip_int" - Speaker clip interrupt.
15  "cdc_spk_ocp_int" - Speaker over current protect interrupt.
16  "mbhc_ins_rem_det1" - jack insert removal detect interrupt 1.
17  "mbhc_but_rel_det" - button release interrupt.
18  "mbhc_but_press_det" - button press event
19  "mbhc_ins_rem_det" - jack insert removal detect interrupt.
20  "mbhc_switch_int"	- multi button headset interrupt.
21  "cdc_ear_ocp_int" - Earphone over current protect interrupt.
22  "cdc_hphr_ocp_int" - Headphone R over current protect interrupt.
23  "cdc_hphl_ocp_det" - Headphone L over current protect interrupt.
24  "cdc_ear_cnp_int" - earphone cnp interrupt.
25  "cdc_hphr_cnp_int" - hphr click and pop interrupt.
26  "cdc_hphl_cnp_int" - hphl click and pop interrupt.
27
28 - clocks: Handle to mclk.
29 - clock-names: should be "mclk"
30 - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node.
31 - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node.
32 - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node.
33
34Optional 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.
41- 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).
50- qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor
51			 connected.
52- qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor
53			 connected.
54
55Example:
56
57spmi_bus {
58	...
59	audio-codec@f000{
60		compatible = "qcom,pm8916-wcd-analog-codec";
61		reg = <0xf000 0x200>;
62		reg-names = "pmic-codec-core";
63		clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
64		clock-names = "mclk";
65		qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
66		qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
67		interrupt-parent = <&spmi_bus>;
68		interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
69			     <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
70			     <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
71			     <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
72			     <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
73			     <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
74			     <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
75			     <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
76			     <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
77			     <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
78			     <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
79			     <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
80			     <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
81			     <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
82		interrupt-names = "cdc_spk_cnp_int",
83				  "cdc_spk_clip_int",
84				  "cdc_spk_ocp_int",
85				  "mbhc_ins_rem_det1",
86				  "mbhc_but_rel_det",
87				  "mbhc_but_press_det",
88				  "mbhc_ins_rem_det",
89				  "mbhc_switch_int",
90				  "cdc_ear_ocp_int",
91				  "cdc_hphr_ocp_int",
92				  "cdc_hphl_ocp_det",
93				  "cdc_ear_cnp_int",
94				  "cdc_hphr_cnp_int",
95				  "cdc_hphl_cnp_int";
96	               vdd-cdc-io-supply = <&pm8916_l5>;
97	               vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
98	               vdd-micbias-supply = <&pm8916_l13>;
99	               #sound-dai-cells = <1>;
100	};
101};
102