18c2ecf20Sopenharmony_ciFreescale Synchronous Audio Interface (SAI). 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe SAI is based on I2S module that used communicating with audio codecs, 48c2ecf20Sopenharmony_ciwhich provides a synchronous audio interface that supports fullduplex 58c2ecf20Sopenharmony_ciserial interfaces with frame synchronization such as I2S, AC97, TDM, and 68c2ecf20Sopenharmony_cicodec/DSP interfaces. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciRequired properties: 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci - compatible : Compatible list, contains "fsl,vf610-sai", 118c2ecf20Sopenharmony_ci "fsl,imx6sx-sai", "fsl,imx6ul-sai", 128c2ecf20Sopenharmony_ci "fsl,imx7ulp-sai", "fsl,imx8mq-sai" or 138c2ecf20Sopenharmony_ci "fsl,imx8qm-sai". 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci - reg : Offset and length of the register set for the device. 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci - clocks : Must contain an entry for each entry in clock-names. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci - clock-names : Must include the "bus" for register access and 208c2ecf20Sopenharmony_ci "mclk1", "mclk2", "mclk3" for bit clock and frame 218c2ecf20Sopenharmony_ci clock providing. 228c2ecf20Sopenharmony_ci - dmas : Generic dma devicetree binding as described in 238c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/dma/dma.txt. 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci - dma-names : Two dmas have to be defined, "tx" and "rx". 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci - pinctrl-names : Must contain a "default" entry. 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci - pinctrl-NNN : One property must exist for each entry in 308c2ecf20Sopenharmony_ci pinctrl-names. See ../pinctrl/pinctrl-bindings.txt 318c2ecf20Sopenharmony_ci for details of the property values. 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci - lsb-first : Configures whether the LSB or the MSB is transmitted 348c2ecf20Sopenharmony_ci first for the fifo data. If this property is absent, 358c2ecf20Sopenharmony_ci the MSB is transmitted first as default, or the LSB 368c2ecf20Sopenharmony_ci is transmitted first. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci - fsl,sai-synchronous-rx: This is a boolean property. If present, indicating 398c2ecf20Sopenharmony_ci that SAI will work in the synchronous mode (sync Tx 408c2ecf20Sopenharmony_ci with Rx) which means both the transmitter and the 418c2ecf20Sopenharmony_ci receiver will send and receive data by following 428c2ecf20Sopenharmony_ci receiver's bit clocks and frame sync clocks. 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci - fsl,sai-asynchronous: This is a boolean property. If present, indicating 458c2ecf20Sopenharmony_ci that SAI will work in the asynchronous mode, which 468c2ecf20Sopenharmony_ci means both transmitter and receiver will send and 478c2ecf20Sopenharmony_ci receive data by following their own bit clocks and 488c2ecf20Sopenharmony_ci frame sync clocks separately. 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ciOptional properties: 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci - big-endian : Boolean property, required if all the SAI 538c2ecf20Sopenharmony_ci registers are big-endian rather than little-endian. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciOptional properties (for mx6ul): 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci - fsl,sai-mclk-direction-output: This is a boolean property. If present, 588c2ecf20Sopenharmony_ci indicates that SAI will output the SAI MCLK clock. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciNote: 618c2ecf20Sopenharmony_ci- If both fsl,sai-asynchronous and fsl,sai-synchronous-rx are absent, the 628c2ecf20Sopenharmony_ci default synchronous mode (sync Rx with Tx) will be used, which means both 638c2ecf20Sopenharmony_ci transmitter and receiver will send and receive data by following clocks 648c2ecf20Sopenharmony_ci of transmitter. 658c2ecf20Sopenharmony_ci- fsl,sai-asynchronous and fsl,sai-synchronous-rx are exclusive. 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ciExample: 688c2ecf20Sopenharmony_cisai2: sai@40031000 { 698c2ecf20Sopenharmony_ci compatible = "fsl,vf610-sai"; 708c2ecf20Sopenharmony_ci reg = <0x40031000 0x1000>; 718c2ecf20Sopenharmony_ci pinctrl-names = "default"; 728c2ecf20Sopenharmony_ci pinctrl-0 = <&pinctrl_sai2_1>; 738c2ecf20Sopenharmony_ci clocks = <&clks VF610_CLK_PLATFORM_BUS>, 748c2ecf20Sopenharmony_ci <&clks VF610_CLK_SAI2>, 758c2ecf20Sopenharmony_ci <&clks 0>, <&clks 0>; 768c2ecf20Sopenharmony_ci clock-names = "bus", "mclk1", "mclk2", "mclk3"; 778c2ecf20Sopenharmony_ci dma-names = "tx", "rx"; 788c2ecf20Sopenharmony_ci dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>, 798c2ecf20Sopenharmony_ci <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>; 808c2ecf20Sopenharmony_ci big-endian; 818c2ecf20Sopenharmony_ci lsb-first; 828c2ecf20Sopenharmony_ci}; 83