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,rpmsg.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP Audio RPMSG CPU DAI Controller
8
9maintainers:
10  - Shengjiu Wang <shengjiu.wang@nxp.com>
11
12description: |
13  fsl_rpmsg is a virtual audio device. Mapping to real hardware devices
14  are SAI, MICFIL, DMA controlled by Cortex M core. What we see from
15  Linux side is a device which provides audio service by rpmsg channel.
16  We can create different sound cards which access different hardwares
17  such as SAI, MICFIL, .etc through building rpmsg channels between
18  Cortex-A and Cortex-M.
19
20properties:
21  compatible:
22    enum:
23      - fsl,imx7ulp-rpmsg-audio
24      - fsl,imx8mn-rpmsg-audio
25      - fsl,imx8mm-rpmsg-audio
26      - fsl,imx8mp-rpmsg-audio
27      - fsl,imx8ulp-rpmsg-audio
28
29  model:
30    $ref: /schemas/types.yaml#/definitions/string
31    description: User specified audio sound card name
32
33  clocks:
34    items:
35      - description: Peripheral clock for register access
36      - description: Master clock
37      - description: DMA clock for DMA register access
38      - description: Parent clock for multiple of 8kHz sample rates
39      - description: Parent clock for multiple of 11kHz sample rates
40
41  clock-names:
42    items:
43      - const: ipg
44      - const: mclk
45      - const: dma
46      - const: pll8k
47      - const: pll11k
48
49  power-domains:
50    description:
51      List of phandle and PM domain specifier as documented in
52      Documentation/devicetree/bindings/power/power_domain.txt
53    maxItems: 1
54
55  memory-region:
56    maxItems: 1
57    description:
58      phandle to a node describing reserved memory (System RAM memory)
59      The M core can't access all the DDR memory space on some platform,
60      So reserved a specific memory for dma buffer which M core can
61      access.
62      (see bindings/reserved-memory/reserved-memory.txt)
63
64  audio-codec:
65    $ref: /schemas/types.yaml#/definitions/phandle
66    description: The phandle to a node of audio codec
67
68  audio-routing:
69    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
70    description: |
71      A list of the connections between audio components. Each entry is a
72      pair of strings, the first being the connection's sink, the second
73      being the connection's source.
74
75  fsl,enable-lpa:
76    $ref: /schemas/types.yaml#/definitions/flag
77    description: enable low power audio path.
78
79  fsl,rpmsg-out:
80    $ref: /schemas/types.yaml#/definitions/flag
81    description: |
82      This is a boolean property. If present, the transmitting function
83      will be enabled.
84
85  fsl,rpmsg-in:
86    $ref: /schemas/types.yaml#/definitions/flag
87    description: |
88      This is a boolean property. If present, the receiving function
89      will be enabled.
90
91  fsl,rpmsg-channel-name:
92    $ref: /schemas/types.yaml#/definitions/string
93    description: |
94      A string property to assign rpmsg channel this sound card sits on.
95      This property can be omitted if there is only one sound card and it sits
96      on "rpmsg-audio-channel".
97    enum:
98      - rpmsg-audio-channel
99      - rpmsg-micfil-channel
100
101required:
102  - compatible
103  - model
104
105additionalProperties: false
106
107examples:
108  - |
109    #include <dt-bindings/clock/imx8mn-clock.h>
110
111    rpmsg_audio: rpmsg_audio {
112        compatible = "fsl,imx8mn-rpmsg-audio";
113        model = "wm8524-audio";
114        fsl,enable-lpa;
115        fsl,rpmsg-out;
116        clocks = <&clk IMX8MN_CLK_SAI3_IPG>,
117                 <&clk IMX8MN_CLK_SAI3_ROOT>,
118                 <&clk IMX8MN_CLK_SDMA3_ROOT>,
119                 <&clk IMX8MN_AUDIO_PLL1_OUT>,
120                 <&clk IMX8MN_AUDIO_PLL2_OUT>;
121        clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
122    };
123
124  - |
125    #include <dt-bindings/clock/imx8mm-clock.h>
126
127    rpmsg_micfil: audio-controller {
128        compatible = "fsl,imx8mm-rpmsg-audio";
129        model = "micfil-audio";
130        fsl,rpmsg-channel-name = "rpmsg-micfil-channel";
131        fsl,enable-lpa;
132        fsl,rpmsg-in;
133        clocks = <&clk IMX8MM_CLK_PDM_IPG>,
134                 <&clk IMX8MM_CLK_PDM_ROOT>,
135                 <&clk IMX8MM_CLK_SDMA3_ROOT>,
136                 <&clk IMX8MM_AUDIO_PLL1_OUT>,
137                 <&clk IMX8MM_AUDIO_PLL2_OUT>;
138        clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
139    };
140
141...
142