xref: /freebsd/sys/contrib/device-tree/Bindings/sound/rockchip,pdm.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/rockchip,pdm.yaml#
58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
78cc087a1SEmmanuel Vadottitle: Rockchip PDM controller
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotdescription:
108cc087a1SEmmanuel Vadot  The Pulse Density Modulation Interface Controller (PDMC) is
118cc087a1SEmmanuel Vadot  a PDM interface controller and decoder that support PDM format.
128cc087a1SEmmanuel Vadot  It integrates a clock generator driving the PDM microphone
138cc087a1SEmmanuel Vadot  and embeds filters which decimate the incoming bit stream to
148cc087a1SEmmanuel Vadot  obtain most common audio rates.
158cc087a1SEmmanuel Vadot
168cc087a1SEmmanuel Vadotmaintainers:
178cc087a1SEmmanuel Vadot  - Heiko Stuebner <heiko@sntech.de>
188cc087a1SEmmanuel Vadot
19*8bab661aSEmmanuel VadotallOf:
20*8bab661aSEmmanuel Vadot  - $ref: dai-common.yaml#
21*8bab661aSEmmanuel Vadot
228cc087a1SEmmanuel Vadotproperties:
238cc087a1SEmmanuel Vadot  compatible:
248cc087a1SEmmanuel Vadot    enum:
258cc087a1SEmmanuel Vadot      - rockchip,pdm
268cc087a1SEmmanuel Vadot      - rockchip,px30-pdm
278cc087a1SEmmanuel Vadot      - rockchip,rk1808-pdm
288cc087a1SEmmanuel Vadot      - rockchip,rk3308-pdm
298cc087a1SEmmanuel Vadot      - rockchip,rk3568-pdm
308cc087a1SEmmanuel Vadot      - rockchip,rv1126-pdm
318cc087a1SEmmanuel Vadot
328cc087a1SEmmanuel Vadot  reg:
338cc087a1SEmmanuel Vadot    maxItems: 1
348cc087a1SEmmanuel Vadot
358cc087a1SEmmanuel Vadot  interrupts:
368cc087a1SEmmanuel Vadot    maxItems: 1
378cc087a1SEmmanuel Vadot
388cc087a1SEmmanuel Vadot  clocks:
398cc087a1SEmmanuel Vadot    items:
408cc087a1SEmmanuel Vadot      - description: clock for PDM controller
418cc087a1SEmmanuel Vadot      - description: clock for PDM BUS
428cc087a1SEmmanuel Vadot
438cc087a1SEmmanuel Vadot  clock-names:
448cc087a1SEmmanuel Vadot    items:
458cc087a1SEmmanuel Vadot      - const: pdm_clk
468cc087a1SEmmanuel Vadot      - const: pdm_hclk
478cc087a1SEmmanuel Vadot
488cc087a1SEmmanuel Vadot  dmas:
498cc087a1SEmmanuel Vadot    maxItems: 1
508cc087a1SEmmanuel Vadot
518cc087a1SEmmanuel Vadot  dma-names:
528cc087a1SEmmanuel Vadot    items:
538cc087a1SEmmanuel Vadot      - const: rx
548cc087a1SEmmanuel Vadot
558cc087a1SEmmanuel Vadot  power-domains:
568cc087a1SEmmanuel Vadot    maxItems: 1
578cc087a1SEmmanuel Vadot
588cc087a1SEmmanuel Vadot  resets:
598cc087a1SEmmanuel Vadot    items:
608cc087a1SEmmanuel Vadot      - description: reset for PDM controller
618cc087a1SEmmanuel Vadot
628cc087a1SEmmanuel Vadot  reset-names:
638cc087a1SEmmanuel Vadot    items:
648cc087a1SEmmanuel Vadot      - const: pdm-m
658cc087a1SEmmanuel Vadot
668cc087a1SEmmanuel Vadot  rockchip,path-map:
678cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
688cc087a1SEmmanuel Vadot    description:
698cc087a1SEmmanuel Vadot      Defines the mapping of PDM SDIx to PDM PATHx.
708cc087a1SEmmanuel Vadot      By default, they are mapped one-to-one.
718cc087a1SEmmanuel Vadot    maxItems: 4
728cc087a1SEmmanuel Vadot    uniqueItems: true
738cc087a1SEmmanuel Vadot    items:
748cc087a1SEmmanuel Vadot      enum: [ 0, 1, 2, 3 ]
758cc087a1SEmmanuel Vadot
768cc087a1SEmmanuel Vadot  "#sound-dai-cells":
778cc087a1SEmmanuel Vadot    const: 0
788cc087a1SEmmanuel Vadot
798cc087a1SEmmanuel Vadotrequired:
808cc087a1SEmmanuel Vadot  - compatible
818cc087a1SEmmanuel Vadot  - reg
828cc087a1SEmmanuel Vadot  - interrupts
838cc087a1SEmmanuel Vadot  - clocks
848cc087a1SEmmanuel Vadot  - clock-names
858cc087a1SEmmanuel Vadot  - dmas
868cc087a1SEmmanuel Vadot  - dma-names
878cc087a1SEmmanuel Vadot  - "#sound-dai-cells"
888cc087a1SEmmanuel Vadot
89*8bab661aSEmmanuel VadotunevaluatedProperties: false
908cc087a1SEmmanuel Vadot
918cc087a1SEmmanuel Vadotexamples:
928cc087a1SEmmanuel Vadot  - |
938cc087a1SEmmanuel Vadot    #include <dt-bindings/clock/rk3328-cru.h>
948cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
958cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
968cc087a1SEmmanuel Vadot    #include <dt-bindings/pinctrl/rockchip.h>
978cc087a1SEmmanuel Vadot
988cc087a1SEmmanuel Vadot    bus {
998cc087a1SEmmanuel Vadot        #address-cells = <2>;
1008cc087a1SEmmanuel Vadot        #size-cells = <2>;
1018cc087a1SEmmanuel Vadot
1028cc087a1SEmmanuel Vadot        pdm@ff040000 {
1038cc087a1SEmmanuel Vadot            compatible = "rockchip,pdm";
1048cc087a1SEmmanuel Vadot            reg = <0x0 0xff040000 0x0 0x1000>;
1058cc087a1SEmmanuel Vadot            interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
1068cc087a1SEmmanuel Vadot            clocks = <&cru SCLK_PDM>, <&cru HCLK_PDM>;
1078cc087a1SEmmanuel Vadot            clock-names = "pdm_clk", "pdm_hclk";
1088cc087a1SEmmanuel Vadot            dmas = <&dmac 16>;
1098cc087a1SEmmanuel Vadot            dma-names = "rx";
1108cc087a1SEmmanuel Vadot            #sound-dai-cells = <0>;
1118cc087a1SEmmanuel Vadot            pinctrl-names = "default", "sleep";
1128cc087a1SEmmanuel Vadot            pinctrl-0 = <&pdmm0_clk
1138cc087a1SEmmanuel Vadot                         &pdmm0_sdi0
1148cc087a1SEmmanuel Vadot                         &pdmm0_sdi1
1158cc087a1SEmmanuel Vadot                         &pdmm0_sdi2
1168cc087a1SEmmanuel Vadot                         &pdmm0_sdi3>;
1178cc087a1SEmmanuel Vadot            pinctrl-1 = <&pdmm0_clk_sleep
1188cc087a1SEmmanuel Vadot                         &pdmm0_sdi0_sleep
1198cc087a1SEmmanuel Vadot                         &pdmm0_sdi1_sleep
1208cc087a1SEmmanuel Vadot                         &pdmm0_sdi2_sleep
1218cc087a1SEmmanuel Vadot                         &pdmm0_sdi3_sleep>;
1228cc087a1SEmmanuel Vadot        };
1238cc087a1SEmmanuel Vadot    };
124