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