18c2ecf20Sopenharmony_ciFreescale Enhanced Serial Audio Interface (ESAI) Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe Enhanced Serial Audio Interface (ESAI) provides a full-duplex serial port
48c2ecf20Sopenharmony_cifor serial communication with a variety of serial devices, including industry
58c2ecf20Sopenharmony_cistandard codecs, Sony/Phillips Digital Interface (S/PDIF) transceivers, and
68c2ecf20Sopenharmony_ciother DSPs. It has up to six transmitters and four receivers.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciRequired properties:
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci  - compatible		: Compatible list, should contain one of the following
118c2ecf20Sopenharmony_ci			  compatibles:
128c2ecf20Sopenharmony_ci			  "fsl,imx35-esai",
138c2ecf20Sopenharmony_ci			  "fsl,vf610-esai",
148c2ecf20Sopenharmony_ci			  "fsl,imx6ull-esai",
158c2ecf20Sopenharmony_ci			  "fsl,imx8qm-esai",
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci  - reg			: Offset and length of the register set for the device.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci  - interrupts		: Contains the spdif interrupt.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci  - dmas		: Generic dma devicetree binding as described in
228c2ecf20Sopenharmony_ci			  Documentation/devicetree/bindings/dma/dma.txt.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci  - dma-names		: Two dmas have to be defined, "tx" and "rx".
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci  - clocks		: Contains an entry for each entry in clock-names.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci  - clock-names		: Includes the following entries:
298c2ecf20Sopenharmony_ci	"core"		  The core clock used to access registers
308c2ecf20Sopenharmony_ci	"extal"		  The esai baud clock for esai controller used to
318c2ecf20Sopenharmony_ci			  derive HCK, SCK and FS.
328c2ecf20Sopenharmony_ci	"fsys"		  The system clock derived from ahb clock used to
338c2ecf20Sopenharmony_ci			  derive HCK, SCK and FS.
348c2ecf20Sopenharmony_ci	"spba"		  The spba clock is required when ESAI is placed as a
358c2ecf20Sopenharmony_ci			  bus slave of the Shared Peripheral Bus and when two
368c2ecf20Sopenharmony_ci			  or more bus masters (CPU, DMA or DSP) try to access
378c2ecf20Sopenharmony_ci			  it. This property is optional depending on the SoC
388c2ecf20Sopenharmony_ci			  design.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci  - fsl,fifo-depth	: The number of elements in the transmit and receive
418c2ecf20Sopenharmony_ci			  FIFOs. This number is the maximum allowed value for
428c2ecf20Sopenharmony_ci			  TFCR[TFWM] or RFCR[RFWM].
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci  - fsl,esai-synchronous: This is a boolean property. If present, indicating
458c2ecf20Sopenharmony_ci			  that ESAI would work in the synchronous mode, which
468c2ecf20Sopenharmony_ci			  means all the settings for Receiving would be
478c2ecf20Sopenharmony_ci			  duplicated from Transmition related registers.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciOptional properties:
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci  - big-endian		: If this property is absent, the native endian mode
528c2ecf20Sopenharmony_ci			  will be in use as default, or the big endian mode
538c2ecf20Sopenharmony_ci			  will be in use for all the device registers.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciExample:
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciesai: esai@2024000 {
588c2ecf20Sopenharmony_ci	compatible = "fsl,imx35-esai";
598c2ecf20Sopenharmony_ci	reg = <0x02024000 0x4000>;
608c2ecf20Sopenharmony_ci	interrupts = <0 51 0x04>;
618c2ecf20Sopenharmony_ci	clocks = <&clks 208>, <&clks 118>, <&clks 208>;
628c2ecf20Sopenharmony_ci	clock-names = "core", "extal", "fsys";
638c2ecf20Sopenharmony_ci	dmas = <&sdma 23 21 0>, <&sdma 24 21 0>;
648c2ecf20Sopenharmony_ci	dma-names = "rx", "tx";
658c2ecf20Sopenharmony_ci	fsl,fifo-depth = <128>;
668c2ecf20Sopenharmony_ci	fsl,esai-synchronous;
678c2ecf20Sopenharmony_ci	big-endian;
688c2ecf20Sopenharmony_ci};
69