1a960de4dSShengjiu Wang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2a960de4dSShengjiu Wang%YAML 1.2
3a960de4dSShengjiu Wang---
4a960de4dSShengjiu Wang$id: http://devicetree.org/schemas/sound/fsl,easrc.yaml#
5a960de4dSShengjiu Wang$schema: http://devicetree.org/meta-schemas/core.yaml#
6a960de4dSShengjiu Wang
7a960de4dSShengjiu Wangtitle: NXP Asynchronous Sample Rate Converter (ASRC) Controller
8a960de4dSShengjiu Wang
9a960de4dSShengjiu Wangmaintainers:
10a960de4dSShengjiu Wang  - Shengjiu Wang <shengjiu.wang@nxp.com>
11a960de4dSShengjiu Wang
12a960de4dSShengjiu Wangproperties:
13a960de4dSShengjiu Wang  $nodename:
14a960de4dSShengjiu Wang    pattern: "^easrc@.*"
15a960de4dSShengjiu Wang
16a960de4dSShengjiu Wang  compatible:
17*b5f3cec3SAdam Ford    oneOf:
18*b5f3cec3SAdam Ford      - enum:
19*b5f3cec3SAdam Ford          - fsl,imx8mn-easrc
20*b5f3cec3SAdam Ford      - items:
21*b5f3cec3SAdam Ford          - enum:
22*b5f3cec3SAdam Ford              - fsl,imx8mp-easrc
23*b5f3cec3SAdam Ford          - const: fsl,imx8mn-easrc
24a960de4dSShengjiu Wang
25a960de4dSShengjiu Wang  reg:
26a960de4dSShengjiu Wang    maxItems: 1
27a960de4dSShengjiu Wang
28a960de4dSShengjiu Wang  interrupts:
29a960de4dSShengjiu Wang    maxItems: 1
30a960de4dSShengjiu Wang
31a960de4dSShengjiu Wang  clocks:
32a960de4dSShengjiu Wang    items:
33a960de4dSShengjiu Wang      - description: Peripheral clock
34a960de4dSShengjiu Wang
35a960de4dSShengjiu Wang  clock-names:
36a960de4dSShengjiu Wang    items:
37a960de4dSShengjiu Wang      - const: mem
38a960de4dSShengjiu Wang
39a960de4dSShengjiu Wang  dmas:
40a960de4dSShengjiu Wang    maxItems: 8
41a960de4dSShengjiu Wang
42a960de4dSShengjiu Wang  dma-names:
43a960de4dSShengjiu Wang    items:
44a960de4dSShengjiu Wang      - const: ctx0_rx
45a960de4dSShengjiu Wang      - const: ctx0_tx
46a960de4dSShengjiu Wang      - const: ctx1_rx
47a960de4dSShengjiu Wang      - const: ctx1_tx
48a960de4dSShengjiu Wang      - const: ctx2_rx
49a960de4dSShengjiu Wang      - const: ctx2_tx
50a960de4dSShengjiu Wang      - const: ctx3_rx
51a960de4dSShengjiu Wang      - const: ctx3_tx
52a960de4dSShengjiu Wang
53a960de4dSShengjiu Wang  firmware-name:
54086e9074SRob Herring    $ref: /schemas/types.yaml#/definitions/string
55086e9074SRob Herring    const: imx/easrc/easrc-imx8mn.bin
56a960de4dSShengjiu Wang    description: The coefficient table for the filters
57a960de4dSShengjiu Wang
58a960de4dSShengjiu Wang  fsl,asrc-rate:
59086e9074SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
60086e9074SRob Herring    minimum: 8000
61086e9074SRob Herring    maximum: 192000
62a960de4dSShengjiu Wang    description: Defines a mutual sample rate used by DPCM Back Ends
63a960de4dSShengjiu Wang
64a960de4dSShengjiu Wang  fsl,asrc-format:
65086e9074SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
66086e9074SRob Herring    enum: [2, 6, 10, 32, 36]
67a960de4dSShengjiu Wang    default: 2
68a960de4dSShengjiu Wang    description:
69a960de4dSShengjiu Wang      Defines a mutual sample format used by DPCM Back Ends
70a960de4dSShengjiu Wang
71a960de4dSShengjiu Wangrequired:
72a960de4dSShengjiu Wang  - compatible
73a960de4dSShengjiu Wang  - reg
74a960de4dSShengjiu Wang  - interrupts
75a960de4dSShengjiu Wang  - clocks
76a960de4dSShengjiu Wang  - clock-names
77a960de4dSShengjiu Wang  - dmas
78a960de4dSShengjiu Wang  - dma-names
79a960de4dSShengjiu Wang  - firmware-name
80a960de4dSShengjiu Wang  - fsl,asrc-rate
81a960de4dSShengjiu Wang  - fsl,asrc-format
82a960de4dSShengjiu Wang
835be478f9SRob HerringadditionalProperties: false
845be478f9SRob Herring
85a960de4dSShengjiu Wangexamples:
86a960de4dSShengjiu Wang  - |
87a960de4dSShengjiu Wang    #include <dt-bindings/clock/imx8mn-clock.h>
88a960de4dSShengjiu Wang
89a960de4dSShengjiu Wang    easrc: easrc@300c0000 {
90a960de4dSShengjiu Wang           compatible = "fsl,imx8mn-easrc";
910db958b6SRob Herring           reg = <0x300c0000 0x10000>;
92a960de4dSShengjiu Wang           interrupts = <0x0 122 0x4>;
93a960de4dSShengjiu Wang           clocks = <&clk IMX8MN_CLK_ASRC_ROOT>;
94a960de4dSShengjiu Wang           clock-names = "mem";
95a960de4dSShengjiu Wang           dmas = <&sdma2 16 23 0> , <&sdma2 17 23 0>,
96a960de4dSShengjiu Wang                  <&sdma2 18 23 0> , <&sdma2 19 23 0>,
97a960de4dSShengjiu Wang                  <&sdma2 20 23 0> , <&sdma2 21 23 0>,
98a960de4dSShengjiu Wang                  <&sdma2 22 23 0> , <&sdma2 23 23 0>;
99a960de4dSShengjiu Wang           dma-names = "ctx0_rx", "ctx0_tx",
100a960de4dSShengjiu Wang                       "ctx1_rx", "ctx1_tx",
101a960de4dSShengjiu Wang                       "ctx2_rx", "ctx2_tx",
102a960de4dSShengjiu Wang                       "ctx3_rx", "ctx3_tx";
103a960de4dSShengjiu Wang           firmware-name = "imx/easrc/easrc-imx8mn.bin";
104a960de4dSShengjiu Wang           fsl,asrc-rate  = <8000>;
105a960de4dSShengjiu Wang           fsl,asrc-format = <2>;
106a960de4dSShengjiu Wang    };
107