1*8cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*8cc087a1SEmmanuel Vadot%YAML 1.2 3*8cc087a1SEmmanuel Vadot--- 4*8cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/rockchip,i2s-tdm.yaml# 5*8cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8cc087a1SEmmanuel Vadot 7*8cc087a1SEmmanuel Vadottitle: Rockchip I2S/TDM Controller 8*8cc087a1SEmmanuel Vadot 9*8cc087a1SEmmanuel Vadotdescription: 10*8cc087a1SEmmanuel Vadot The Rockchip I2S/TDM Controller is a Time Division Multiplexed 11*8cc087a1SEmmanuel Vadot audio interface found in various Rockchip SoCs, allowing up 12*8cc087a1SEmmanuel Vadot to 8 channels of audio over a serial interface. 13*8cc087a1SEmmanuel Vadot 14*8cc087a1SEmmanuel Vadotmaintainers: 15*8cc087a1SEmmanuel Vadot - Nicolas Frattaroli <frattaroli.nicolas@gmail.com> 16*8cc087a1SEmmanuel Vadot 17*8cc087a1SEmmanuel Vadotproperties: 18*8cc087a1SEmmanuel Vadot compatible: 19*8cc087a1SEmmanuel Vadot enum: 20*8cc087a1SEmmanuel Vadot - rockchip,px30-i2s-tdm 21*8cc087a1SEmmanuel Vadot - rockchip,rk1808-i2s-tdm 22*8cc087a1SEmmanuel Vadot - rockchip,rk3308-i2s-tdm 23*8cc087a1SEmmanuel Vadot - rockchip,rk3568-i2s-tdm 24*8cc087a1SEmmanuel Vadot - rockchip,rv1126-i2s-tdm 25*8cc087a1SEmmanuel Vadot 26*8cc087a1SEmmanuel Vadot reg: 27*8cc087a1SEmmanuel Vadot maxItems: 1 28*8cc087a1SEmmanuel Vadot 29*8cc087a1SEmmanuel Vadot interrupts: 30*8cc087a1SEmmanuel Vadot maxItems: 1 31*8cc087a1SEmmanuel Vadot 32*8cc087a1SEmmanuel Vadot dmas: 33*8cc087a1SEmmanuel Vadot minItems: 1 34*8cc087a1SEmmanuel Vadot maxItems: 2 35*8cc087a1SEmmanuel Vadot 36*8cc087a1SEmmanuel Vadot dma-names: 37*8cc087a1SEmmanuel Vadot minItems: 1 38*8cc087a1SEmmanuel Vadot maxItems: 2 39*8cc087a1SEmmanuel Vadot items: 40*8cc087a1SEmmanuel Vadot enum: 41*8cc087a1SEmmanuel Vadot - rx 42*8cc087a1SEmmanuel Vadot - tx 43*8cc087a1SEmmanuel Vadot 44*8cc087a1SEmmanuel Vadot clocks: 45*8cc087a1SEmmanuel Vadot minItems: 3 46*8cc087a1SEmmanuel Vadot items: 47*8cc087a1SEmmanuel Vadot - description: clock for TX 48*8cc087a1SEmmanuel Vadot - description: clock for RX 49*8cc087a1SEmmanuel Vadot - description: AHB clock driving the interface 50*8cc087a1SEmmanuel Vadot - description: 51*8cc087a1SEmmanuel Vadot Parent clock for mclk_tx (only required when using mclk-calibrate) 52*8cc087a1SEmmanuel Vadot - description: 53*8cc087a1SEmmanuel Vadot Parent clock for mclk_rx (only required when using mclk-calibrate) 54*8cc087a1SEmmanuel Vadot - description: 55*8cc087a1SEmmanuel Vadot Clock for sample rates that are an integer multiple of 8000 56*8cc087a1SEmmanuel Vadot (only required when using mclk-calibrate) 57*8cc087a1SEmmanuel Vadot - description: 58*8cc087a1SEmmanuel Vadot Clock for sample rates that are an integer multiple of 11025 59*8cc087a1SEmmanuel Vadot (only required when using mclk-calibrate) 60*8cc087a1SEmmanuel Vadot 61*8cc087a1SEmmanuel Vadot clock-names: 62*8cc087a1SEmmanuel Vadot minItems: 3 63*8cc087a1SEmmanuel Vadot items: 64*8cc087a1SEmmanuel Vadot - const: mclk_tx 65*8cc087a1SEmmanuel Vadot - const: mclk_rx 66*8cc087a1SEmmanuel Vadot - const: hclk 67*8cc087a1SEmmanuel Vadot - const: mclk_tx_src 68*8cc087a1SEmmanuel Vadot - const: mclk_rx_src 69*8cc087a1SEmmanuel Vadot - const: mclk_root0 70*8cc087a1SEmmanuel Vadot - const: mclk_root1 71*8cc087a1SEmmanuel Vadot 72*8cc087a1SEmmanuel Vadot resets: 73*8cc087a1SEmmanuel Vadot minItems: 1 74*8cc087a1SEmmanuel Vadot maxItems: 2 75*8cc087a1SEmmanuel Vadot description: resets for the tx and rx directions 76*8cc087a1SEmmanuel Vadot 77*8cc087a1SEmmanuel Vadot reset-names: 78*8cc087a1SEmmanuel Vadot minItems: 1 79*8cc087a1SEmmanuel Vadot maxItems: 2 80*8cc087a1SEmmanuel Vadot items: 81*8cc087a1SEmmanuel Vadot enum: 82*8cc087a1SEmmanuel Vadot - tx-m 83*8cc087a1SEmmanuel Vadot - rx-m 84*8cc087a1SEmmanuel Vadot 85*8cc087a1SEmmanuel Vadot rockchip,grf: 86*8cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 87*8cc087a1SEmmanuel Vadot description: 88*8cc087a1SEmmanuel Vadot The phandle of the syscon node for the GRF register. 89*8cc087a1SEmmanuel Vadot 90*8cc087a1SEmmanuel Vadot rockchip,trcm-sync-tx-only: 91*8cc087a1SEmmanuel Vadot type: boolean 92*8cc087a1SEmmanuel Vadot description: Use TX BCLK/LRCK for both TX and RX. 93*8cc087a1SEmmanuel Vadot 94*8cc087a1SEmmanuel Vadot rockchip,trcm-sync-rx-only: 95*8cc087a1SEmmanuel Vadot type: boolean 96*8cc087a1SEmmanuel Vadot description: Use RX BCLK/LRCK for both TX and RX. 97*8cc087a1SEmmanuel Vadot 98*8cc087a1SEmmanuel Vadot "#sound-dai-cells": 99*8cc087a1SEmmanuel Vadot const: 0 100*8cc087a1SEmmanuel Vadot 101*8cc087a1SEmmanuel Vadot rockchip,i2s-rx-route: 102*8cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 103*8cc087a1SEmmanuel Vadot description: 104*8cc087a1SEmmanuel Vadot Defines the mapping of I2S RX sdis to I2S data bus lines. 105*8cc087a1SEmmanuel Vadot By default, they are mapped one-to-one. 106*8cc087a1SEmmanuel Vadot rockchip,i2s-rx-route = <3> would mean sdi3 is receiving from data0. 107*8cc087a1SEmmanuel Vadot maxItems: 4 108*8cc087a1SEmmanuel Vadot items: 109*8cc087a1SEmmanuel Vadot enum: [0, 1, 2, 3] 110*8cc087a1SEmmanuel Vadot 111*8cc087a1SEmmanuel Vadot rockchip,i2s-tx-route: 112*8cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 113*8cc087a1SEmmanuel Vadot description: 114*8cc087a1SEmmanuel Vadot Defines the mapping of I2S TX sdos to I2S data bus lines. 115*8cc087a1SEmmanuel Vadot By default, they are mapped one-to-one. 116*8cc087a1SEmmanuel Vadot rockchip,i2s-tx-route = <3> would mean sdo3 is sending to data0. 117*8cc087a1SEmmanuel Vadot maxItems: 4 118*8cc087a1SEmmanuel Vadot items: 119*8cc087a1SEmmanuel Vadot enum: [0, 1, 2, 3] 120*8cc087a1SEmmanuel Vadot 121*8cc087a1SEmmanuel Vadot rockchip,io-multiplex: 122*8cc087a1SEmmanuel Vadot description: 123*8cc087a1SEmmanuel Vadot Specify that the GPIO lines on the I2S bus are multiplexed such that 124*8cc087a1SEmmanuel Vadot the direction (input/output) needs to be dynamically adjusted. 125*8cc087a1SEmmanuel Vadot type: boolean 126*8cc087a1SEmmanuel Vadot 127*8cc087a1SEmmanuel Vadot 128*8cc087a1SEmmanuel Vadotrequired: 129*8cc087a1SEmmanuel Vadot - compatible 130*8cc087a1SEmmanuel Vadot - reg 131*8cc087a1SEmmanuel Vadot - interrupts 132*8cc087a1SEmmanuel Vadot - dmas 133*8cc087a1SEmmanuel Vadot - dma-names 134*8cc087a1SEmmanuel Vadot - clocks 135*8cc087a1SEmmanuel Vadot - clock-names 136*8cc087a1SEmmanuel Vadot - resets 137*8cc087a1SEmmanuel Vadot - reset-names 138*8cc087a1SEmmanuel Vadot - rockchip,grf 139*8cc087a1SEmmanuel Vadot - "#sound-dai-cells" 140*8cc087a1SEmmanuel Vadot 141*8cc087a1SEmmanuel VadotadditionalProperties: false 142*8cc087a1SEmmanuel Vadot 143*8cc087a1SEmmanuel Vadotexamples: 144*8cc087a1SEmmanuel Vadot - | 145*8cc087a1SEmmanuel Vadot #include <dt-bindings/clock/rk3568-cru.h> 146*8cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 147*8cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 148*8cc087a1SEmmanuel Vadot #include <dt-bindings/pinctrl/rockchip.h> 149*8cc087a1SEmmanuel Vadot 150*8cc087a1SEmmanuel Vadot bus { 151*8cc087a1SEmmanuel Vadot #address-cells = <2>; 152*8cc087a1SEmmanuel Vadot #size-cells = <2>; 153*8cc087a1SEmmanuel Vadot i2s@fe410000 { 154*8cc087a1SEmmanuel Vadot compatible = "rockchip,rk3568-i2s-tdm"; 155*8cc087a1SEmmanuel Vadot reg = <0x0 0xfe410000 0x0 0x1000>; 156*8cc087a1SEmmanuel Vadot interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; 157*8cc087a1SEmmanuel Vadot clocks = <&cru MCLK_I2S1_8CH_TX>, <&cru MCLK_I2S1_8CH_RX>, 158*8cc087a1SEmmanuel Vadot <&cru HCLK_I2S1_8CH>; 159*8cc087a1SEmmanuel Vadot clock-names = "mclk_tx", "mclk_rx", "hclk"; 160*8cc087a1SEmmanuel Vadot dmas = <&dmac1 3>, <&dmac1 2>; 161*8cc087a1SEmmanuel Vadot dma-names = "rx", "tx"; 162*8cc087a1SEmmanuel Vadot resets = <&cru SRST_M_I2S1_8CH_TX>, <&cru SRST_M_I2S1_8CH_RX>; 163*8cc087a1SEmmanuel Vadot reset-names = "tx-m", "rx-m"; 164*8cc087a1SEmmanuel Vadot rockchip,trcm-sync-tx-only; 165*8cc087a1SEmmanuel Vadot rockchip,grf = <&grf>; 166*8cc087a1SEmmanuel Vadot #sound-dai-cells = <0>; 167*8cc087a1SEmmanuel Vadot pinctrl-names = "default"; 168*8cc087a1SEmmanuel Vadot pinctrl-0 = 169*8cc087a1SEmmanuel Vadot <&i2s1m0_sclktx 170*8cc087a1SEmmanuel Vadot &i2s1m0_sclkrx 171*8cc087a1SEmmanuel Vadot &i2s1m0_lrcktx 172*8cc087a1SEmmanuel Vadot &i2s1m0_lrckrx 173*8cc087a1SEmmanuel Vadot &i2s1m0_sdi0 174*8cc087a1SEmmanuel Vadot &i2s1m0_sdi1 175*8cc087a1SEmmanuel Vadot &i2s1m0_sdi2 176*8cc087a1SEmmanuel Vadot &i2s1m0_sdi3 177*8cc087a1SEmmanuel Vadot &i2s1m0_sdo0 178*8cc087a1SEmmanuel Vadot &i2s1m0_sdo1 179*8cc087a1SEmmanuel Vadot &i2s1m0_sdo2 180*8cc087a1SEmmanuel Vadot &i2s1m0_sdo3>; 181*8cc087a1SEmmanuel Vadot }; 182*8cc087a1SEmmanuel Vadot }; 183