summaryrefstree
path: root/kernel/Documentation/devicetree/bindings/sound/cs35l41.txt
blob: c77346cb82de08935978842a4c387c26ad4b5eca (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
CS35L41 Speaker Amplifier

Required properties:

  - compatible : "cirrus,cs35l41"

  - reg : the SPI chip select line for the device

  - VA-supply, VP-supply : power supplies for the device,
    as covered in
    Documentation/devicetree/bindings/regulator/regulator.txt.

Optional properties:
  - cirrus,sclk-force-output : Audio serial port SCLK force
  output control. Forces the SCLK to continue to drive even
  if no ASP_TXn channels are enabled.

  - cirrus,lrclk-force-output : Audio serial port LRCLK force
  output control. Forces the LRCLK to continue to drive even
  if no ASP_TXn channels are enabled.

  - cirrus,right-channel-amp : Boolean to determine which channel
  the amplifier is to receive the audio data on. If present the
  amplifier receives data on the right channel of I2S data.
  If not present the amplifier receives data on the left
  channel of I2S data

  - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the
  boost converter's output voltage in mV. The range is from 2550 mV to
  11000 mV with increments of 50 mV.
  (Default) VP

  - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
  Configures the peak current by monitoring the current through the boost FET.
  Range starts at 1600 mA and goes to a maximum of 4500 mA with increments
  of 50 mA.
  (Default) 4.50 Amps

  - cirrus,amp-gain-zc : Boolean to determine whether to use the amplifier
  gain-change zero-crossing feature. If the feature is enabled, any
  user-controlled amplifier gain change will occur on a zero-crossing point.
  (Default) Disabled

  - cirrus,asp-sdout-hiz : Audio serial port SDOUT Hi-Z control. Sets the Hi-Z
  configuration for SDOUT pin of amplifier.

  0 = Logic 0 during unused slots, and while all transmit channels disabled
  1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled
  2 = (Default) Logic 0 during unused slots, but Hi-Z while all transmit channels disabled
  3 = Hi-Z during unused slots and while all transmit channels disabled


  - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold.
  Configures the threshold at which the overtemperature warning condition occurs.
  When the threshold is met, the ovetemperature warning attenuation is applied
  and the TEMP_WARN_EINT interrupt status bit is set.
  If TEMP_WARN_MASK = 0, INTb is asserted.

  0 = 105C
  1 = 115C
  2 = 125C (Default)
  3 = 135C

  - cirrus,hw-noise-gate-select : Hardware Noise Gate feature. Each bit selects
  a different block for detection.

  000000 - All noise gating functionality disbled
  xxxxx1 - Amplifier noise gating detection enabled
  xxxx1x - Boost converter DCM detection enabled
  xxx1xx - VMON low power mode detection enabled
  xx1xxx - IMON low power mode detection enabled
  x1xxxx - VP brownout prevention detection enabled
  1xxxxx - VBST brownout prevention detection enabled

  - cirrus,hw-noise-gate-delay : Time that the incoming audio signal must be
  below the noise gate threshold prior to entering a noise gated state

  0 = 5 ms
  1 = 10 ms
  2 = 25 ms
  3 = 50 ms (default)
  4 = 100 ms
  5 = 250 ms
  6 = 500 ms
  7 = 1 s

  - cirrus,hw-noise-gate-threshold : Threshold of audio signal input which the
  noise gate considers the input audio to be at a low enough level to be
  valid to enter a noise gating state of operation.

  0 = 0.654 mVpk
  1 = 0.328 mVpk
  2 = 0.164 mVpk
  3 = 0.082 mVpk (default)
  4 = 0.041 mVpk
  5 = 0.021 mVpk
  6 = 0.010 mVpk
  7 = True zero data (no LSB dither)

  - cirrus,dsp-noise-gate-enable : DSP Noise Gate feature. If present, noise
  gate feature will be enabled.

  - cirrus,dsp-noise-gate-threshold : Threshold of audio signal input which the
  noise gate considers the input audio to be at a low enough level to be
  valid to enter a noise gating state of operation.

  0 = -66 dBFS
  1 = -72 dBFS
  2 = -78 dBFS
  3 = -84 dBFS (default)
  4 = -90 dBFS
  5 = -96 dBFS
  6 = -102 dBFS
  7 = -108 dBFS

  - cirrus,dsp-noise-gate-delay : Time that the incoming audio signal must be
  below the noise gate threshold prior to entering a noise gated state

  0 = 5 ms
  1 = 10 ms
  2 = 25 ms
  3 = 50 ms (default)
  4 = 100 ms
  5 = 250 ms
  6 = 500 ms
  7 = 1 s
  8 = 5 s
  9 = 10 s
  10 = 20 s
  11 = 30 s
  12 = 40 s
  13 = 50 s
  14 = 60 s
  15 = 120 s

  - cirrus,invert-pcm : Invert PCM data before output

Optional H/G Algorithm sub-node:

  The cs35l41 node can have a single "cirrus,classh-internal-algo" sub-node
  that will disable automatic control of the internal H/G Algorithm.

  It is strongly recommended that the Datasheet be referenced when adjusting
  or using these Class H Algorithm controls over the internal Algorithm.
  Serious damage can occur to the Device and surrounding components.

  - cirrus,classh-internal-algo : Sub-node for the Internal Class H Algorithm
  See Section 4.4 Internal Class H Algorithm in the Datasheet.
  If not used, the device manages the ClassH Algorithm internally.

Optional properties for the "cirrus,classh-internal-algo" Sub-node

  Section 7.9 Boost Control
  - cirrus,classh-bst-overide : Boolean
  - cirrus,classh-bst-max-limit

  Section 7.17 Class H, Weak-FET Control
  - cirrus,classh-headroom
  - cirrus,classh-release-rate
  - cirrus,classh-mem-depth
  - cirrus,classh-wk-fet-delay
  - cirrus,classh-wk-fet-thld


Optional GPIO1 sub-node:

The cs35l41 node can have an single "cirrus,gpio-config1" sub-node for
configuring the GPIO1 pin.

- cirrus,gpio-polarity-invert : Boolean which specifies whether the GPIO1
level is inverted. If this property is not present the level is not inverted.

- cirrus,gpio-output-enable : Boolean which specifies whether the GPIO1 pin
is configured as an output. If this property is not present the
pin will be configured as an input.

- cirrus,gpio-src-select : Configures the function of the GPIO1 pin.
Note that the options are different from the GPIO2 pin.

0 = High Impedance (Default)
1 = GPIO
2 = Sync
3 = MCLK input


Optional GPIO2 sub-node:

The cs35l41 node can have an single "cirrus,gpio-config2" sub-node for
configuring the GPIO1 pin.

- cirrus,gpio-polarity-invert : Boolean which specifies whether the GPIO2
level is inverted. If this property is not present the level is not inverted.

- cirrus,gpio-output-enable : Boolean which specifies whether the GPIO2 pin
is configured as an output. If this property is not present the
pin will be configured as an input.

- cirrus,gpio-src-select : Configures the function of the GPIO2 pin.
Note that the options are different from the GPIO1 pin.

0 = High Impedance (Default)
1 = GPIO
2 = Open Drain INTB
3 = MCLK input
4 = Push-pull INTB (active low)
5 = Push-pull INT (active high)


Example:

cs35l41: cs35l41@2 {
	compatible = "cirrus,cs35l41";
	reg = <2>;
	VA-supply = <&dummy_vreg>;
	VP-supply = <&dummy_vreg>;
};

Optional Fixed HW Params sub-node:

The cs35l41 node can have a single "cirrus,fixed-hw-params" sub-node for
setting the HW params to a fixed rate, width, and word-length.

Example:

  cirrus,fixed-hw-params {
    cirrus,fixed-rate = <48000>;
    cirrus,fixed-width = <16>;
    cirrus,fixed-wl = <16>;
  };