1*7d0873ebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*7d0873ebSEmmanuel Vadot%YAML 1.2 3*7d0873ebSEmmanuel Vadot--- 4*7d0873ebSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/fsl,ssi.yaml# 5*7d0873ebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*7d0873ebSEmmanuel Vadot 7*7d0873ebSEmmanuel Vadottitle: Freescale Synchronous Serial Interface 8*7d0873ebSEmmanuel Vadot 9*7d0873ebSEmmanuel Vadotmaintainers: 10*7d0873ebSEmmanuel Vadot - Shengjiu Wang <shengjiu.wang@nxp.com> 11*7d0873ebSEmmanuel Vadot 12*7d0873ebSEmmanuel Vadotdescription: 13*7d0873ebSEmmanuel Vadot Notes on fsl,playback-dma and fsl,capture-dma 14*7d0873ebSEmmanuel Vadot On SOCs that have an SSI, specific DMA channels are hard-wired for playback 15*7d0873ebSEmmanuel Vadot and capture. On the MPC8610, for example, SSI1 must use DMA channel 0 for 16*7d0873ebSEmmanuel Vadot playback and DMA channel 1 for capture. SSI2 must use DMA channel 2 for 17*7d0873ebSEmmanuel Vadot playback and DMA channel 3 for capture. The developer can choose which 18*7d0873ebSEmmanuel Vadot DMA controller to use, but the channels themselves are hard-wired. The 19*7d0873ebSEmmanuel Vadot purpose of these two properties is to represent this hardware design. 20*7d0873ebSEmmanuel Vadot 21*7d0873ebSEmmanuel Vadot The device tree nodes for the DMA channels that are referenced by 22*7d0873ebSEmmanuel Vadot "fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with 23*7d0873ebSEmmanuel Vadot "fsl,ssi-dma-channel". The SOC-specific compatible string (e.g. 24*7d0873ebSEmmanuel Vadot "fsl,mpc8610-dma-channel") can remain. If these nodes are left as 25*7d0873ebSEmmanuel Vadot "fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA 26*7d0873ebSEmmanuel Vadot drivers (fsldma) will attempt to use them, and it will conflict with the 27*7d0873ebSEmmanuel Vadot sound drivers. 28*7d0873ebSEmmanuel Vadot 29*7d0873ebSEmmanuel Vadotproperties: 30*7d0873ebSEmmanuel Vadot compatible: 31*7d0873ebSEmmanuel Vadot oneOf: 32*7d0873ebSEmmanuel Vadot - items: 33*7d0873ebSEmmanuel Vadot - enum: 34*7d0873ebSEmmanuel Vadot - fsl,imx50-ssi 35*7d0873ebSEmmanuel Vadot - fsl,imx53-ssi 36*7d0873ebSEmmanuel Vadot - const: fsl,imx51-ssi 37*7d0873ebSEmmanuel Vadot - const: fsl,imx21-ssi 38*7d0873ebSEmmanuel Vadot - items: 39*7d0873ebSEmmanuel Vadot - enum: 40*7d0873ebSEmmanuel Vadot - fsl,imx25-ssi 41*7d0873ebSEmmanuel Vadot - fsl,imx27-ssi 42*7d0873ebSEmmanuel Vadot - fsl,imx35-ssi 43*7d0873ebSEmmanuel Vadot - fsl,imx51-ssi 44*7d0873ebSEmmanuel Vadot - const: fsl,imx21-ssi 45*7d0873ebSEmmanuel Vadot - items: 46*7d0873ebSEmmanuel Vadot - enum: 47*7d0873ebSEmmanuel Vadot - fsl,imx6q-ssi 48*7d0873ebSEmmanuel Vadot - fsl,imx6sl-ssi 49*7d0873ebSEmmanuel Vadot - fsl,imx6sx-ssi 50*7d0873ebSEmmanuel Vadot - const: fsl,imx51-ssi 51*7d0873ebSEmmanuel Vadot - items: 52*7d0873ebSEmmanuel Vadot - const: fsl,imx21-ssi 53*7d0873ebSEmmanuel Vadot - items: 54*7d0873ebSEmmanuel Vadot - const: fsl,mpc8610-ssi 55*7d0873ebSEmmanuel Vadot 56*7d0873ebSEmmanuel Vadot reg: 57*7d0873ebSEmmanuel Vadot maxItems: 1 58*7d0873ebSEmmanuel Vadot 59*7d0873ebSEmmanuel Vadot interrupts: 60*7d0873ebSEmmanuel Vadot maxItems: 1 61*7d0873ebSEmmanuel Vadot 62*7d0873ebSEmmanuel Vadot clocks: 63*7d0873ebSEmmanuel Vadot items: 64*7d0873ebSEmmanuel Vadot - description: The ipg clock for register access 65*7d0873ebSEmmanuel Vadot - description: clock for SSI master mode 66*7d0873ebSEmmanuel Vadot minItems: 1 67*7d0873ebSEmmanuel Vadot 68*7d0873ebSEmmanuel Vadot clock-names: 69*7d0873ebSEmmanuel Vadot items: 70*7d0873ebSEmmanuel Vadot - const: ipg 71*7d0873ebSEmmanuel Vadot - const: baud 72*7d0873ebSEmmanuel Vadot minItems: 1 73*7d0873ebSEmmanuel Vadot 74*7d0873ebSEmmanuel Vadot dmas: 75*7d0873ebSEmmanuel Vadot oneOf: 76*7d0873ebSEmmanuel Vadot - items: 77*7d0873ebSEmmanuel Vadot - description: DMA controller phandle and request line for RX 78*7d0873ebSEmmanuel Vadot - description: DMA controller phandle and request line for TX 79*7d0873ebSEmmanuel Vadot - items: 80*7d0873ebSEmmanuel Vadot - description: DMA controller phandle and request line for RX0 81*7d0873ebSEmmanuel Vadot - description: DMA controller phandle and request line for TX0 82*7d0873ebSEmmanuel Vadot - description: DMA controller phandle and request line for RX1 83*7d0873ebSEmmanuel Vadot - description: DMA controller phandle and request line for TX1 84*7d0873ebSEmmanuel Vadot 85*7d0873ebSEmmanuel Vadot dma-names: 86*7d0873ebSEmmanuel Vadot oneOf: 87*7d0873ebSEmmanuel Vadot - items: 88*7d0873ebSEmmanuel Vadot - const: rx 89*7d0873ebSEmmanuel Vadot - const: tx 90*7d0873ebSEmmanuel Vadot - items: 91*7d0873ebSEmmanuel Vadot - const: rx0 92*7d0873ebSEmmanuel Vadot - const: tx0 93*7d0873ebSEmmanuel Vadot - const: rx1 94*7d0873ebSEmmanuel Vadot - const: tx1 95*7d0873ebSEmmanuel Vadot 96*7d0873ebSEmmanuel Vadot "#sound-dai-cells": 97*7d0873ebSEmmanuel Vadot const: 0 98*7d0873ebSEmmanuel Vadot description: optional, some dts node didn't add it. 99*7d0873ebSEmmanuel Vadot 100*7d0873ebSEmmanuel Vadot cell-index: 101*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 102*7d0873ebSEmmanuel Vadot enum: [0, 1, 2] 103*7d0873ebSEmmanuel Vadot description: The SSI index 104*7d0873ebSEmmanuel Vadot 105*7d0873ebSEmmanuel Vadot ac97-gpios: 106*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 107*7d0873ebSEmmanuel Vadot description: Please refer to soc-ac97link.txt 108*7d0873ebSEmmanuel Vadot 109*7d0873ebSEmmanuel Vadot codec-handle: 110*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 111*7d0873ebSEmmanuel Vadot description: 112*7d0873ebSEmmanuel Vadot Phandle to a 'codec' node that defines an audio 113*7d0873ebSEmmanuel Vadot codec connected to this SSI. This node is typically 114*7d0873ebSEmmanuel Vadot a child of an I2C or other control node. 115*7d0873ebSEmmanuel Vadot 116*7d0873ebSEmmanuel Vadot fsl,fifo-depth: 117*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 118*7d0873ebSEmmanuel Vadot description: 119*7d0873ebSEmmanuel Vadot The number of elements in the transmit and receive FIFOs. 120*7d0873ebSEmmanuel Vadot This number is the maximum allowed value for SFCSR[TFWM0]. 121*7d0873ebSEmmanuel Vadot enum: [8, 15] 122*7d0873ebSEmmanuel Vadot 123*7d0873ebSEmmanuel Vadot fsl,fiq-stream-filter: 124*7d0873ebSEmmanuel Vadot type: boolean 125*7d0873ebSEmmanuel Vadot description: 126*7d0873ebSEmmanuel Vadot Disabled DMA and use FIQ instead to filter the codec stream. 127*7d0873ebSEmmanuel Vadot This is necessary for some boards where an incompatible codec 128*7d0873ebSEmmanuel Vadot is connected to this SSI, e.g. on pca100 and pcm043. 129*7d0873ebSEmmanuel Vadot 130*7d0873ebSEmmanuel Vadot fsl,mode: 131*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 132*7d0873ebSEmmanuel Vadot enum: [ ac97-slave, ac97-master, i2s-slave, i2s-master, 133*7d0873ebSEmmanuel Vadot lj-slave, lj-master, rj-slave, rj-master ] 134*7d0873ebSEmmanuel Vadot description: | 135*7d0873ebSEmmanuel Vadot "ac97-slave" - AC97 mode, SSI is clock slave 136*7d0873ebSEmmanuel Vadot "ac97-master" - AC97 mode, SSI is clock master 137*7d0873ebSEmmanuel Vadot "i2s-slave" - I2S mode, SSI is clock slave 138*7d0873ebSEmmanuel Vadot "i2s-master" - I2S mode, SSI is clock master 139*7d0873ebSEmmanuel Vadot "lj-slave" - Left justified mode, SSI is clock slave 140*7d0873ebSEmmanuel Vadot "lj-master" - Left justified mode, SSI is clock master 141*7d0873ebSEmmanuel Vadot "rj-slave" - Right justified mode, SSI is clock slave 142*7d0873ebSEmmanuel Vadot "rj-master" - Right justified mode, SSI is clock master 143*7d0873ebSEmmanuel Vadot 144*7d0873ebSEmmanuel Vadot fsl,ssi-asynchronous: 145*7d0873ebSEmmanuel Vadot type: boolean 146*7d0873ebSEmmanuel Vadot description: If specified, the SSI is to be programmed in asynchronous 147*7d0873ebSEmmanuel Vadot mode. In this mode, pins SRCK, STCK, SRFS, and STFS must 148*7d0873ebSEmmanuel Vadot all be connected to valid signals. In synchronous mode, 149*7d0873ebSEmmanuel Vadot SRCK and SRFS are ignored. Asynchronous mode allows 150*7d0873ebSEmmanuel Vadot playback and capture to use different sample sizes and 151*7d0873ebSEmmanuel Vadot sample rates. Some drivers may require that SRCK and STCK 152*7d0873ebSEmmanuel Vadot be connected together, and SRFS and STFS be connected 153*7d0873ebSEmmanuel Vadot together. This would still allow different sample sizes, 154*7d0873ebSEmmanuel Vadot but not different sample rates. 155*7d0873ebSEmmanuel Vadot 156*7d0873ebSEmmanuel Vadot fsl,playback-dma: 157*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 158*7d0873ebSEmmanuel Vadot description: Phandle to a node for the DMA channel to use for 159*7d0873ebSEmmanuel Vadot playback of audio. This is typically dictated by SOC 160*7d0873ebSEmmanuel Vadot design. Only used on Power Architecture. 161*7d0873ebSEmmanuel Vadot 162*7d0873ebSEmmanuel Vadot fsl,capture-dma: 163*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 164*7d0873ebSEmmanuel Vadot description: Phandle to a node for the DMA channel to use for 165*7d0873ebSEmmanuel Vadot capture (recording) of audio. This is typically dictated 166*7d0873ebSEmmanuel Vadot by SOC design. Only used on Power Architecture. 167*7d0873ebSEmmanuel Vadot 168*7d0873ebSEmmanuel Vadotrequired: 169*7d0873ebSEmmanuel Vadot - compatible 170*7d0873ebSEmmanuel Vadot - reg 171*7d0873ebSEmmanuel Vadot - interrupts 172*7d0873ebSEmmanuel Vadot - fsl,fifo-depth 173*7d0873ebSEmmanuel Vadot 174*7d0873ebSEmmanuel VadotallOf: 175*7d0873ebSEmmanuel Vadot - $ref: dai-common.yaml# 176*7d0873ebSEmmanuel Vadot 177*7d0873ebSEmmanuel VadotunevaluatedProperties: false 178*7d0873ebSEmmanuel Vadot 179*7d0873ebSEmmanuel Vadotexamples: 180*7d0873ebSEmmanuel Vadot - | 181*7d0873ebSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 182*7d0873ebSEmmanuel Vadot #include <dt-bindings/clock/imx6qdl-clock.h> 183*7d0873ebSEmmanuel Vadot ssi@2028000 { 184*7d0873ebSEmmanuel Vadot compatible = "fsl,imx6q-ssi", "fsl,imx51-ssi"; 185*7d0873ebSEmmanuel Vadot reg = <0x02028000 0x4000>; 186*7d0873ebSEmmanuel Vadot interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; 187*7d0873ebSEmmanuel Vadot clocks = <&clks IMX6QDL_CLK_SSI1_IPG>, 188*7d0873ebSEmmanuel Vadot <&clks IMX6QDL_CLK_SSI1>; 189*7d0873ebSEmmanuel Vadot clock-names = "ipg", "baud"; 190*7d0873ebSEmmanuel Vadot dmas = <&sdma 37 1 0>, <&sdma 38 1 0>; 191*7d0873ebSEmmanuel Vadot dma-names = "rx", "tx"; 192*7d0873ebSEmmanuel Vadot #sound-dai-cells = <0>; 193*7d0873ebSEmmanuel Vadot fsl,fifo-depth = <15>; 194*7d0873ebSEmmanuel Vadot }; 195