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
46624dcbdeSMarkus PargmannOptional properties:
47624dcbdeSMarkus Pargmann- codec-handle:     Phandle to a 'codec' node that defines an audio
48624dcbdeSMarkus Pargmann                    codec connected to this SSI.  This node is typically
49624dcbdeSMarkus Pargmann                    a child of an I2C or other control node.
50de623eceSMarkus Pargmann- fsl,fiq-stream-filter: Bool property. Disabled DMA and use FIQ instead to
51de623eceSMarkus Pargmann		    filter the codec stream. This is necessary for some boards
52de623eceSMarkus Pargmann		    where an incompatible codec is connected to this SSI, e.g.
53de623eceSMarkus Pargmann		    on pca100 and pcm043.
54624dcbdeSMarkus Pargmann
55624dcbdeSMarkus PargmannChild 'codec' node required properties:
56624dcbdeSMarkus Pargmann- compatible:       Compatible list, contains the name of the codec
57624dcbdeSMarkus Pargmann
58624dcbdeSMarkus PargmannChild 'codec' node optional properties:
59624dcbdeSMarkus Pargmann- clock-frequency:  The frequency of the input clock, which typically comes
60624dcbdeSMarkus Pargmann                    from an on-board dedicated oscillator.
61624dcbdeSMarkus Pargmann
62624dcbdeSMarkus PargmannNotes on fsl,playback-dma and fsl,capture-dma:
63624dcbdeSMarkus Pargmann
64624dcbdeSMarkus PargmannOn SOCs that have an SSI, specific DMA channels are hard-wired for playback
65624dcbdeSMarkus Pargmannand capture.  On the MPC8610, for example, SSI1 must use DMA channel 0 for
66624dcbdeSMarkus Pargmannplayback and DMA channel 1 for capture.  SSI2 must use DMA channel 2 for
67624dcbdeSMarkus Pargmannplayback and DMA channel 3 for capture.  The developer can choose which
68624dcbdeSMarkus PargmannDMA controller to use, but the channels themselves are hard-wired.  The
69624dcbdeSMarkus Pargmannpurpose of these two properties is to represent this hardware design.
70624dcbdeSMarkus Pargmann
71624dcbdeSMarkus PargmannThe device tree nodes for the DMA channels that are referenced by
72624dcbdeSMarkus Pargmann"fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with
73624dcbdeSMarkus Pargmann"fsl,ssi-dma-channel".  The SOC-specific compatible string (e.g.
74624dcbdeSMarkus Pargmann"fsl,mpc8610-dma-channel") can remain.  If these nodes are left as
75624dcbdeSMarkus Pargmann"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA
76624dcbdeSMarkus Pargmanndrivers (fsldma) will attempt to use them, and it will conflict with the
77624dcbdeSMarkus Pargmannsound drivers.
78