18c2ecf20Sopenharmony_ciDialog Semiconductor DA7218 Audio Codec bindings 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciDA7218 is an audio codec with HP detect feature. 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci====== 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciRequired properties: 88c2ecf20Sopenharmony_ci- compatible : Should be "dlg,da7217" or "dlg,da7218" 98c2ecf20Sopenharmony_ci- reg: Specifies the I2C slave address 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci- VDD-supply: VDD power supply for the device 128c2ecf20Sopenharmony_ci- VDDMIC-supply: VDDMIC power supply for the device 138c2ecf20Sopenharmony_ci- VDDIO-supply: VDDIO power supply for the device 148c2ecf20Sopenharmony_ci (See Documentation/devicetree/bindings/regulator/regulator.txt for further 158c2ecf20Sopenharmony_ci information relating to regulators) 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciOptional properties: 188c2ecf20Sopenharmony_ci- interrupts: IRQ line info for DA7218 chip. 198c2ecf20Sopenharmony_ci (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for 208c2ecf20Sopenharmony_ci further information relating to interrupt properties) 218c2ecf20Sopenharmony_ci- interrupt-names : Name associated with interrupt line. Should be "wakeup" if 228c2ecf20Sopenharmony_ci interrupt is to be used to wake system, otherwise "irq" should be used. 238c2ecf20Sopenharmony_ci- wakeup-source: Flag to indicate this device can wake system (suspend/resume). 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci- clocks : phandle and clock specifier for codec MCLK. 268c2ecf20Sopenharmony_ci- clock-names : Clock name string for 'clocks' attribute, should be "mclk". 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci- dlg,micbias1-lvl-millivolt : Voltage (mV) for Mic Bias 1 298c2ecf20Sopenharmony_ci [<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>] 308c2ecf20Sopenharmony_ci- dlg,micbias2-lvl-millivolt : Voltage (mV) for Mic Bias 2 318c2ecf20Sopenharmony_ci [<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>] 328c2ecf20Sopenharmony_ci- dlg,mic1-amp-in-sel : Mic1 input source type 338c2ecf20Sopenharmony_ci ["diff", "se_p", "se_n"] 348c2ecf20Sopenharmony_ci- dlg,mic2-amp-in-sel : Mic2 input source type 358c2ecf20Sopenharmony_ci ["diff", "se_p", "se_n"] 368c2ecf20Sopenharmony_ci- dlg,dmic1-data-sel : DMIC1 channel select based on clock edge. 378c2ecf20Sopenharmony_ci ["lrise_rfall", "lfall_rrise"] 388c2ecf20Sopenharmony_ci- dlg,dmic1-samplephase : When to sample audio from DMIC1. 398c2ecf20Sopenharmony_ci ["on_clkedge", "between_clkedge"] 408c2ecf20Sopenharmony_ci- dlg,dmic1-clkrate-hz : DMic1 clock frequency (Hz). 418c2ecf20Sopenharmony_ci [<1500000>, <3000000>] 428c2ecf20Sopenharmony_ci- dlg,dmic2-data-sel : DMic2 channel select based on clock edge. 438c2ecf20Sopenharmony_ci ["lrise_rfall", "lfall_rrise"] 448c2ecf20Sopenharmony_ci- dlg,dmic2-samplephase : When to sample audio from DMic2. 458c2ecf20Sopenharmony_ci ["on_clkedge", "between_clkedge"] 468c2ecf20Sopenharmony_ci- dlg,dmic2-clkrate-hz : DMic2 clock frequency (Hz). 478c2ecf20Sopenharmony_ci [<1500000>, <3000000>] 488c2ecf20Sopenharmony_ci- dlg,hp-diff-single-supply : Boolean flag, use single supply for HP 498c2ecf20Sopenharmony_ci (DA7217 only) 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci====== 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ciOptional Child node - 'da7218_hpldet' (DA7218 only): 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciOptional properties: 568c2ecf20Sopenharmony_ci- dlg,jack-rate-us : Time between jack detect measurements (us) 578c2ecf20Sopenharmony_ci [<5>, <10>, <20>, <40>, <80>, <160>, <320>, <640>] 588c2ecf20Sopenharmony_ci- dlg,jack-debounce : Number of debounce measurements taken for jack detect 598c2ecf20Sopenharmony_ci [<0>, <2>, <3>, <4>] 608c2ecf20Sopenharmony_ci- dlg,jack-threshold-pct : Threshold level for jack detection (% of VDD) 618c2ecf20Sopenharmony_ci [<84>, <88>, <92>, <96>] 628c2ecf20Sopenharmony_ci- dlg,comp-inv : Boolean flag, invert comparator output 638c2ecf20Sopenharmony_ci- dlg,hyst : Boolean flag, enable hysteresis 648c2ecf20Sopenharmony_ci- dlg,discharge : Boolean flag, auto discharge of Mic Bias on jack removal 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci====== 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciExample: 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci codec: da7218@1a { 718c2ecf20Sopenharmony_ci compatible = "dlg,da7218"; 728c2ecf20Sopenharmony_ci reg = <0x1a>; 738c2ecf20Sopenharmony_ci interrupt-parent = <&gpio6>; 748c2ecf20Sopenharmony_ci interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 758c2ecf20Sopenharmony_ci wakeup-source; 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci VDD-supply = <®_audio>; 788c2ecf20Sopenharmony_ci VDDMIC-supply = <®_audio>; 798c2ecf20Sopenharmony_ci VDDIO-supply = <®_audio>; 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci clocks = <&clks 201>; 828c2ecf20Sopenharmony_ci clock-names = "mclk"; 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci dlg,micbias1-lvl-millivolt = <2600>; 858c2ecf20Sopenharmony_ci dlg,micbias2-lvl-millivolt = <2600>; 868c2ecf20Sopenharmony_ci dlg,mic1-amp-in-sel = "diff"; 878c2ecf20Sopenharmony_ci dlg,mic2-amp-in-sel = "diff"; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci dlg,dmic1-data-sel = "lrise_rfall"; 908c2ecf20Sopenharmony_ci dlg,dmic1-samplephase = "on_clkedge"; 918c2ecf20Sopenharmony_ci dlg,dmic1-clkrate-hz = <3000000>; 928c2ecf20Sopenharmony_ci dlg,dmic2-data-sel = "lrise_rfall"; 938c2ecf20Sopenharmony_ci dlg,dmic2-samplephase = "on_clkedge"; 948c2ecf20Sopenharmony_ci dlg,dmic2-clkrate-hz = <3000000>; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci da7218_hpldet { 978c2ecf20Sopenharmony_ci dlg,jack-rate-us = <40>; 988c2ecf20Sopenharmony_ci dlg,jack-debounce = <2>; 998c2ecf20Sopenharmony_ci dlg,jack-threshold-pct = <84>; 1008c2ecf20Sopenharmony_ci dlg,hyst; 1018c2ecf20Sopenharmony_ci }; 1028c2ecf20Sopenharmony_ci }; 103