xref: /linux/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
1cfec0193SClaudiu Beznea# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2cfec0193SClaudiu Beznea%YAML 1.2
3cfec0193SClaudiu Beznea---
4cfec0193SClaudiu Beznea$id: http://devicetree.org/schemas/sound/microchip,sama7g5-pdmc.yaml#
5cfec0193SClaudiu Beznea$schema: http://devicetree.org/meta-schemas/core.yaml#
6cfec0193SClaudiu Beznea
7cfec0193SClaudiu Bezneatitle: Microchip Pulse Density Microphone Controller
8cfec0193SClaudiu Beznea
9cfec0193SClaudiu Bezneamaintainers:
10cfec0193SClaudiu Beznea  - Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
11cfec0193SClaudiu Beznea
12cfec0193SClaudiu Bezneadescription:
13cfec0193SClaudiu Beznea  The Microchip Pulse Density Microphone Controller (PDMC) interfaces up to 4
14cfec0193SClaudiu Beznea  digital microphones having Pulse Density Modulated (PDM) outputs.
15cfec0193SClaudiu Beznea
16cfec0193SClaudiu BezneaallOf:
17cfec0193SClaudiu Beznea  - $ref: dai-common.yaml#
18cfec0193SClaudiu Beznea
19cfec0193SClaudiu Bezneaproperties:
20cfec0193SClaudiu Beznea  compatible:
21cfec0193SClaudiu Beznea    const: microchip,sama7g5-pdmc
22cfec0193SClaudiu Beznea
23cfec0193SClaudiu Beznea  reg:
24cfec0193SClaudiu Beznea    maxItems: 1
25cfec0193SClaudiu Beznea
26cfec0193SClaudiu Beznea  "#sound-dai-cells":
27cfec0193SClaudiu Beznea    const: 0
28cfec0193SClaudiu Beznea
29cfec0193SClaudiu Beznea  interrupts:
30cfec0193SClaudiu Beznea    maxItems: 1
31cfec0193SClaudiu Beznea
32cfec0193SClaudiu Beznea  clocks:
33cfec0193SClaudiu Beznea    items:
34cfec0193SClaudiu Beznea      - description: Peripheral Bus Clock
35cfec0193SClaudiu Beznea      - description: Generic Clock
36cfec0193SClaudiu Beznea
37cfec0193SClaudiu Beznea  clock-names:
38cfec0193SClaudiu Beznea    items:
39cfec0193SClaudiu Beznea      - const: pclk
40cfec0193SClaudiu Beznea      - const: gclk
41cfec0193SClaudiu Beznea
42cfec0193SClaudiu Beznea  dmas:
43cfec0193SClaudiu Beznea    description: RX DMA Channel
44cfec0193SClaudiu Beznea    maxItems: 1
45cfec0193SClaudiu Beznea
46cfec0193SClaudiu Beznea  dma-names:
47cfec0193SClaudiu Beznea    const: rx
48cfec0193SClaudiu Beznea
49cfec0193SClaudiu Beznea  microchip,mic-pos:
50cfec0193SClaudiu Beznea    description: |
51cfec0193SClaudiu Beznea      Position of PDM microphones on the DS line and the sampling edge (rising
52cfec0193SClaudiu Beznea      or falling) of the CLK line. A microphone is represented as a pair of DS
53cfec0193SClaudiu Beznea      line and the sampling edge. The first microphone is mapped to channel 0,
54cfec0193SClaudiu Beznea      the second to channel 1, etc.
55cfec0193SClaudiu Beznea    $ref: /schemas/types.yaml#/definitions/uint32-matrix
56cfec0193SClaudiu Beznea    items:
57cfec0193SClaudiu Beznea      items:
58cfec0193SClaudiu Beznea        - description: value for DS line
59*b2c28785SRob Herring          enum: [0, 1]
60cfec0193SClaudiu Beznea        - description: value for sampling edge
61*b2c28785SRob Herring          enum: [0, 1]
62cfec0193SClaudiu Beznea    minItems: 1
63cfec0193SClaudiu Beznea    maxItems: 4
64cfec0193SClaudiu Beznea    uniqueItems: true
65cfec0193SClaudiu Beznea
66143a2f01SClaudiu Beznea  microchip,startup-delay-us:
67143a2f01SClaudiu Beznea    description: |
68143a2f01SClaudiu Beznea      Specifies the delay in microseconds that needs to be applied after
69143a2f01SClaudiu Beznea      enabling the PDMC microphones to avoid unwanted noise due to microphones
70143a2f01SClaudiu Beznea      not being ready.
71143a2f01SClaudiu Beznea
72cfec0193SClaudiu Beznearequired:
73cfec0193SClaudiu Beznea  - compatible
74cfec0193SClaudiu Beznea  - reg
75cfec0193SClaudiu Beznea  - "#sound-dai-cells"
76cfec0193SClaudiu Beznea  - interrupts
77cfec0193SClaudiu Beznea  - clocks
78cfec0193SClaudiu Beznea  - clock-names
79cfec0193SClaudiu Beznea  - dmas
80cfec0193SClaudiu Beznea  - dma-names
81cfec0193SClaudiu Beznea  - microchip,mic-pos
82cfec0193SClaudiu Beznea
83cfec0193SClaudiu BezneaunevaluatedProperties: false
84cfec0193SClaudiu Beznea
85cfec0193SClaudiu Bezneaexamples:
86cfec0193SClaudiu Beznea  - |
87cfec0193SClaudiu Beznea    #include <dt-bindings/clock/at91.h>
88cfec0193SClaudiu Beznea    #include <dt-bindings/dma/at91.h>
89cfec0193SClaudiu Beznea    #include <dt-bindings/interrupt-controller/arm-gic.h>
90cfec0193SClaudiu Beznea    #include <dt-bindings/sound/microchip,pdmc.h>
91cfec0193SClaudiu Beznea
92cfec0193SClaudiu Beznea    pdmc: sound@e1608000 {
93cfec0193SClaudiu Beznea        compatible = "microchip,sama7g5-pdmc";
94cfec0193SClaudiu Beznea        reg = <0xe1608000 0x4000>;
95cfec0193SClaudiu Beznea        #sound-dai-cells = <0>;
96cfec0193SClaudiu Beznea        interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
97cfec0193SClaudiu Beznea        dmas = <&dma0 AT91_XDMAC_DT_PERID(37)>;
98cfec0193SClaudiu Beznea        dma-names = "rx";
99cfec0193SClaudiu Beznea        clocks = <&pmc PMC_TYPE_PERIPHERAL 68>, <&pmc PMC_TYPE_GCK 68>;
100cfec0193SClaudiu Beznea        clock-names = "pclk", "gclk";
101cfec0193SClaudiu Beznea        microchip,mic-pos = <MCHP_PDMC_DS0 MCHP_PDMC_CLK_POSITIVE>,
102cfec0193SClaudiu Beznea                            <MCHP_PDMC_DS0 MCHP_PDMC_CLK_NEGATIVE>,
103cfec0193SClaudiu Beznea                            <MCHP_PDMC_DS1 MCHP_PDMC_CLK_POSITIVE>,
104cfec0193SClaudiu Beznea                            <MCHP_PDMC_DS1 MCHP_PDMC_CLK_NEGATIVE>;
105cfec0193SClaudiu Beznea    };
106