xref: /freebsd/sys/contrib/device-tree/Bindings/sound/fsl,asrc.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotFreescale Asynchronous Sample Rate Converter (ASRC) Controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThe Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a
4*c66ec88fSEmmanuel Vadotsignal associated with an input clock into a signal associated with a different
5*c66ec88fSEmmanuel Vadotoutput clock. The driver currently works as a Front End of DPCM with other Back
6*c66ec88fSEmmanuel VadotEnds Audio controller such as ESAI, SSI and SAI. It has three pairs to support
7*c66ec88fSEmmanuel Vadotthree substreams within totally 10 channels.
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel VadotRequired properties:
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel Vadot  - compatible		: Compatible list, should contain one of the following
12*c66ec88fSEmmanuel Vadot			  compatibles:
13*c66ec88fSEmmanuel Vadot			  "fsl,imx35-asrc",
14*c66ec88fSEmmanuel Vadot			  "fsl,imx53-asrc",
15*c66ec88fSEmmanuel Vadot			  "fsl,imx8qm-asrc",
16*c66ec88fSEmmanuel Vadot			  "fsl,imx8qxp-asrc",
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel Vadot  - reg			: Offset and length of the register set for the device.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadot  - interrupts		: Contains the spdif interrupt.
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadot  - dmas		: Generic dma devicetree binding as described in
23*c66ec88fSEmmanuel Vadot			  Documentation/devicetree/bindings/dma/dma.txt.
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel Vadot  - dma-names		: Contains "rxa", "rxb", "rxc", "txa", "txb" and "txc".
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot  - clocks		: Contains an entry for each entry in clock-names.
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel Vadot  - clock-names		: Contains the following entries
30*c66ec88fSEmmanuel Vadot	"mem"		  Peripheral access clock to access registers.
31*c66ec88fSEmmanuel Vadot	"ipg"		  Peripheral clock to driver module.
32*c66ec88fSEmmanuel Vadot	"asrck_<0-f>"	  Clock sources for input and output clock.
33*c66ec88fSEmmanuel Vadot	"spba"		  The spba clock is required when ASRC is placed as a
34*c66ec88fSEmmanuel Vadot			  bus slave of the Shared Peripheral Bus and when two
35*c66ec88fSEmmanuel Vadot			  or more bus masters (CPU, DMA or DSP) try to access
36*c66ec88fSEmmanuel Vadot			  it. This property is optional depending on the SoC
37*c66ec88fSEmmanuel Vadot			  design.
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot   - fsl,asrc-rate	: Defines a mutual sample rate used by DPCM Back Ends.
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel Vadot   - fsl,asrc-width	: Defines a mutual sample width used by DPCM Back Ends.
42*c66ec88fSEmmanuel Vadot
43*c66ec88fSEmmanuel Vadot   - fsl,asrc-clk-map   : Defines clock map used in driver. which is required
44*c66ec88fSEmmanuel Vadot			  by imx8qm/imx8qxp platform
45*c66ec88fSEmmanuel Vadot			  <0> - select the map for asrc0 in imx8qm/imx8qxp
46*c66ec88fSEmmanuel Vadot			  <1> - select the map for asrc1 in imx8qm/imx8qxp
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel VadotOptional properties:
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel Vadot   - big-endian		: If this property is absent, the little endian mode
51*c66ec88fSEmmanuel Vadot			  will be in use as default. Otherwise, the big endian
52*c66ec88fSEmmanuel Vadot			  mode will be in use for all the device registers.
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadot   - fsl,asrc-format	: Defines a mutual sample format used by DPCM Back
55*c66ec88fSEmmanuel Vadot			  Ends, which can replace the fsl,asrc-width.
56*c66ec88fSEmmanuel Vadot			  The value is 2 (S16_LE), or 6 (S24_LE).
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel VadotExample:
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadotasrc: asrc@2034000 {
61*c66ec88fSEmmanuel Vadot	compatible = "fsl,imx53-asrc";
62*c66ec88fSEmmanuel Vadot	reg = <0x02034000 0x4000>;
63*c66ec88fSEmmanuel Vadot	interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
64*c66ec88fSEmmanuel Vadot	clocks = <&clks 107>, <&clks 107>, <&clks 0>,
65*c66ec88fSEmmanuel Vadot	       <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
66*c66ec88fSEmmanuel Vadot	       <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
67*c66ec88fSEmmanuel Vadot	       <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
68*c66ec88fSEmmanuel Vadot	       <&clks 107>, <&clks 0>, <&clks 0>;
69*c66ec88fSEmmanuel Vadot	clock-names = "mem", "ipg", "asrck0",
70*c66ec88fSEmmanuel Vadot		"asrck_1", "asrck_2", "asrck_3", "asrck_4",
71*c66ec88fSEmmanuel Vadot		"asrck_5", "asrck_6", "asrck_7", "asrck_8",
72*c66ec88fSEmmanuel Vadot		"asrck_9", "asrck_a", "asrck_b", "asrck_c",
73*c66ec88fSEmmanuel Vadot		"asrck_d", "asrck_e", "asrck_f";
74*c66ec88fSEmmanuel Vadot	dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
75*c66ec88fSEmmanuel Vadot	     <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
76*c66ec88fSEmmanuel Vadot	dma-names = "rxa", "rxb", "rxc",
77*c66ec88fSEmmanuel Vadot		"txa", "txb", "txc";
78*c66ec88fSEmmanuel Vadot	fsl,asrc-rate  = <48000>;
79*c66ec88fSEmmanuel Vadot	fsl,asrc-width = <16>;
80*c66ec88fSEmmanuel Vadot};
81