18c2ecf20Sopenharmony_ciFreescale Asynchronous Sample Rate Converter (ASRC) Controller 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a 48c2ecf20Sopenharmony_cisignal associated with an input clock into a signal associated with a different 58c2ecf20Sopenharmony_cioutput clock. The driver currently works as a Front End of DPCM with other Back 68c2ecf20Sopenharmony_ciEnds Audio controller such as ESAI, SSI and SAI. It has three pairs to support 78c2ecf20Sopenharmony_cithree substreams within totally 10 channels. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciRequired properties: 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci - compatible : Compatible list, should contain one of the following 128c2ecf20Sopenharmony_ci compatibles: 138c2ecf20Sopenharmony_ci "fsl,imx35-asrc", 148c2ecf20Sopenharmony_ci "fsl,imx53-asrc", 158c2ecf20Sopenharmony_ci "fsl,imx8qm-asrc", 168c2ecf20Sopenharmony_ci "fsl,imx8qxp-asrc", 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci - reg : Offset and length of the register set for the device. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci - interrupts : Contains the spdif interrupt. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci - dmas : Generic dma devicetree binding as described in 238c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/dma/dma.txt. 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci - dma-names : Contains "rxa", "rxb", "rxc", "txa", "txb" and "txc". 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci - clocks : Contains an entry for each entry in clock-names. 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci - clock-names : Contains the following entries 308c2ecf20Sopenharmony_ci "mem" Peripheral access clock to access registers. 318c2ecf20Sopenharmony_ci "ipg" Peripheral clock to driver module. 328c2ecf20Sopenharmony_ci "asrck_<0-f>" Clock sources for input and output clock. 338c2ecf20Sopenharmony_ci "spba" The spba clock is required when ASRC is placed as a 348c2ecf20Sopenharmony_ci bus slave of the Shared Peripheral Bus and when two 358c2ecf20Sopenharmony_ci or more bus masters (CPU, DMA or DSP) try to access 368c2ecf20Sopenharmony_ci it. This property is optional depending on the SoC 378c2ecf20Sopenharmony_ci design. 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci - fsl,asrc-rate : Defines a mutual sample rate used by DPCM Back Ends. 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci - fsl,asrc-width : Defines a mutual sample width used by DPCM Back Ends. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci - fsl,asrc-clk-map : Defines clock map used in driver. which is required 448c2ecf20Sopenharmony_ci by imx8qm/imx8qxp platform 458c2ecf20Sopenharmony_ci <0> - select the map for asrc0 in imx8qm/imx8qxp 468c2ecf20Sopenharmony_ci <1> - select the map for asrc1 in imx8qm/imx8qxp 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciOptional properties: 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci - big-endian : If this property is absent, the little endian mode 518c2ecf20Sopenharmony_ci will be in use as default. Otherwise, the big endian 528c2ecf20Sopenharmony_ci mode will be in use for all the device registers. 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci - fsl,asrc-format : Defines a mutual sample format used by DPCM Back 558c2ecf20Sopenharmony_ci Ends, which can replace the fsl,asrc-width. 568c2ecf20Sopenharmony_ci The value is 2 (S16_LE), or 6 (S24_LE). 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciExample: 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciasrc: asrc@2034000 { 618c2ecf20Sopenharmony_ci compatible = "fsl,imx53-asrc"; 628c2ecf20Sopenharmony_ci reg = <0x02034000 0x4000>; 638c2ecf20Sopenharmony_ci interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>; 648c2ecf20Sopenharmony_ci clocks = <&clks 107>, <&clks 107>, <&clks 0>, 658c2ecf20Sopenharmony_ci <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, 668c2ecf20Sopenharmony_ci <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, 678c2ecf20Sopenharmony_ci <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, 688c2ecf20Sopenharmony_ci <&clks 107>, <&clks 0>, <&clks 0>; 698c2ecf20Sopenharmony_ci clock-names = "mem", "ipg", "asrck0", 708c2ecf20Sopenharmony_ci "asrck_1", "asrck_2", "asrck_3", "asrck_4", 718c2ecf20Sopenharmony_ci "asrck_5", "asrck_6", "asrck_7", "asrck_8", 728c2ecf20Sopenharmony_ci "asrck_9", "asrck_a", "asrck_b", "asrck_c", 738c2ecf20Sopenharmony_ci "asrck_d", "asrck_e", "asrck_f"; 748c2ecf20Sopenharmony_ci dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>, 758c2ecf20Sopenharmony_ci <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>; 768c2ecf20Sopenharmony_ci dma-names = "rxa", "rxb", "rxc", 778c2ecf20Sopenharmony_ci "txa", "txb", "txc"; 788c2ecf20Sopenharmony_ci fsl,asrc-rate = <48000>; 798c2ecf20Sopenharmony_ci fsl,asrc-width = <16>; 808c2ecf20Sopenharmony_ci}; 81