Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: dt-bindings: davinci-mcasp: Add properties for asynchronous mode

McASP supports the independent configuration of TX & RX clk and frame
sync registers. By default, the driver is configured in synchronous mode
where RX clock generator is disabled and it uses transmit clock signals as
bit clock and frame sync. Therefore add optional properties needed for
asynchronous mode.

Add ti,async-mode boolean binding to provide a way to decouple the default
behavior and allows for independent TX & RX clocking.

Add tdm-slots-rx uint32 binding to provide an alternative hardware
specifier stating the number of RX serializers.
The existing property tdm-slots will still dictate number of
TX serializers, and RX if tdm-slots-rx isn't given for backwards
compatibility.

Add auxclk-fs-ratio-rx which allows to specify the ratio just for RX.
The driver can be supplied with two different ratios
(auxclk-fs-ratio and auxclk-fs-ratio-rx in tandem) and achieve two
different sampling rates for tx & rx.

Signed-off-by: Sen Wang <sen@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Tested-by: Paresh Bhagat <p-bhagat@ti.com>
Link: https://patch.msgid.link/20260203003703.2334443-2-sen@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Sen Wang and committed by
Mark Brown
f1ef70a4 dcf0470a

+66 -5
+66 -5
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
··· 40 40 tdm-slots: 41 41 $ref: /schemas/types.yaml#/definitions/uint32 42 42 description: 43 - number of channels over one serializer 44 - the property is ignored in DIT mode 43 + Number of channels over one serializer. This property 44 + specifies the TX playback TDM slot count, along with default RX slot count 45 + if tdm-slots-rx is not specified. 46 + The property is ignored in DIT mode. 45 47 minimum: 2 46 48 maximum: 32 49 + 50 + tdm-slots-rx: 51 + $ref: /schemas/types.yaml#/definitions/uint32 52 + description: 53 + Number of RX capture channels over one serializer. If specified, 54 + allows independent RX TDM slot count separate from TX. Requires 55 + ti,async-mode to be enabled for independent TX/RX clock rates. 56 + The property is ignored in DIT mode. 57 + minimum: 2 58 + maximum: 32 59 + 60 + ti,async-mode: 61 + description: 62 + Specify to allow independent TX & RX clocking, 63 + to enable audio playback & record with different sampling rate, 64 + and different number of bits per frame. 65 + if property is omitted, TX and RX will share same bit clock and frame clock signals, 66 + thus RX need to use same bits per frame and sampling rate as TX in synchronous mode. 67 + the property is ignored in DIT mode (as DIT is TX-only) 68 + type: boolean 47 69 48 70 serial-dir: 49 71 description: ··· 147 125 148 126 auxclk-fs-ratio: 149 127 $ref: /schemas/types.yaml#/definitions/uint32 150 - description: ratio of AUCLK and FS rate if applicable 128 + description: 129 + Ratio of AUCLK and FS rate if applicable. This property specifies 130 + the TX ratio, along with default RX ratio if auxclk-fs-ratio-rx 131 + is not specified. 132 + When not specified, the inputted system clock frequency via set_sysclk 133 + callback by the machine driver is used for divider calculation. 134 + 135 + auxclk-fs-ratio-rx: 136 + $ref: /schemas/types.yaml#/definitions/uint32 137 + description: 138 + Ratio of AUCLK and FS rate for RX. If specified, allows 139 + for a different RX ratio. Requires ti,async-mode to be 140 + enabled when the ratio differs from auxclk-fs-ratio. 141 + When not specified, it defaults to the value of auxclk-fs-ratio. 142 + The property is ignored in DIT mode. 151 143 152 144 gpio-controller: true 153 145 ··· 206 170 - $ref: dai-common.yaml# 207 171 - if: 208 172 properties: 209 - opmode: 173 + op-mode: 210 174 enum: 211 175 - 0 212 - 213 176 then: 214 177 required: 215 178 - tdm-slots 179 + 180 + - if: 181 + properties: 182 + op-mode: 183 + const: 1 184 + then: 185 + properties: 186 + tdm-slots: false 187 + tdm-slots-rx: false 188 + ti,async-mode: false 189 + auxclk-fs-ratio-rx: false 190 + 191 + - if: 192 + required: 193 + - tdm-slots-rx 194 + then: 195 + required: 196 + - ti,async-mode 197 + 198 + - if: 199 + required: 200 + - auxclk-fs-ratio-rx 201 + then: 202 + required: 203 + - ti,async-mode 216 204 217 205 unevaluatedProperties: false 218 206 ··· 250 190 interrupt-names = "tx", "rx"; 251 191 op-mode = <0>; /* MCASP_IIS_MODE */ 252 192 tdm-slots = <2>; 193 + ti,async-mode; 253 194 dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>; 254 195 dma-names = "tx", "rx"; 255 196 serial-dir = <