1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/cirrus,madera.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Cirrus Logic Madera class audio CODECs
8
9maintainers:
10  - patches@opensource.cirrus.com
11
12description: |
13  This describes audio configuration bindings for these codecs.
14
15  See also the core bindings for the parent MFD driver:
16
17    Documentation/devicetree/bindings/mfd/cirrus,madera.yaml
18
19  and defines for values used in these bindings:
20
21    include/dt-bindings/sound/madera.h
22
23  The properties are all contained in the parent MFD node.
24
25properties:
26  '#sound-dai-cells':
27    description:
28      The first cell indicating the audio interface.
29    const: 1
30
31  cirrus,inmode:
32    description:
33      A list of input mode settings for each input. A maximum
34      of 24 cells, with four cells per input in the order INnAL,
35      INnAR INnBL INnBR.  For non-muxed inputs the first two cells
36      for that input set the mode for the left and right channel
37      and the second two cells must be 0.  For muxed inputs the
38      first two cells for that input set the mode of the left and
39      right A inputs and the second two cells set the mode of the
40      left and right B inputs.  Valid mode values are one of the
41      MADERA_INMODE_xxx. If the array is shorter than the number
42      of inputs the unspecified inputs default to MADERA_INMODE_DIFF.
43    $ref: /schemas/types.yaml#/definitions/uint32-array
44    minItems: 1
45    maxItems: 24
46    items:
47      minimum: 0
48      maximum: 1
49      default: 0
50
51  cirrus,out-mono:
52    description:
53      Mono bit for each output, maximum of six cells if the array
54      is shorter outputs will be set to stereo.
55    $ref: /schemas/types.yaml#/definitions/uint32-array
56    minItems: 1
57    maxItems: 6
58    items:
59      minimum: 0
60      maximum: 1
61      default: 0
62
63  cirrus,dmic-ref:
64    description: |
65      Indicates how the MICBIAS pins have been externally connected
66      to DMICs on each input, one cell per input.
67
68        <IN1 IN2 IN3 ...>
69
70      A value of 0 indicates MICVDD and is the default,
71      other values depend on the codec: For CS47L35 one of the
72      CS47L35_DMIC_REF_xxx values For all other codecs one of
73      the MADERA_DMIC_REF_xxx values Also see the datasheet for a
74      description of the INn_DMIC_SUP field.
75    $ref: /schemas/types.yaml#/definitions/uint32-array
76    minItems: 1
77    maxItems: 6
78    items:
79      minimum: 0
80      maximum: 3
81      default: 0
82
83  cirrus,max-channels-clocked:
84    description:
85      Maximum number of channels that I2S clocks will be generated
86      for. Useful when clock master for systems where the I2S bus
87      has multiple data lines.  One cell for each AIF, use a value
88      of zero for AIFs that should be handled normally.
89    $ref: /schemas/types.yaml#/definitions/uint32-array
90    minItems: 1
91    maxItems: 4
92    items:
93      default: 0
94
95  cirrus,pdm-fmt:
96    description:
97      PDM speaker data format, must contain 2 cells (OUT5 and
98      OUT6). See the PDM_SPKn_FMT field in the datasheet for a
99      description of this value. The second cell is ignored for
100      codecs that do not have OUT6.
101    $ref: /schemas/types.yaml#/definitions/uint32-array
102    minItems: 2
103    maxItems: 2
104
105  cirrus,pdm-mute:
106    description: |
107      PDM mute format, must contain 2 cells (OUT5 and OUT6). See the
108      PDM_SPKn_CTRL_1 register in the datasheet for a description
109      of this value.  The second cell is ignored for codecs that
110      do not have OUT6.
111    $ref: /schemas/types.yaml#/definitions/uint32-array
112    minItems: 2
113    maxItems: 2
114