1f126890aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2f126890aSEmmanuel Vadot%YAML 1.2 3f126890aSEmmanuel Vadot--- 4f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/dialog,da7219.yaml# 5f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6f126890aSEmmanuel Vadot 7f126890aSEmmanuel Vadottitle: Dialog Semiconductor DA7219 Audio Codec 8f126890aSEmmanuel Vadot 9f126890aSEmmanuel Vadotmaintainers: 10f126890aSEmmanuel Vadot - David Rau <David.Rau.opensource@dm.renesas.com> 11f126890aSEmmanuel Vadot 12f126890aSEmmanuel Vadotdescription: 13f126890aSEmmanuel Vadot The DA7219 is an ultra low-power audio codec with 14f126890aSEmmanuel Vadot in-built advanced accessory detection (AAD) for mobile 15f126890aSEmmanuel Vadot computing and accessory applications, which supports 16f126890aSEmmanuel Vadot sample rates up to 96 kHz at 24-bit resolution. 17f126890aSEmmanuel Vadot 18f126890aSEmmanuel Vadotproperties: 19f126890aSEmmanuel Vadot compatible: 20f126890aSEmmanuel Vadot const: dlg,da7219 21f126890aSEmmanuel Vadot 22f126890aSEmmanuel Vadot reg: 23f126890aSEmmanuel Vadot maxItems: 1 24f126890aSEmmanuel Vadot 25f126890aSEmmanuel Vadot interrupts: 26f126890aSEmmanuel Vadot maxItems: 1 27f126890aSEmmanuel Vadot 28f126890aSEmmanuel Vadot VDD-supply: 29f126890aSEmmanuel Vadot description: 30f126890aSEmmanuel Vadot VDD power supply for the device. 31f126890aSEmmanuel Vadot 32f126890aSEmmanuel Vadot VDDMIC-supply: 33f126890aSEmmanuel Vadot description: 34f126890aSEmmanuel Vadot VDDMIC power supply for the device. 35f126890aSEmmanuel Vadot 36f126890aSEmmanuel Vadot VDDIO-supply: 37f126890aSEmmanuel Vadot description: 38f126890aSEmmanuel Vadot VDDIO power supply for the device. 39f126890aSEmmanuel Vadot 40f126890aSEmmanuel Vadot interrupt-names: 41f126890aSEmmanuel Vadot description: 42f126890aSEmmanuel Vadot Should be "wakeup" if interrupt is to be used to wake system, 43f126890aSEmmanuel Vadot otherwise "irq" should be used. 44f126890aSEmmanuel Vadot enum: 45f126890aSEmmanuel Vadot - wakeup 46f126890aSEmmanuel Vadot - irq 47f126890aSEmmanuel Vadot 48f126890aSEmmanuel Vadot wakeup-source: 49f126890aSEmmanuel Vadot type: boolean 50f126890aSEmmanuel Vadot description: 51f126890aSEmmanuel Vadot Flag to indicate this device can wake system (suspend/resume). 52f126890aSEmmanuel Vadot 53f126890aSEmmanuel Vadot "#clock-cells": 54f126890aSEmmanuel Vadot const: 1 55f126890aSEmmanuel Vadot 56f126890aSEmmanuel Vadot clock-output-names: 57f126890aSEmmanuel Vadot minItems: 2 58f126890aSEmmanuel Vadot maxItems: 2 59f126890aSEmmanuel Vadot description: 60f126890aSEmmanuel Vadot Name given for DAI WCLK and BCLK outputs. 61f126890aSEmmanuel Vadot 62f126890aSEmmanuel Vadot clocks: 63f126890aSEmmanuel Vadot maxItems: 1 64f126890aSEmmanuel Vadot description: 65f126890aSEmmanuel Vadot phandle and clock specifier for codec MCLK. 66f126890aSEmmanuel Vadot 67f126890aSEmmanuel Vadot clock-names: 68f126890aSEmmanuel Vadot const: mclk 69f126890aSEmmanuel Vadot 70f126890aSEmmanuel Vadot dlg,micbias-lvl: 71f126890aSEmmanuel Vadot enum: [1600, 1800, 2000, 2200, 2400, 2600] 72f126890aSEmmanuel Vadot description: 73f126890aSEmmanuel Vadot Voltage (mV) for Mic Bias. 74f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 75f126890aSEmmanuel Vadot 76f126890aSEmmanuel Vadot dlg,mic-amp-in-sel: 77aa1a8ff2SEmmanuel Vadot enum: [diff, se_p, se_n] 78f126890aSEmmanuel Vadot description: 79f126890aSEmmanuel Vadot Mic input source type. 80f126890aSEmmanuel Vadot 81f126890aSEmmanuel Vadot diff - Differential. 82f126890aSEmmanuel Vadot 83f126890aSEmmanuel Vadot se_p - MIC_P. 84f126890aSEmmanuel Vadot Positive differential analog microphone input. 85f126890aSEmmanuel Vadot 86f126890aSEmmanuel Vadot se_n - MIC_N. 87f126890aSEmmanuel Vadot Negative differential analog microphone input. 88f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 89f126890aSEmmanuel Vadot 90f126890aSEmmanuel Vadot da7219_aad: 91f126890aSEmmanuel Vadot type: object 92*84943d6fSEmmanuel Vadot additionalProperties: false 93f126890aSEmmanuel Vadot description: 94f126890aSEmmanuel Vadot Configuration of advanced accessory detection. 95f126890aSEmmanuel Vadot properties: 96f126890aSEmmanuel Vadot dlg,micbias-pulse-lvl: 97f126890aSEmmanuel Vadot enum: [2800, 2900] 98f126890aSEmmanuel Vadot description: 99f126890aSEmmanuel Vadot Mic bias higher voltage pulse level (mV). 100f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 101f126890aSEmmanuel Vadot 102f126890aSEmmanuel Vadot dlg,micbias-pulse-time: 103f126890aSEmmanuel Vadot description: 104f126890aSEmmanuel Vadot Mic bias higher voltage pulse duration (ms). 105f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 106f126890aSEmmanuel Vadot minimum: 0 107f126890aSEmmanuel Vadot 108f126890aSEmmanuel Vadot dlg,btn-cfg: 109f126890aSEmmanuel Vadot enum: [2, 5, 10, 50, 100, 200, 500] 110f126890aSEmmanuel Vadot description: 111f126890aSEmmanuel Vadot Periodic button press measurements for 4-pole jack (ms). 112f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 113f126890aSEmmanuel Vadot 114f126890aSEmmanuel Vadot dlg,mic-det-thr: 115f126890aSEmmanuel Vadot enum: [200, 500, 750, 1000] 116f126890aSEmmanuel Vadot description: 117f126890aSEmmanuel Vadot Impedance threshold for mic detection measurement (Ohms). 118f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 119f126890aSEmmanuel Vadot 120f126890aSEmmanuel Vadot dlg,jack-ins-deb: 121f126890aSEmmanuel Vadot enum: [5, 10, 20, 50, 100, 200, 500, 1000] 122f126890aSEmmanuel Vadot description: 123f126890aSEmmanuel Vadot Debounce time for jack insertion (ms). 124f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 125f126890aSEmmanuel Vadot 126f126890aSEmmanuel Vadot dlg,jack-ins-det-pty: 127aa1a8ff2SEmmanuel Vadot enum: [low, high] 128f126890aSEmmanuel Vadot description: 129f126890aSEmmanuel Vadot Polarity for jack insertion detection. 130f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 131f126890aSEmmanuel Vadot 132f126890aSEmmanuel Vadot dlg,jack-det-rate: 133f126890aSEmmanuel Vadot enum: ["32_64", "64_128", "128_256", "256_512"] 134f126890aSEmmanuel Vadot description: 135f126890aSEmmanuel Vadot Jack type (3/4 pole) detection latency (ms). 136f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 137f126890aSEmmanuel Vadot 138f126890aSEmmanuel Vadot dlg,jack-rem-deb: 139f126890aSEmmanuel Vadot enum: [1, 5, 10, 20] 140f126890aSEmmanuel Vadot description: 141f126890aSEmmanuel Vadot Debounce time for jack removal (ms). 142f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 143f126890aSEmmanuel Vadot 144f126890aSEmmanuel Vadot dlg,a-d-btn-thr: 145f126890aSEmmanuel Vadot description: 146f126890aSEmmanuel Vadot Impedance threshold between buttons A and D. 147f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 148f126890aSEmmanuel Vadot minimum: 0 149f126890aSEmmanuel Vadot maximum: 255 150f126890aSEmmanuel Vadot 151f126890aSEmmanuel Vadot dlg,d-b-btn-thr: 152f126890aSEmmanuel Vadot description: 153f126890aSEmmanuel Vadot Impedance threshold between buttons D and B. 154f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 155f126890aSEmmanuel Vadot minimum: 0 156f126890aSEmmanuel Vadot maximum: 255 157f126890aSEmmanuel Vadot 158f126890aSEmmanuel Vadot dlg,b-c-btn-thr: 159f126890aSEmmanuel Vadot description: 160f126890aSEmmanuel Vadot Impedance threshold between buttons B and C. 161f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 162f126890aSEmmanuel Vadot minimum: 0 163f126890aSEmmanuel Vadot maximum: 255 164f126890aSEmmanuel Vadot 165f126890aSEmmanuel Vadot dlg,c-mic-btn-thr: 166f126890aSEmmanuel Vadot description: 167f126890aSEmmanuel Vadot Impedance threshold between button C and Mic. 168f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 169f126890aSEmmanuel Vadot minimum: 0 170f126890aSEmmanuel Vadot maximum: 255 171f126890aSEmmanuel Vadot 172f126890aSEmmanuel Vadot dlg,btn-avg: 173f126890aSEmmanuel Vadot enum: [1, 2, 4, 8] 174f126890aSEmmanuel Vadot description: 175f126890aSEmmanuel Vadot Number of 8-bit readings for averaged button measurement. 176f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 177f126890aSEmmanuel Vadot 178f126890aSEmmanuel Vadot dlg,adc-1bit-rpt: 179f126890aSEmmanuel Vadot enum: [1, 2, 4, 8] 180f126890aSEmmanuel Vadot description: 181f126890aSEmmanuel Vadot Repeat count for 1-bit button measurement. 182f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 183f126890aSEmmanuel Vadot 184f126890aSEmmanuel Vadotrequired: 185f126890aSEmmanuel Vadot - compatible 186f126890aSEmmanuel Vadot - reg 187f126890aSEmmanuel Vadot - interrupts 188f126890aSEmmanuel Vadot - VDD-supply 189f126890aSEmmanuel Vadot - VDDMIC-supply 190f126890aSEmmanuel Vadot - VDDIO-supply 191f126890aSEmmanuel Vadot 192f126890aSEmmanuel VadotadditionalProperties: false 193f126890aSEmmanuel Vadot 194f126890aSEmmanuel Vadotexamples: 195f126890aSEmmanuel Vadot - | 196f126890aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 197f126890aSEmmanuel Vadot i2c { 198f126890aSEmmanuel Vadot #address-cells = <1>; 199f126890aSEmmanuel Vadot #size-cells = <0>; 200f126890aSEmmanuel Vadot 201f126890aSEmmanuel Vadot codec: da7219@1a { 202f126890aSEmmanuel Vadot compatible = "dlg,da7219"; 203f126890aSEmmanuel Vadot reg = <0x1a>; 204f126890aSEmmanuel Vadot 205f126890aSEmmanuel Vadot interrupt-parent = <&gpio6>; 206f126890aSEmmanuel Vadot interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 207f126890aSEmmanuel Vadot 208f126890aSEmmanuel Vadot VDD-supply = <&vdd_reg>; 209f126890aSEmmanuel Vadot VDDMIC-supply = <&vddmic_reg>; 210f126890aSEmmanuel Vadot VDDIO-supply = <&vddio_reg>; 211f126890aSEmmanuel Vadot 212f126890aSEmmanuel Vadot #clock-cells = <1>; 213f126890aSEmmanuel Vadot clock-output-names = "da7219-dai-wclk", "da7219-dai-bclk"; 214f126890aSEmmanuel Vadot 215f126890aSEmmanuel Vadot clocks = <&clks 201>; 216f126890aSEmmanuel Vadot clock-names = "mclk"; 217f126890aSEmmanuel Vadot 218f126890aSEmmanuel Vadot dlg,micbias-lvl = <2600>; 219f126890aSEmmanuel Vadot dlg,mic-amp-in-sel = "diff"; 220f126890aSEmmanuel Vadot 221f126890aSEmmanuel Vadot da7219_aad { 222f126890aSEmmanuel Vadot dlg,btn-cfg = <50>; 223f126890aSEmmanuel Vadot dlg,mic-det-thr = <500>; 224f126890aSEmmanuel Vadot dlg,jack-ins-deb = <20>; 225f126890aSEmmanuel Vadot dlg,jack-ins-det-pty = "low"; 226f126890aSEmmanuel Vadot dlg,jack-det-rate = "32_64"; 227f126890aSEmmanuel Vadot dlg,jack-rem-deb = <1>; 228f126890aSEmmanuel Vadot 229f126890aSEmmanuel Vadot dlg,a-d-btn-thr = <0xa>; 230f126890aSEmmanuel Vadot dlg,d-b-btn-thr = <0x16>; 231f126890aSEmmanuel Vadot dlg,b-c-btn-thr = <0x21>; 232f126890aSEmmanuel Vadot dlg,c-mic-btn-thr = <0x3E>; 233f126890aSEmmanuel Vadot 234f126890aSEmmanuel Vadot dlg,btn-avg = <4>; 235f126890aSEmmanuel Vadot dlg,adc-1bit-rpt = <1>; 236f126890aSEmmanuel Vadot }; 237f126890aSEmmanuel Vadot }; 238f126890aSEmmanuel Vadot }; 239