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