1*4882a593Smuzhiyun* Rockchip I2S/TDM controller 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun- compatible: should be one of the following 6*4882a593Smuzhiyun - "rockchip,px30-i2s-tdm": for px30 7*4882a593Smuzhiyun - "rockchip,rk1808-i2s-tdm": for rk1808 8*4882a593Smuzhiyun - "rockchip,rk3308-i2s-tdm": for rk3308 9*4882a593Smuzhiyun - "rockchip,rk3568-i2s-tdm": for rk3568 10*4882a593Smuzhiyun - "rockchip,rk3588-i2s-tdm": for rk3588 11*4882a593Smuzhiyun - "rockchip,rv1106-i2s-tdm": for rv1106 12*4882a593Smuzhiyun - "rockchip,rv1126-i2s-tdm": for rv1126 13*4882a593Smuzhiyun- reg: physical base address of the controller and length of memory mapped 14*4882a593Smuzhiyun region. 15*4882a593Smuzhiyun- interrupts: should contain the I2S interrupt. 16*4882a593Smuzhiyun- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, 17*4882a593Smuzhiyun Documentation/devicetree/bindings/dma/dma.txt 18*4882a593Smuzhiyun- dma-names: should include "tx" and "rx". 19*4882a593Smuzhiyun- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. 20*4882a593Smuzhiyun- clock-names: clock names. 21*4882a593Smuzhiyun- rockchip,bclk-fs: configure the bclk fs. 22*4882a593Smuzhiyun- resets: a list of phandle + reset-specifer paris, one for each entry in reset-names. 23*4882a593Smuzhiyun- reset-names: reset names, should include "tx-m", "rx-m". 24*4882a593Smuzhiyun- rockchip,cru: cru phandle. 25*4882a593Smuzhiyun- rockchip,grf: the phandle of the syscon node for GRF register. 26*4882a593Smuzhiyun- rockchip,mclk-calibrate: enable mclk source calibration. 27*4882a593Smuzhiyun- rockchip,clk-trcm: tx and rx lrck/bclk common use. 28*4882a593Smuzhiyun - 0: both tx_lrck/bclk and rx_lrck/bclk are used 29*4882a593Smuzhiyun - 1: only tx_lrck/bclk is used 30*4882a593Smuzhiyun - 2: only rx_lrck/bclk is used 31*4882a593Smuzhiyun- rockchip,no-dmaengine: This is a boolean property. If present, driver will do not 32*4882a593Smuzhiyun register pcm dmaengine, only just register dai. if the dai is part of multi-dais, 33*4882a593Smuzhiyun the property should be present. Please refer to rockchip,multidais.txt about 34*4882a593Smuzhiyun multi-dais usage. 35*4882a593Smuzhiyun- rockchip,playback-only: Specify that the controller only has playback capability. 36*4882a593Smuzhiyun- rockchip,capture-only: Specify that the controller only has capture capability. 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunOptional properties: 39*4882a593Smuzhiyun- rockchip,i2s-rx-route: This is a variable length array, that shows the mapping 40*4882a593Smuzhiyun route of i2s rx sdis to I2S data bus. By default, they are one-to-one mapping: 41*4882a593Smuzhiyun * sdi_0 <-- data_0 42*4882a593Smuzhiyun * sdi_1 <-- data_1 43*4882a593Smuzhiyun * sdi_2 <-- data_2 44*4882a593Smuzhiyun * sdi_3 <-- data_3 45*4882a593Smuzhiyun If you would like to change the order of I2S RX data, the route mapping may 46*4882a593Smuzhiyun like this: 47*4882a593Smuzhiyun * sdi_3 <-- data_0 48*4882a593Smuzhiyun * sdi_1 <-- data_1 49*4882a593Smuzhiyun * sdi_2 <-- data_2 50*4882a593Smuzhiyun * sdi_0 <-- data_3 51*4882a593Smuzhiyun You need to add the property for i2s node on dts: 52*4882a593Smuzhiyun - rockchip,i2s-rx-route = <3 1 2 0>; 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun- rockchip,i2s-tx-route: This is a variable length array, that shows the mapping 55*4882a593Smuzhiyun route of i2s tx sdos to I2S data bus. By default, they are one-to-one mapping: 56*4882a593Smuzhiyun * sdo_0 --> data_0 57*4882a593Smuzhiyun * sdo_1 --> data_1 58*4882a593Smuzhiyun * sdo_2 --> data_2 59*4882a593Smuzhiyun * sdo_3 --> data_3 60*4882a593Smuzhiyun If you would like to change the order of I2S TX data, the route mapping may 61*4882a593Smuzhiyun like this: 62*4882a593Smuzhiyun * sdo_2 --> data_0 63*4882a593Smuzhiyun * sdo_1 --> data_1 64*4882a593Smuzhiyun * sdo_0 --> data_2 65*4882a593Smuzhiyun * sdo_3 --> data_3 66*4882a593Smuzhiyun You need to add the property for i2s node on dts: 67*4882a593Smuzhiyun - rockchip,i2s-tx-route = <2 1 0 3>; 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun- rockchip,tdm-fsync-half-frame: This is a boolean value, if present, use half 70*4882a593Smuzhiyun frame fsync. 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunExample for rk3308 I2S/TDM controller: 73*4882a593Smuzhiyun 74*4882a593Smuzhiyuni2s_8ch_0: i2s@ff300000 { 75*4882a593Smuzhiyun compatible = "rockchip,rk3308-i2s-tdm"; 76*4882a593Smuzhiyun reg = <0x0 0xff300000 0x0 0x1000>; 77*4882a593Smuzhiyun interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; 78*4882a593Smuzhiyun clocks = <&cru SCLK_I2S0_8CH_TX>, <&cru SCLK_I2S0_8CH_RX>, <&cru HCLK_I2S0_8CH>; 79*4882a593Smuzhiyun clock-names = "mclk_tx", "mclk_rx", "hclk"; 80*4882a593Smuzhiyun dmas = <&dmac1 0>, <&dmac1 1>; 81*4882a593Smuzhiyun dma-names = "tx", "rx"; 82*4882a593Smuzhiyun resets = <&cru SRST_I2S0_8CH_TX_M>, <&cru SRST_I2S0_8CH_RX_M>; 83*4882a593Smuzhiyun reset-names = "tx-m", "rx-m"; 84*4882a593Smuzhiyun rockchip,cru = <&cru>; 85*4882a593Smuzhiyun rockchip,clk-trcm = <1>; 86*4882a593Smuzhiyun pinctrl-names = "default"; 87*4882a593Smuzhiyun pinctrl-0 = <&i2s_8ch_0_sclktx 88*4882a593Smuzhiyun &i2s_8ch_0_sclkrx 89*4882a593Smuzhiyun &i2s_8ch_0_lrcktx 90*4882a593Smuzhiyun &i2s_8ch_0_lrckrx 91*4882a593Smuzhiyun &i2s_8ch_0_sdi0 92*4882a593Smuzhiyun &i2s_8ch_0_sdi1 93*4882a593Smuzhiyun &i2s_8ch_0_sdi2 94*4882a593Smuzhiyun &i2s_8ch_0_sdi3 95*4882a593Smuzhiyun &i2s_8ch_0_sdo0 96*4882a593Smuzhiyun &i2s_8ch_0_sdo1 97*4882a593Smuzhiyun &i2s_8ch_0_sdo2 98*4882a593Smuzhiyun &i2s_8ch_0_sdo3 99*4882a593Smuzhiyun &i2s_8ch_0_mclk>; 100*4882a593Smuzhiyun status = "disabled"; 101*4882a593Smuzhiyun}; 102