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