xref: /freebsd/sys/contrib/device-tree/Bindings/sound/davinci-mcasp-audio.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/davinci-mcasp-audio.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
7c9ccf3a3SEmmanuel Vadottitle: McASP Controller for TI SoCs
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Jayesh Choudhary <j-choudhary@ti.com>
11c9ccf3a3SEmmanuel Vadot
12c9ccf3a3SEmmanuel Vadotproperties:
13c9ccf3a3SEmmanuel Vadot  compatible:
14c9ccf3a3SEmmanuel Vadot    enum:
15c9ccf3a3SEmmanuel Vadot      - ti,dm646x-mcasp-audio
16c9ccf3a3SEmmanuel Vadot      - ti,da830-mcasp-audio
17c9ccf3a3SEmmanuel Vadot      - ti,am33xx-mcasp-audio
18c9ccf3a3SEmmanuel Vadot      - ti,dra7-mcasp-audio
19c9ccf3a3SEmmanuel Vadot      - ti,omap4-mcasp-audio
20c9ccf3a3SEmmanuel Vadot
21c9ccf3a3SEmmanuel Vadot  reg:
22c9ccf3a3SEmmanuel Vadot    minItems: 1
23c9ccf3a3SEmmanuel Vadot    items:
24c9ccf3a3SEmmanuel Vadot      - description: CFG registers
25c9ccf3a3SEmmanuel Vadot      - description: data registers
26c9ccf3a3SEmmanuel Vadot
27c9ccf3a3SEmmanuel Vadot  reg-names:
28c9ccf3a3SEmmanuel Vadot    minItems: 1
29c9ccf3a3SEmmanuel Vadot    items:
30c9ccf3a3SEmmanuel Vadot      - const: mpu
31c9ccf3a3SEmmanuel Vadot      - const: dat
32c9ccf3a3SEmmanuel Vadot
33c9ccf3a3SEmmanuel Vadot  op-mode:
34c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
35c9ccf3a3SEmmanuel Vadot    description: 0 - I2S or 1 - DIT operation mode
36c9ccf3a3SEmmanuel Vadot    enum:
37c9ccf3a3SEmmanuel Vadot      - 0
38c9ccf3a3SEmmanuel Vadot      - 1
39c9ccf3a3SEmmanuel Vadot
40c9ccf3a3SEmmanuel Vadot  tdm-slots:
41c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
42c9ccf3a3SEmmanuel Vadot    description:
43c9ccf3a3SEmmanuel Vadot      number of channels over one serializer
44c9ccf3a3SEmmanuel Vadot      the property is ignored in DIT mode
45c9ccf3a3SEmmanuel Vadot    minimum: 2
46c9ccf3a3SEmmanuel Vadot    maximum: 32
47c9ccf3a3SEmmanuel Vadot
48c9ccf3a3SEmmanuel Vadot  serial-dir:
49c9ccf3a3SEmmanuel Vadot    description:
50c9ccf3a3SEmmanuel Vadot      A list of serializer configuration
51c9ccf3a3SEmmanuel Vadot      Entry is indication for serializer pin direction
52c9ccf3a3SEmmanuel Vadot      0 - Inactive, 1 - TX, 2 - RX
53c9ccf3a3SEmmanuel Vadot      All AXR pins should be present in the array even if inactive
54c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
55c9ccf3a3SEmmanuel Vadot    minItems: 1
56c9ccf3a3SEmmanuel Vadot    maxItems: 25
57c9ccf3a3SEmmanuel Vadot    items:
58c9ccf3a3SEmmanuel Vadot      minimum: 0
59c9ccf3a3SEmmanuel Vadot      maximum: 2
60c9ccf3a3SEmmanuel Vadot
61c9ccf3a3SEmmanuel Vadot  dmas:
62c9ccf3a3SEmmanuel Vadot    minItems: 1
63c9ccf3a3SEmmanuel Vadot    items:
64c9ccf3a3SEmmanuel Vadot      - description: transmission DMA channel
65c9ccf3a3SEmmanuel Vadot      - description: reception DMA channel
66c9ccf3a3SEmmanuel Vadot
67c9ccf3a3SEmmanuel Vadot  dma-names:
68c9ccf3a3SEmmanuel Vadot    minItems: 1
69c9ccf3a3SEmmanuel Vadot    items:
70c9ccf3a3SEmmanuel Vadot      - const: tx
71c9ccf3a3SEmmanuel Vadot      - const: rx
72c9ccf3a3SEmmanuel Vadot
73c9ccf3a3SEmmanuel Vadot  ti,hwmods:
74c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
75c9ccf3a3SEmmanuel Vadot    description: Name of hwmod associated with McASP
76c9ccf3a3SEmmanuel Vadot    maxItems: 1
77c9ccf3a3SEmmanuel Vadot    deprecated: true
78c9ccf3a3SEmmanuel Vadot
79c9ccf3a3SEmmanuel Vadot  tx-num-evt:
80c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
81c9ccf3a3SEmmanuel Vadot    description:
82c9ccf3a3SEmmanuel Vadot      configures WFIFO threshold
83c9ccf3a3SEmmanuel Vadot      0 disables the FIFO use
84c9ccf3a3SEmmanuel Vadot      if property is missing, then also FIFO use is disabled
85c9ccf3a3SEmmanuel Vadot
86c9ccf3a3SEmmanuel Vadot  rx-num-evt:
87c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
88c9ccf3a3SEmmanuel Vadot    description:
89c9ccf3a3SEmmanuel Vadot      configures RFIFO threshold
90c9ccf3a3SEmmanuel Vadot      0 disables the FIFO use
91c9ccf3a3SEmmanuel Vadot      if property is missing, then also FIFO use is disabled
92c9ccf3a3SEmmanuel Vadot
93c9ccf3a3SEmmanuel Vadot  dismod:
94c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
95c9ccf3a3SEmmanuel Vadot    description:
96c9ccf3a3SEmmanuel Vadot      specify the drive on TX pin during inactive time slots
97c9ccf3a3SEmmanuel Vadot      0 - 3-state, 2 - logic low, 3 - logic high
98c9ccf3a3SEmmanuel Vadot    enum:
99c9ccf3a3SEmmanuel Vadot      - 0
100c9ccf3a3SEmmanuel Vadot      - 2
101c9ccf3a3SEmmanuel Vadot      - 3
102c9ccf3a3SEmmanuel Vadot    default: 2
103c9ccf3a3SEmmanuel Vadot
104c9ccf3a3SEmmanuel Vadot  interrupts:
105c9ccf3a3SEmmanuel Vadot    anyOf:
106c9ccf3a3SEmmanuel Vadot      - minItems: 1
107c9ccf3a3SEmmanuel Vadot        items:
108c9ccf3a3SEmmanuel Vadot          - description: TX interrupt
109c9ccf3a3SEmmanuel Vadot          - description: RX interrupt
110c9ccf3a3SEmmanuel Vadot      - items:
111c9ccf3a3SEmmanuel Vadot          - description: common/combined interrupt
112c9ccf3a3SEmmanuel Vadot
113c9ccf3a3SEmmanuel Vadot  interrupt-names:
114c9ccf3a3SEmmanuel Vadot    oneOf:
115c9ccf3a3SEmmanuel Vadot      - minItems: 1
116c9ccf3a3SEmmanuel Vadot        items:
117c9ccf3a3SEmmanuel Vadot          - const: tx
118c9ccf3a3SEmmanuel Vadot          - const: rx
119c9ccf3a3SEmmanuel Vadot      - const: common
120c9ccf3a3SEmmanuel Vadot
121c9ccf3a3SEmmanuel Vadot  fck_parent:
122c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
123c9ccf3a3SEmmanuel Vadot    description: parent clock name for McASP fck
124c9ccf3a3SEmmanuel Vadot    maxItems: 1
125c9ccf3a3SEmmanuel Vadot
126c9ccf3a3SEmmanuel Vadot  auxclk-fs-ratio:
127c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
128c9ccf3a3SEmmanuel Vadot    description: ratio of AUCLK and FS rate if applicable
129c9ccf3a3SEmmanuel Vadot
130c9ccf3a3SEmmanuel Vadot  gpio-controller: true
131c9ccf3a3SEmmanuel Vadot
132c9ccf3a3SEmmanuel Vadot  "#gpio-cells":
133c9ccf3a3SEmmanuel Vadot    const: 2
134c9ccf3a3SEmmanuel Vadot
135c9ccf3a3SEmmanuel Vadot  clocks:
136c9ccf3a3SEmmanuel Vadot    minItems: 1
137c9ccf3a3SEmmanuel Vadot    items:
138c9ccf3a3SEmmanuel Vadot      - description: functional clock
139c9ccf3a3SEmmanuel Vadot      - description: module specific optional ahclkx clock
140c9ccf3a3SEmmanuel Vadot      - description: module specific optional ahclkr clock
141c9ccf3a3SEmmanuel Vadot
142c9ccf3a3SEmmanuel Vadot  clock-names:
143c9ccf3a3SEmmanuel Vadot    minItems: 1
144c9ccf3a3SEmmanuel Vadot    items:
145c9ccf3a3SEmmanuel Vadot      - const: fck
146c9ccf3a3SEmmanuel Vadot      - const: ahclkx
147c9ccf3a3SEmmanuel Vadot      - const: ahclkr
148c9ccf3a3SEmmanuel Vadot
149c9ccf3a3SEmmanuel Vadot  power-domains:
150c9ccf3a3SEmmanuel Vadot    description: phandle to the corresponding power-domain
151c9ccf3a3SEmmanuel Vadot    maxItems: 1
152c9ccf3a3SEmmanuel Vadot
153c9ccf3a3SEmmanuel Vadot  "#sound-dai-cells":
154c9ccf3a3SEmmanuel Vadot    const: 0
155c9ccf3a3SEmmanuel Vadot
156c9ccf3a3SEmmanuel Vadot  port:
157c9ccf3a3SEmmanuel Vadot    description: connection for when McASP is used via graph card
158c9ccf3a3SEmmanuel Vadot    type: object
159c9ccf3a3SEmmanuel Vadot
160c9ccf3a3SEmmanuel Vadotrequired:
161c9ccf3a3SEmmanuel Vadot  - compatible
162c9ccf3a3SEmmanuel Vadot  - reg
163c9ccf3a3SEmmanuel Vadot  - reg-names
164c9ccf3a3SEmmanuel Vadot  - dmas
165c9ccf3a3SEmmanuel Vadot  - dma-names
166c9ccf3a3SEmmanuel Vadot  - interrupts
167c9ccf3a3SEmmanuel Vadot  - interrupt-names
168c9ccf3a3SEmmanuel Vadot
169c9ccf3a3SEmmanuel VadotallOf:
170*8bab661aSEmmanuel Vadot  - $ref: dai-common.yaml#
171c9ccf3a3SEmmanuel Vadot  - if:
172c9ccf3a3SEmmanuel Vadot      properties:
173c9ccf3a3SEmmanuel Vadot        opmode:
174c9ccf3a3SEmmanuel Vadot          enum:
175c9ccf3a3SEmmanuel Vadot            - 0
176c9ccf3a3SEmmanuel Vadot
177c9ccf3a3SEmmanuel Vadot    then:
178c9ccf3a3SEmmanuel Vadot      required:
179c9ccf3a3SEmmanuel Vadot        - tdm-slots
180c9ccf3a3SEmmanuel Vadot
181*8bab661aSEmmanuel VadotunevaluatedProperties: false
182c9ccf3a3SEmmanuel Vadot
183c9ccf3a3SEmmanuel Vadotexamples:
184c9ccf3a3SEmmanuel Vadot  - |
185c9ccf3a3SEmmanuel Vadot    mcasp0: mcasp0@1d00000 {
186c9ccf3a3SEmmanuel Vadot      compatible = "ti,da830-mcasp-audio";
187c9ccf3a3SEmmanuel Vadot      reg = <0x100000 0x3000>;
188c9ccf3a3SEmmanuel Vadot      reg-names = "mpu";
189c9ccf3a3SEmmanuel Vadot      interrupts = <82>, <83>;
190c9ccf3a3SEmmanuel Vadot      interrupt-names = "tx", "rx";
191c9ccf3a3SEmmanuel Vadot      op-mode = <0>;		/* MCASP_IIS_MODE */
192c9ccf3a3SEmmanuel Vadot      tdm-slots = <2>;
193c9ccf3a3SEmmanuel Vadot      dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>;
194c9ccf3a3SEmmanuel Vadot      dma-names = "tx", "rx";
195c9ccf3a3SEmmanuel Vadot      serial-dir = <
196c9ccf3a3SEmmanuel Vadot          0 0 0 0	/* 0: INACTIVE, 1: TX, 2: RX */
197c9ccf3a3SEmmanuel Vadot          0 0 0 0
198c9ccf3a3SEmmanuel Vadot          0 0 0 1
199c9ccf3a3SEmmanuel Vadot          2 0 0 0 >;
200c9ccf3a3SEmmanuel Vadot      tx-num-evt = <1>;
201c9ccf3a3SEmmanuel Vadot      rx-num-evt = <1>;
202c9ccf3a3SEmmanuel Vadot    };
203