| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/sound/davinci-mcasp-audio.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: McASP Controller for TI SoCs |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Jayesh Choudhary <[email protected]> |
| 11 |
|
| 12 |
properties: |
| 13 |
compatible: |
| 14 |
enum: |
| 15 |
- ti,dm646x-mcasp-audio |
| 16 |
- ti,da830-mcasp-audio |
| 17 |
- ti,am33xx-mcasp-audio |
| 18 |
- ti,dra7-mcasp-audio |
| 19 |
- ti,omap4-mcasp-audio |
| 20 |
|
| 21 |
reg: |
| 22 |
minItems: 1 |
| 23 |
items: |
| 24 |
- description: CFG registers |
| 25 |
- description: data registers |
| 26 |
|
| 27 |
reg-names: |
| 28 |
minItems: 1 |
| 29 |
items: |
| 30 |
- const: mpu |
| 31 |
- const: dat |
| 32 |
|
| 33 |
op-mode: |
| 34 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 35 |
description: 0 - I2S or 1 - DIT operation mode |
| 36 |
enum: |
| 37 |
- 0 |
| 38 |
- 1 |
| 39 |
|
| 40 |
tdm-slots: |
| 41 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 42 |
description: |
| 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. |
| 47 |
minimum: 2 |
| 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 |
| 69 |
|
| 70 |
serial-dir: |
| 71 |
description: |
| 72 |
A list of serializer configuration |
| 73 |
Entry is indication for serializer pin direction |
| 74 |
0 - Inactive, 1 - TX, 2 - RX |
| 75 |
All AXR pins should be present in the array even if inactive |
| 76 |
$ref: /schemas/types.yaml#/definitions/uint32-array |
| 77 |
minItems: 1 |
| 78 |
maxItems: 25 |
| 79 |
items: |
| 80 |
minimum: 0 |
| 81 |
maximum: 2 |
| 82 |
|
| 83 |
dmas: |
| 84 |
minItems: 1 |
| 85 |
items: |
| 86 |
- description: transmission DMA channel |
| 87 |
- description: reception DMA channel |
| 88 |
|
| 89 |
dma-names: |
| 90 |
minItems: 1 |
| 91 |
items: |
| 92 |
- const: tx |
| 93 |
- const: rx |
| 94 |
|
| 95 |
ti,hwmods: |
| 96 |
$ref: /schemas/types.yaml#/definitions/string |
| 97 |
description: Name of hwmod associated with McASP |
| 98 |
maxItems: 1 |
| 99 |
deprecated: true |
| 100 |
|
| 101 |
tx-num-evt: |
| 102 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 103 |
description: |
| 104 |
configures WFIFO threshold |
| 105 |
0 disables the FIFO use |
| 106 |
if property is missing, then also FIFO use is disabled |
| 107 |
|
| 108 |
rx-num-evt: |
| 109 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 110 |
description: |
| 111 |
configures RFIFO threshold |
| 112 |
0 disables the FIFO use |
| 113 |
if property is missing, then also FIFO use is disabled |
| 114 |
|
| 115 |
dismod: |
| 116 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 117 |
description: |
| 118 |
specify the drive on TX pin during inactive time slots |
| 119 |
0 - 3-state, 2 - logic low, 3 - logic high |
| 120 |
enum: |
| 121 |
- 0 |
| 122 |
- 2 |
| 123 |
- 3 |
| 124 |
default: 2 |
| 125 |
|
| 126 |
interrupts: |
| 127 |
minItems: 1 |
| 128 |
maxItems: 2 |
| 129 |
|
| 130 |
interrupt-names: |
| 131 |
oneOf: |
| 132 |
- description: TX interrupt |
| 133 |
const: tx |
| 134 |
- description: RX interrupt |
| 135 |
const: rx |
| 136 |
- description: TX and RX interrupts |
| 137 |
items: |
| 138 |
- const: tx |
| 139 |
- const: rx |
| 140 |
- description: Common/combined interrupt |
| 141 |
const: common |
| 142 |
|
| 143 |
fck_parent: |
| 144 |
$ref: /schemas/types.yaml#/definitions/string |
| 145 |
description: parent clock name for McASP fck |
| 146 |
maxItems: 1 |
| 147 |
|
| 148 |
auxclk-fs-ratio: |
| 149 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 150 |
description: |
| 151 |
Ratio of AUCLK and FS rate if applicable. This property specifies |
| 152 |
the TX ratio, along with default RX ratio if auxclk-fs-ratio-rx |
| 153 |
is not specified. |
| 154 |
When not specified, the inputted system clock frequency via set_sysclk |
| 155 |
callback by the machine driver is used for divider calculation. |
| 156 |
|
| 157 |
auxclk-fs-ratio-rx: |
| 158 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 159 |
description: |
| 160 |
Ratio of AUCLK and FS rate for RX. If specified, allows |
| 161 |
for a different RX ratio. Requires ti,async-mode to be |
| 162 |
enabled when the ratio differs from auxclk-fs-ratio. |
| 163 |
When not specified, it defaults to the value of auxclk-fs-ratio. |
| 164 |
The property is ignored in DIT mode. |
| 165 |
|
| 166 |
gpio-controller: true |
| 167 |
|
| 168 |
"#gpio-cells": |
| 169 |
const: 2 |
| 170 |
|
| 171 |
clocks: |
| 172 |
minItems: 1 |
| 173 |
items: |
| 174 |
- description: functional clock |
| 175 |
- description: module specific optional ahclkx clock |
| 176 |
- description: module specific optional ahclkr clock |
| 177 |
|
| 178 |
clock-names: |
| 179 |
minItems: 1 |
| 180 |
items: |
| 181 |
- const: fck |
| 182 |
- const: ahclkx |
| 183 |
- const: ahclkr |
| 184 |
|
| 185 |
power-domains: |
| 186 |
description: phandle to the corresponding power-domain |
| 187 |
maxItems: 1 |
| 188 |
|
| 189 |
"#sound-dai-cells": |
| 190 |
const: 0 |
| 191 |
|
| 192 |
port: |
| 193 |
description: connection for when McASP is used via graph card |
| 194 |
type: object |
| 195 |
|
| 196 |
required: |
| 197 |
- compatible |
| 198 |
- reg |
| 199 |
- reg-names |
| 200 |
- dmas |
| 201 |
- dma-names |
| 202 |
- interrupts |
| 203 |
- interrupt-names |
| 204 |
|
| 205 |
allOf: |
| 206 |
- $ref: dai-common.yaml# |
| 207 |
- if: |
| 208 |
properties: |
| 209 |
op-mode: |
| 210 |
enum: |
| 211 |
- 0 |
| 212 |
then: |
| 213 |
required: |
| 214 |
- tdm-slots |
| 215 |
|
| 216 |
- if: |
| 217 |
properties: |
| 218 |
op-mode: |
| 219 |
const: 1 |
| 220 |
then: |
| 221 |
properties: |
| 222 |
tdm-slots: false |
| 223 |
tdm-slots-rx: false |
| 224 |
ti,async-mode: false |
| 225 |
auxclk-fs-ratio-rx: false |
| 226 |
|
| 227 |
- if: |
| 228 |
required: |
| 229 |
- tdm-slots-rx |
| 230 |
then: |
| 231 |
required: |
| 232 |
- ti,async-mode |
| 233 |
|
| 234 |
- if: |
| 235 |
required: |
| 236 |
- auxclk-fs-ratio-rx |
| 237 |
then: |
| 238 |
required: |
| 239 |
- ti,async-mode |
| 240 |
|
| 241 |
unevaluatedProperties: false |
| 242 |
|
| 243 |
examples: |
| 244 |
- | |
| 245 |
mcasp0: mcasp0@1d00000 { |
| 246 |
compatible = "ti,da830-mcasp-audio"; |
| 247 |
reg = <0x100000 0x3000>; |
| 248 |
reg-names = "mpu"; |
| 249 |
interrupts = <82>, <83>; |
| 250 |
interrupt-names = "tx", "rx"; |
| 251 |
op-mode = <0>; /* MCASP_IIS_MODE */ |
| 252 |
tdm-slots = <2>; |
| 253 |
ti,async-mode; |
| 254 |
dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>; |
| 255 |
dma-names = "tx", "rx"; |
| 256 |
serial-dir = < |
| 257 |
0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */ |
| 258 |
0 0 0 0 |
| 259 |
0 0 0 1 |
| 260 |
2 0 0 0 >; |
| 261 |
tx-num-evt = <1>; |
| 262 |
rx-num-evt = <1>; |
| 263 |
}; |