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