blob: 5ff76c9c57d27212d88723b85442e431cfa1aed4 [file] [log] [blame]
Kumar Galad0fc2ea2008-07-07 11:28:33 -05001Freescale Synchronous Serial Interface
2
3The SSI is a serial device that communicates with audio codecs. It can
4be programmed in AC97, I2S, left-justified, or right-justified modes.
5
6Required properties:
Timur Tabidf4b6802009-03-11 19:22:04 -05007- compatible: Compatible list, contains "fsl,ssi".
8- cell-index: The SSI, <0> = SSI1, <1> = SSI2, and so on.
9- reg: Offset and length of the register set for the device.
10- interrupts: <a b> where a is the interrupt number and b is a
11 field that represents an encoding of the sense and
12 level information for the interrupt. This should be
13 encoded based on the information in section 2)
14 depending on the type of interrupt controller you
15 have.
16- interrupt-parent: The phandle for the interrupt controller that
17 services interrupts for this device.
18- fsl,mode: The operating mode for the SSI interface.
19 "i2s-slave" - I2S mode, SSI is clock slave
20 "i2s-master" - I2S mode, SSI is clock master
21 "lj-slave" - left-justified mode, SSI is clock slave
22 "lj-master" - l.j. mode, SSI is clock master
23 "rj-slave" - right-justified mode, SSI is clock slave
24 "rj-master" - r.j., SSI is clock master
25 "ac97-slave" - AC97 mode, SSI is clock slave
26 "ac97-master" - AC97 mode, SSI is clock master
27- fsl,playback-dma: Phandle to a node for the DMA channel to use for
Timur Tabib56c2762008-10-10 11:52:31 -050028 playback of audio. This is typically dictated by SOC
29 design. See the notes below.
Timur Tabidf4b6802009-03-11 19:22:04 -050030- fsl,capture-dma: Phandle to a node for the DMA channel to use for
Timur Tabib56c2762008-10-10 11:52:31 -050031 capture (recording) of audio. This is typically dictated
32 by SOC design. See the notes below.
Timur Tabidf4b6802009-03-11 19:22:04 -050033- fsl,fifo-depth: The number of elements in the transmit and receive FIFOs.
Timur Tabi0bcd7832009-03-04 14:55:30 -060034 This number is the maximum allowed value for SFCSR[TFWM0].
Timur Tabidf4b6802009-03-11 19:22:04 -050035- fsl,ssi-asynchronous:
36 If specified, the SSI is to be programmed in asynchronous
37 mode. In this mode, pins SRCK, STCK, SRFS, and STFS must
38 all be connected to valid signals. In synchronous mode,
39 SRCK and SRFS are ignored. Asynchronous mode allows
40 playback and capture to use different sample sizes and
41 sample rates. Some drivers may require that SRCK and STCK
42 be connected together, and SRFS and STFS be connected
43 together. This would still allow different sample sizes,
44 but not different sample rates.
Kumar Galad0fc2ea2008-07-07 11:28:33 -050045
46Optional properties:
Timur Tabidf4b6802009-03-11 19:22:04 -050047- codec-handle: Phandle to a 'codec' node that defines an audio
48 codec connected to this SSI. This node is typically
49 a child of an I2C or other control node.
Kumar Galad0fc2ea2008-07-07 11:28:33 -050050
51Child 'codec' node required properties:
Timur Tabidf4b6802009-03-11 19:22:04 -050052- compatible: Compatible list, contains the name of the codec
Kumar Galad0fc2ea2008-07-07 11:28:33 -050053
54Child 'codec' node optional properties:
Timur Tabidf4b6802009-03-11 19:22:04 -050055- clock-frequency: The frequency of the input clock, which typically comes
56 from an on-board dedicated oscillator.
Timur Tabic2fe5942008-08-06 11:48:25 -050057
58Notes on fsl,playback-dma and fsl,capture-dma:
59
60On SOCs that have an SSI, specific DMA channels are hard-wired for playback
61and capture. On the MPC8610, for example, SSI1 must use DMA channel 0 for
62playback and DMA channel 1 for capture. SSI2 must use DMA channel 2 for
63playback and DMA channel 3 for capture. The developer can choose which
64DMA controller to use, but the channels themselves are hard-wired. The
65purpose of these two properties is to represent this hardware design.
Timur Tabib56c2762008-10-10 11:52:31 -050066
67The device tree nodes for the DMA channels that are referenced by
68"fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with
69"fsl,ssi-dma-channel". The SOC-specific compatible string (e.g.
70"fsl,mpc8610-dma-channel") can remain. If these nodes are left as
71"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA
72drivers (fsldma) will attempt to use them, and it will conflict with the
73sound drivers.