1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/sound/fsl,audmix.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: NXP Audio Mixer (AUDMIX). 8 9maintainers: 10 - Shengjiu Wang <shengjiu.wang@nxp.com> 11 - Frank Li <Frank.Li@nxp.com> 12 13description: | 14 The Audio Mixer is a on-chip functional module that allows mixing of two 15 audio streams into a single audio stream. Audio Mixer has two input serial 16 audio interfaces. These are driven by two Synchronous Audio interface 17 modules (SAI). Each input serial interface carries 8 audio channels in its 18 frame in TDM manner. Mixer mixes audio samples of corresponding channels 19 from two interfaces into a single sample. Before mixing, audio samples of 20 two inputs can be attenuated based on configuration. The output of the 21 Audio Mixer is also a serial audio interface. Like input interfaces it has 22 the same TDM frame format. This output is used to drive the serial DAC TDM 23 interface of audio codec and also sent to the external pins along with the 24 receive path of normal audio SAI module for readback by the CPU. 25 26 The output of Audio Mixer can be selected from any of the three streams 27 - serial audio input 1 28 - serial audio input 2 29 - mixed audio 30 31 Mixing operation is independent of audio sample rate but the two audio 32 input streams must have same audio sample rate with same number of channels 33 in TDM frame to be eligible for mixing. 34 35properties: 36 compatible: 37 const: fsl,imx8qm-audmix 38 39 reg: 40 maxItems: 1 41 42 clocks: 43 maxItems: 1 44 45 clock-names: 46 items: 47 - const: ipg 48 49 power-domains: 50 maxItems: 1 51 52 dais: 53 description: contain a list of phandles to AUDMIX connected DAIs. 54 $ref: /schemas/types.yaml#/definitions/phandle-array 55 minItems: 2 56 items: 57 - description: the AUDMIX output 58 maxItems: 1 59 - description: serial audio input 1 60 maxItems: 1 61 - description: serial audio input 2 62 maxItems: 1 63 64 ports: 65 $ref: /schemas/graph.yaml#/properties/ports 66 patternProperties: 67 '^port@[0-1]': 68 $ref: audio-graph-port.yaml# 69 unevaluatedProperties: false 70 description: Input port from SAI TX 71 72 properties: 73 port@2: 74 $ref: audio-graph-port.yaml# 75 unevaluatedProperties: false 76 description: Output port to SAI RX 77 78required: 79 - compatible 80 - reg 81 - clocks 82 - clock-names 83 - power-domains 84 85unevaluatedProperties: false 86 87examples: 88 - | 89 audmix@59840000 { 90 compatible = "fsl,imx8qm-audmix"; 91 reg = <0x59840000 0x10000>; 92 clocks = <&amix_lpcg 0>; 93 clock-names = "ipg"; 94 power-domains = <&pd_audmix>; 95 dais = <&sai4>, <&sai5>; 96 97 ports { 98 #address-cells = <1>; 99 #size-cells = <0>; 100 101 port@0 { 102 reg = <0>; 103 playback-only; 104 105 amix_endpoint0: endpoint { 106 dai-tdm-slot-num = <8>; 107 dai-tdm-slot-width = <32>; 108 dai-tdm-slot-width-map = <32 8 32>; 109 dai-format = "dsp_a"; 110 remote-endpoint = <&be00_ep>; 111 }; 112 }; 113 114 port@1 { 115 reg = <1>; 116 playback-only; 117 118 amix_endpoint1: endpoint { 119 dai-tdm-slot-num = <8>; 120 dai-tdm-slot-width = <32>; 121 dai-tdm-slot-width-map = <32 8 32>; 122 dai-format = "dsp_a"; 123 remote-endpoint = <&be01_ep>; 124 }; 125 }; 126 127 port@2 { 128 reg = <2>; 129 capture-only; 130 131 amix_endpoint2: endpoint { 132 dai-tdm-slot-num = <8>; 133 dai-tdm-slot-width = <32>; 134 dai-tdm-slot-width-map = <32 8 32>; 135 dai-format = "dsp_a"; 136 bitclock-master; 137 frame-master; 138 remote-endpoint = <&be02_ep>; 139 }; 140 }; 141 }; 142 }; 143