xref: /linux/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
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
20allOf:
21  - $ref: sound-card-common.yaml#
22
23properties:
24  compatible:
25    oneOf:
26      - enum:
27          - fsl,imx7ulp-rpmsg-audio
28          - fsl,imx8mn-rpmsg-audio
29          - fsl,imx8mm-rpmsg-audio
30          - fsl,imx8mp-rpmsg-audio
31          - fsl,imx8ulp-rpmsg-audio
32          - fsl,imx93-rpmsg-audio
33          - fsl,imx95-rpmsg-audio
34      - items:
35          - enum:
36              - fsl,imx94-rpmsg-audio
37              - fsl,imx952-rpmsg-audio
38          - const: fsl,imx95-rpmsg-audio
39
40  clocks:
41    items:
42      - description: Peripheral clock for register access
43      - description: Master clock
44      - description: DMA clock for DMA register access
45      - description: Parent clock for multiple of 8kHz sample rates
46      - description: Parent clock for multiple of 11kHz sample rates
47
48  clock-names:
49    items:
50      - const: ipg
51      - const: mclk
52      - const: dma
53      - const: pll8k
54      - const: pll11k
55
56  power-domains:
57    description:
58      List of phandle and PM domain specifier as documented in
59      Documentation/devicetree/bindings/power/power_domain.txt
60    maxItems: 1
61
62  memory-region:
63    maxItems: 1
64    description:
65      phandle to a node describing reserved memory (System RAM memory)
66      The M core can't access all the DDR memory space on some platform,
67      So reserved a specific memory for dma buffer which M core can
68      access.
69      (see bindings/reserved-memory/reserved-memory.txt)
70
71  audio-codec:
72    $ref: /schemas/types.yaml#/definitions/phandle
73    description: The phandle to a node of audio codec
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
101  hp-det-gpios:
102    maxItems: 1
103    description: The GPIO that detect headphones are plugged in
104
105required:
106  - compatible
107
108unevaluatedProperties: false
109
110examples:
111  - |
112    #include <dt-bindings/clock/imx8mn-clock.h>
113
114    rpmsg_audio: rpmsg_audio {
115        compatible = "fsl,imx8mn-rpmsg-audio";
116        model = "wm8524-audio";
117        fsl,enable-lpa;
118        fsl,rpmsg-out;
119        clocks = <&clk IMX8MN_CLK_SAI3_IPG>,
120                 <&clk IMX8MN_CLK_SAI3_ROOT>,
121                 <&clk IMX8MN_CLK_SDMA3_ROOT>,
122                 <&clk IMX8MN_AUDIO_PLL1_OUT>,
123                 <&clk IMX8MN_AUDIO_PLL2_OUT>;
124        clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
125    };
126
127  - |
128    #include <dt-bindings/clock/imx8mm-clock.h>
129
130    rpmsg_micfil: audio-controller {
131        compatible = "fsl,imx8mm-rpmsg-audio";
132        model = "micfil-audio";
133        fsl,rpmsg-channel-name = "rpmsg-micfil-channel";
134        fsl,enable-lpa;
135        fsl,rpmsg-in;
136        clocks = <&clk IMX8MM_CLK_PDM_IPG>,
137                 <&clk IMX8MM_CLK_PDM_ROOT>,
138                 <&clk IMX8MM_CLK_SDMA3_ROOT>,
139                 <&clk IMX8MM_AUDIO_PLL1_OUT>,
140                 <&clk IMX8MM_AUDIO_PLL2_OUT>;
141        clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
142    };
143
144...
145