18c2ecf20Sopenharmony_ciTexas Instruments McASP controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible :
58c2ecf20Sopenharmony_ci	"ti,dm646x-mcasp-audio"	: for DM646x platforms
68c2ecf20Sopenharmony_ci	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
78c2ecf20Sopenharmony_ci	"ti,am33xx-mcasp-audio"	: for AM33xx platforms (AM33xx, AM43xx, TI81xx)
88c2ecf20Sopenharmony_ci	"ti,dra7-mcasp-audio"	: for DRA7xx platforms
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci- reg : Should contain reg specifiers for the entries in the reg-names property.
118c2ecf20Sopenharmony_ci- reg-names : Should contain:
128c2ecf20Sopenharmony_ci         * "mpu" for the main registers (required). For compatibility with
138c2ecf20Sopenharmony_ci           existing software, it is recommended this is the first entry.
148c2ecf20Sopenharmony_ci         * "dat" for separate data port register access (optional).
158c2ecf20Sopenharmony_ci- op-mode : I2S/DIT ops mode. 0 for I2S mode. 1 for DIT mode used for S/PDIF,
168c2ecf20Sopenharmony_ci  	    IEC60958-1, and AES-3 formats.
178c2ecf20Sopenharmony_ci- tdm-slots : Slots for TDM operation. Indicates number of channels transmitted
188c2ecf20Sopenharmony_ci  	      or received over one serializer.
198c2ecf20Sopenharmony_ci- serial-dir : A list of serializer configuration. Each entry is a number
208c2ecf20Sopenharmony_ci               indication for serializer pin direction.
218c2ecf20Sopenharmony_ci               (0 - INACTIVE, 1 - TX, 2 - RX)
228c2ecf20Sopenharmony_ci- dmas: two element list of DMA controller phandles and DMA request line
238c2ecf20Sopenharmony_ci        ordered pairs.
248c2ecf20Sopenharmony_ci- dma-names: identifier string for each DMA request line in the dmas property.
258c2ecf20Sopenharmony_ci	     These strings correspond 1:1 with the ordered pairs in dmas. The dma
268c2ecf20Sopenharmony_ci	     identifiers must be "rx" and "tx".
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciOptional properties:
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci- ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
318c2ecf20Sopenharmony_ci- tx-num-evt : FIFO levels.
328c2ecf20Sopenharmony_ci- rx-num-evt : FIFO levels.
338c2ecf20Sopenharmony_ci- dismod : Specify the drive on TX pin during inactive slots
348c2ecf20Sopenharmony_ci	0 : 3-state
358c2ecf20Sopenharmony_ci	2 : logic low
368c2ecf20Sopenharmony_ci	3 : logic high
378c2ecf20Sopenharmony_ci	Defaults to 'logic low' when the property is not present
388c2ecf20Sopenharmony_ci- sram-size-playback : size of sram to be allocated during playback
398c2ecf20Sopenharmony_ci- sram-size-capture  : size of sram to be allocated during capture
408c2ecf20Sopenharmony_ci- interrupts : Interrupt numbers for McASP
418c2ecf20Sopenharmony_ci- interrupt-names : Known interrupt names are "tx" and "rx"
428c2ecf20Sopenharmony_ci- pinctrl-0: Should specify pin control group used for this controller.
438c2ecf20Sopenharmony_ci- pinctrl-names: Should contain only one value - "default", for more details
448c2ecf20Sopenharmony_ci  		 please refer to pinctrl-bindings.txt
458c2ecf20Sopenharmony_ci- fck_parent : Should contain a valid clock name which will be used as parent
468c2ecf20Sopenharmony_ci	       for the McASP fck
478c2ecf20Sopenharmony_ci- auxclk-fs-ratio: When McASP is bus master indicates the ratio between AUCLK
488c2ecf20Sopenharmony_ci		   and FS rate if applicable:
498c2ecf20Sopenharmony_ci		   AUCLK rate = auxclk-fs-ratio * FS rate
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciOptional GPIO support:
528c2ecf20Sopenharmony_ciIf any McASP pin need to be used as GPIO then the McASP node must have:
538c2ecf20Sopenharmony_ci...
548c2ecf20Sopenharmony_ci  gpio-controller
558c2ecf20Sopenharmony_ci  #gpio-cells = <2>;
568c2ecf20Sopenharmony_ci...
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ciWhen requesting a GPIO, the first parameter is the PIN index in McASP_P*
598c2ecf20Sopenharmony_ciregisters.
608c2ecf20Sopenharmony_ciFor example to request the AXR2 pin of mcasp8:
618c2ecf20Sopenharmony_cifunction-gpios = <&mcasp8 2 0>;
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ciOr to request the ACLKR pin of mcasp8:
648c2ecf20Sopenharmony_cifunction-gpios = <&mcasp8 29 0>;
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ciFor generic gpio information, please refer to bindings/gpio/gpio.txt
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ciExample:
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_cimcasp0: mcasp0@1d00000 {
718c2ecf20Sopenharmony_ci	compatible = "ti,da830-mcasp-audio";
728c2ecf20Sopenharmony_ci	reg = <0x100000 0x3000>;
738c2ecf20Sopenharmony_ci	reg-names "mpu";
748c2ecf20Sopenharmony_ci	interrupts = <82>, <83>;
758c2ecf20Sopenharmony_ci	interrupt-names = "tx", "rx";
768c2ecf20Sopenharmony_ci	op-mode = <0>;		/* MCASP_IIS_MODE */
778c2ecf20Sopenharmony_ci	tdm-slots = <2>;
788c2ecf20Sopenharmony_ci	serial-dir = <
798c2ecf20Sopenharmony_ci			0 0 0 0	/* 0: INACTIVE, 1: TX, 2: RX */
808c2ecf20Sopenharmony_ci			0 0 0 0
818c2ecf20Sopenharmony_ci			0 0 0 1
828c2ecf20Sopenharmony_ci			2 0 0 0 >;
838c2ecf20Sopenharmony_ci	tx-num-evt = <1>;
848c2ecf20Sopenharmony_ci	rx-num-evt = <1>;
858c2ecf20Sopenharmony_ci};
86