xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunTexas Instruments McASP controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- compatible :
5*4882a593Smuzhiyun	"ti,dm646x-mcasp-audio"	: for DM646x platforms
6*4882a593Smuzhiyun	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
7*4882a593Smuzhiyun	"ti,am33xx-mcasp-audio"	: for AM33xx platforms (AM33xx, AM43xx, TI81xx)
8*4882a593Smuzhiyun	"ti,dra7-mcasp-audio"	: for DRA7xx platforms
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun- reg : Should contain reg specifiers for the entries in the reg-names property.
11*4882a593Smuzhiyun- reg-names : Should contain:
12*4882a593Smuzhiyun         * "mpu" for the main registers (required). For compatibility with
13*4882a593Smuzhiyun           existing software, it is recommended this is the first entry.
14*4882a593Smuzhiyun         * "dat" for separate data port register access (optional).
15*4882a593Smuzhiyun- op-mode : I2S/DIT ops mode. 0 for I2S mode. 1 for DIT mode used for S/PDIF,
16*4882a593Smuzhiyun  	    IEC60958-1, and AES-3 formats.
17*4882a593Smuzhiyun- tdm-slots : Slots for TDM operation. Indicates number of channels transmitted
18*4882a593Smuzhiyun  	      or received over one serializer.
19*4882a593Smuzhiyun- serial-dir : A list of serializer configuration. Each entry is a number
20*4882a593Smuzhiyun               indication for serializer pin direction.
21*4882a593Smuzhiyun               (0 - INACTIVE, 1 - TX, 2 - RX)
22*4882a593Smuzhiyun- dmas: two element list of DMA controller phandles and DMA request line
23*4882a593Smuzhiyun        ordered pairs.
24*4882a593Smuzhiyun- dma-names: identifier string for each DMA request line in the dmas property.
25*4882a593Smuzhiyun	     These strings correspond 1:1 with the ordered pairs in dmas. The dma
26*4882a593Smuzhiyun	     identifiers must be "rx" and "tx".
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunOptional properties:
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun- ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
31*4882a593Smuzhiyun- tx-num-evt : FIFO levels.
32*4882a593Smuzhiyun- rx-num-evt : FIFO levels.
33*4882a593Smuzhiyun- dismod : Specify the drive on TX pin during inactive slots
34*4882a593Smuzhiyun	0 : 3-state
35*4882a593Smuzhiyun	2 : logic low
36*4882a593Smuzhiyun	3 : logic high
37*4882a593Smuzhiyun	Defaults to 'logic low' when the property is not present
38*4882a593Smuzhiyun- sram-size-playback : size of sram to be allocated during playback
39*4882a593Smuzhiyun- sram-size-capture  : size of sram to be allocated during capture
40*4882a593Smuzhiyun- interrupts : Interrupt numbers for McASP
41*4882a593Smuzhiyun- interrupt-names : Known interrupt names are "tx" and "rx"
42*4882a593Smuzhiyun- pinctrl-0: Should specify pin control group used for this controller.
43*4882a593Smuzhiyun- pinctrl-names: Should contain only one value - "default", for more details
44*4882a593Smuzhiyun  		 please refer to pinctrl-bindings.txt
45*4882a593Smuzhiyun- fck_parent : Should contain a valid clock name which will be used as parent
46*4882a593Smuzhiyun	       for the McASP fck
47*4882a593Smuzhiyun- auxclk-fs-ratio: When McASP is bus master indicates the ratio between AUCLK
48*4882a593Smuzhiyun		   and FS rate if applicable:
49*4882a593Smuzhiyun		   AUCLK rate = auxclk-fs-ratio * FS rate
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunOptional GPIO support:
52*4882a593SmuzhiyunIf any McASP pin need to be used as GPIO then the McASP node must have:
53*4882a593Smuzhiyun...
54*4882a593Smuzhiyun  gpio-controller
55*4882a593Smuzhiyun  #gpio-cells = <2>;
56*4882a593Smuzhiyun...
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunWhen requesting a GPIO, the first parameter is the PIN index in McASP_P*
59*4882a593Smuzhiyunregisters.
60*4882a593SmuzhiyunFor example to request the AXR2 pin of mcasp8:
61*4882a593Smuzhiyunfunction-gpios = <&mcasp8 2 0>;
62*4882a593Smuzhiyun
63*4882a593SmuzhiyunOr to request the ACLKR pin of mcasp8:
64*4882a593Smuzhiyunfunction-gpios = <&mcasp8 29 0>;
65*4882a593Smuzhiyun
66*4882a593SmuzhiyunFor generic gpio information, please refer to bindings/gpio/gpio.txt
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunExample:
69*4882a593Smuzhiyun
70*4882a593Smuzhiyunmcasp0: mcasp0@1d00000 {
71*4882a593Smuzhiyun	compatible = "ti,da830-mcasp-audio";
72*4882a593Smuzhiyun	reg = <0x100000 0x3000>;
73*4882a593Smuzhiyun	reg-names "mpu";
74*4882a593Smuzhiyun	interrupts = <82>, <83>;
75*4882a593Smuzhiyun	interrupt-names = "tx", "rx";
76*4882a593Smuzhiyun	op-mode = <0>;		/* MCASP_IIS_MODE */
77*4882a593Smuzhiyun	tdm-slots = <2>;
78*4882a593Smuzhiyun	serial-dir = <
79*4882a593Smuzhiyun			0 0 0 0	/* 0: INACTIVE, 1: TX, 2: RX */
80*4882a593Smuzhiyun			0 0 0 0
81*4882a593Smuzhiyun			0 0 0 1
82*4882a593Smuzhiyun			2 0 0 0 >;
83*4882a593Smuzhiyun	tx-num-evt = <1>;
84*4882a593Smuzhiyun	rx-num-evt = <1>;
85*4882a593Smuzhiyun};
86