Debian Codegraph @

Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/fsl,imx-asrc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Freescale Asynchronous Sample Rate Converter (ASRC) Controller
8
9 description:
10 The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of
11 a signal associated with an input clock into a signal associated with a
12 different output clock. The driver currently works as a Front End of DPCM
13 with other Back Ends Audio controller such as ESAI, SSI and SAI. It has
14 three pairs to support three substreams within totally 10 channels.
15
16 maintainers:
17 - Shawn Guo <[email protected]>
18 - Sascha Hauer <[email protected]>
19
20 properties:
21 compatible:
22 oneOf:
23 - enum:
24 - fsl,imx35-asrc
25 - fsl,imx53-asrc
26 - fsl,imx8qm-asrc
27 - fsl,imx8qxp-asrc
28 - fsl,imx952-asrc
29 - items:
30 - enum:
31 - fsl,imx6sx-asrc
32 - fsl,imx6ul-asrc
33 - const: fsl,imx53-asrc
34
35 reg:
36 maxItems: 1
37
38 interrupts:
39 maxItems: 1
40
41 dmas:
42 maxItems: 6
43
44 dma-names:
45 items:
46 - const: rxa
47 - const: rxb
48 - const: rxc
49 - const: txa
50 - const: txb
51 - const: txc
52
53 clocks:
54 maxItems: 19
55
56 clock-names:
57 items:
58 - const: mem
59 - const: ipg
60 - const: asrck_0
61 - const: asrck_1
62 - const: asrck_2
63 - const: asrck_3
64 - const: asrck_4
65 - const: asrck_5
66 - const: asrck_6
67 - const: asrck_7
68 - const: asrck_8
69 - const: asrck_9
70 - const: asrck_a
71 - const: asrck_b
72 - const: asrck_c
73 - const: asrck_d
74 - const: asrck_e
75 - const: asrck_f
76 - const: spba
77
78 power-domains:
79 maxItems: 1
80
81 port:
82 $ref: audio-graph-port.yaml#
83 unevaluatedProperties: false
84
85 fsl,asrc-rate:
86 $ref: /schemas/types.yaml#/definitions/uint32
87 description: The mutual sample rate used by DPCM Back Ends
88
89 fsl,asrc-width:
90 $ref: /schemas/types.yaml#/definitions/uint32
91 description: The mutual sample width used by DPCM Back Ends
92 enum: [16, 24]
93
94 fsl,asrc-clk-map:
95 $ref: /schemas/types.yaml#/definitions/uint32
96 description:
97 Defines clock map used in driver
98 <0> - select the map for asrc0 in imx8qm/imx8qxp
99 <1> - select the map for asrc1 in imx8qm/imx8qxp
100 enum: [0, 1]
101
102 big-endian:
103 type: boolean
104 description:
105 If this property is absent, the little endian mode will be in use as
106 default. Otherwise, the big endian mode will be in use for all the
107 device registers.
108
109 fsl,asrc-format:
110 $ref: /schemas/types.yaml#/definitions/uint32
111 description:
112 Defines a mutual sample format used by DPCM Back Ends, which can
113 replace the fsl,asrc-width. The value is 2 (S16_LE), or 6 (S24_LE).
114 enum: [2, 6]
115
116 required:
117 - compatible
118 - reg
119 - interrupts
120 - dmas
121 - dma-names
122 - clocks
123 - clock-names
124 - fsl,asrc-rate
125 - fsl,asrc-width
126
127 allOf:
128 - $ref: dai-common.yaml#
129 - if:
130 properties:
131 compatible:
132 contains:
133 enum:
134 - fsl,imx8qm-asrc
135 - fsl,imx8qxp-asrc
136 then:
137 required:
138 - fsl,asrc-clk-map
139 else:
140 properties:
141 fsl,asrc-clk-map: false
142
143 - if:
144 properties:
145 compatible:
146 contains:
147 enum:
148 - fsl,imx8qm-asrc
149 - fsl,imx8qxp-asrc
150 then:
151 required:
152 - power-domains
153
154 unevaluatedProperties: false
155
156 examples:
157 - |
158 #include <dt-bindings/interrupt-controller/irq.h>
159 #include <dt-bindings/clock/imx6qdl-clock.h>
160 asrc: asrc@2034000 {
161 compatible = "fsl,imx53-asrc";
162 reg = <0x02034000 0x4000>;
163 interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
164 clocks = <&clks IMX6QDL_CLK_ASRC_IPG>,
165 <&clks IMX6QDL_CLK_ASRC_MEM>, <&clks 0>,
166 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
167 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
168 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
169 <&clks IMX6QDL_CLK_ASRC>, <&clks 0>, <&clks 0>,
170 <&clks IMX6QDL_CLK_SPBA>;
171 clock-names = "mem", "ipg", "asrck_0",
172 "asrck_1", "asrck_2", "asrck_3", "asrck_4",
173 "asrck_5", "asrck_6", "asrck_7", "asrck_8",
174 "asrck_9", "asrck_a", "asrck_b", "asrck_c",
175 "asrck_d", "asrck_e", "asrck_f", "spba";
176 dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
177 <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
178 dma-names = "rxa", "rxb", "rxc",
179 "txa", "txb", "txc";
180 fsl,asrc-rate = <48000>;
181 fsl,asrc-width = <16>;
182
183 port {
184 playback-only;
185
186 asrc_endpoint: endpoint {
187 remote-endpoint = <&fe00_ep>;
188 };
189 };
190 };