18c2ecf20Sopenharmony_ciDialog Semiconductor DA7219 Audio Codec bindings
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciDA7219 is an audio codec with advanced accessory detect features.
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci======
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciRequired properties:
88c2ecf20Sopenharmony_ci- compatible : Should be "dlg,da7219"
98c2ecf20Sopenharmony_ci- reg: Specifies the I2C slave address
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci- interrupts : IRQ line info for DA7219.
128c2ecf20Sopenharmony_ci  (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for
138c2ecf20Sopenharmony_ci   further information relating to interrupt properties)
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci- VDD-supply: VDD power supply for the device
168c2ecf20Sopenharmony_ci- VDDMIC-supply: VDDMIC power supply for the device
178c2ecf20Sopenharmony_ci- VDDIO-supply: VDDIO power supply for the device
188c2ecf20Sopenharmony_ci  (See Documentation/devicetree/bindings/regulator/regulator.txt for further
198c2ecf20Sopenharmony_ci   information relating to regulators)
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciOptional properties:
228c2ecf20Sopenharmony_ci- interrupt-names : Name associated with interrupt line. Should be "wakeup" if
238c2ecf20Sopenharmony_ci  interrupt is to be used to wake system, otherwise "irq" should be used.
248c2ecf20Sopenharmony_ci- wakeup-source: Flag to indicate this device can wake system (suspend/resume).
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci- #clock-cells :  Should be set to '<1>', two clock sources provided;
278c2ecf20Sopenharmony_ci- clock-output-names : Names given for DAI clock outputs (WCLK & BCLK);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci- clocks : phandle and clock specifier for codec MCLK.
308c2ecf20Sopenharmony_ci- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci- dlg,micbias-lvl : Voltage (mV) for Mic Bias
338c2ecf20Sopenharmony_ci	[<1600>, <1800>, <2000>, <2200>, <2400>, <2600>]
348c2ecf20Sopenharmony_ci- dlg,mic-amp-in-sel : Mic input source type
358c2ecf20Sopenharmony_ci	["diff", "se_p", "se_n"]
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciDeprecated properties:
388c2ecf20Sopenharmony_ci- dlg,ldo-lvl : Required internal LDO voltage (mV) level for digital engine
398c2ecf20Sopenharmony_ci  (LDO unavailable in production HW so property no longer required).
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci======
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciChild node - 'da7219_aad':
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ciOptional properties:
468c2ecf20Sopenharmony_ci- dlg,micbias-pulse-lvl : Mic bias higher voltage pulse level (mV).
478c2ecf20Sopenharmony_ci	[<2800>, <2900>]
488c2ecf20Sopenharmony_ci- dlg,micbias-pulse-time : Mic bias higher voltage pulse duration (ms)
498c2ecf20Sopenharmony_ci- dlg,btn-cfg : Periodic button press measurements for 4-pole jack (ms)
508c2ecf20Sopenharmony_ci	[<2>, <5>, <10>, <50>, <100>, <200>, <500>]
518c2ecf20Sopenharmony_ci- dlg,mic-det-thr : Impedance threshold for mic detection measurement (Ohms)
528c2ecf20Sopenharmony_ci	[<200>, <500>, <750>, <1000>]
538c2ecf20Sopenharmony_ci- dlg,jack-ins-deb : Debounce time for jack insertion (ms)
548c2ecf20Sopenharmony_ci	[<5>, <10>, <20>, <50>, <100>, <200>, <500>, <1000>]
558c2ecf20Sopenharmony_ci- dlg,jack-det-rate: Jack type detection latency (3/4 pole)
568c2ecf20Sopenharmony_ci	["32ms_64ms", "64ms_128ms", "128ms_256ms", "256ms_512ms"]
578c2ecf20Sopenharmony_ci- dlg,jack-rem-deb : Debounce time for jack removal (ms)
588c2ecf20Sopenharmony_ci	[<1>, <5>, <10>, <20>]
598c2ecf20Sopenharmony_ci- dlg,a-d-btn-thr : Impedance threshold between buttons A and D
608c2ecf20Sopenharmony_ci	[0x0 - 0xFF]
618c2ecf20Sopenharmony_ci- dlg,d-b-btn-thr : Impedance threshold between buttons D and B
628c2ecf20Sopenharmony_ci	[0x0 - 0xFF]
638c2ecf20Sopenharmony_ci- dlg,b-c-btn-thr : Impedance threshold between buttons B and C
648c2ecf20Sopenharmony_ci	[0x0 - 0xFF]
658c2ecf20Sopenharmony_ci- dlg,c-mic-btn-thr : Impedance threshold between button C and Mic
668c2ecf20Sopenharmony_ci	[0x0 - 0xFF]
678c2ecf20Sopenharmony_ci- dlg,btn-avg : Number of 8-bit readings for averaged button measurement
688c2ecf20Sopenharmony_ci	[<1>, <2>, <4>, <8>]
698c2ecf20Sopenharmony_ci- dlg,adc-1bit-rpt : Repeat count for 1-bit button measurement
708c2ecf20Sopenharmony_ci	[<1>, <2>, <4>, <8>]
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci======
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciExample:
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci	codec: da7219@1a {
778c2ecf20Sopenharmony_ci		compatible = "dlg,da7219";
788c2ecf20Sopenharmony_ci		reg = <0x1a>;
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci		interrupt-parent = <&gpio6>;
818c2ecf20Sopenharmony_ci		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci		VDD-supply = <&reg_audio>;
848c2ecf20Sopenharmony_ci		VDDMIC-supply = <&reg_audio>;
858c2ecf20Sopenharmony_ci		VDDIO-supply = <&reg_audio>;
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci		#clock-cells = <1>;
888c2ecf20Sopenharmony_ci		clock-output-names = "dai-wclk", "dai-bclk";
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci		clocks = <&clks 201>;
918c2ecf20Sopenharmony_ci		clock-names = "mclk";
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci		dlg,ldo-lvl = <1200>;
948c2ecf20Sopenharmony_ci		dlg,micbias-lvl = <2600>;
958c2ecf20Sopenharmony_ci		dlg,mic-amp-in-sel = "diff";
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci		da7219_aad {
988c2ecf20Sopenharmony_ci			dlg,btn-cfg = <50>;
998c2ecf20Sopenharmony_ci			dlg,mic-det-thr = <500>;
1008c2ecf20Sopenharmony_ci			dlg,jack-ins-deb = <20>;
1018c2ecf20Sopenharmony_ci			dlg,jack-det-rate = "32ms_64ms";
1028c2ecf20Sopenharmony_ci			dlg,jack-rem-deb = <1>;
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci			dlg,a-d-btn-thr = <0xa>;
1058c2ecf20Sopenharmony_ci			dlg,d-b-btn-thr = <0x16>;
1068c2ecf20Sopenharmony_ci			dlg,b-c-btn-thr = <0x21>;
1078c2ecf20Sopenharmony_ci			dlg,c-mic-btn-thr = <0x3E>;
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci			dlg,btn-avg = <4>;
1108c2ecf20Sopenharmony_ci			dlg,adc-1bit-rpt = <1>;
1118c2ecf20Sopenharmony_ci		};
1128c2ecf20Sopenharmony_ci	};
113