Merge tag 'for-4.19/post-20180822' of git://git.kernel.dk/linux-block
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / sound / qcom,msm8916-wcd-analog.txt
1 msm8916 analog audio CODEC
2
3 Bindings for codec Analog IP which is integrated in pmic pm8916,
4
5 ## Bindings for codec core on pmic:
6
7 Required 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 Optional Properties:
34  - qcom,mbhc-vthreshold-low: Array of 5 threshold voltages in mV for 5 buttons
35                              detection on headset when the mbhc is powered up
36                              by internal current source, this is a low power.
37  - qcom,mbhc-vthreshold-high: Array of 5 thresold voltages in mV for 5 buttons
38                               detection on headset when mbhc is powered up
39                                from micbias.
40 - qcom,micbias-lvl:  Voltage (mV) for Mic Bias
41 - qcom,hphl-jack-type-normally-open: boolean, present if hphl pin on jack is a
42                                      NO (Normally Open). If not specified, then
43                                      its assumed that hphl pin on jack is NC
44                                      (Normally Closed).
45 - qcom,gnd-jack-type-normally-open: boolean, present if gnd pin on jack is
46                                     NO (Normally Open). If not specified, then
47                                     its assumed that gnd pin on jack is NC
48                                     (Normally Closed).
49 - qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor
50                          connected.
51 - qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor
52                          connected.
53
54 Example:
55
56 spmi_bus {
57         ...
58         audio-codec@f000{
59                 compatible = "qcom,pm8916-wcd-analog-codec";
60                 reg = <0xf000 0x200>;
61                 reg-names = "pmic-codec-core";
62                 clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
63                 clock-names = "mclk";
64                 qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
65                 qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
66                 interrupt-parent = <&spmi_bus>;
67                 interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
68                              <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
69                              <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
70                              <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
71                              <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
72                              <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
73                              <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
74                              <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
75                              <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
76                              <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
77                              <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
78                              <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
79                              <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
80                              <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
81                 interrupt-names = "cdc_spk_cnp_int",
82                                   "cdc_spk_clip_int",
83                                   "cdc_spk_ocp_int",
84                                   "mbhc_ins_rem_det1",
85                                   "mbhc_but_rel_det",
86                                   "mbhc_but_press_det",
87                                   "mbhc_ins_rem_det",
88                                   "mbhc_switch_int",
89                                   "cdc_ear_ocp_int",
90                                   "cdc_hphr_ocp_int",
91                                   "cdc_hphl_ocp_det",
92                                   "cdc_ear_cnp_int",
93                                   "cdc_hphr_cnp_int",
94                                   "cdc_hphl_cnp_int";
95                        VDD-CDC-IO-supply = <&pm8916_l5>;
96                        VDD-CDC-TX-RX-CX-supply = <&pm8916_l5>;
97                        VDD-MICBIAS-supply = <&pm8916_l13>;
98                        #sound-dai-cells = <1>;
99         };
100 };