Merge tag 'block-6.13-20242901' of git://git.kernel.dk/linux
[drm/drm-misc.git] / Documentation / devicetree / bindings / dsp / fsl,dsp.yaml
blobab93ffd3d2e5b657164f144a8f792679d4ab102b
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: NXP i.MX8 DSP core
9 maintainers:
10   - Daniel Baluta <daniel.baluta@nxp.com>
11   - Shengjiu Wang <shengjiu.wang@nxp.com>
13 description: |
14   Some boards from i.MX8 family contain a DSP core used for
15   advanced pre- and post- audio processing.
17 properties:
18   compatible:
19     enum:
20       - fsl,imx8qxp-dsp
21       - fsl,imx8qm-dsp
22       - fsl,imx8mp-dsp
23       - fsl,imx8ulp-dsp
24       - fsl,imx8qxp-hifi4
25       - fsl,imx8qm-hifi4
26       - fsl,imx8mp-hifi4
27       - fsl,imx8ulp-hifi4
29   reg:
30     maxItems: 1
32   clocks:
33     items:
34       - description: ipg clock
35       - description: ocram clock
36       - description: core clock
37       - description: debug interface clock
38       - description: message unit clock
39     minItems: 3
41   clock-names:
42     items:
43       - const: ipg
44       - const: ocram
45       - const: core
46       - const: debug
47       - const: mu
48     minItems: 3
50   power-domains:
51     description:
52       List of phandle and PM domain specifier as documented in
53       Documentation/devicetree/bindings/power/power_domain.txt
54     minItems: 1
55     maxItems: 4
57   mboxes:
58     description:
59       List of <&phandle type channel> - 2 channels for TXDB, 2 channels for RXDB
60       or - 1 channel for TX, 1 channel for RX, 1 channel for RXDB
61       (see mailbox/fsl,mu.txt)
62     minItems: 3
63     maxItems: 4
65   mbox-names:
66     minItems: 3
67     maxItems: 4
69   memory-region:
70     description:
71       phandle to a node describing reserved memory (System RAM memory)
72       used by DSP (see bindings/reserved-memory/reserved-memory.txt)
73     minItems: 1
74     maxItems: 4
76   firmware-name:
77     description: |
78       Default name of the firmware to load to the remote processor.
80   fsl,dsp-ctrl:
81     $ref: /schemas/types.yaml#/definitions/phandle
82     description:
83       Phandle to syscon block which provide access for processor enablement
85 required:
86   - compatible
87   - reg
88   - clocks
89   - clock-names
90   - power-domains
91   - mboxes
92   - mbox-names
93   - memory-region
95 allOf:
96   - if:
97       properties:
98         compatible:
99           contains:
100             enum:
101               - fsl,imx8qxp-dsp
102               - fsl,imx8qxp-hifi4
103     then:
104       properties:
105         power-domains:
106           minItems: 2
107           maxItems: 2
109   - if:
110       properties:
111         compatible:
112           contains:
113             enum:
114               - fsl,imx8qm-dsp
115               - fsl,imx8qm-hifi4
116     then:
117       properties:
118         power-domains:
119           minItems: 4
121   - if:
122       properties:
123         compatible:
124           contains:
125             enum:
126               - fsl,imx8mp-dsp
127               - fsl,imx8mp-hifi4
128               - fsl,imx8ulp-dsp
129               - fsl,imx8ulp-hifi4
130     then:
131       properties:
132         power-domains:
133           maxItems: 1
135   - if:
136       properties:
137         compatible:
138           contains:
139             enum:
140               - fsl,imx8qxp-hifi4
141               - fsl,imx8qm-hifi4
142               - fsl,imx8mp-hifi4
143               - fsl,imx8ulp-hifi4
144     then:
145       properties:
146         memory-region:
147           minItems: 4
148         mboxes:
149           maxItems: 3
150         mbox-names:
151           items:
152             - const: tx
153             - const: rx
154             - const: rxdb
155     else:
156       properties:
157         memory-region:
158           maxItems: 1
159         mboxes:
160           minItems: 4
161         mbox-names:
162           items:
163             - const: txdb0
164             - const: txdb1
165             - const: rxdb0
166             - const: rxdb1
168 additionalProperties: false
170 examples:
171   - |
172     #include <dt-bindings/firmware/imx/rsrc.h>
173     #include <dt-bindings/clock/imx8-clock.h>
174     dsp@596e8000 {
175         compatible = "fsl,imx8qxp-dsp";
176         reg = <0x596e8000 0x88000>;
177         clocks = <&adma_lpcg IMX_ADMA_LPCG_DSP_IPG_CLK>,
178                  <&adma_lpcg IMX_ADMA_LPCG_OCRAM_IPG_CLK>,
179                  <&adma_lpcg IMX_ADMA_LPCG_DSP_CORE_CLK>;
180         clock-names = "ipg", "ocram", "core";
181         power-domains = <&pd IMX_SC_R_MU_13B>,
182                         <&pd IMX_SC_R_MU_2A>;
183         mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
184         mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>;
185         memory-region = <&dsp_reserved>;
186     };
187   - |
188     #include <dt-bindings/clock/imx8mp-clock.h>
189     dsp_reserved: dsp@92400000 {
190       reg = <0x92400000 0x1000000>;
191       no-map;
192     };
193     dsp_vdev0vring0: vdev0vring0@942f0000 {
194       reg = <0x942f0000 0x8000>;
195       no-map;
196     };
197     dsp_vdev0vring1: vdev0vring1@942f8000 {
198       reg = <0x942f8000 0x8000>;
199       no-map;
200     };
201     dsp_vdev0buffer: vdev0buffer@94300000 {
202       compatible = "shared-dma-pool";
203       reg = <0x94300000 0x100000>;
204       no-map;
205     };
207     dsp: dsp@3b6e8000 {
208       compatible = "fsl,imx8mp-hifi4";
209       reg = <0x3b6e8000 0x88000>;
210       clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSP_ROOT>,
211                <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_OCRAMA_IPG>,
212                <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSP_ROOT>,
213                <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSPDBG_ROOT>;
214       clock-names = "ipg", "ocram", "core", "debug";
215       firmware-name = "imx/dsp/hifi4.bin";
216       power-domains = <&audiomix_pd>;
217       mbox-names = "tx", "rx", "rxdb";
218       mboxes = <&mu2 0 0>,
219                <&mu2 1 0>,
220                <&mu2 3 0>;
221       memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>,
222                       <&dsp_vdev0vring1>, <&dsp_reserved>;
223       fsl,dsp-ctrl = <&audio_blk_ctrl>;
224     };