xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/da7219.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunDialog Semiconductor DA7219 Audio Codec bindings
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunDA7219 is an audio codec with advanced accessory detect features.
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun======
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunRequired properties:
8*4882a593Smuzhiyun- compatible : Should be "dlg,da7219"
9*4882a593Smuzhiyun- reg: Specifies the I2C slave address
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun- interrupts : IRQ line info for DA7219.
12*4882a593Smuzhiyun  (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for
13*4882a593Smuzhiyun   further information relating to interrupt properties)
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun- VDD-supply: VDD power supply for the device
16*4882a593Smuzhiyun- VDDMIC-supply: VDDMIC power supply for the device
17*4882a593Smuzhiyun- VDDIO-supply: VDDIO power supply for the device
18*4882a593Smuzhiyun  (See Documentation/devicetree/bindings/regulator/regulator.txt for further
19*4882a593Smuzhiyun   information relating to regulators)
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunOptional properties:
22*4882a593Smuzhiyun- interrupt-names : Name associated with interrupt line. Should be "wakeup" if
23*4882a593Smuzhiyun  interrupt is to be used to wake system, otherwise "irq" should be used.
24*4882a593Smuzhiyun- wakeup-source: Flag to indicate this device can wake system (suspend/resume).
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun- #clock-cells :  Should be set to '<1>', two clock sources provided;
27*4882a593Smuzhiyun- clock-output-names : Names given for DAI clock outputs (WCLK & BCLK);
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun- clocks : phandle and clock specifier for codec MCLK.
30*4882a593Smuzhiyun- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun- dlg,micbias-lvl : Voltage (mV) for Mic Bias
33*4882a593Smuzhiyun	[<1600>, <1800>, <2000>, <2200>, <2400>, <2600>]
34*4882a593Smuzhiyun- dlg,mic-amp-in-sel : Mic input source type
35*4882a593Smuzhiyun	["diff", "se_p", "se_n"]
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunDeprecated properties:
38*4882a593Smuzhiyun- dlg,ldo-lvl : Required internal LDO voltage (mV) level for digital engine
39*4882a593Smuzhiyun  (LDO unavailable in production HW so property no longer required).
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun======
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunChild node - 'da7219_aad':
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunOptional properties:
46*4882a593Smuzhiyun- dlg,micbias-pulse-lvl : Mic bias higher voltage pulse level (mV).
47*4882a593Smuzhiyun	[<2800>, <2900>]
48*4882a593Smuzhiyun- dlg,micbias-pulse-time : Mic bias higher voltage pulse duration (ms)
49*4882a593Smuzhiyun- dlg,btn-cfg : Periodic button press measurements for 4-pole jack (ms)
50*4882a593Smuzhiyun	[<2>, <5>, <10>, <50>, <100>, <200>, <500>]
51*4882a593Smuzhiyun- dlg,mic-det-thr : Impedance threshold for mic detection measurement (Ohms)
52*4882a593Smuzhiyun	[<200>, <500>, <750>, <1000>]
53*4882a593Smuzhiyun- dlg,jack-ins-deb : Debounce time for jack insertion (ms)
54*4882a593Smuzhiyun	[<5>, <10>, <20>, <50>, <100>, <200>, <500>, <1000>]
55*4882a593Smuzhiyun- dlg,jack-det-rate: Jack type detection latency (3/4 pole)
56*4882a593Smuzhiyun	["32ms_64ms", "64ms_128ms", "128ms_256ms", "256ms_512ms"]
57*4882a593Smuzhiyun- dlg,jack-rem-deb : Debounce time for jack removal (ms)
58*4882a593Smuzhiyun	[<1>, <5>, <10>, <20>]
59*4882a593Smuzhiyun- dlg,a-d-btn-thr : Impedance threshold between buttons A and D
60*4882a593Smuzhiyun	[0x0 - 0xFF]
61*4882a593Smuzhiyun- dlg,d-b-btn-thr : Impedance threshold between buttons D and B
62*4882a593Smuzhiyun	[0x0 - 0xFF]
63*4882a593Smuzhiyun- dlg,b-c-btn-thr : Impedance threshold between buttons B and C
64*4882a593Smuzhiyun	[0x0 - 0xFF]
65*4882a593Smuzhiyun- dlg,c-mic-btn-thr : Impedance threshold between button C and Mic
66*4882a593Smuzhiyun	[0x0 - 0xFF]
67*4882a593Smuzhiyun- dlg,btn-avg : Number of 8-bit readings for averaged button measurement
68*4882a593Smuzhiyun	[<1>, <2>, <4>, <8>]
69*4882a593Smuzhiyun- dlg,adc-1bit-rpt : Repeat count for 1-bit button measurement
70*4882a593Smuzhiyun	[<1>, <2>, <4>, <8>]
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun======
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunExample:
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun	codec: da7219@1a {
77*4882a593Smuzhiyun		compatible = "dlg,da7219";
78*4882a593Smuzhiyun		reg = <0x1a>;
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun		interrupt-parent = <&gpio6>;
81*4882a593Smuzhiyun		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun		VDD-supply = <&reg_audio>;
84*4882a593Smuzhiyun		VDDMIC-supply = <&reg_audio>;
85*4882a593Smuzhiyun		VDDIO-supply = <&reg_audio>;
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun		#clock-cells = <1>;
88*4882a593Smuzhiyun		clock-output-names = "dai-wclk", "dai-bclk";
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun		clocks = <&clks 201>;
91*4882a593Smuzhiyun		clock-names = "mclk";
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun		dlg,ldo-lvl = <1200>;
94*4882a593Smuzhiyun		dlg,micbias-lvl = <2600>;
95*4882a593Smuzhiyun		dlg,mic-amp-in-sel = "diff";
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun		da7219_aad {
98*4882a593Smuzhiyun			dlg,btn-cfg = <50>;
99*4882a593Smuzhiyun			dlg,mic-det-thr = <500>;
100*4882a593Smuzhiyun			dlg,jack-ins-deb = <20>;
101*4882a593Smuzhiyun			dlg,jack-det-rate = "32ms_64ms";
102*4882a593Smuzhiyun			dlg,jack-rem-deb = <1>;
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun			dlg,a-d-btn-thr = <0xa>;
105*4882a593Smuzhiyun			dlg,d-b-btn-thr = <0x16>;
106*4882a593Smuzhiyun			dlg,b-c-btn-thr = <0x21>;
107*4882a593Smuzhiyun			dlg,c-mic-btn-thr = <0x3E>;
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun			dlg,btn-avg = <4>;
110*4882a593Smuzhiyun			dlg,adc-1bit-rpt = <1>;
111*4882a593Smuzhiyun		};
112*4882a593Smuzhiyun	};
113