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