1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/dmic-codec.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Generic PDM Digital microphone (DMIC) codec
8
9maintainers:
10  - Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
11
12allOf:
13  - $ref: dai-common.yaml#
14
15properties:
16  compatible:
17    const: dmic-codec
18
19  '#sound-dai-cells':
20    const: 0
21
22  dmicen-gpios:
23    description: GPIO specifier for DMIC to control start and stop
24    maxItems: 1
25
26  num-channels:
27    description: Number of microphones on this DAI
28    $ref: /schemas/types.yaml#/definitions/uint32
29    minimum: 1
30    maximum: 8
31    default: 8
32
33  modeswitch-delay-ms:
34    description: Delay (in ms) to complete DMIC mode switch
35
36  wakeup-delay-ms:
37    description: Delay (in ms) after enabling the DMIC
38
39required:
40  - compatible
41
42unevaluatedProperties: false
43
44examples:
45  - |
46    #include <dt-bindings/gpio/gpio.h>
47
48    dmic {
49        compatible = "dmic-codec";
50        dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
51        num-channels = <1>;
52        wakeup-delay-ms = <50>;
53        modeswitch-delay-ms = <35>;
54    };
55...
56