1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*ae5de77eSEmmanuel Vadot%YAML 1.2 3*ae5de77eSEmmanuel Vadot--- 4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/rockchip,rk3576-sai.yaml# 5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*ae5de77eSEmmanuel Vadot 7*ae5de77eSEmmanuel Vadottitle: Rockchip Serial Audio Interface Controller 8*ae5de77eSEmmanuel Vadot 9*ae5de77eSEmmanuel Vadotdescription: 10*ae5de77eSEmmanuel Vadot The Rockchip Serial Audio Interface (SAI) controller is a flexible audio 11*ae5de77eSEmmanuel Vadot controller that implements the I2S, I2S/TDM and the PDM standards. 12*ae5de77eSEmmanuel Vadot 13*ae5de77eSEmmanuel Vadotmaintainers: 14*ae5de77eSEmmanuel Vadot - Nicolas Frattaroli <nicolas.frattaroli@collabora.com> 15*ae5de77eSEmmanuel Vadot 16*ae5de77eSEmmanuel VadotallOf: 17*ae5de77eSEmmanuel Vadot - $ref: dai-common.yaml# 18*ae5de77eSEmmanuel Vadot 19*ae5de77eSEmmanuel Vadotproperties: 20*ae5de77eSEmmanuel Vadot compatible: 21*ae5de77eSEmmanuel Vadot const: rockchip,rk3576-sai 22*ae5de77eSEmmanuel Vadot 23*ae5de77eSEmmanuel Vadot reg: 24*ae5de77eSEmmanuel Vadot maxItems: 1 25*ae5de77eSEmmanuel Vadot 26*ae5de77eSEmmanuel Vadot interrupts: 27*ae5de77eSEmmanuel Vadot maxItems: 1 28*ae5de77eSEmmanuel Vadot 29*ae5de77eSEmmanuel Vadot dmas: 30*ae5de77eSEmmanuel Vadot minItems: 1 31*ae5de77eSEmmanuel Vadot maxItems: 2 32*ae5de77eSEmmanuel Vadot 33*ae5de77eSEmmanuel Vadot dma-names: 34*ae5de77eSEmmanuel Vadot minItems: 1 35*ae5de77eSEmmanuel Vadot items: 36*ae5de77eSEmmanuel Vadot - enum: [tx, rx] 37*ae5de77eSEmmanuel Vadot - const: rx 38*ae5de77eSEmmanuel Vadot 39*ae5de77eSEmmanuel Vadot clocks: 40*ae5de77eSEmmanuel Vadot items: 41*ae5de77eSEmmanuel Vadot - description: master audio clock 42*ae5de77eSEmmanuel Vadot - description: AHB clock driving the interface 43*ae5de77eSEmmanuel Vadot 44*ae5de77eSEmmanuel Vadot clock-names: 45*ae5de77eSEmmanuel Vadot items: 46*ae5de77eSEmmanuel Vadot - const: mclk 47*ae5de77eSEmmanuel Vadot - const: hclk 48*ae5de77eSEmmanuel Vadot 49*ae5de77eSEmmanuel Vadot resets: 50*ae5de77eSEmmanuel Vadot minItems: 1 51*ae5de77eSEmmanuel Vadot items: 52*ae5de77eSEmmanuel Vadot - description: reset for the mclk domain 53*ae5de77eSEmmanuel Vadot - description: reset for the hclk domain 54*ae5de77eSEmmanuel Vadot 55*ae5de77eSEmmanuel Vadot reset-names: 56*ae5de77eSEmmanuel Vadot minItems: 1 57*ae5de77eSEmmanuel Vadot items: 58*ae5de77eSEmmanuel Vadot - const: m 59*ae5de77eSEmmanuel Vadot - const: h 60*ae5de77eSEmmanuel Vadot 61*ae5de77eSEmmanuel Vadot port: 62*ae5de77eSEmmanuel Vadot $ref: audio-graph-port.yaml# 63*ae5de77eSEmmanuel Vadot unevaluatedProperties: false 64*ae5de77eSEmmanuel Vadot 65*ae5de77eSEmmanuel Vadot power-domains: 66*ae5de77eSEmmanuel Vadot maxItems: 1 67*ae5de77eSEmmanuel Vadot 68*ae5de77eSEmmanuel Vadot "#sound-dai-cells": 69*ae5de77eSEmmanuel Vadot const: 0 70*ae5de77eSEmmanuel Vadot 71*ae5de77eSEmmanuel Vadot rockchip,sai-rx-route: 72*ae5de77eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 73*ae5de77eSEmmanuel Vadot description: 74*ae5de77eSEmmanuel Vadot Defines the mapping of the controller's SDI ports to actual input lanes, 75*ae5de77eSEmmanuel Vadot as well as the number of input lanes. 76*ae5de77eSEmmanuel Vadot rockchip,sai-rx-route = <3> would mean sdi3 is receiving from data0, and 77*ae5de77eSEmmanuel Vadot that there is only one receiving lane. 78*ae5de77eSEmmanuel Vadot This property's absence is to be understood as only one receiving lane 79*ae5de77eSEmmanuel Vadot being used if the controller has capture capabilities. 80*ae5de77eSEmmanuel Vadot maxItems: 4 81*ae5de77eSEmmanuel Vadot items: 82*ae5de77eSEmmanuel Vadot minimum: 0 83*ae5de77eSEmmanuel Vadot maximum: 3 84*ae5de77eSEmmanuel Vadot 85*ae5de77eSEmmanuel Vadot rockchip,sai-tx-route: 86*ae5de77eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 87*ae5de77eSEmmanuel Vadot description: 88*ae5de77eSEmmanuel Vadot Defines the mapping of the controller's SDO ports to actual output lanes, 89*ae5de77eSEmmanuel Vadot as well as the number of output lanes. 90*ae5de77eSEmmanuel Vadot rockchip,sai-tx-route = <3> would mean sdo3 is sending to data0, and 91*ae5de77eSEmmanuel Vadot that there is only one transmitting lane. 92*ae5de77eSEmmanuel Vadot This property's absence is to be understood as only one transmitting lane 93*ae5de77eSEmmanuel Vadot being used if the controller has playback capabilities. 94*ae5de77eSEmmanuel Vadot maxItems: 4 95*ae5de77eSEmmanuel Vadot items: 96*ae5de77eSEmmanuel Vadot minimum: 0 97*ae5de77eSEmmanuel Vadot maximum: 3 98*ae5de77eSEmmanuel Vadot 99*ae5de77eSEmmanuel Vadotrequired: 100*ae5de77eSEmmanuel Vadot - compatible 101*ae5de77eSEmmanuel Vadot - reg 102*ae5de77eSEmmanuel Vadot - dmas 103*ae5de77eSEmmanuel Vadot - dma-names 104*ae5de77eSEmmanuel Vadot - clocks 105*ae5de77eSEmmanuel Vadot - clock-names 106*ae5de77eSEmmanuel Vadot - "#sound-dai-cells" 107*ae5de77eSEmmanuel Vadot 108*ae5de77eSEmmanuel VadotunevaluatedProperties: false 109*ae5de77eSEmmanuel Vadot 110*ae5de77eSEmmanuel Vadotexamples: 111*ae5de77eSEmmanuel Vadot - | 112*ae5de77eSEmmanuel Vadot #include <dt-bindings/clock/rockchip,rk3576-cru.h> 113*ae5de77eSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 114*ae5de77eSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 115*ae5de77eSEmmanuel Vadot #include <dt-bindings/pinctrl/rockchip.h> 116*ae5de77eSEmmanuel Vadot #include <dt-bindings/power/rockchip,rk3576-power.h> 117*ae5de77eSEmmanuel Vadot #include <dt-bindings/reset/rockchip,rk3576-cru.h> 118*ae5de77eSEmmanuel Vadot 119*ae5de77eSEmmanuel Vadot bus { 120*ae5de77eSEmmanuel Vadot #address-cells = <2>; 121*ae5de77eSEmmanuel Vadot #size-cells = <2>; 122*ae5de77eSEmmanuel Vadot sai1: sai@2a610000 { 123*ae5de77eSEmmanuel Vadot compatible = "rockchip,rk3576-sai"; 124*ae5de77eSEmmanuel Vadot reg = <0x0 0x2a610000 0x0 0x1000>; 125*ae5de77eSEmmanuel Vadot interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; 126*ae5de77eSEmmanuel Vadot clocks = <&cru MCLK_SAI1_8CH>, <&cru HCLK_SAI1_8CH>; 127*ae5de77eSEmmanuel Vadot clock-names = "mclk", "hclk"; 128*ae5de77eSEmmanuel Vadot dmas = <&dmac0 2>, <&dmac0 3>; 129*ae5de77eSEmmanuel Vadot dma-names = "tx", "rx"; 130*ae5de77eSEmmanuel Vadot power-domains = <&power RK3576_PD_AUDIO>; 131*ae5de77eSEmmanuel Vadot resets = <&cru SRST_M_SAI1_8CH>, <&cru SRST_H_SAI1_8CH>; 132*ae5de77eSEmmanuel Vadot reset-names = "m", "h"; 133*ae5de77eSEmmanuel Vadot pinctrl-names = "default"; 134*ae5de77eSEmmanuel Vadot pinctrl-0 = <&sai1m0_lrck 135*ae5de77eSEmmanuel Vadot &sai1m0_sclk 136*ae5de77eSEmmanuel Vadot &sai1m0_sdi0 137*ae5de77eSEmmanuel Vadot &sai1m0_sdo0 138*ae5de77eSEmmanuel Vadot &sai1m0_sdo1 139*ae5de77eSEmmanuel Vadot &sai1m0_sdo2 140*ae5de77eSEmmanuel Vadot &sai1m0_sdo3>; 141*ae5de77eSEmmanuel Vadot rockchip,sai-tx-route = <3 1 2 0>; 142*ae5de77eSEmmanuel Vadot #sound-dai-cells = <0>; 143*ae5de77eSEmmanuel Vadot }; 144*ae5de77eSEmmanuel Vadot }; 145