xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunmsm8916 analog audio CODEC
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunBindings for codec Analog IP which is integrated in pmic pm8916,
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun## Bindings for codec core on pmic:
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunRequired properties
8*4882a593Smuzhiyun - compatible = "qcom,pm8916-wcd-analog-codec";
9*4882a593Smuzhiyun - reg: represents the slave base address provided to the peripheral.
10*4882a593Smuzhiyun - interrupts: List of interrupts in given SPMI peripheral.
11*4882a593Smuzhiyun - interrupt-names: Names specified to above list of interrupts in same
12*4882a593Smuzhiyun		    order. List of supported interrupt names are:
13*4882a593Smuzhiyun  "cdc_spk_cnp_int" - Speaker click and pop interrupt.
14*4882a593Smuzhiyun  "cdc_spk_clip_int" - Speaker clip interrupt.
15*4882a593Smuzhiyun  "cdc_spk_ocp_int" - Speaker over current protect interrupt.
16*4882a593Smuzhiyun  "mbhc_ins_rem_det1" - jack insert removal detect interrupt 1.
17*4882a593Smuzhiyun  "mbhc_but_rel_det" - button release interrupt.
18*4882a593Smuzhiyun  "mbhc_but_press_det" - button press event
19*4882a593Smuzhiyun  "mbhc_ins_rem_det" - jack insert removal detect interrupt.
20*4882a593Smuzhiyun  "mbhc_switch_int"	- multi button headset interrupt.
21*4882a593Smuzhiyun  "cdc_ear_ocp_int" - Earphone over current protect interrupt.
22*4882a593Smuzhiyun  "cdc_hphr_ocp_int" - Headphone R over current protect interrupt.
23*4882a593Smuzhiyun  "cdc_hphl_ocp_det" - Headphone L over current protect interrupt.
24*4882a593Smuzhiyun  "cdc_ear_cnp_int" - earphone cnp interrupt.
25*4882a593Smuzhiyun  "cdc_hphr_cnp_int" - hphr click and pop interrupt.
26*4882a593Smuzhiyun  "cdc_hphl_cnp_int" - hphl click and pop interrupt.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun - clocks: Handle to mclk.
29*4882a593Smuzhiyun - clock-names: should be "mclk"
30*4882a593Smuzhiyun - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node.
31*4882a593Smuzhiyun - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node.
32*4882a593Smuzhiyun - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node.
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunOptional Properties:
35*4882a593Smuzhiyun - qcom,mbhc-vthreshold-low: Array of 5 threshold voltages in mV for 5 buttons
36*4882a593Smuzhiyun			     detection on headset when the mbhc is powered up
37*4882a593Smuzhiyun			     by internal current source, this is a low power.
38*4882a593Smuzhiyun - qcom,mbhc-vthreshold-high: Array of 5 thresold voltages in mV for 5 buttons
39*4882a593Smuzhiyun			      detection on headset when mbhc is powered up
40*4882a593Smuzhiyun			       from micbias.
41*4882a593Smuzhiyun- qcom,micbias-lvl:  Voltage (mV) for Mic Bias
42*4882a593Smuzhiyun- qcom,hphl-jack-type-normally-open: boolean, present if hphl pin on jack is a
43*4882a593Smuzhiyun				     NO (Normally Open). If not specified, then
44*4882a593Smuzhiyun				     its assumed that hphl pin on jack is NC
45*4882a593Smuzhiyun				     (Normally Closed).
46*4882a593Smuzhiyun- qcom,gnd-jack-type-normally-open: boolean, present if gnd pin on jack is
47*4882a593Smuzhiyun				    NO (Normally Open). If not specified, then
48*4882a593Smuzhiyun				    its assumed that gnd pin on jack is NC
49*4882a593Smuzhiyun				    (Normally Closed).
50*4882a593Smuzhiyun- qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor
51*4882a593Smuzhiyun			 connected.
52*4882a593Smuzhiyun- qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor
53*4882a593Smuzhiyun			 connected.
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunExample:
56*4882a593Smuzhiyun
57*4882a593Smuzhiyunspmi_bus {
58*4882a593Smuzhiyun	...
59*4882a593Smuzhiyun	audio-codec@f000{
60*4882a593Smuzhiyun		compatible = "qcom,pm8916-wcd-analog-codec";
61*4882a593Smuzhiyun		reg = <0xf000 0x200>;
62*4882a593Smuzhiyun		reg-names = "pmic-codec-core";
63*4882a593Smuzhiyun		clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
64*4882a593Smuzhiyun		clock-names = "mclk";
65*4882a593Smuzhiyun		qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
66*4882a593Smuzhiyun		qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
67*4882a593Smuzhiyun		interrupt-parent = <&spmi_bus>;
68*4882a593Smuzhiyun		interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
69*4882a593Smuzhiyun			     <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
70*4882a593Smuzhiyun			     <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
71*4882a593Smuzhiyun			     <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
72*4882a593Smuzhiyun			     <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
73*4882a593Smuzhiyun			     <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
74*4882a593Smuzhiyun			     <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
75*4882a593Smuzhiyun			     <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
76*4882a593Smuzhiyun			     <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
77*4882a593Smuzhiyun			     <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
78*4882a593Smuzhiyun			     <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
79*4882a593Smuzhiyun			     <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
80*4882a593Smuzhiyun			     <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
81*4882a593Smuzhiyun			     <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
82*4882a593Smuzhiyun		interrupt-names = "cdc_spk_cnp_int",
83*4882a593Smuzhiyun				  "cdc_spk_clip_int",
84*4882a593Smuzhiyun				  "cdc_spk_ocp_int",
85*4882a593Smuzhiyun				  "mbhc_ins_rem_det1",
86*4882a593Smuzhiyun				  "mbhc_but_rel_det",
87*4882a593Smuzhiyun				  "mbhc_but_press_det",
88*4882a593Smuzhiyun				  "mbhc_ins_rem_det",
89*4882a593Smuzhiyun				  "mbhc_switch_int",
90*4882a593Smuzhiyun				  "cdc_ear_ocp_int",
91*4882a593Smuzhiyun				  "cdc_hphr_ocp_int",
92*4882a593Smuzhiyun				  "cdc_hphl_ocp_det",
93*4882a593Smuzhiyun				  "cdc_ear_cnp_int",
94*4882a593Smuzhiyun				  "cdc_hphr_cnp_int",
95*4882a593Smuzhiyun				  "cdc_hphl_cnp_int";
96*4882a593Smuzhiyun	               vdd-cdc-io-supply = <&pm8916_l5>;
97*4882a593Smuzhiyun	               vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
98*4882a593Smuzhiyun	               vdd-micbias-supply = <&pm8916_l13>;
99*4882a593Smuzhiyun	               #sound-dai-cells = <1>;
100*4882a593Smuzhiyun	};
101*4882a593Smuzhiyun};
102