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
25allOf:
26  - $ref: dai-common.yaml#
27
28properties:
29  '#sound-dai-cells':
30    description:
31      The first cell indicating the audio interface.
32    const: 1
33
34  cirrus,inmode:
35    description:
36      A list of input mode settings for each input. A maximum
37      of 24 cells, with four cells per input in the order INnAL,
38      INnAR INnBL INnBR.  For non-muxed inputs the first two cells
39      for that input set the mode for the left and right channel
40      and the second two cells must be 0.  For muxed inputs the
41      first two cells for that input set the mode of the left and
42      right A inputs and the second two cells set the mode of the
43      left and right B inputs.  Valid mode values are one of the
44      MADERA_INMODE_xxx. If the array is shorter than the number
45      of inputs the unspecified inputs default to MADERA_INMODE_DIFF.
46    $ref: /schemas/types.yaml#/definitions/uint32-array
47    minItems: 1
48    maxItems: 24
49    items:
50      minimum: 0
51      maximum: 1
52      default: 0
53
54  cirrus,out-mono:
55    description:
56      Mono bit for each output, maximum of six cells if the array
57      is shorter outputs will be set to stereo.
58    $ref: /schemas/types.yaml#/definitions/uint32-array
59    minItems: 1
60    maxItems: 6
61    items:
62      minimum: 0
63      maximum: 1
64      default: 0
65
66  cirrus,dmic-ref:
67    description: |
68      Indicates how the MICBIAS pins have been externally connected
69      to DMICs on each input, one cell per input.
70
71        <IN1 IN2 IN3 ...>
72
73      A value of 0 indicates MICVDD and is the default,
74      other values depend on the codec: For CS47L35 one of the
75      CS47L35_DMIC_REF_xxx values For all other codecs one of
76      the MADERA_DMIC_REF_xxx values Also see the datasheet for a
77      description of the INn_DMIC_SUP field.
78    $ref: /schemas/types.yaml#/definitions/uint32-array
79    minItems: 1
80    maxItems: 6
81    items:
82      minimum: 0
83      maximum: 3
84      default: 0
85
86  cirrus,max-channels-clocked:
87    description:
88      Maximum number of channels that I2S clocks will be generated
89      for. Useful when clock master for systems where the I2S bus
90      has multiple data lines.  One cell for each AIF, use a value
91      of zero for AIFs that should be handled normally.
92    $ref: /schemas/types.yaml#/definitions/uint32-array
93    minItems: 1
94    maxItems: 4
95    items:
96      default: 0
97
98  cirrus,pdm-fmt:
99    description:
100      PDM speaker data format, must contain 2 cells (OUT5 and
101      OUT6). See the PDM_SPKn_FMT field in the datasheet for a
102      description of this value. The second cell is ignored for
103      codecs that do not have OUT6.
104    $ref: /schemas/types.yaml#/definitions/uint32-array
105    minItems: 2
106    maxItems: 2
107
108  cirrus,pdm-mute:
109    description: |
110      PDM mute format, must contain 2 cells (OUT5 and OUT6). See the
111      PDM_SPKn_CTRL_1 register in the datasheet for a description
112      of this value.  The second cell is ignored for codecs that
113      do not have OUT6.
114    $ref: /schemas/types.yaml#/definitions/uint32-array
115    minItems: 2
116    maxItems: 2
117
118additionalProperties: true
119