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