summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/sound/madera.txt
blob: 5e669ce552f4711e770be7c6a365dac14619aa9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Cirrus Logic Madera class audio codecs

This describes audio configuration bindings for these codecs.

See also the core bindings for the parent MFD driver:
See Documentation/devicetree/bindings/mfd/madera.txt

and defines for values used in these bindings:
include/dt-bindings/sound/madera.h

These properties are all contained in the parent MFD node.

Optional properties:
  - cirrus,dmic-ref : Indicates how the MICBIAS pins have been externally
    connected to DMICs on each input, one cell per input.
    <IN1 IN2 IN3 ...>
    A value of 0 indicates MICVDD and is the default, other values depend on the
    codec:
    For CS47L35 one of the CS47L35_DMIC_REF_xxx values
    For all other codecs one of the MADERA_DMIC_REF_xxx values
    Also see the datasheet for a description of the INn_DMIC_SUP field.

  - cirrus,inmode : A list of input mode settings for each input. A maximum of
    16 cells, with four cells per input in the order INnAL, INnAR INnBL INnBR.
    For non-muxed inputs the first two cells for that input set the mode for
    the left and right channel and the second two cells must be 0.
    For muxed inputs the first two cells for that input set the mode of the
    left and right A inputs and the second two cells set the mode of the left
    and right B inputs.
    Valid mode values are one of the MADERA_INMODE_xxx. If the array is shorter
    than the number of inputs the unspecified inputs default to
    MADERA_INMODE_DIFF.

  - cirrus,out-mono : Mono bit for each output, maximum of six cells if the
    array is shorter outputs will be set to stereo.

  - cirrus,max-channels-clocked : Maximum number of channels that I2S clocks
    will be generated for. Useful when clock master for systems where the I2S
    bus has multiple data lines.
    One cell for each AIF, use a value of zero for AIFs that should be handled
    normally.

  - cirrus,pdm-fmt : PDM speaker data format, must contain 2 cells
    (OUT5 and OUT6). See the PDM_SPKn_FMT field in the datasheet for a
    description of this value.
    The second cell is ignored for codecs that do not have OUT6.

  - cirrus,pdm-mute : PDM mute format, must contain 2 cells
    (OUT5 and OUT6). See the PDM_SPKn_CTRL_1 register in the datasheet for a
    description of this value.
    The second cell is ignored for codecs that do not have OUT6.

Example:

cs47l35@0 {
	compatible = "cirrus,cs47l35";

	cirrus,dmic-ref = <0 0 CS47L35_DMIC_REF_MICBIAS1B 0>;
	cirrus,inmode = <
		MADERA_INMODE_DMIC MADERA_INMODE_DMIC /* IN1A digital */
		MADERA_INMODE_SE   MADERA_INMODE_SE   /* IN1B single-ended */
		MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2 differential */
		0 0 	/* not used on this codec */
	>;
	cirrus,out-mono = <0 0 0 0 0 0>;
	cirrus,max-channels-clocked = <2 0 0>;
};