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