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