GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / sound / rockchip,pdm.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/rockchip,pdm.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Rockchip PDM controller
8
9 description:
10   The Pulse Density Modulation Interface Controller (PDMC) is
11   a PDM interface controller and decoder that support PDM format.
12   It integrates a clock generator driving the PDM microphone
13   and embeds filters which decimate the incoming bit stream to
14   obtain most common audio rates.
15
16 maintainers:
17   - Heiko Stuebner <heiko@sntech.de>
18
19 properties:
20   compatible:
21     enum:
22       - rockchip,pdm
23       - rockchip,px30-pdm
24       - rockchip,rk1808-pdm
25       - rockchip,rk3308-pdm
26       - rockchip,rk3568-pdm
27       - rockchip,rv1126-pdm
28
29   reg:
30     maxItems: 1
31
32   interrupts:
33     maxItems: 1
34
35   clocks:
36     items:
37       - description: clock for PDM controller
38       - description: clock for PDM BUS
39
40   clock-names:
41     items:
42       - const: pdm_clk
43       - const: pdm_hclk
44
45   dmas:
46     maxItems: 1
47
48   dma-names:
49     items:
50       - const: rx
51
52   power-domains:
53     maxItems: 1
54
55   resets:
56     items:
57       - description: reset for PDM controller
58
59   reset-names:
60     items:
61       - const: pdm-m
62
63   rockchip,path-map:
64     $ref: /schemas/types.yaml#/definitions/uint32-array
65     description:
66       Defines the mapping of PDM SDIx to PDM PATHx.
67       By default, they are mapped one-to-one.
68     maxItems: 4
69     uniqueItems: true
70     items:
71       enum: [ 0, 1, 2, 3 ]
72
73   "#sound-dai-cells":
74     const: 0
75
76 required:
77   - compatible
78   - reg
79   - interrupts
80   - clocks
81   - clock-names
82   - dmas
83   - dma-names
84   - "#sound-dai-cells"
85
86 additionalProperties: false
87
88 examples:
89   - |
90     #include <dt-bindings/clock/rk3328-cru.h>
91     #include <dt-bindings/interrupt-controller/arm-gic.h>
92     #include <dt-bindings/interrupt-controller/irq.h>
93     #include <dt-bindings/pinctrl/rockchip.h>
94
95     bus {
96         #address-cells = <2>;
97         #size-cells = <2>;
98
99         pdm@ff040000 {
100             compatible = "rockchip,pdm";
101             reg = <0x0 0xff040000 0x0 0x1000>;
102             interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
103             clocks = <&cru SCLK_PDM>, <&cru HCLK_PDM>;
104             clock-names = "pdm_clk", "pdm_hclk";
105             dmas = <&dmac 16>;
106             dma-names = "rx";
107             #sound-dai-cells = <0>;
108             pinctrl-names = "default", "sleep";
109             pinctrl-0 = <&pdmm0_clk
110                          &pdmm0_sdi0
111                          &pdmm0_sdi1
112                          &pdmm0_sdi2
113                          &pdmm0_sdi3>;
114             pinctrl-1 = <&pdmm0_clk_sleep
115                          &pdmm0_sdi0_sleep
116                          &pdmm0_sdi1_sleep
117                          &pdmm0_sdi2_sleep
118                          &pdmm0_sdi3_sleep>;
119         };
120     };