summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/sound/cs35l35.txt
blob: 7915897f8a81bbb5df41395eaf3ff1020c3c2678 (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
CS35L35 Boosted Speaker Amplifier

Required properties:

  - compatible : "cirrus,cs35l35"

  - reg : the I2C address of the device for I2C

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

  - interrupts : IRQ line info CS35L35.
    (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
    for further information relating to interrupt properties)

 - cirrus,boost-ind-nanohenry: Inductor value for boost converter. The value is
    in nH and they can be values of 1000nH, 1200nH, 1500nH, and 2200nH.

Optional properties:
  - reset-gpios : gpio used to reset the amplifier

  - cirrus,stereo-config : Boolean to determine if there are 2 AMPs for a
  Stereo configuration

  - cirrus,audio-channel : Set Location of Audio Signal on Serial Port
  0 = Data Packet received on Left I2S Channel
  1 = Data Packet received on Right I2S Channel

  - cirrus,advisory-channel : Set Location of Advisory Signal on Serial Port
  0 = Data Packet received on Left I2S Channel
  1 = Data Packet received on Right I2S Channel

  - cirrus,shared-boost : Boolean to enable ClassH tracking of Advisory Signal
  if 2 Devices share Boost BST_CTL

  - cirrus,external-boost : Boolean to specify the device is using an external
  boost supply, note that sharing a boost from another cs35l35 would constitute
  using an external supply for the slave device

  - cirrus,sp-drv-strength : Value for setting the Serial Port drive strength
  Table 3-10 of the datasheet lists drive-strength specifications
  0 = 1x (Default)
  1 = .5x
  - cirrus,sp-drv-unused : Determines how unused slots should be driven on the
  Serial Port.
  0 - Hi-Z
  2 - Drive 0's (Default)
  3 - Drive 1's

  - cirrus,bst-pdn-fet-on : Boolean to determine if the Boost PDN control
  powers down with a rectification FET On or Off. If VSPK is supplied
  externally then FET is off.

  - cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
    converter's output voltage in mV. The range is from 2600mV to 9000mV with
    increments of 100mV.
    (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 1680mA and goes to a maximum of 4480mA with increments of
  110mA.
  (Default) 2.46 Amps

  - cirrus,amp-gain-zc : Boolean to determine if to use Amplifier gain-change
  zero-cross

Optional H/G Algorithm sub-node:

  The cs35l35 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.3 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.29 Class H Control
  - cirrus,classh-bst-overide : Boolean
  - cirrus,classh-bst-max-limit
  - cirrus,classh-mem-depth

  Section 7.30 Class H Headroom Control
  - cirrus,classh-headroom

  Section 7.31 Class H Release Rate
  - cirrus,classh-release-rate

  Section 7.32 Class H Weak FET Drive Control
  - cirrus,classh-wk-fet-disable
  - cirrus,classh-wk-fet-delay
  - cirrus,classh-wk-fet-thld

  Section 7.34 Class H VP Control
  - cirrus,classh-vpch-auto
  - cirrus,classh-vpch-rate
  - cirrus,classh-vpch-man

Optional Monitor Signal Format sub-node:

  The cs35l35 node can have a single "cirrus,monitor-signal-format" sub-node
  for adjusting the Depth, Location and Frame of the Monitoring Signals
  for Algorithms.

  See Sections 4.8.2 through 4.8.4 Serial-Port Control in the Datasheet

  -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formating
  on the I2S Port. Each of the 3 8 bit values in the array contain the settings
  for depth, location, and frame.

  If not used, the defaults for the 6 monitor signals is used.

  Sections 7.44 - 7.53 lists values for the depth, location, and frame
  for each monitoring signal.

  - cirrus,imon : 4 8 bit values to set the depth, location, frame and ADC
  scale of the IMON monitor signal.

  - cirrus,vmon : 3 8 bit values to set the depth, location, and frame
  of the VMON monitor signal.

  - cirrus,vpmon : 3 8 bit values to set the depth, location, and frame
  of the VPMON monitor signal.

  - cirrus,vbstmon : 3 8 bit values to set the depth, location, and frame
  of the VBSTMON monitor signal

  - cirrus,vpbrstat : 3 8 bit values to set the depth, location, and frame
  of the VPBRSTAT monitor signal

  - cirrus,zerofill : 3 8 bit values to set the depth, location, and frame\
  of the ZEROFILL packet in the monitor signal

Example:

cs35l35: cs35l35@20 {
	compatible = "cirrus,cs35l35";
	reg = <0x20>;
	VA-supply = <&dummy_vreg>;
	VP-supply = <&dummy_vreg>;
	reset-gpios = <&axi_gpio 54 0>;
	interrupt-parent = <&gpio8>;
	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
	cirrus,boost-ctl-millivolt = <9000>;

	cirrus,stereo-config;
	cirrus,audio-channel = <0x00>;
	cirrus,advisory-channel = <0x01>;
	cirrus,shared-boost;

	cirrus,classh-internal-algo {
		cirrus,classh-bst-overide;
		cirrus,classh-bst-max-limit = <0x01>;
		cirrus,classh-mem-depth = <0x01>;
		cirrus,classh-release-rate = <0x08>;
		cirrus,classh-headroom-millivolt = <0x0B>;
		cirrus,classh-wk-fet-disable = <0x01>;
		cirrus,classh-wk-fet-delay = <0x04>;
		cirrus,classh-wk-fet-thld = <0x01>;
		cirrus,classh-vpch-auto = <0x01>;
		cirrus,classh-vpch-rate = <0x02>;
		cirrus,classh-vpch-man = <0x05>;
	};

	/* Depth, Location, Frame */
	cirrus,monitor-signal-format {
		cirrus,imon = /bits/ 8 <0x03 0x00 0x01>;
		cirrus,vmon = /bits/ 8 <0x03 0x00 0x00>;
		cirrus,vpmon = /bits/ 8 <0x03 0x04 0x00>;
		cirrus,vbstmon = /bits/ 8 <0x03 0x04 0x01>;
		cirrus,vpbrstat = /bits/ 8 <0x00 0x04 0x00>;
		cirrus,zerofill = /bits/ 8 <0x00 0x00 0x00>;
	};

};