xref: /linux/Documentation/devicetree/bindings/sound/cs35l35.txt (revision 95a0c7c2d6cfde3fb5fdb713428ed0df4d6bdd58)
1CS35L35 Boosted Speaker Amplifier
2
3Required properties:
4
5  - compatible : "cirrus,cs35l35"
6
7  - reg : the I2C address of the device for I2C
8
9  - VA-supply, VP-supply : power supplies for the device,
10    as covered in
11    Documentation/devicetree/bindings/regulator/regulator.txt.
12
13  - interrupt-parent : Specifies the phandle of the interrupt controller to
14    which the IRQs from CS35L35 are delivered to.
15  - interrupts : IRQ line info CS35L35.
16    (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
17    for further information relating to interrupt properties)
18
19 - cirrus,boost-ind-nanohenry: Inductor value for boost converter. The value is
20    in nH and they can be values of 1000nH, 1200nH, 1500nH, and 2200nH.
21
22Optional properties:
23  - reset-gpios : gpio used to reset the amplifier
24
25  - cirrus,stereo-config : Boolean to determine if there are 2 AMPs for a
26  Stereo configuration
27
28  - cirrus,audio-channel : Set Location of Audio Signal on Serial Port
29  0 = Data Packet received on Left I2S Channel
30  1 = Data Packet received on Right I2S Channel
31
32  - cirrus,advisory-channel : Set Location of Advisory Signal on Serial Port
33  0 = Data Packet received on Left I2S Channel
34  1 = Data Packet received on Right I2S Channel
35
36  - cirrus,shared-boost : Boolean to enable ClassH tracking of Advisory Signal
37  if 2 Devices share Boost BST_CTL
38
39  - cirrus,external-boost : Boolean to specify the device is using an external
40  boost supply, note that sharing a boost from another cs35l35 would constitute
41  using an external supply for the slave device
42
43  - cirrus,sp-drv-strength : Value for setting the Serial Port drive strength
44  Table 3-10 of the datasheet lists drive-strength specifications
45  0 = 1x (Default)
46  1 = .5x
47  - cirrus,sp-drv-unused : Determines how unused slots should be driven on the
48  Serial Port.
49  0 - Hi-Z
50  2 - Drive 0's (Default)
51  3 - Drive 1's
52
53  - cirrus,bst-pdn-fet-on : Boolean to determine if the Boost PDN control
54  powers down with a rectification FET On or Off. If VSPK is supplied
55  externally then FET is off.
56
57  - cirrus,boost-ctl-millivolt : Boost Voltage Value.  Configures the boost
58    converter's output voltage in mV. The range is from 2600mV to 9000mV with
59    increments of 100mV.
60    (Default) VP
61
62  - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
63  Configures the peak current by monitoring the current through the boost FET.
64  Range starts at 1680mA and goes to a maximum of 4480mA with increments of
65  110mA.
66  (Default) 2.46 Amps
67
68  - cirrus,amp-gain-zc : Boolean to determine if to use Amplifier gain-change
69  zero-cross
70
71Optional H/G Algorithm sub-node:
72
73  The cs35l35 node can have a single "cirrus,classh-internal-algo" sub-node
74  that will disable automatic control of the internal H/G Algorithm.
75
76  It is strongly recommended that the Datasheet be referenced when adjusting
77  or using these Class H Algorithm controls over the internal Algorithm.
78  Serious damage can occur to the Device and surrounding components.
79
80  - cirrus,classh-internal-algo : Sub-node for the Internal Class H Algorithm
81  See Section 4.3 Internal Class H Algorithm in the Datasheet.
82  If not used, the device manages the ClassH Algorithm internally.
83
84Optional properties for the "cirrus,classh-internal-algo" Sub-node
85
86  Section 7.29 Class H Control
87  - cirrus,classh-bst-overide : Boolean
88  - cirrus,classh-bst-max-limit
89  - cirrus,classh-mem-depth
90
91  Section 7.30 Class H Headroom Control
92  - cirrus,classh-headroom
93
94  Section 7.31 Class H Release Rate
95  - cirrus,classh-release-rate
96
97  Section 7.32 Class H Weak FET Drive Control
98  - cirrus,classh-wk-fet-disable
99  - cirrus,classh-wk-fet-delay
100  - cirrus,classh-wk-fet-thld
101
102  Section 7.34 Class H VP Control
103  - cirrus,classh-vpch-auto
104  - cirrus,classh-vpch-rate
105  - cirrus,classh-vpch-man
106
107Optional Monitor Signal Format sub-node:
108
109  The cs35l35 node can have a single "cirrus,monitor-signal-format" sub-node
110  for adjusting the Depth, Location and Frame of the Monitoring Signals
111  for Algorithms.
112
113  See Sections 4.8.2 through 4.8.4 Serial-Port Control in the Datasheet
114
115  -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formating
116  on the I2S Port. Each of the 3 8 bit values in the array contain the settings
117  for depth, location, and frame.
118
119  If not used, the defaults for the 6 monitor signals is used.
120
121  Sections 7.44 - 7.53 lists values for the depth, location, and frame
122  for each monitoring signal.
123
124  - cirrus,imon : 4 8 bit values to set the depth, location, frame and ADC
125  scale of the IMON monitor signal.
126
127  - cirrus,vmon : 3 8 bit values to set the depth, location, and frame
128  of the VMON monitor signal.
129
130  - cirrus,vpmon : 3 8 bit values to set the depth, location, and frame
131  of the VPMON monitor signal.
132
133  - cirrus,vbstmon : 3 8 bit values to set the depth, location, and frame
134  of the VBSTMON monitor signal
135
136  - cirrus,vpbrstat : 3 8 bit values to set the depth, location, and frame
137  of the VPBRSTAT monitor signal
138
139  - cirrus,zerofill : 3 8 bit values to set the depth, location, and frame\
140  of the ZEROFILL packet in the monitor signal
141
142Example:
143
144cs35l35: cs35l35@20 {
145	compatible = "cirrus,cs35l35";
146	reg = <0x20>;
147	VA-supply = <&dummy_vreg>;
148	VP-supply = <&dummy_vreg>;
149	reset-gpios = <&axi_gpio 54 0>;
150	interrupt-parent = <&gpio8>;
151	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
152	cirrus,boost-ctl-millivolt = <9000>;
153
154	cirrus,stereo-config;
155	cirrus,audio-channel = <0x00>;
156	cirrus,advisory-channel = <0x01>;
157	cirrus,shared-boost;
158
159	cirrus,classh-internal-algo {
160		cirrus,classh-bst-overide;
161		cirrus,classh-bst-max-limit = <0x01>;
162		cirrus,classh-mem-depth = <0x01>;
163		cirrus,classh-release-rate = <0x08>;
164		cirrus,classh-headroom-millivolt = <0x0B>;
165		cirrus,classh-wk-fet-disable = <0x01>;
166		cirrus,classh-wk-fet-delay = <0x04>;
167		cirrus,classh-wk-fet-thld = <0x01>;
168		cirrus,classh-vpch-auto = <0x01>;
169		cirrus,classh-vpch-rate = <0x02>;
170		cirrus,classh-vpch-man = <0x05>;
171	};
172
173	/* Depth, Location, Frame */
174	cirrus,monitor-signal-format {
175		cirrus,imon = /bits/ 8 <0x03 0x00 0x01>;
176		cirrus,vmon = /bits/ 8 <0x03 0x00 0x00>;
177		cirrus,vpmon = /bits/ 8 <0x03 0x04 0x00>;
178		cirrus,vbstmon = /bits/ 8 <0x03 0x04 0x01>;
179		cirrus,vpbrstat = /bits/ 8 <0x00 0x04 0x00>;
180		cirrus,zerofill = /bits/ 8 <0x00 0x00 0x00>;
181	};
182
183};
184