1624dcbdeSMarkus PargmannFreescale Synchronous Serial Interface
2624dcbdeSMarkus Pargmann
3624dcbdeSMarkus PargmannThe SSI is a serial device that communicates with audio codecs.  It can
4624dcbdeSMarkus Pargmannbe programmed in AC97, I2S, left-justified, or right-justified modes.
5624dcbdeSMarkus Pargmann
6624dcbdeSMarkus PargmannRequired properties:
7624dcbdeSMarkus Pargmann- compatible:       Compatible list, contains "fsl,ssi".
8624dcbdeSMarkus Pargmann- cell-index:       The SSI, <0> = SSI1, <1> = SSI2, and so on.
9624dcbdeSMarkus Pargmann- reg:              Offset and length of the register set for the device.
10624dcbdeSMarkus Pargmann- interrupts:       <a b> where a is the interrupt number and b is a
11624dcbdeSMarkus Pargmann                    field that represents an encoding of the sense and
12624dcbdeSMarkus Pargmann                    level information for the interrupt.  This should be
13624dcbdeSMarkus Pargmann                    encoded based on the information in section 2)
14624dcbdeSMarkus Pargmann                    depending on the type of interrupt controller you
15624dcbdeSMarkus Pargmann                    have.
16624dcbdeSMarkus Pargmann- interrupt-parent: The phandle for the interrupt controller that
17624dcbdeSMarkus Pargmann                    services interrupts for this device.
18624dcbdeSMarkus Pargmann- fsl,mode:         The operating mode for the SSI interface.
19624dcbdeSMarkus Pargmann                    "i2s-slave" - I2S mode, SSI is clock slave
20624dcbdeSMarkus Pargmann                    "i2s-master" - I2S mode, SSI is clock master
21624dcbdeSMarkus Pargmann                    "lj-slave" - left-justified mode, SSI is clock slave
22624dcbdeSMarkus Pargmann                    "lj-master" - l.j. mode, SSI is clock master
23624dcbdeSMarkus Pargmann                    "rj-slave" - right-justified mode, SSI is clock slave
24624dcbdeSMarkus Pargmann                    "rj-master" - r.j., SSI is clock master
25624dcbdeSMarkus Pargmann                    "ac97-slave" - AC97 mode, SSI is clock slave
26624dcbdeSMarkus Pargmann                    "ac97-master" - AC97 mode, SSI is clock master
27624dcbdeSMarkus Pargmann- fsl,playback-dma: Phandle to a node for the DMA channel to use for
28624dcbdeSMarkus Pargmann                    playback of audio.  This is typically dictated by SOC
29624dcbdeSMarkus Pargmann                    design.  See the notes below.
30624dcbdeSMarkus Pargmann- fsl,capture-dma:  Phandle to a node for the DMA channel to use for
31624dcbdeSMarkus Pargmann                    capture (recording) of audio.  This is typically dictated
32624dcbdeSMarkus Pargmann                    by SOC design.  See the notes below.
33624dcbdeSMarkus Pargmann- fsl,fifo-depth:   The number of elements in the transmit and receive FIFOs.
34624dcbdeSMarkus Pargmann                    This number is the maximum allowed value for SFCSR[TFWM0].
35624dcbdeSMarkus Pargmann- fsl,ssi-asynchronous:
36624dcbdeSMarkus Pargmann                    If specified, the SSI is to be programmed in asynchronous
37624dcbdeSMarkus Pargmann                    mode.  In this mode, pins SRCK, STCK, SRFS, and STFS must
38624dcbdeSMarkus Pargmann                    all be connected to valid signals.  In synchronous mode,
39624dcbdeSMarkus Pargmann                    SRCK and SRFS are ignored.  Asynchronous mode allows
40624dcbdeSMarkus Pargmann                    playback and capture to use different sample sizes and
41624dcbdeSMarkus Pargmann                    sample rates.  Some drivers may require that SRCK and STCK
42624dcbdeSMarkus Pargmann                    be connected together, and SRFS and STFS be connected
43624dcbdeSMarkus Pargmann                    together.  This would still allow different sample sizes,
44624dcbdeSMarkus Pargmann                    but not different sample rates.
45624dcbdeSMarkus Pargmann
46cd7f0295SMarkus PargmannRequired are also ac97 link bindings if ac97 is used. See
47cd7f0295SMarkus PargmannDocumentation/devicetree/bindings/sound/soc-ac97link.txt for the necessary
48cd7f0295SMarkus Pargmannbindings.
49cd7f0295SMarkus Pargmann
50624dcbdeSMarkus PargmannOptional properties:
51624dcbdeSMarkus Pargmann- codec-handle:     Phandle to a 'codec' node that defines an audio
52624dcbdeSMarkus Pargmann                    codec connected to this SSI.  This node is typically
53624dcbdeSMarkus Pargmann                    a child of an I2C or other control node.
54de623eceSMarkus Pargmann- fsl,fiq-stream-filter: Bool property. Disabled DMA and use FIQ instead to
55de623eceSMarkus Pargmann		    filter the codec stream. This is necessary for some boards
56de623eceSMarkus Pargmann		    where an incompatible codec is connected to this SSI, e.g.
57de623eceSMarkus Pargmann		    on pca100 and pcm043.
583a5e517bSMarkus Pargmann- dmas:		    Generic dma devicetree binding as described in
593a5e517bSMarkus Pargmann		    Documentation/devicetree/bindings/dma/dma.txt.
603a5e517bSMarkus Pargmann- dma-names:	    Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
613a5e517bSMarkus Pargmann		    is not defined.
62624dcbdeSMarkus Pargmann
63624dcbdeSMarkus PargmannChild 'codec' node required properties:
64624dcbdeSMarkus Pargmann- compatible:       Compatible list, contains the name of the codec
65624dcbdeSMarkus Pargmann
66624dcbdeSMarkus PargmannChild 'codec' node optional properties:
67624dcbdeSMarkus Pargmann- clock-frequency:  The frequency of the input clock, which typically comes
68624dcbdeSMarkus Pargmann                    from an on-board dedicated oscillator.
69624dcbdeSMarkus Pargmann
70624dcbdeSMarkus PargmannNotes on fsl,playback-dma and fsl,capture-dma:
71624dcbdeSMarkus Pargmann
72624dcbdeSMarkus PargmannOn SOCs that have an SSI, specific DMA channels are hard-wired for playback
73624dcbdeSMarkus Pargmannand capture.  On the MPC8610, for example, SSI1 must use DMA channel 0 for
74624dcbdeSMarkus Pargmannplayback and DMA channel 1 for capture.  SSI2 must use DMA channel 2 for
75624dcbdeSMarkus Pargmannplayback and DMA channel 3 for capture.  The developer can choose which
76624dcbdeSMarkus PargmannDMA controller to use, but the channels themselves are hard-wired.  The
77624dcbdeSMarkus Pargmannpurpose of these two properties is to represent this hardware design.
78624dcbdeSMarkus Pargmann
79624dcbdeSMarkus PargmannThe device tree nodes for the DMA channels that are referenced by
80624dcbdeSMarkus Pargmann"fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with
81624dcbdeSMarkus Pargmann"fsl,ssi-dma-channel".  The SOC-specific compatible string (e.g.
82624dcbdeSMarkus Pargmann"fsl,mpc8610-dma-channel") can remain.  If these nodes are left as
83624dcbdeSMarkus Pargmann"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA
84624dcbdeSMarkus Pargmanndrivers (fsldma) will attempt to use them, and it will conflict with the
85624dcbdeSMarkus Pargmannsound drivers.
86