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