Documentation / devicetree / bindings / sound / rockchip,pdm.yaml


Based on kernel version 6.10. Page generated on 2024-07-16 09:00 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/rockchip,pdm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Rockchip PDM controller

description:
  The Pulse Density Modulation Interface Controller (PDMC) is
  a PDM interface controller and decoder that support PDM format.
  It integrates a clock generator driving the PDM microphone
  and embeds filters which decimate the incoming bit stream to
  obtain most common audio rates.

maintainers:
  - Heiko Stuebner <heiko@sntech.de>

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    enum:
      - rockchip,pdm
      - rockchip,px30-pdm
      - rockchip,rk1808-pdm
      - rockchip,rk3308-pdm
      - rockchip,rk3568-pdm
      - rockchip,rv1126-pdm

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: clock for PDM controller
      - description: clock for PDM BUS

  clock-names:
    items:
      - const: pdm_clk
      - const: pdm_hclk

  dmas:
    maxItems: 1

  dma-names:
    items:
      - const: rx

  power-domains:
    maxItems: 1

  resets:
    items:
      - description: reset for PDM controller

  reset-names:
    items:
      - const: pdm-m

  rockchip,path-map:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description:
      Defines the mapping of PDM SDIx to PDM PATHx.
      By default, they are mapped one-to-one.
    maxItems: 4
    uniqueItems: true
    items:
      enum: [ 0, 1, 2, 3 ]
 
  "#sound-dai-cells":
    const: 0

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names
  - "#sound-dai-cells"

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/rk3328-cru.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/pinctrl/rockchip.h>
 
    bus {
        #address-cells = <2>;
        #size-cells = <2>;
 
        pdm@ff040000 {
            compatible = "rockchip,pdm";
            reg = <0x0 0xff040000 0x0 0x1000>;
            interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&cru SCLK_PDM>, <&cru HCLK_PDM>;
            clock-names = "pdm_clk", "pdm_hclk";
            dmas = <&dmac 16>;
            dma-names = "rx";
            #sound-dai-cells = <0>;
            pinctrl-names = "default", "sleep";
            pinctrl-0 = <&pdmm0_clk
                         &pdmm0_sdi0
                         &pdmm0_sdi1
                         &pdmm0_sdi2
                         &pdmm0_sdi3>;
            pinctrl-1 = <&pdmm0_clk_sleep
                         &pdmm0_sdi0_sleep
                         &pdmm0_sdi1_sleep
                         &pdmm0_sdi2_sleep
                         &pdmm0_sdi3_sleep>;
        };
    };